app-crypt/pinentry: add 1.3.0

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2024-03-18 14:51:35 +00:00
parent fe64d8bd46
commit 89bf64216c
4 changed files with 290 additions and 0 deletions
+2
View File
@@ -1,2 +1,4 @@
DIST pinentry-1.2.1.tar.bz2 547698 BLAKE2B aa47612aa3a6f74c3676bf4018780356cb22ed4078792c1f466f9e0465199428c151c0e20dfbe6c784ef93c2b42b673daff0b6adc74c8c98fed9921e65ed42ea SHA512 a665315628f4dcf07e16a22db3f3be15d7e7e93b3deec0546c7275b71b0e3bd65535a08af5e12d6339fd6595132df86529401d9d12bd17c428a3466e8dfafab6
DIST pinentry-1.2.1.tar.bz2.sig 238 BLAKE2B 01ba3dc296a8e76c546d21d0bb0cd13778476d5d5b3ef55a3401c6a0353a56d79250d11555afb31c77c5a77e63847ded0f8eaef395bb0dc2ee3ff1d6a4ed83bd SHA512 d0e8435dc169a58f111f057f1c9fbb6c70da32a850f1107d6abdf41357c1714832728109ae61507db313d7eaef9596e5faf92fd21bed78adcc46a8c8a590430b
DIST pinentry-1.3.0.tar.bz2 610363 BLAKE2B a55b80754ef37d18ebdf0bd50e134a7b1bf6362b859b7069a9e4ebd86cd7e733d51f3c21a16779a18aa0d0dfab1f7a3df070d4f7e39e0840339078c4e9cb58bc SHA512 1bbac81c6811cffc8969a46494e6daa6b8447802f47ff6fa3e4dc9ac244cf6e5f629834c9b6a60770d06bff6c9932ad4059f10d2fdf93fd9e26fd5d21c0e3732
DIST pinentry-1.3.0.tar.bz2.sig 119 BLAKE2B 0f11126761b2a06f8b08cf971f5d610cacbde1a5ee419523a6e704ac21fef4cce26495a160a51bee5ed5f68eca7d6864dfa03efa48030ba2cf783e767b925e1c SHA512 77a61877adf241d67caeea3af4c12a2c7c13ddc423ac001fab79bcec463a5853d8806052d61504fae0c67e0a9d1edf6a12d24b560ff7b4083eea5e86f9b54a90
@@ -0,0 +1,141 @@
https://dev.gnupg.org/T6161
https://bugs.gentoo.org/819939
https://bugs.gentoo.org/837719
--- a/configure.ac
+++ b/configure.ac
@@ -514,8 +514,12 @@ fi
dnl
dnl Check for libX11 library
dnl
+AC_ARG_WITH(x,
+ AS_HELP_STRING([--with-x],[use libX11]),
+ [want_x11=$withval], [want_x11=maybe])
+
have_x11=no
-if test "$have_w32_system" != "yes"; then
+AS_IF([test "$have_w32_system" != "yes" && test "$want_x11" != "no"], [
PKG_CHECK_MODULES(
LIBX11,
[x11],
@@ -525,18 +529,20 @@ if test "$have_w32_system" != "yes"; then
have_x11=no
]
)
+])
- if test "$have_x11" = "yes"; then
- AC_DEFINE(HAVE_X11, 1,
- [The pinentries can optionally use x11.])
- fi
-fi
+AS_IF([test "$have_x11" = "yes"], [AC_DEFINE(HAVE_X11, 1, [The pinentries can optionally use x11.])])
dnl
dnl Check for KF5WaylandClient library
dnl
+
+AC_ARG_ENABLE(kf5-wayland,
+ AS_HELP_STRING([--enable-kf5-wayland],[use KF5WaylandClient for capslock indication on Wayland]),
+ [want_kf5_wayland=$enableval], [want_kf5_wayland=maybe])
+
have_kf5waylandclient=no
-if test "$have_w32_system" != "yes"; then
+AS_IF([test "$have_w32_system" != "yes" && test "$want_kf5_wayland" != "no"], [
PKG_CHECK_MODULES(
KF5WAYLANDCLIENT,
[KF5WaylandClient >= 5.60],
@@ -546,13 +552,18 @@ if test "$have_w32_system" != "yes"; then
have_kf5waylandclient=no
]
)
-fi
+])
dnl
dnl Check for KF6GuiAddons library
dnl
+
+AC_ARG_ENABLE(kf6-wayland,
+ AS_HELP_STRING([--enable-kf6-wayland],[use KF6GuiAddons for capslock indication and KF6WindowSystem for window parenting on Wayland]),
+ [want_kf6_wayland=$enableval], [want_kf6_wayland=maybe])
+
have_kf6guiaddons=no
-if test "$have_w32_system" != "yes"; then
+AS_IF([test "$have_w32_system" != "yes" && test "$want_kf6_wayland" != "no"], [
PKG_CHECK_MODULES(
KF6GUIADDONS,
[KF6GuiAddons >= 5.240],
@@ -562,7 +573,7 @@ if test "$have_w32_system" != "yes"; then
have_kf6guiaddons=no
]
)
-fi
+])
dnl
dnl Check for Qt5 pinentry program.
@@ -663,7 +674,8 @@ dnl
dnl Check for KF6WindowSystem library
dnl
have_kf6windowsystem=no
-if test "$have_w32_system" != "yes" && test "$pinentry_qt6" = "yes"; then
+
+AS_IF([test "$have_w32_system" != "yes" && test "$want_kf6_wayland" != "no"], [
PKG_CHECK_MODULES(
KF6WINDOWSYSTEM,
[KF6WindowSystem >= 5.240],
@@ -673,7 +685,7 @@ if test "$have_w32_system" != "yes" && test "$pinentry_qt6" = "yes"; then
have_kf6windowsystem=no
]
)
-fi
+])
if test "$have_kf6windowsystem" = "yes"; then
PINENTRY_QT6_CFLAGS="$KF6WINDOWSYSTEM_CFLAGS $PINENTRY_QT6_CFLAGS"
--- a/m4/qt5.m4
+++ b/m4/qt5.m4
@@ -33,6 +33,10 @@ AC_DEFUN([FIND_QT5],
enable_pinentry_qt5=$enableval,
enable_pinentry_qt5="try")
+ AC_ARG_ENABLE(qtx11extras,
+ AS_HELP_STRING([--enable-qtx11extras],[use Qt5X11Extras for capslock indication on X11]),
+ [want_qtx11extras=$enableval], [want_qtx11extras=maybe])
+
have_qt5_libs="no";
require_qt5_cpp11="no";
@@ -63,20 +67,22 @@ AC_DEFUN([FIND_QT5],
fi
fi
- if test "$have_x11" = "yes"; then
+ have_qt5_x11extras=no
+ AS_IF([test "$have_x11" = "yes" && test "$want_qtx11extras" != "no"], [
PKG_CHECK_MODULES(
PINENTRY_QT5_X11_EXTRAS,
Qt5X11Extras >= 5.1.0,
[have_qt5_x11extras="yes"],
- [
- AC_MSG_WARN([pinentry-qt will be built without Caps Lock warning on X11])
- have_qt5_x11extras="no"
- ])
- if test "$have_qt5_x11extras" = "yes"; then
- PINENTRY_QT5_CFLAGS="$LIBX11_CFLAGS $PINENTRY_QT5_CFLAGS $PINENTRY_QT5_X11_EXTRAS_CFLAGS"
- PINENTRY_QT5_LIBS="$LIBX11_LIBS $PINENTRY_QT5_LIBS $PINENTRY_QT5_X11_EXTRAS_LIBS"
- fi
- fi
+ [have_qt5_x11extras="no"]
+ )
+ ])
+
+ AS_IF([test "$have_qt5_x11extras" = "yes"], [
+ PINENTRY_QT_CFLAGS="$LIBX11_CFLAGS $PINENTRY_QT_CFLAGS $PINENTRY_QT_X11_EXTRAS_CFLAGS"
+ PINENTRY_QT_LIBS="$LIBX11_LIBS $PINENTRY_QT_LIBS $PINENTRY_QT_X11_EXTRAS_LIBS"
+ ], [
+ AC_MSG_WARN([pinentry-qt will be built without Caps Lock warning on X11])
+ ])
AC_CHECK_TOOL(MOC5, moc)
AC_MSG_CHECKING([moc version])
+143
View File
@@ -0,0 +1,143 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
inherit autotools qmake-utils verify-sig
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
HOMEPAGE="https://gnupg.org/aegypten2/"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="caps efl emacs gtk keyring ncurses qt5 qt6 wayland X"
DEPEND="
>=dev-libs/libassuan-2.1
>=dev-libs/libgcrypt-1.6.3
>=dev-libs/libgpg-error-1.17
efl? ( dev-libs/efl[X] )
keyring? ( app-crypt/libsecret )
ncurses? ( sys-libs/ncurses:= )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
wayland? ( kde-plasma/kwayland:5 )
X? (
dev-qt/qtx11extras:5
x11-libs/libX11
)
)
qt6? (
dev-qt/qtbase:6[gui,widgets]
wayland? (
kde-frameworks/kguiaddons:6
kde-frameworks/kwindowsystem:6
)
)
"
RDEPEND="
${DEPEND}
gtk? ( app-crypt/gcr:4[gtk] )
"
BDEPEND="
sys-devel/gettext
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
PDEPEND="emacs? ( app-emacs/pinentry )"
IDEPEND=">=app-eselect/eselect-pinentry-0.7.4"
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
PATCHES=(
"${FILESDIR}/${PN}-1.0.0-AR.patch"
"${FILESDIR}/${PN}-1.3.0-automagic.patch" # bug #819939, bug #837719
)
src_prepare() {
default
eautoreconf
}
src_configure() {
unset FLTK_CONFIG
local myeconfargs=(
$(use_enable efl pinentry-efl)
$(use_enable emacs pinentry-emacs)
$(use_enable keyring libsecret)
$(use_enable gtk pinentry-gnome3)
$(use_enable ncurses fallback-curses)
$(use_enable ncurses pinentry-curses)
$(use_enable qt5 pinentry-qt5)
$(use_enable qt6 pinentry-qt)
# TODO: could split this up into qt5/qt6?
$(use_enable X qtx11extras)
$(use_with X x)
--enable-pinentry-tty
--disable-pinentry-fltk
--disable-pinentry-gtk2
ac_cv_path_GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
$("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
)
if use qt5 ; then
export PATH="$(qt5_get_bindir):${PATH}"
export QTLIB="$(qt5_get_libdir):${QTLIB}"
export MOC5="$(qt5_get_bindir)"/moc
myeconfargs+=(
$(use_enable wayland kf5-wayland)
)
else
myeconfargs+=(
--disable-kf5-wayland
)
fi
if use qt6 ; then
export PATH="$(qt6_get_bindir):${PATH}"
export QTLIB="$(qt6_get_libdir):${QTLIB}"
export MOC="$(qt6_get_libdir)/qt6/libexec/moc"
myeconfargs+=(
$(use_enable wayland kf6-wayland)
)
else
myeconfargs+=(
--disable-kf6-wayland
)
fi
econf "${myeconfargs[@]}"
}
src_install() {
default
rm "${ED}"/usr/bin/pinentry || die
if use qt6 ; then
dosym pinentry-qt /usr/bin/pinentry-qt6
elif use qt6 ; then
dosym pinentry-qt /usr/bin/pinentry-qt5
fi
}
pkg_postinst() {
eselect pinentry update ifunset
}
pkg_postrm() {
eselect pinentry update ifunset
}
+4
View File
@@ -6,6 +6,10 @@
# This file is only for generic masks. For arch-specific masks (i.e.
# mask everywhere, unmask on arch/*) use arch/base.
# Sam James <sam@gentoo.org> (2024-03-18)
# Needs masked KF6 for Wayland at least.
app-crypt/pinentry qt6
# Michał Górny <mgorny@gentoo.org> (2024-03-17)
# Suffers from unaligned accesses, upstream's working on it.
# https://github.com/psycopg/psycopg/issues/734