From 5abcd7da52259e48d30c744fdf3e675adb012d8d Mon Sep 17 00:00:00 2001 From: John Date: Mon, 27 Apr 2020 00:57:01 +0200 Subject: [PATCH] libaccounts-qt5: patch Config.cmake to work better when cross compiling --- srcpkgs/libaccounts-qt5/patches/cross.patch | 26 +++++++++++++++++++++ srcpkgs/libaccounts-qt5/template | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libaccounts-qt5/patches/cross.patch diff --git a/srcpkgs/libaccounts-qt5/patches/cross.patch b/srcpkgs/libaccounts-qt5/patches/cross.patch new file mode 100644 index 00000000000..61e5c9d054f --- /dev/null +++ b/srcpkgs/libaccounts-qt5/patches/cross.patch @@ -0,0 +1,26 @@ +--- Accounts/AccountsQt5Config.cmake.in 2019-09-18 21:00:34.000000000 +0200 ++++ - 2020-04-26 23:54:46.522721966 +0200 +@@ -1,5 +1,20 @@ + # ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories + # ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt ++ ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) ++if(_realCurr STREQUAL _realOrig) ++ set(_IMPORT_PREFIX "/usr/lib/cmake/AccountsQt5") ++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() ++ ++set(ACCOUNTSQT_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so) ++set(ACCOUNTSQT_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/) + +-set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so) +-set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/) +\ No newline at end of file ++set(_IMPORT_PREFIX) diff --git a/srcpkgs/libaccounts-qt5/template b/srcpkgs/libaccounts-qt5/template index 2c6b5bd37ab..73c98fb72bd 100644 --- a/srcpkgs/libaccounts-qt5/template +++ b/srcpkgs/libaccounts-qt5/template @@ -1,7 +1,7 @@ # Template file for 'libaccounts-qt5' pkgname=libaccounts-qt5 version=1.16 -revision=1 +revision=2 wrksrc="libaccounts-qt-VERSION_${version}-525ec684cfa8d234f797d7e49e21c476eea04d8e" build_style=qmake configure_args="LIBDIR=/usr/lib"