diff --git a/srcpkgs/gpgme/patches/cmake-crossbuild-support.patch b/srcpkgs/gpgme/patches/cmake-crossbuild-support.patch new file mode 100644 index 00000000000..d4fd5353d12 --- /dev/null +++ b/srcpkgs/gpgme/patches/cmake-crossbuild-support.patch @@ -0,0 +1,98 @@ +Cross-building needs that include and library paths to be computed +at this package's build time and not at runtime usage of this cmake support. + +Code inspired from cmake files of KDE Framework 5 various subparts. + +--- lang/cpp/src/GpgmeppConfig.cmake.in.in.ORIG ++++ lang/cpp/src/GpgmeppConfig.cmake.in.in +@@ -58,19 +58,41 @@ + unset(_targetsNotDefined) + unset(_expectedTargets) + ++ ++# Compute the installation prefix relative to this file. ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) ++# Use original install prefix when loaded through a ++# cross-prefix symbolic link such as /lib -> /usr/lib. ++get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH) ++get_filename_component(_realOrig "/usr/lib/cmake/Gpgmepp" REALPATH) ++if(_realCurr STREQUAL _realOrig) ++ set(_IMPORT_PREFIX "/usr/lib/cmake/Gpgmepp") ++endif() ++unset(_realOrig) ++unset(_realCurr) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++if(_IMPORT_PREFIX STREQUAL "/") ++ set(_IMPORT_PREFIX "") ++endif() ++ + # Create imported target Gpgmepp + add_library(Gpgmepp SHARED IMPORTED) + + set_target_properties(Gpgmepp PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@" +- INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@" +- IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@" ++ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/gpgme++" ++ INTERFACE_LINK_LIBRARIES "pthread;${_IMPORT_PREFIX}/lib/libgpgme@libsuffix@;@LIBASSUAN_LIBS@" ++ IMPORTED_LOCATION "${_IMPORT_PREFIX}/lib/libgpgmepp@libsuffix@" + ) + + if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") + endif() + ++# Cleanup temporary variables. ++set(_IMPORT_PREFIX) ++ + # Loop over all imported files and verify that they actually exist + foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) +--- lang/qt/src/QGpgmeConfig.cmake.in.in.ORIG ++++ lang/qt/src/QGpgmeConfig.cmake.in.in +@@ -58,19 +58,41 @@ + unset(_targetsNotDefined) + unset(_expectedTargets) + ++ ++# Compute the installation prefix relative to this file. ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) ++# Use original install prefix when loaded through a ++# cross-prefix symbolic link such as /lib -> /usr/lib. ++get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH) ++get_filename_component(_realOrig "/usr/lib/cmake/QGpgme" REALPATH) ++if(_realCurr STREQUAL _realOrig) ++ set(_IMPORT_PREFIX "/usr/lib/cmake/QGpgme") ++endif() ++unset(_realOrig) ++unset(_realCurr) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++if(_IMPORT_PREFIX STREQUAL "/") ++ set(_IMPORT_PREFIX "") ++endif() ++ + # Create imported target QGpgme + add_library(QGpgme SHARED IMPORTED) + + set_target_properties(QGpgme PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/qgpgme;@resolved_includedir@" ++ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/qgpgme" + INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core" +- IMPORTED_LOCATION "@resolved_libdir@/libqgpgme@libsuffix@" ++ IMPORTED_LOCATION "${_IMPORT_PREFIX}/libqgpgme@libsuffix@" + ) + + if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") + endif() + ++# Cleanup temporary variables. ++set(_IMPORT_PREFIX) ++ + # Loop over all imported files and verify that they actually exist + foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) diff --git a/srcpkgs/gpgme/template b/srcpkgs/gpgme/template index 841092843a0..5eaa7f23b7a 100644 --- a/srcpkgs/gpgme/template +++ b/srcpkgs/gpgme/template @@ -1,7 +1,7 @@ # Template file for 'gpgme' pkgname=gpgme version=1.9.0 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-fd-passing --disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test diff --git a/srcpkgs/kwallet/template b/srcpkgs/kwallet/template index f08eb59bfc0..753cc00cd60 100644 --- a/srcpkgs/kwallet/template +++ b/srcpkgs/kwallet/template @@ -1,7 +1,7 @@ # Template file for 'kwallet' pkgname=kwallet version=5.37.0 -revision=1 +revision=2 build_style=cmake make_build_args="VERBOSE=1" configure_args="-DBUILD_TESTING=OFF" @@ -16,7 +16,6 @@ checksum=5fc368410da498dcd9eb9d5b7119f37c87f3a6b9859bbb2ce4a2ff0cfca0f2d0 if [ -n "$CROSS_BUILD" ]; then hostmakedepends+=" qt5-host-tools qt5-qmake python kdoctools" - broken='CMake Error in tests/kwalletd/CMakeLists.txt: Imported target "Gpgmepp" includes non-existent path "/usr/include/gpgme++"' fi kwallet-devel_package() {