gpgme: split gpgme-qt6 and all Qt subpackages to break cycles

Fixes: #50541
This commit is contained in:
Andrew J. Hesford 2024-05-29 11:36:22 -04:00 committed by Đoàn Trần Công Danh
parent fff9edf7c6
commit b1e52f4b16
9 changed files with 129 additions and 82 deletions

View File

@ -1 +0,0 @@
gpgme

View File

@ -1 +1 @@
gpgme gpgme-qt6

1
srcpkgs/gpgme-qt6/patches Symbolic link
View File

@ -0,0 +1 @@
../gpgme/patches

112
srcpkgs/gpgme-qt6/template Normal file
View File

@ -0,0 +1,112 @@
# Template file for 'gpgme-qt6'
#
# THIS PACKAGE MUST BE SYNCHRONIZED WITH "srcpkgs/gpgme"
#
# IT IS SPLIT TO AVOID A CYCLIC DEDPENDENCY:
# SDL2 -> pipewire -> libcanberra -> gtk+ -> gtk+3
# -> colord -> sane -> poppler -> gpgme -> qt5 -> SDL2
pkgname=gpgme-qt6
version=1.23.2
revision=4
build_style=gnu-configure
configure_args="--enable-fd-passing
--with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
--with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake qt6-base"
makedepends="libassuan-devel libgpg-error-devel qt5-devel qt6-base-devel"
checkdepends="which gnupg"
short_desc="GnuPG Made Easy - Qt6 binding"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.gnupg.org/software/gpgme/index.html"
changelog="https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=blob_plain;f=NEWS;hb=HEAD"
distfiles="https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2"
checksum=9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224
CXXFLAGS="-D_GLIBCXX_USE_C99_STDIO=1"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" ac_cv_sys_file_offset_bits=no"
elif [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
CFLAGS="-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1"
CXXFLAGS+=" ${CFLAGS}"
fi
do_configure() {
mkdir -p build
( cd build && ../configure ${configure_args} )
mkdir -p build-qt6
( cd build-qt6 && \
../configure ${configure_args} \
--enable-languages=qt6,cpp \
MOC=/usr/lib/qt6/libexec/moc )
}
do_build() {
make -C build ${makejobs}
make -C build-qt6 ${makejobs}
}
do_check() {
make -C build ${makejobs} check
make -C build-qt6 ${makejobs} check
}
do_install() {
make -C build install DESTDIR=${DESTDIR}
make -C build-qt6 install DESTDIR=${DESTDIR}
# Remove files not related to Qt
local f
for f in "${DESTDIR}"/usr/{include,lib/cmake}/*; do
[ -e "${f}" ] || continue
case "${f##*/}" in
Q*|q*) ;;
*) rm -r "${f}" ;;
esac
done
rm -r "${DESTDIR}"/usr/{bin,share,lib/pkgconfig}
rm "${DESTDIR}"/usr/lib/{libgpgme,libgpgmepp}.so*
}
gpgmeqt_package() {
short_desc="GnuPG Made Easy - Qt5 binding"
pkg_install() {
vmove "usr/lib/libqgpgme.so.*"
}
}
gpgmeqt-headers_package() {
short_desc="GnuPG Made Easy - Qt binding headers"
pkg_install() {
vmove usr/include/QGpgME
vmove usr/include/qgpgme
}
}
gpgmeqt-devel_package() {
depends="gpgme-devel>=${version}_${revision}
gpgmeqt-headers>=${version}_${revision}
gpgmeqt>=${version}_${revision}"
short_desc="GnuPG Made Easy - Qt5 development files"
pkg_install() {
vmove usr/lib/libqgpgme.so
vmove usr/lib/cmake/QGpgme
}
}
gpgme-qt6-devel_package() {
depends="gpgme-devel>=${version}_${revision}
gpgmeqt-headers>=${version}_${revision}
gpgme-qt6>=${version}_${revision}"
short_desc="GnuPG Made Easy - Qt6 development files"
pkg_install() {
vmove usr/lib/libqgpgmeqt6.la
vmove usr/lib/libqgpgmeqt6.so
vmove usr/lib/cmake/QGpgmeQt6
}
}

1
srcpkgs/gpgme-qt6/update Normal file
View File

@ -0,0 +1 @@
pkgname=gpgme

View File

@ -1,16 +1,17 @@
# Template file for 'gpgme' # Template file for 'gpgme'
#
# THIS PACKAGE MUST BE SYNCHRONIZED WITH "srcpkgs/gpgme-qt6"
pkgname=gpgme pkgname=gpgme
version=1.23.2 version=1.23.2
revision=3 revision=4
build_style=gnu-configure build_style=gnu-configure
build_helper="python3" build_helper="python3"
configure_args="--enable-fd-passing configure_args="--enable-fd-passing
--with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr --with-libgpg-error-prefix=$XBPS_CROSS_BASE/usr
--with-libassuan-prefix=$XBPS_CROSS_BASE/usr" --with-libassuan-prefix=$XBPS_CROSS_BASE/usr"
hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake python3-setuptools hostmakedepends="gnupg pkg-config python3-setuptools python3-installer
python3-installer python3-build python3-wheel swig qt6-base" python3-build python3-wheel swig"
makedepends="libassuan-devel libgpg-error-devel python3-devel makedepends="libassuan-devel libgpg-error-devel python3-devel"
qt5-devel qt6-base-devel"
checkdepends="which gnupg" checkdepends="which gnupg"
short_desc="GnuPG Made Easy" short_desc="GnuPG Made Easy"
maintainer="Orphaned <orphan@voidlinux.org>" maintainer="Orphaned <orphan@voidlinux.org>"
@ -29,35 +30,13 @@ elif [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
CXXFLAGS+=" ${CFLAGS}" CXXFLAGS+=" ${CFLAGS}"
fi fi
do_configure() { post_build() {
mkdir -p build cd lang/python
mkdir -p build-qt6 top_builddir=../.. python3 -m build --wheel --no-isolation
cd build
../configure ${configure_args}
cd ../build-qt6
../configure ${configure_args} --enable-languages=qt6,cpp \
MOC=/usr/lib/qt6/libexec/moc
} }
do_build() { post_install() {
local f python3 -m installer --destdir="${DESTDIR}" lang/python/dist/*.whl
make -C build ${makejobs}
make -C build-qt6 ${makejobs}
cd build/lang/python
top_builddir=../.. srcdir=../../../lang/python \
python -m build --wheel --no-isolation
}
do_check() {
make -C build ${makejobs} check
make -C build-qt6 ${makejobs} check
}
do_install() {
make -C build install DESTDIR=${DESTDIR}
make -C build-qt6 install DESTDIR=${DESTDIR}
cd build/lang/python
python -m installer --destdir="${DESTDIR}" dist/*.whl
} }
libgpgme_package() { libgpgme_package() {
@ -99,51 +78,6 @@ gpgmepp-devel_package() {
} }
} }
gpgmeqt_package() {
short_desc+=" - Qt5 binding"
pkg_install() {
vmove "usr/lib/libqgpgme.so.*"
}
}
gpgmeqt-headers_package() {
short_desc+=" - Qt binding headers"
pkg_install() {
vmove usr/include/QGpgME
vmove usr/include/qgpgme
}
}
gpgmeqt-devel_package() {
depends="gpgme-devel>=${version}_${revision}
gpgmeqt-headers>=${version}_${revision}
gpgmeqt>=${version}_${revision}"
short_desc+=" - Qt5 binding development files"
pkg_install() {
vmove usr/lib/libqgpgme.so
vmove usr/lib/cmake/QGpgme
}
}
gpgme-qt6_package() {
short_desc+=" - Qt 6 binding"
pkg_install() {
vmove "usr/lib/libqgpgmeqt6.so.*"
}
}
gpgme-qt6-devel_package() {
depends="gpgme-devel>=${version}_${revision}
gpgmeqt-headers>=${version}_${revision}
gpgme-qt6>=${version}_${revision}"
short_desc+=" - Qt 6 binding - development files"
pkg_install() {
vmove usr/lib/libqgpgmeqt6.la
vmove usr/lib/libqgpgmeqt6.so
vmove usr/lib/cmake/QGpgmeQt6
}
}
gpgme-python3_package() { gpgme-python3_package() {
short_desc+=" - Python binding" short_desc+=" - Python binding"
depends="gpgme" depends="gpgme"

View File

@ -1 +1 @@
gpgme gpgme-qt6

View File

@ -1 +1 @@
gpgme gpgme-qt6

View File

@ -1 +1 @@
gpgme gpgme-qt6