Import mingw-w64-extra-cmake-modules from AUR and update to 5.59.0
This commit is contained in:
parent
8204026137
commit
c3863ba9fb
|
@ -0,0 +1,68 @@
|
|||
From 05aa27dc0e14dab407379a4d22f895e9eff13cc0 Mon Sep 17 00:00:00 2001
|
||||
From: Martchus <martchus@gmx.net>
|
||||
Date: Thu, 29 Dec 2016 13:31:31 +0100
|
||||
Subject: [PATCH] Fix use of Qt5::lconvert and Qt5::lrelease
|
||||
|
||||
This workaround seems to be required
|
||||
for mingw-w64 packages, not sure what's
|
||||
the actual problem, though
|
||||
---
|
||||
modules/ECMCreateQmFromPoFiles.cmake | 6 +++---
|
||||
modules/ECMPoQmTools.cmake | 6 +++---
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake
|
||||
index 4cc1e7b..fc6634e 100644
|
||||
--- a/modules/ECMCreateQmFromPoFiles.cmake
|
||||
+++ b/modules/ECMCreateQmFromPoFiles.cmake
|
||||
@@ -122,12 +122,12 @@ function(_ECM_QM_EXTRACT_LANGUAGE out_language po_file)
|
||||
endfunction()
|
||||
|
||||
function(_ECM_QM_CREATE_TARGET install_destination catalog_name)
|
||||
+ get_target_property(lrelease_location Qt5::lrelease LOCATION)
|
||||
# Find lconvert
|
||||
if(TARGET Qt5::lconvert)
|
||||
- set(lconvert_executable Qt5::lconvert)
|
||||
+ get_target_property(lconvert_executable Qt5::lconvert IMPORTED_LOCATION)
|
||||
else()
|
||||
# Qt < 5.3.1 does not define Qt5::lconvert
|
||||
- get_target_property(lrelease_location Qt5::lrelease LOCATION)
|
||||
get_filename_component(lrelease_path ${lrelease_location} PATH)
|
||||
find_program(lconvert_executable
|
||||
NAMES lconvert-qt5 lconvert
|
||||
@@ -157,7 +157,7 @@ function(_ECM_QM_CREATE_TARGET install_destination catalog_name)
|
||||
add_custom_command(OUTPUT ${qmfile}
|
||||
COMMAND ${lconvert_executable}
|
||||
ARGS -i ${it} -o ${tsfile} -target-language ${language}
|
||||
- COMMAND Qt5::lrelease
|
||||
+ COMMAND ${lrelease_location}
|
||||
ARGS -removeidentical -silent ${tsfile} -qm ${qmfile}
|
||||
DEPENDS ${it}
|
||||
)
|
||||
diff --git a/modules/ECMPoQmTools.cmake b/modules/ECMPoQmTools.cmake
|
||||
index 5bc3b07..95a8afa 100644
|
||||
--- a/modules/ECMPoQmTools.cmake
|
||||
+++ b/modules/ECMPoQmTools.cmake
|
||||
@@ -143,11 +143,11 @@ function(ecm_process_po_files_as_qm lang)
|
||||
# Find lrelease and lconvert
|
||||
find_package(Qt5LinguistTools CONFIG REQUIRED)
|
||||
|
||||
+ get_target_property(lrelease_location Qt5::lrelease LOCATION)
|
||||
if(TARGET Qt5::lconvert)
|
||||
- set(lconvert_executable Qt5::lconvert)
|
||||
+ get_target_property(lconvert_executable Qt5::lconvert IMPORTED_LOCATION)
|
||||
else()
|
||||
# Qt < 5.3.1 does not define Qt5::lconvert
|
||||
- get_target_property(lrelease_location Qt5::lrelease LOCATION)
|
||||
get_filename_component(lrelease_path ${lrelease_location} PATH)
|
||||
find_program(lconvert_executable
|
||||
NAMES lconvert-qt5 lconvert
|
||||
@@ -174,7 +174,7 @@ function(ecm_process_po_files_as_qm lang)
|
||||
add_custom_command(OUTPUT ${qm_file}
|
||||
COMMAND ${lconvert_executable}
|
||||
ARGS -i ${po_file} -o ${ts_file} -target-language ${lang}
|
||||
- COMMAND Qt5::lrelease
|
||||
+ COMMAND ${lrelease_location}
|
||||
ARGS -removeidentical -nounfinished -silent ${ts_file} -qm ${qm_file}
|
||||
DEPENDS ${po_file}
|
||||
)
|
|
@ -0,0 +1,48 @@
|
|||
pkgname=mingw-w64-extra-cmake-modules
|
||||
pkgver=5.59.0
|
||||
pkgrel=1
|
||||
arch=(any)
|
||||
pkgdesc="Extra modules and scripts for CMake (mingw-w64)"
|
||||
groups=(mingw-w64-kf5)
|
||||
license=("LGPL")
|
||||
depends=(mingw-w64-cmake)
|
||||
options=(staticlibs !strip !buildflags)
|
||||
url="https://community.kde.org/Frameworks"
|
||||
source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/extra-cmake-modules-${pkgver}.tar.xz"{,.sig}
|
||||
"set-AUTOSTATICPLUGINS.patch"
|
||||
"05aa27dc0e14dab407379a4d22f895e9eff13cc0.patch")
|
||||
sha256sums=('1a630b242242ac32d20d14e7ae5645aa28a47676eae0e62ed76af8bc1f56c438'
|
||||
'SKIP'
|
||||
'30bdcedab402c69ea0db3460f5a23cbd226a5cd1e12b13926b8a65df773e14a0'
|
||||
'7e44cf56a8274c8166eaf02e60c2d34e5048992a7e3c8309b998b762a394e909')
|
||||
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>
|
||||
|
||||
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
|
||||
|
||||
prepare() {
|
||||
cd extra-cmake-modules-$pkgver
|
||||
|
||||
sed -e 's|/usr/bin/env python|/usr/bin/env python2|' -i find-modules/*.py
|
||||
patch -p1 -i "${srcdir}"/set-AUTOSTATICPLUGINS.patch
|
||||
patch -p1 -i "$srcdir"/05aa27dc0e14dab407379a4d22f895e9eff13cc0.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd extra-cmake-modules-$pkgver
|
||||
for _arch in ${_architectures}; do
|
||||
unset LDFLAGS
|
||||
mkdir "build-${_arch}" && pushd "build-${_arch}"
|
||||
${_arch}-cmake \
|
||||
-DBUILD_HTML_DOCS=OFF \
|
||||
..
|
||||
make
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
for _arch in ${_architectures}; do
|
||||
cd "${srcdir}/${pkgname#mingw-w64-}-$pkgver/build-${_arch}"
|
||||
make DESTDIR="$pkgdir" install
|
||||
done
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
diff -urN extra-cmake-modules-1.5.0.orig/kde-modules/KDECMakeSettings.cmake extra-cmake-modules-1.5.0/kde-modules/KDECMakeSettings.cmake
|
||||
--- extra-cmake-modules-1.5.0.orig/kde-modules/KDECMakeSettings.cmake 2015-01-04 01:35:09.800389800 +0000
|
||||
+++ extra-cmake-modules-1.5.0/kde-modules/KDECMakeSettings.cmake 2015-01-04 01:37:00.535144400 +0000
|
||||
@@ -151,6 +151,11 @@
|
||||
# Since CMake 2.8.6
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
+ # Enable autostaticplugins in MSYS2 qt5-static/cmake
|
||||
+ # Since https://github.com/Alexpux/MINGW-packages/commit/e5517227778695a51bd56df07f1b05c43103ad3f
|
||||
+ # and https://github.com/Alexpux/MINGW-packages/commit/aa8f86ab267446002bcbb59e1455fbdf0d9f1cde
|
||||
+ set(CMAKE_AUTOSTATICPLUGINS ON)
|
||||
+
|
||||
# By default, create 'GUI' executables. This can be reverted on a per-target basis
|
||||
# using ECMMarkNonGuiExecutable
|
||||
# Since CMake 2.8.8
|
Loading…
Reference in New Issue