From e6af60b3b15075a0eaeaa676df51923461db274e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 7 Apr 2024 16:02:14 +0700 Subject: [PATCH] New package: libaccounts-qt-1.17 --- srcpkgs/libaccounts-qt/patches/cross.patch | 61 +++++++++++++++ srcpkgs/libaccounts-qt/template | 78 +++++++++++++++++++ .../update | 0 srcpkgs/libaccounts-qt5 | 1 + srcpkgs/libaccounts-qt5-devel | 2 +- srcpkgs/libaccounts-qt5/patches/cross.patch | 26 ------- srcpkgs/libaccounts-qt5/template | 26 ------- srcpkgs/libaccounts-qt6 | 1 + srcpkgs/libaccounts-qt6-devel | 1 + 9 files changed, 143 insertions(+), 53 deletions(-) create mode 100644 srcpkgs/libaccounts-qt/patches/cross.patch create mode 100644 srcpkgs/libaccounts-qt/template rename srcpkgs/{libaccounts-qt5 => libaccounts-qt}/update (100%) create mode 120000 srcpkgs/libaccounts-qt5 delete mode 100644 srcpkgs/libaccounts-qt5/patches/cross.patch delete mode 100644 srcpkgs/libaccounts-qt5/template create mode 120000 srcpkgs/libaccounts-qt6 create mode 120000 srcpkgs/libaccounts-qt6-devel diff --git a/srcpkgs/libaccounts-qt/patches/cross.patch b/srcpkgs/libaccounts-qt/patches/cross.patch new file mode 100644 index 00000000000..2ddb5ca1710 --- /dev/null +++ b/srcpkgs/libaccounts-qt/patches/cross.patch @@ -0,0 +1,61 @@ +--- a/Accounts/AccountsQt5Config.cmake.in ++++ b/Accounts/AccountsQt5Config.cmake.in +@@ -1,5 +1,25 @@ + # ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories + # ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt + +-set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so) +-set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/) ++# 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/AccountsQt5" REALPATH) ++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(ACCOUNTSQT5_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so) ++set(ACCOUNTSQT5_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/) +--- a/Accounts/AccountsQt6Config.cmake.in ++++ b/Accounts/AccountsQt6Config.cmake.in +@@ -1,5 +1,25 @@ + # ACCOUNTSQT_INCLUDE_DIRS - The libaccounts-qt include directories + # ACCOUNTSQT_LIBRARIES - The libraries needed to use libaccounts-qt + +-set(ACCOUNTSQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so) +-set(ACCOUNTSQT_INCLUDE_DIRS $${INSTALL_PREFIX}/include/$${TARGET}/) +\ No newline at end of file ++# 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/AccountsQt6" REALPATH) ++if(_realCurr STREQUAL _realOrig) ++ set(_IMPORT_PREFIX "/usr/lib/cmake/AccountsQt6") ++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(ACCOUNTSQT6_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so) ++set(ACCOUNTSQT6_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/) diff --git a/srcpkgs/libaccounts-qt/template b/srcpkgs/libaccounts-qt/template new file mode 100644 index 00000000000..c291b9f7514 --- /dev/null +++ b/srcpkgs/libaccounts-qt/template @@ -0,0 +1,78 @@ +# Template file for 'libaccounts-qt' +pkgname=libaccounts-qt +version=1.17 +revision=1 +build_style=qmake +configure_args="LIBDIR=/usr/lib .." +hostmakedepends="pkg-config doxygen qt5-qmake qt5-host-tools + qt6-base" +makedepends="libaccounts-glib-devel qt5-devel qt6-base-devel" +short_desc="Client library to the accounts database" +maintainer="John Rowley " +license="LGPL-2.1-only" +homepage="https://gitlab.com/accounts-sso/libaccounts-qt" +distfiles="${homepage}/-/archive/VERSION_${version}/libaccounts-qt-VERSION_${version}.tar.gz" +checksum=6ed3e976133962c1c88f6c66928ba0d0a17a570843577d31e783dc891659e5d8 + +post_extract() { + mkdir -p build-qt5 build-qt6 +} + +pre_configure() { + build_wrksrc=build-qt5 +} + +post_configure() { + build_wrksrc="build-qt6" + QT=qt6 + do_configure +} + +do_build() { + make -C build-qt5 ${make_jobs} + make -C build-qt6 ${make_jobs} +} + +do_install() { + make -C build-qt5 install DESTDIR=${DESTDIR} PREFIX=/usr \ + INSTALL_ROOT=${DESTDIR} STRIP=true + make -C build-qt6 install DESTDIR=${DESTDIR} PREFIX=/usr \ + INSTALL_ROOT=${DESTDIR} STRIP=true +} + +libaccounts-qt5_package() { + short_desc+=" - Qt5" + pkg_install() { + vmove "usr/lib/libaccounts-qt5.so.*" + } +} + +libaccounts-qt6_package() { + short_desc+=" - Qt6" + pkg_install() { + vmove "usr/lib/libaccounts-qt6.so.*" + } +} + +libaccounts-qt5-devel_package() { + short_desc+=" - Qt5 - development files" + depends="qt5-devel libaccounts-qt5>=${version}_${revision}" + pkg_install() { + vmove usr/include/accounts-qt5 + vmove usr/lib/libaccounts-qt5.so + vmove usr/lib/cmake/AccountsQt5 + vmove usr/lib/pkgconfig/accounts-qt5.pc + } +} + +libaccounts-qt6-devel_package() { + short_desc+=" - Qt6 - development files" + depends="qt6-base-devel libaccounts-qt6>=${version}_${revision}" + pkg_install() { + vmove usr/include/accounts-qt6 + vmove usr/lib/libaccounts-qt6.so + vmove usr/lib/cmake/AccountsQt6 + vmove usr/lib/pkgconfig/accounts-qt6.pc + vmove usr/share/doc + } +} diff --git a/srcpkgs/libaccounts-qt5/update b/srcpkgs/libaccounts-qt/update similarity index 100% rename from srcpkgs/libaccounts-qt5/update rename to srcpkgs/libaccounts-qt/update diff --git a/srcpkgs/libaccounts-qt5 b/srcpkgs/libaccounts-qt5 new file mode 120000 index 00000000000..b490868d44e --- /dev/null +++ b/srcpkgs/libaccounts-qt5 @@ -0,0 +1 @@ +libaccounts-qt \ No newline at end of file diff --git a/srcpkgs/libaccounts-qt5-devel b/srcpkgs/libaccounts-qt5-devel index d3f04ed4865..b490868d44e 120000 --- a/srcpkgs/libaccounts-qt5-devel +++ b/srcpkgs/libaccounts-qt5-devel @@ -1 +1 @@ -libaccounts-qt5 \ No newline at end of file +libaccounts-qt \ No newline at end of file diff --git a/srcpkgs/libaccounts-qt5/patches/cross.patch b/srcpkgs/libaccounts-qt5/patches/cross.patch deleted file mode 100644 index c3265b7db9b..00000000000 --- a/srcpkgs/libaccounts-qt5/patches/cross.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/Accounts/AccountsQt5Config.cmake.in 2019-09-18 21:00:34.000000000 +0200 -+++ b/Accounts/AccountsQt5Config.cmake.in 2019-09-18 21:00:34.000000000 +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 deleted file mode 100644 index f7da82daa10..00000000000 --- a/srcpkgs/libaccounts-qt5/template +++ /dev/null @@ -1,26 +0,0 @@ -# Template file for 'libaccounts-qt5' -pkgname=libaccounts-qt5 -version=1.16 -revision=2 -build_style=qmake -configure_args="LIBDIR=/usr/lib" -hostmakedepends="pkg-config doxygen qt5-qmake qt5-host-tools" -makedepends="libaccounts-glib-devel qt5-devel" -short_desc="Client library to the accounts database, with a Qt5-based API" -maintainer="John Rowley " -license="LGPL-2.1-only" -homepage="https://gitlab.com/accounts-sso/libaccounts-qt" -distfiles="${homepage}/-/archive/VERSION_${version}/libaccounts-qt-VERSION_${version}.tar.gz" -checksum=3e527b151ee87e851b0f027214bda1353d8e48e10a5b54109f1e4b7d422a7de3 - -libaccounts-qt5-devel_package() { - short_desc+=" - development files" - depends="${makedepends} ${sourcepkg}>=${version}_${revision}" - pkg_install() { - vmove usr/include - vmove usr/lib/*.so - vmove usr/lib/pkgconfig - vmove usr/share/doc/accounts-qt - vmove usr/lib/cmake - } -} diff --git a/srcpkgs/libaccounts-qt6 b/srcpkgs/libaccounts-qt6 new file mode 120000 index 00000000000..b490868d44e --- /dev/null +++ b/srcpkgs/libaccounts-qt6 @@ -0,0 +1 @@ +libaccounts-qt \ No newline at end of file diff --git a/srcpkgs/libaccounts-qt6-devel b/srcpkgs/libaccounts-qt6-devel new file mode 120000 index 00000000000..b490868d44e --- /dev/null +++ b/srcpkgs/libaccounts-qt6-devel @@ -0,0 +1 @@ +libaccounts-qt \ No newline at end of file