signond: build with qt6

This commit is contained in:
Đoàn Trần Công Danh 2024-05-11 22:54:20 +07:00 committed by Đoàn Trần Công Danh
parent e948f75f85
commit 8747ac0d91
3 changed files with 84 additions and 24 deletions

View File

@ -2747,10 +2747,11 @@ libzimg.so.2 zimg-2.0.4_1
libvapoursynth.so vapoursynth-R32_2
libvapoursynth-script.so.0 vapoursynth-R32_1
libtwolame.so.0 twolame-0.3.13_1
libsignon-plugins.so.1 signond-8.58_1
libsignon-qt5.so.1 signond-8.58_1
libsignon-plugins-common.so.1 signond-8.58_1
libsignon-extension.so.1 signond-8.58_1
libsignon-plugins.so.1 signond-8.61_2
libsignon-qt5.so.1 signond-8.61_2
libsignon-qt6.so.1 signond-8.61_2
libsignon-plugins-common.so.1 signond-8.61_2
libsignon-extension.so.1 signond-8.61_2
libj4status-plugin.so.0 j4status-0.1_1
libvirglrenderer.so.1 virglrenderer-0.5.0_1
libglpk.so.40 glpk-4.60_1

View File

@ -1,14 +1,20 @@
--- a/lib/SignOn/SignOnQt5Config.cmake.in 2018-09-17 18:28:27.000000000 +0200
+++ b/lib/SignOn/SignOnQt5Config.cmake.in 2018-09-17 18:28:27.000000000 +0200
@@ -2,6 +2,21 @@
diff --git a/lib/SignOn/SignOnQt5Config.cmake.in b/lib/SignOn/SignOnQt5Config.cmake.in
index 128ee8d..bae7705 100644
--- a/lib/SignOn/SignOnQt5Config.cmake.in
+++ b/lib/SignOn/SignOnQt5Config.cmake.in
@@ -2,6 +2,25 @@
# SIGNONQT_LIBRARIES - The libraries needed to use libsignon-qt
# SIGNONQT_LIBRARIES_STATIC - The static version of libsignon-qt
-set(SIGNONQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so)
-set(SIGNONQT_LIBRARIES_STATIC $${INSTALL_LIBDIR}/lib$${TARGET}.a)
-set(SIGNONQT_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/SignOnQt5" REALPATH)
+if(_realCurr STREQUAL _realOrig)
+ set(_IMPORT_PREFIX "/usr/lib/cmake/SignOnQt5")
+endif()
@ -22,7 +28,41 @@
+endif()
+
+set(SIGNONQT_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so)
+set(SIGNONQT_LIBRARIES_STATIC ${_IMPORT_PREFIX}/lib/lib$${TARGET}.a)
+set(SIGNONQT_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET})
+set(SIGNONQT_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/)
+set(SIGNONQT_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so)
+set(SIGNONQT_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/)
diff --git a/lib/SignOn/SignOnQt6Config.cmake.in b/lib/SignOn/SignOnQt6Config.cmake.in
index 128ee8d..9222038 100644
--- a/lib/SignOn/SignOnQt6Config.cmake.in
+++ b/lib/SignOn/SignOnQt6Config.cmake.in
@@ -2,6 +2,25 @@
# SIGNONQT_LIBRARIES - The libraries needed to use libsignon-qt
# SIGNONQT_LIBRARIES_STATIC - The static version of libsignon-qt
-set(SIGNONQT_LIBRARIES $${INSTALL_LIBDIR}/lib$${TARGET}.so)
-set(SIGNONQT_LIBRARIES_STATIC $${INSTALL_LIBDIR}/lib$${TARGET}.a)
-set(SIGNONQT_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/SignOnQt6" REALPATH)
+if(_realCurr STREQUAL _realOrig)
+ set(_IMPORT_PREFIX "/usr/lib/cmake/SignOnQt6")
+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(_IMPORT_PREFIX)
+set(SIGNONQT_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so)
+set(SIGNONQT_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/)
+set(SIGNONQT_LIBRARIES ${_IMPORT_PREFIX}/lib/lib$${TARGET}.so)
+set(SIGNONQT_INCLUDE_DIRS ${_IMPORT_PREFIX}/include/$${TARGET}/)

View File

@ -1,26 +1,45 @@
# Template file for 'signond'
# NOTE: drop Qt5 once everything migrated to Qt6
pkgname=signond
version=8.61
revision=1
revision=2
_commit="c8ad98249af541514ff7a81634d3295e712f1a39"
build_style=qmake
configure_args="LIBDIR=/usr/lib"
configure_args="LIBDIR=/usr/lib .."
conf_files="/etc/signond.conf"
hostmakedepends="pkg-config doxygen qt5-host-tools qt5-qmake"
makedepends="qt5-devel"
hostmakedepends="pkg-config doxygen qt6-base qt5-qmake qt5-host-tools"
makedepends="qt6-base-devel qt5-devel"
short_desc="Daemon providing SSO over D-Bus for the gSSO framework"
maintainer="John Rowley <enterthevoid@codesector.co>"
license="LGPL-2.1-only"
homepage="https://gitlab.com/accounts-sso/signond"
distfiles="${homepage}/-/archive/VERSION_${version}/signond-VERSION_${version}.tar.gz"
checksum=3dd57c25e1bf1583b2cb857f96831e38e73d40264ff66ca43e63bb7233f76828
distfiles="https://gitlab.com/accounts-sso/signond/-/archive/$_commit/signond-$_commit.tar.gz"
checksum=2c3dd97fcdb90f38bb9884f7e11d0fb9ba214f78bddaacb27e4969cefff7d690
post_extract() {
mkdir -p build-qt5 build-qt6
}
pre_configure() {
if [ "$CROSS_BUILD" ]; then
CXXFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/qt5"
for i in ${XBPS_CROSS_BASE}/usr/include/qt5/*; do
CXXFLAGS+=" -I$i"
done
fi
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
}
signond-doc_package() {
@ -32,7 +51,7 @@ signond-doc_package() {
signond-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
depends="qt6-base-devel ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so