aqbanking: fix cross, change prefix detection for the cmake config file

The cmake configuration file for aqbankung always uses /usr as prefix
which causes issues while cross-compiling. This adds a patch to change
the detection to do it the same way most KDE/QT software does it.

Closes: #10663 [via git-merge-pr]
This commit is contained in:
Helmut Pozimski 2018-01-10 16:34:47 +01:00 committed by Jürgen Buchmüller
parent 51f448202a
commit b5d8fcd306
2 changed files with 32 additions and 3 deletions

View File

@ -0,0 +1,23 @@
--- aqbanking-config.cmake.in 2018-01-10 16:09:39.079835643 +0100
+++ aqbanking-config.cmake.in 2018-01-10 16:11:18.140403253 +0100
@@ -19,7 +19,18 @@
include(CMakeFindDependencyMacro)
find_dependency(gwenhywfar "@GWENHYWFAR_MINIMUM_VERSION@")
-set_and_check(prefix "@prefix@")
+get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
+
+# Use original install prefix when loaded through a "/usr move"
+# cross-prefix symbolic link such as /lib -> /usr/lib.
+get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
+get_filename_component(_realOrig "@prefix@/lib/cmake/aqbanking-@AQBANKING_VERSION_MAJOR@.@AQBANKING_VERSION_MINOR@" REALPATH)
+if(_realCurr STREQUAL _realOrig)
+ set(prefix "/usr")
+endif()
+unset(_realOrig)
+unset(_realCurr)
+
set_and_check(exec_prefix "@exec_prefix@")
set_and_check(AQBANKING_INCLUDE_DIRS "@includedir@/aqbanking@AQBANKING_VERSION_MAJOR@")
set_and_check(AQBANKING_LIBRARIES "@libdir@/libaqbanking.so")

View File

@ -2,18 +2,24 @@
pkgname=aqbanking pkgname=aqbanking
_dnrel=208 _dnrel=208
version=5.6.12 version=5.6.12
revision=1 revision=2
hostmakedepends="pkg-config" hostmakedepends="pkg-config gwenhywfar"
makedepends="gwenhywfar-devel xmlsec1-devel ktoblzcheck-devel gmp-devel" makedepends="gwenhywfar-devel xmlsec1-devel ktoblzcheck-devel gmp-devel"
build_style="gnu-configure" build_style="gnu-configure"
maintainer="Enno Boland <gottox@voidlinux.eu>" maintainer="Enno Boland <gottox@voidlinux.eu>"
license="LGPL" license="GPL-2, GPL-3"
homepage="http://www.aquamaniac.de/aqbanking" homepage="http://www.aquamaniac.de/aqbanking"
short_desc="A library for online banking and financial applications" short_desc="A library for online banking and financial applications"
distfiles="http://www2.aquamaniac.de/sites/download/download.php?package=03&release=${_dnrel}&file=01&dummy=aqbanking-$version.tar.gz" distfiles="http://www2.aquamaniac.de/sites/download/download.php?package=03&release=${_dnrel}&file=01&dummy=aqbanking-$version.tar.gz"
checksum=0652706a487d594640a7d544271976261165bf269d90dc70447b38b363e54b22 checksum=0652706a487d594640a7d544271976261165bf269d90dc70447b38b363e54b22
disable_parallel_build=yes disable_parallel_build=yes
if [ "$CROSS_BUILD" ]; then
configure_args+=" --with-gwen-dir=${XBPS_CROSS_BASE} -with-xmlmerge=/usr/bin/xmlmerge"
export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gwenhywfar4"
export CXXFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/gwenhywfar4"
fi
aqbanking-devel_package() { aqbanking-devel_package() {
depends="${sourcepkg}>=${version}_${revision}" depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files" short_desc+=" - development files"