pinentry: split -gnome, -gtk, -qt to fix a cyclic dependency.

Fixes #20438
This commit is contained in:
Juan RP 2020-04-15 17:41:28 +02:00
parent 1eecb5e4a1
commit fef54af1ce
No known key found for this signature in database
GPG key ID: AF19F6CB482F9368
5 changed files with 67 additions and 49 deletions

View file

@ -1 +1 @@
pinentry pinentry-gtk

View file

@ -1 +0,0 @@
pinentry

View file

@ -0,0 +1,53 @@
# Template file for 'pinentry-gtk'
# NOTE: keep this pkg synchronized with srcpkgs/pinentry.
# NOTE: it's splitted this way to avoid cyclic dependencies.
_desc="PIN or passphrase entry dialogs for GnuPG"
pkgname=pinentry-gtk
version=1.1.0
revision=6
wrksrc="pinentry-${version}"
build_style=gnu-configure
configure_args="--without-libcap --enable-fallback-curses
--disable-pinentry-curses --disable-pinentry-tty
--disable-pinentry-emacs --enable-pinentry-qt
--enable-pinentry-gtk2 --enable-pinentry-gnome3
$(vopt_enable libsecret)"
hostmakedepends="pkg-config qt5-host-tools"
makedepends="ncurses-devel libassuan-devel libgpg-error-devel
gcr-devel gtk+-devel qt5-devel $(vopt_if libsecret libsecret-devel)"
short_desc="${_desc} based on GTK+"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-or-later"
homepage="https://www.gnupg.org/related_software/pinentry/index.html"
distfiles="https://gnupg.org/ftp/gcrypt/pinentry/pinentry-${version}.tar.bz2"
checksum=68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570
alternatives="pinentry:pinentry:/usr/bin/pinentry-gtk-2"
build_options="libsecret"
build_options_default="libsecret"
desc_option_libsecret="Enable support for saving passwords via libsecret"
post_install() {
rm -f ${DESTDIR}/usr/bin/pinentry
rm -rf ${DESTDIR}/usr/share/info
}
pinentry-qt_package() {
depends="pinentry>=${version}_${revision}"
short_desc="${_desc} based on Qt"
alternatives="pinentry:pinentry:/usr/bin/pinentry-qt"
pkg_install() {
vmove usr/bin/pinentry-qt
}
}
pinentry-gnome_package() {
depends="pinentry>=${version}_${revision}"
short_desc="${_desc} for the GNOME desktop"
alternatives="pinentry:pinentry:/usr/bin/pinentry-gnome3"
pkg_install() {
vmove usr/bin/pinentry-gnome3
}
}

View file

@ -1 +1 @@
pinentry pinentry-gtk

View file

@ -1,15 +1,16 @@
# Template file for 'pinentry' # Template file for 'pinentry'
# NOTE: keep this pkg synchronized with srcpkgs/pinentry-gtk.
# NOTE: it's splitted this way to avoid cyclic dependencies.
pkgname=pinentry pkgname=pinentry
version=1.1.0 version=1.1.0
revision=5 revision=6
build_style=gnu-configure build_style=gnu-configure
configure_args="--disable-rpath --without-libcap --disable-pinentry-gtk configure_args="--without-libcap --enable-pinentry-tty
--enable-pinentry-curses --enable-fallback-curses --enable-pinentry-gtk2 --enable-pinentry-curses --enable-fallback-curses
--enable-pinentry-emacs --enable-pinentry-qt --enable-pinentry-tty --enable-pinentry-emacs --disable-pinentry-qt --disable-libsecret
--enable-pinentry-gnome3 $(vopt_enable libsecret)" --disable-pinentry-gtk2 --disable-pinentry-gnome3"
hostmakedepends="pkg-config" hostmakedepends="pkg-config"
makedepends="ncurses-devel gcr-devel gtk+-devel libassuan-devel libgpg-error-devel makedepends="ncurses-devel libassuan-devel libgpg-error-devel"
qt5-devel $(vopt_if libsecret 'libsecret-devel')"
short_desc="PIN or passphrase entry dialogs for GnuPG" short_desc="PIN or passphrase entry dialogs for GnuPG"
maintainer="Leah Neukirchen <leah@vuxu.org>" maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-or-later" license="GPL-2.0-or-later"
@ -19,14 +20,6 @@ checksum=68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570
alternatives="pinentry:pinentry:/usr/bin/pinentry-curses" alternatives="pinentry:pinentry:/usr/bin/pinentry-curses"
build_options="libsecret"
desc_option_libsecret="Enable support for saving passwords via libsecret"
build_options_default="libsecret"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools"
fi
pre_build() { pre_build() {
sed -e 's,ncursesw/curses.h,curses.h,' -i pinentry/pinentry-curses.c sed -e 's,ncursesw/curses.h,curses.h,' -i pinentry/pinentry-curses.c
} }
@ -35,33 +28,6 @@ post_install() {
rm ${DESTDIR}/usr/bin/pinentry rm ${DESTDIR}/usr/bin/pinentry
} }
pinentry-tty_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" for dumb terminals"
alternatives="pinentry:pinentry:/usr/bin/pinentry-tty"
pkg_install() {
vmove usr/bin/pinentry-tty
}
}
pinentry-qt_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" based on Qt"
alternatives="pinentry:pinentry:/usr/bin/pinentry-qt"
pkg_install() {
vmove usr/bin/pinentry-qt
}
}
pinentry-gtk_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" based on GTK+"
alternatives="pinentry:pinentry:/usr/bin/pinentry-gtk-2"
pkg_install() {
vmove usr/bin/pinentry-gtk-2
}
}
pinentry-emacs_package() { pinentry-emacs_package() {
depends="${sourcepkg}>=${version}_${revision}" depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - Emacs interface" short_desc+=" - Emacs interface"
@ -71,11 +37,11 @@ pinentry-emacs_package() {
} }
} }
pinentry-gnome_package() { pinentry-tty_package() {
depends="${sourcepkg}>=${version}_${revision}" depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" for the GNOME desktop" short_desc+=" for dumb terminals"
alternatives="pinentry:pinentry:/usr/bin/pinentry-gnome3" alternatives="pinentry:pinentry:/usr/bin/pinentry-tty"
pkg_install() { pkg_install() {
vmove usr/bin/pinentry-gnome3 vmove usr/bin/pinentry-tty
} }
} }