Gentoo Archives: gentoo-commits

From: Kristian Fiskerstrand <k_f@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/pinentry/
Date: Mon, 26 Oct 2015 17:14:26
Message-Id: 1445879428.70b692fe8698ada3cb642dd7b956fe519adf6191.k_f@gentoo
1 commit: 70b692fe8698ada3cb642dd7b956fe519adf6191
2 Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 26 17:10:09 2015 +0000
4 Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 26 17:10:28 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70b692fe
7
8 app-crypt/pinentry: Enable qt5 as possible single backend and fix symlink
9
10 Enable qt5 as the only single backend and fix issue where pinentry-qt4 symlink
11 was created unconditionally
12
13 Bug: 564000
14 Bug: 563520
15
16 Package-Manager: portage-2.2.20.1
17
18 app-crypt/pinentry/pinentry-0.9.6-r6.ebuild | 123 ++++++++++++++++++++++++++++
19 1 file changed, 123 insertions(+)
20
21 diff --git a/app-crypt/pinentry/pinentry-0.9.6-r6.ebuild b/app-crypt/pinentry/pinentry-0.9.6-r6.ebuild
22 new file mode 100644
23 index 0000000..ea0df55
24 --- /dev/null
25 +++ b/app-crypt/pinentry/pinentry-0.9.6-r6.ebuild
26 @@ -0,0 +1,123 @@
27 +# Copyright 1999-2015 Gentoo Foundation
28 +# Distributed under the terms of the GNU General Public License v2
29 +# $Id$
30 +
31 +EAPI=5
32 +
33 +inherit autotools qmake-utils multilib eutils flag-o-matic toolchain-funcs
34 +
35 +DESCRIPTION="Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol"
36 +HOMEPAGE="http://gnupg.org/aegypten2/index.html"
37 +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
38 +
39 +LICENSE="GPL-2"
40 +SLOT="0"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
42 +IUSE="emacs gtk ncurses qt4 qt5 caps gnome-keyring static"
43 +
44 +CDEPEND="
45 + >=dev-libs/libgpg-error-1.17
46 + >=dev-libs/libassuan-2
47 + >=dev-libs/libgcrypt-1.6.3
48 + ncurses? ( sys-libs/ncurses:0= )
49 + gtk? ( x11-libs/gtk+:2 )
50 + qt4? (
51 + >=dev-qt/qtgui-4.4.1:4
52 + )
53 + qt5? (
54 + dev-qt/qtgui:5
55 + dev-qt/qtwidgets:5
56 + )
57 + caps? ( sys-libs/libcap )
58 + static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] )
59 + app-eselect/eselect-pinentry
60 + gnome-keyring? ( app-crypt/libsecret )
61 +"
62 +
63 +DEPEND="${CDEPEND}
64 + sys-devel/gettext
65 + virtual/pkgconfig
66 +"
67 +
68 +RDEPEND="
69 + ${CDEPEND}
70 + gnome-keyring? ( app-crypt/gcr )
71 +"
72 +
73 +REQUIRED_USE="
74 + || ( ncurses gtk qt4 qt5 )
75 + gtk? ( !static )
76 + qt4? ( !static )
77 + qt5? ( !static )
78 + static? ( ncurses )
79 + ?? ( qt4 qt5 )
80 +"
81 +
82 +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
83 +
84 +src_prepare() {
85 + epatch "${FILESDIR}/${PN}-0.8.2-ncurses.patch"
86 + epatch "${FILESDIR}/${P}-add-disable-pinentry-qt5-option.patch"
87 + eautoreconf
88 +}
89 +
90 +src_configure() {
91 + local myconf=()
92 + use static && append-ldflags -static
93 + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
94 +
95 + QT_MOC=""
96 + if use qt4; then
97 + myconf+=( --enable-pinentry-qt
98 + --disable-pinentry-qt5
99 + )
100 + QT_MOC="$(qt4_get_bindir)"/moc
101 + # Issues finding qt on multilib systems
102 + export QTLIB="$(qt4_get_libdir)"
103 + elif use qt5; then
104 + myconf+=( --enable-pinentry-qt )
105 + QT_MOC="$(qt5_get_bindir)"/moc
106 + export QTLIB="$(qt5_get_libdir)"
107 + else
108 + myconf+=( --disable-pinentry-qt )
109 + fi
110 +
111 + econf \
112 + --enable-pinentry-tty \
113 + $(use_enable emacs pinentry-emacs) \
114 + $(use_enable gtk pinentry-gtk2) \
115 + $(use_enable ncurses pinentry-curses) \
116 + $(use_enable ncurses fallback-curses) \
117 + $(use_with caps libcap) \
118 + $(use_enable gnome-keyring libsecret) \
119 + $(use_enable gnome-keyring pinentry-gnome3) \
120 + "${myconf[@]}" \
121 + MOC="${QT_MOC}"
122 +}
123 +
124 +src_install() {
125 + default
126 + rm -f "${ED}"/usr/bin/pinentry || die
127 +
128 + if use qt4 || use qt5; then
129 + dosym pinentry-qt /usr/bin/pinentry-qt4
130 + fi
131 +}
132 +
133 +pkg_postinst() {
134 + if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then
135 + elog "We no longer install pinentry-curses and pinentry-qt SUID root by default."
136 + elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes."
137 + elog "The soft resource limit for memory locking specifies the limit an"
138 + elog "unprivileged process may lock into memory. You can also use POSIX"
139 + elog "capabilities to allow pinentry to lock memory. To do so activate the caps"
140 + elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of"
141 + elog "your users."
142 + fi
143 +
144 + eselect pinentry update ifunset
145 +}
146 +
147 +pkg_postrm() {
148 + eselect pinentry update ifunset
149 +}