diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-crypt/pinentry |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-crypt/pinentry')
-rw-r--r-- | app-crypt/pinentry/Manifest | 10 | ||||
-rw-r--r-- | app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch | 25 | ||||
-rw-r--r-- | app-crypt/pinentry/files/pinentry-0.9.7-require-CPP11-for-qt-5-7.patches | 48 | ||||
-rw-r--r-- | app-crypt/pinentry/files/pinentry-1.0.0-build.patch | 218 | ||||
-rw-r--r-- | app-crypt/pinentry/metadata.xml | 12 | ||||
-rw-r--r-- | app-crypt/pinentry/pinentry-0.9.7-r1.ebuild | 122 | ||||
-rw-r--r-- | app-crypt/pinentry/pinentry-1.0.0-r1.ebuild | 102 |
7 files changed, 537 insertions, 0 deletions
diff --git a/app-crypt/pinentry/Manifest b/app-crypt/pinentry/Manifest new file mode 100644 index 000000000000..604fd4c2aac4 --- /dev/null +++ b/app-crypt/pinentry/Manifest @@ -0,0 +1,10 @@ +AUX pinentry-0.8.2-ncurses.patch 824 SHA256 7d5e485e2c6dcce80ab63055d24761f53ae28e19b5ab2dacc424ebc7677805e8 SHA512 415ad55fd7a4ab66e87e5db76b1314b00f5a86552804f1f431a533ba1e7ec3f2c7136096106688b572639ceb637fdf0c3e25d96aa2e07fd1f6f295d39e1d4901 WHIRLPOOL 5483ccb6041e769387685ce987a19a2aa50835781a391169abbe7a838325149b81ce186692dbdc588858f74ef912a80f1eca6efb0f3421ace57925ca9c6f9ca5 +AUX pinentry-0.9.7-require-CPP11-for-qt-5-7.patches 1415 SHA256 ee9fc1ccc6d8c96a7097d8cb93a2277b7809dff24314d616615ae3bbe369c5a1 SHA512 1191ec7aa71042e4c770ea2793aac73f5501e83f0f93e9ae5440cbf84e4796c258156af7da9d0aaa7603e690c6bfa97d921c7721b3519d7ba33bd0f0def0baf4 WHIRLPOOL bbd686b0bde31c1a07074720ae611454f8a2f383c4d950c29deac974ac91b44c64c06066a65467589451bf596badbcc56d63a6bbfcb2061329861983b9209915 +AUX pinentry-1.0.0-build.patch 6634 SHA256 ddc05cb4e3760b3c2f92c0dd76f316aed455400f34dd4ff2939a5a59995c5c15 SHA512 cd71552db3c4ab3bd7dd34d5009ad332e5a430ae1e909085cac6a04e63801086cac18916af65a37c110c2b667054c356f38dcc8af43468a23b1b562bf6dbafec WHIRLPOOL d117a3e591b38ed5e5239b5e2fab01c3db0d90fc6b8f52204d9e4cb7a579e703de1615be0bc8d481bc23149731835d6f78b25ffc74a8b361a1400a9d80da0344 +DIST pinentry-0.9.7.tar.bz2 432978 SHA256 6398208394972bbf897c3325780195584682a0d0c164ca5a0da35b93b1e4e7b2 SHA512 9c5bc8f7246e8b0affd83fea6e64c47cecf6a12515a82dd2a6712b230306a9c3c97da4dbf6519ea98c85c88bf180a5a2b8c46cedcd594f224e5a08f2f0e35bf0 WHIRLPOOL eb3f72acf6990d61b4279de89a334e68c6052a3edef789aab2a421c2e489c1286b756bf3c9b8e6dd4cee3716e32b53d0e9d41db15a5069e010fe713dfba0596a +DIST pinentry-1.0.0.tar.bz2 436930 SHA256 1672c2edc1feb036075b187c0773787b2afd0544f55025c645a71b4c2f79275a SHA512 f109236707c51871b5020ef807a551366461fafcfbe09bf8cda19d4b163a42cf622562b905ceb41429f1d648b3f3d27807538709da6a135b67f9888709eccd62 WHIRLPOOL 182d75e37afc40c02705ed6611354eb3429924df9062e64d42e511a5bdac5f7094b351aae406ef243e4a9d6f7db0eb897820bd23ed925b8787941342bc67d187 +EBUILD pinentry-0.9.7-r1.ebuild 3246 SHA256 7f098011d46661c2b5fea2b03ec0402d232b7845564d57e1d56d954f70367325 SHA512 78e797ea8a8f806fbac7a161b82ada7941e80b69dc1a3051d20655abca27dcab40888d6a08d913203c8e2d14308d8e6164249f6ec915ed2c991a763d66d0e8af WHIRLPOOL ede02f69437072f1b2251613078a62f592f682793c8c4fa422be6982f071b563b0a85c4207996f8c5752fa0d176b194ef805d960536f9c3a1434023e9f4c3c3d +EBUILD pinentry-1.0.0-r1.ebuild 2817 SHA256 3d106e89979ed830015951c5f58b5ad4a4ce14fc613d246fca19487920e578eb SHA512 74878447433a3d537c29376c05f47d578deb8bfecb073b84efa4ac390953e683422b9ad38555297b11cb2414eed7a6e10bcb27caa8b2f3675ad1e3da5d61449b WHIRLPOOL fb59532c611c1c30802220e1893daa7e2641af769cc8c762f840976afb17466f7ae6c3d6a5f7888b7a36fb937d6f5f05e255d8770375be8e88cf943819b3c19e +MISC ChangeLog 9508 SHA256 c9cc05ed15e6ab1341299c3fb985fdd2d8a9539e62d73a16b4dd8f5815bbeefb SHA512 7ff10fc6c2e2621c475ebb0805b63092d8d9fd56b40d69fa4669a4456c5900644aa51b758b92086621035b83e4f728fcfc20d2d8a13e53194d7ef88b3aeb3fa4 WHIRLPOOL 4dac379391947f44aec42b9c3d71b01f46700ede56347dea6b73d9771c7e55cdcbdbdec20cf7781119e1aaf4d3dd822eb423a4810ff3657a8d76dd1768f2a6dc +MISC ChangeLog-2015 25487 SHA256 599f868331443fbdf95c4b9ef073517aeb355df82a2878199d311310891ebaa1 SHA512 b6cbb7b6abb7ba7e70094d334d18da227aec8b0e7654af58736fd6a5626dd178c23ac7524abddaf2dbf67037f117e98d6bf4a3757f0c2bb9428e55f0154c8f96 WHIRLPOOL 7683a728f4a93c78d60061a1a85785a3a7271e5854a81e7485fae2760190d49edd1d43e68db525ffc785a1ae45cb52b7df7af9a47d77b84c8a5c397ee4a29d56 +MISC metadata.xml 352 SHA256 7fd48348fd50b298029c84f873443f5b826fb46f05437440cef6dc2e1ce3773e SHA512 3817eb6ad931ab0ee363ed7f8612b08a44c0d02e7abb9d0734452c289350c9909ca4208acad01c54a3f1b260417c400f4692e37b34113c6d618680d41796e2d0 WHIRLPOOL 46aba74d2e5243e320da11ac8193123ec2576b4fa7d6c904a494b8e234716afe4a90fe1c2c6ea211b40b53edef261eb1735200950563ecc1592d213c66d40ad8 diff --git a/app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch b/app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch new file mode 100644 index 000000000000..3bb92c63d00c --- /dev/null +++ b/app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch @@ -0,0 +1,25 @@ +From bafe8608fc525ef103b3d1f3048ca28958bef596 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Sun, 5 May 2013 02:23:08 +0300 +Subject: [PATCH] ncurses: link with optional tinfo + +--- + m4/curses.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/m4/curses.m4 b/m4/curses.m4 +index 3a01881..ffb6bd1 100644 +--- a/m4/curses.m4 ++++ b/m4/curses.m4 +@@ -36,6 +36,8 @@ AC_DEFUN([IU_LIB_NCURSES], [ + have_ncursesw=no + fi + if test "$LIBNCURSES"; then ++ AC_CHECK_LIB(tinfow, curs_set, LIBNCURSES="${LIBNCURSES} -ltinfow", ++ AC_CHECK_LIB(tinfo, curs_set, LIBNCURSES="${LIBNCURSES} -ltinfo")) + # Use ncurses header files instead of the ordinary ones, if possible; + # is there a better way of doing this, that avoids looking in specific + # directories? +-- +1.8.1.5 + diff --git a/app-crypt/pinentry/files/pinentry-0.9.7-require-CPP11-for-qt-5-7.patches b/app-crypt/pinentry/files/pinentry-0.9.7-require-CPP11-for-qt-5-7.patches new file mode 100644 index 000000000000..406571cdd3a0 --- /dev/null +++ b/app-crypt/pinentry/files/pinentry-0.9.7-require-CPP11-for-qt-5-7.patches @@ -0,0 +1,48 @@ +From 7384e2a575dde2809784d9f182fd1d247064c8a2 Mon Sep 17 00:00:00 2001 +From: Kristian Fiskerstrand <kf@sumptuouscapital.com> +Date: Thu, 11 Aug 2016 14:44:37 +0200 +Subject: [PATCH] Qt: Append -std=c++11 if building against Qt 5.7 + + * m4/qt.m4: Append -std=c++11 to CFLAGS if building against Qt 5.7 + +-- +Qt 5.7 enables C++11 for Qt modules, and any app relying on it require to be +compiled with at least this standard. + +This patch adds detection for Qt 5.7 and make sure -std=c++11 is passed if +building against Qt 5.7 or higher. +--- + m4/qt.m4 | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/m4/qt.m4 b/m4/qt.m4 +index 093f428..90c4a6e 100644 +--- a/m4/qt.m4 ++++ b/m4/qt.m4 +@@ -35,6 +35,7 @@ AC_DEFUN([FIND_QT], + enable_pinentry_qt5="try") + + have_qt5_libs="no"; ++ require_qt_cpp11="no"; + + if test "$enable_pinentry_qt5" != "no"; then + PKG_CHECK_MODULES(PINENTRY_QT, +@@ -47,6 +48,15 @@ AC_DEFUN([FIND_QT], + fi + fi + if test "$have_qt5_libs" = "yes"; then ++ PKG_CHECK_MODULES(PINENTRY_QT_REQUIRE_CPP11, ++ Qt5Core >= 5.7.0, ++ [require_qt_cpp11="yes"], ++ [require_qt_cpp11="no"]) ++ ++ if test "${require_qt_cpp11}" = "yes"; then ++ PINENTRY_QT_CFLAGS="$PINENTRY_QT_CFLAGS -std=c++11" ++ fi ++ + AC_CHECK_TOOL(MOC, moc) + AC_MSG_CHECKING([moc version]) + mocversion=`$MOC -v 2>&1` +-- +2.7.3 + diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-build.patch b/app-crypt/pinentry/files/pinentry-1.0.0-build.patch new file mode 100644 index 000000000000..e367b8566450 --- /dev/null +++ b/app-crypt/pinentry/files/pinentry-1.0.0-build.patch @@ -0,0 +1,218 @@ +From c5c7bee68730c9f66a27f9bb0d023480623a2bfb Mon Sep 17 00:00:00 2001 +From: Werner Koch <wk@gnupg.org> +Date: Thu, 1 Dec 2016 09:10:08 +0100 +Subject: [PATCH] Fix linkage problem in tty and emacs pinentries. + +* emacs/pinentry-emacs.c (curses_cmd_handler): Remove var. +* tty/pinentry-tty.c (curses_cmd_handler): Remove var. +* pinentry/pinentry.c (flavor_flag): New local var. +(pinentry_set_flavor_flag): New function. +(cmd_getinfo): Use FLAVOR_FLAG for the "flavor" sub-command. +* gnome3/pinentry-gnome3.c (main): Call pinentry_set_flavor_flag. +* gtk+-2/pinentry-gtk-2.c (main): Ditto. +* pinentry/pinentry-emacs.c (initial_emacs_cmd_handler): Ditto. +* qt/main.cpp (main): Ditto. +-- + +Fixes-commit: e4e3a9cc88704dcffac660d0b92fd1ed8abecc11 +Fixes-commit: d126036671e7dd631babc118cb4113f723f15748 +Signed-off-by: Werner Koch <wk@gnupg.org> +--- + emacs/pinentry-emacs.c | 4 ---- + gnome3/pinentry-gnome3.c | 3 +++ + gtk+-2/pinentry-gtk-2.c | 10 ++++++++-- + pinentry/pinentry-emacs.c | 5 ++++- + pinentry/pinentry.c | 34 ++++++++++++++++++---------------- + pinentry/pinentry.h | 4 ++++ + qt/main.cpp | 1 + + tty/pinentry-tty.c | 3 --- + 8 files changed, 38 insertions(+), 26 deletions(-) + +diff --git a/emacs/pinentry-emacs.c b/emacs/pinentry-emacs.c +index b6b3eb8..3c39a96 100644 +--- a/emacs/pinentry-emacs.c ++++ b/emacs/pinentry-emacs.c +@@ -29,10 +29,6 @@ + + pinentry_cmd_handler_t pinentry_cmd_handler = emacs_cmd_handler; + +-/* needed to link cleanly; should never be used except for comparison +- * in pinentry/pinentry.c's cmd_getinfo(): */ +-pinentry_cmd_handler_t curses_cmd_handler = NULL; +- + + + int +diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c +index a040f9b..d5a49d6 100644 +--- a/gnome3/pinentry-gnome3.c ++++ b/gnome3/pinentry-gnome3.c +@@ -517,18 +517,21 @@ main (int argc, char *argv[]) + fprintf (stderr, "No $DBUS_SESSION_BUS_ADDRESS found," + " falling back to curses\n"); + pinentry_cmd_handler = curses_cmd_handler; ++ pinentry_set_flavor_flag ("curses"); + } + else if (!pe_gcr_system_prompt_available ()) + { + fprintf (stderr, "No Gcr System Prompter available," + " falling back to curses\n"); + pinentry_cmd_handler = curses_cmd_handler; ++ pinentry_set_flavor_flag ("curses"); + } + else if (pe_gnome_screen_locked ()) + { + fprintf (stderr, "GNOME screensaver is locked," + " falling back to curses\n"); + pinentry_cmd_handler = curses_cmd_handler; ++ pinentry_set_flavor_flag ("curses"); + } + #endif + +diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c +index 6037533..473c4aa 100644 +--- a/gtk+-2/pinentry-gtk-2.c ++++ b/gtk+-2/pinentry-gtk-2.c +@@ -938,10 +938,16 @@ main (int argc, char *argv[]) + if (pinentry_have_display (argc, argv)) + { + if (! gtk_init_check (&argc, &argv)) +- pinentry_cmd_handler = curses_cmd_handler; ++ { ++ pinentry_cmd_handler = curses_cmd_handler; ++ pinentry_set_flavor_flag ("curses"); ++ } + } + else +- pinentry_cmd_handler = curses_cmd_handler; ++ { ++ pinentry_cmd_handler = curses_cmd_handler; ++ pinentry_set_flavor_flag ("curses"); ++ } + #else + gtk_init (&argc, &argv); + #endif +diff --git a/pinentry/pinentry-emacs.c b/pinentry/pinentry-emacs.c +index df12f1b..50ba406 100644 +--- a/pinentry/pinentry-emacs.c ++++ b/pinentry/pinentry-emacs.c +@@ -644,7 +644,10 @@ initial_emacs_cmd_handler (pinentry_t pe) + if (emacs_socket < 0) + pinentry_cmd_handler = fallback_cmd_handler; + else +- pinentry_cmd_handler = emacs_cmd_handler; ++ { ++ pinentry_cmd_handler = emacs_cmd_handler; ++ pinentry_set_flavor_flag ("emacs"); ++ } + + return (* pinentry_cmd_handler) (pe); + } +diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c +index 322a651..a198fb3 100644 +--- a/pinentry/pinentry.c ++++ b/pinentry/pinentry.c +@@ -67,6 +67,10 @@ static char this_pgmname[50]; + + struct pinentry pinentry; + ++ ++static const char *flavor_flag; ++ ++ + static void + pinentry_reset (int use_defaults) + { +@@ -793,6 +797,16 @@ pinentry_parse_opts (int argc, char *argv[]) + } + } + ++ ++/* Set the optional flag used with getinfo. */ ++void ++pinentry_set_flavor_flag (const char *string) ++{ ++ flavor_flag = string; ++} ++ ++ ++ + + static gpg_error_t + option_handler (assuan_context_t ctx, const char *key, const char *value) +@@ -1444,27 +1458,15 @@ cmd_getinfo (assuan_context_t ctx, char *line) + } + else if (!strcmp (line, "flavor")) + { +- const char *flags; +- + if (!strncmp (this_pgmname, "pinentry-", 9) && this_pgmname[9]) + s = this_pgmname + 9; + else + s = this_pgmname; + +- if (0) +- ; +-#ifdef INSIDE_EMACS +- else if (pinentry_cmd_handler == emacs_cmd_handler) +- flags = ":emacs"; +-#endif +-#ifdef FALLBACK_CURSES +- else if (pinentry_cmd_handler == curses_cmd_handler) +- flags = ":curses"; +-#endif +- else +- flags = ""; +- +- snprintf (buffer, sizeof buffer, "%s%s", s, flags); ++ snprintf (buffer, sizeof buffer, "%s%s%s", ++ s, ++ flavor_flag? ":":"", ++ flavor_flag? flavor_flag : ""); + buffer[sizeof buffer -1] = 0; + rc = assuan_send_data (ctx, buffer, strlen (buffer)); + } +diff --git a/pinentry/pinentry.h b/pinentry/pinentry.h +index 01fb373..45d35ad 100644 +--- a/pinentry/pinentry.h ++++ b/pinentry/pinentry.h +@@ -275,6 +275,10 @@ int pinentry_have_display (int argc, char **argv); + or version output is requested. */ + void pinentry_parse_opts (int argc, char *argv[]); + ++/* Set the optional flag used with getinfo. */ ++void pinentry_set_flavor_flag (const char *string); ++ ++ + + /* The caller must define this variable to process assuan commands. */ + extern pinentry_cmd_handler_t pinentry_cmd_handler; +diff --git a/qt/main.cpp b/qt/main.cpp +index 8284960..225c06b 100644 +--- a/qt/main.cpp ++++ b/qt/main.cpp +@@ -308,6 +308,7 @@ main(int argc, char *argv[]) + #ifdef FALLBACK_CURSES + if (!pinentry_have_display(argc, argv)) { + pinentry_cmd_handler = curses_cmd_handler; ++ pinentry_set_flavor_flag ("curses"); + } else + #endif + { +diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c +index 3d6cd5a..a509d79 100644 +--- a/tty/pinentry-tty.c ++++ b/tty/pinentry-tty.c +@@ -556,9 +556,6 @@ tty_cmd_handler(pinentry_t pinentry) + + pinentry_cmd_handler_t pinentry_cmd_handler = tty_cmd_handler; + +-/* needed to link cleanly; should never be used except for comparison +- * in pinentry/pinentry.c's cmd_getinfo(): */ +-pinentry_cmd_handler_t curses_cmd_handler = NULL; + + + int +-- +2.8.0.rc3 + diff --git a/app-crypt/pinentry/metadata.xml b/app-crypt/pinentry/metadata.xml new file mode 100644 index 000000000000..46f4637bdd41 --- /dev/null +++ b/app-crypt/pinentry/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>k_f@gentoo.org</email> + <name>Kristian Fiskerstrand</name> + </maintainer> + <maintainer type="project"> + <email>crypto@gentoo.org</email> + <name>Crypto</name> + </maintainer> +</pkgmetadata> diff --git a/app-crypt/pinentry/pinentry-0.9.7-r1.ebuild b/app-crypt/pinentry/pinentry-0.9.7-r1.ebuild new file mode 100644 index 000000000000..82a509210995 --- /dev/null +++ b/app-crypt/pinentry/pinentry-0.9.7-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools qmake-utils multilib eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" +HOMEPAGE="http://gnupg.org/aegypten2/index.html" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="emacs gtk ncurses qt4 qt5 caps gnome-keyring static" + +CDEPEND=" + >=dev-libs/libgpg-error-1.17 + >=dev-libs/libassuan-2.1 + >=dev-libs/libgcrypt-1.6.3 + ncurses? ( sys-libs/ncurses:0= ) + gtk? ( x11-libs/gtk+:2 ) + qt4? ( + >=dev-qt/qtgui-4.4.1:4 + ) + qt5? ( + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + caps? ( sys-libs/libcap ) + static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) + app-eselect/eselect-pinentry + gnome-keyring? ( app-crypt/libsecret ) +" + +DEPEND="${CDEPEND} + sys-devel/gettext + virtual/pkgconfig +" + +RDEPEND=" + ${CDEPEND} + gnome-keyring? ( app-crypt/gcr ) +" + +REQUIRED_USE=" + || ( ncurses gtk qt4 qt5 ) + gtk? ( !static ) + qt4? ( !static ) + qt5? ( !static ) + static? ( ncurses ) + ?? ( qt4 qt5 ) +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.8.2-ncurses.patch"\ + "${FILESDIR}/${P}-require-CPP11-for-qt-5-7.patches" + eautoreconf +} + +src_configure() { + local myconf=() + use static && append-ldflags -static + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 + + QT_MOC="" + if use qt4; then + myconf+=( --enable-pinentry-qt + --disable-pinentry-qt5 + ) + QT_MOC="$(qt4_get_bindir)"/moc + # Issues finding qt on multilib systems + export QTLIB="$(qt4_get_libdir)" + elif use qt5; then + myconf+=( --enable-pinentry-qt ) + QT_MOC="$(qt5_get_bindir)"/moc + export QTLIB="$(qt5_get_libdir)" + else + myconf+=( --disable-pinentry-qt ) + fi + + econf \ + --enable-pinentry-tty \ + $(use_enable emacs pinentry-emacs) \ + $(use_enable gtk pinentry-gtk2) \ + $(use_enable ncurses pinentry-curses) \ + $(use_enable ncurses fallback-curses) \ + $(use_with caps libcap) \ + $(use_enable gnome-keyring libsecret) \ + $(use_enable gnome-keyring pinentry-gnome3) \ + "${myconf[@]}" \ + MOC="${QT_MOC}" +} + +src_install() { + default + rm -f "${ED}"/usr/bin/pinentry || die + + if use qt4 || use qt5; then + dosym pinentry-qt /usr/bin/pinentry-qt4 + fi +} + +pkg_postinst() { + if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then + elog "We no longer install pinentry-curses and pinentry-qt SUID root by default." + elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes." + elog "The soft resource limit for memory locking specifies the limit an" + elog "unprivileged process may lock into memory. You can also use POSIX" + elog "capabilities to allow pinentry to lock memory. To do so activate the caps" + elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" + elog "your users." + fi + + eselect pinentry update ifunset +} + +pkg_postrm() { + eselect pinentry update ifunset +} diff --git a/app-crypt/pinentry/pinentry-1.0.0-r1.ebuild b/app-crypt/pinentry/pinentry-1.0.0-r1.ebuild new file mode 100644 index 000000000000..23de2e2209d0 --- /dev/null +++ b/app-crypt/pinentry/pinentry-1.0.0-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools flag-o-matic qmake-utils toolchain-funcs + +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" +HOMEPAGE="https://gnupg.org/aegypten2/index.html" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps emacs gnome-keyring gtk ncurses qt5 static" + +CDEPEND=" + app-eselect/eselect-pinentry + >=dev-libs/libassuan-2.1 + >=dev-libs/libgcrypt-1.6.3 + >=dev-libs/libgpg-error-1.17 + caps? ( sys-libs/libcap ) + gnome-keyring? ( app-crypt/libsecret ) + gtk? ( x11-libs/gtk+:2 ) + ncurses? ( sys-libs/ncurses:0= ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) +" +DEPEND="${CDEPEND} + sys-devel/gettext + virtual/pkgconfig +" +RDEPEND="${CDEPEND} + gnome-keyring? ( app-crypt/gcr ) +" + +REQUIRED_USE=" + || ( ncurses gtk qt5 ) + gtk? ( !static ) + qt5? ( !static ) + static? ( ncurses ) +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}/${PN}-0.8.2-ncurses.patch" + "${FILESDIR}/${P}-build.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + use static && append-ldflags -static + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 + + export QTLIB="$(qt5_get_libdir)" + + econf \ + --enable-pinentry-tty \ + $(use_with caps libcap) \ + $(use_enable emacs pinentry-emacs) \ + $(use_enable gnome-keyring libsecret) \ + $(use_enable gnome-keyring pinentry-gnome3) \ + $(use_enable gtk pinentry-gtk2) \ + $(use_enable ncurses pinentry-curses) \ + $(use_enable ncurses fallback-curses) \ + $(use_enable qt5 pinentry-qt) \ + MOC="$(qt5_get_bindir)"/moc +} + +src_install() { + default + rm -f "${ED}"/usr/bin/pinentry || die + + use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4 +} + +pkg_postinst() { + if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then + elog "We no longer install pinentry-curses and pinentry-qt SUID root by default." + elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes." + elog "The soft resource limit for memory locking specifies the limit an" + elog "unprivileged process may lock into memory. You can also use POSIX" + elog "capabilities to allow pinentry to lock memory. To do so activate the caps" + elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" + elog "your users." + fi + + eselect pinentry update ifunset +} + +pkg_postrm() { + eselect pinentry update ifunset +} |