gpgme: add cross-build support and Qt support
This commit is contained in:
parent
9d6d7111f4
commit
2defdad9a7
5 changed files with 126 additions and 3 deletions
|
@ -647,6 +647,7 @@ libassuan.so.0 libassuan-2.0.1_1
|
|||
libgpgme.so.11 gpgme-1.3.0_1
|
||||
libgpgme-pthread.so.11 gpgme-1.3.0_1
|
||||
libgpgmepp.so.6 gpgmepp-1.7.0_3
|
||||
libqgpgme.so.7 gpgmeqt-1.7.0_3
|
||||
libgarcon-1.so.0 garcon-0.1.12_1
|
||||
libgarcon-gtk2-1.so.0 garcon-0.4.0_1
|
||||
libxfce4ui-1.so.0 libxfce4ui-4.9.2_1
|
||||
|
|
98
srcpkgs/gpgme/patches/cmake-crossbuild-support.patch
Normal file
98
srcpkgs/gpgme/patches/cmake-crossbuild-support.patch
Normal file
|
@ -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@libsuffix@;@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}} )
|
|
@ -1,13 +1,14 @@
|
|||
# Template file for 'gpgme'
|
||||
pkgname=gpgme
|
||||
version=1.7.1
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-fd-passing --disable-gpgconf-test
|
||||
--disable-gpg-test --disable-gpgsm-test
|
||||
--with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
|
||||
--with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
|
||||
makedepends="libgpg-error-devel libassuan-devel"
|
||||
hostmakedepends="qt5-qmake pkg-config qt5-host-tools"
|
||||
makedepends="libgpg-error-devel libassuan-devel qt5-tools-devel"
|
||||
depends="gnupg2"
|
||||
short_desc="GnuPG Made Easy"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
|
@ -25,7 +26,7 @@ case "$XBPS_TARGET_MACHINE" in
|
|||
esac
|
||||
|
||||
gpgme-devel_package() {
|
||||
depends="${makedepends} gpgme>=${version}_${revision}"
|
||||
depends="${makedepends/qt5-tools-devel/} gpgme>=${version}_${revision}"
|
||||
short_desc+=" - development files"
|
||||
pkg_install() {
|
||||
vmove usr/bin/gpgme-config
|
||||
|
@ -55,3 +56,24 @@ gpgmepp-devel_package() {
|
|||
vmove usr/lib/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
|
||||
}
|
||||
}
|
||||
|
||||
gpgmeqt_package() {
|
||||
depends="${sourcepkg}>=${version}_${revision}"
|
||||
short_desc+=" - Qt binding"
|
||||
pkg_install() {
|
||||
vmove usr/lib/libqgpgme.so.*
|
||||
}
|
||||
}
|
||||
|
||||
gpgmeqt-devel_package() {
|
||||
depends="gpgme-devel>=${version}_${revision} gpgmeqt>=${version}_${revision}"
|
||||
short_desc+=" - Qt binding development files"
|
||||
pkg_install() {
|
||||
vmove usr/include/qgpgme_version.h
|
||||
vmove usr/include/QGpgME
|
||||
vmove usr/include/qgpgme
|
||||
vmove usr/lib/libqgpgme.so
|
||||
vmove usr/lib/cmake/Gpgmepp/QGpgmeConfig.cmake
|
||||
vmove usr/lib/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
|
||||
}
|
||||
}
|
||||
|
|
1
srcpkgs/gpgmeqt
Symbolic link
1
srcpkgs/gpgmeqt
Symbolic link
|
@ -0,0 +1 @@
|
|||
gpgme
|
1
srcpkgs/gpgmeqt-devel
Symbolic link
1
srcpkgs/gpgmeqt-devel
Symbolic link
|
@ -0,0 +1 @@
|
|||
gpgme
|
Loading…
Reference in a new issue