1 |
commit: 2b97b37e5a9f90e05b4675025332b1854462fe19 |
2 |
Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 21 17:16:26 2015 +0000 |
4 |
Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 21 17:18:17 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b97b37e |
7 |
|
8 |
app-crypt/pinentry: Completely remove Qt5 detection |
9 |
|
10 |
Revision bump that removes more of the Qt5 automagic that resulted in |
11 |
failed builds in 0.9.6-r1 |
12 |
|
13 |
Bug: 560786 |
14 |
|
15 |
Package-Manager: portage-2.2.20.1 |
16 |
|
17 |
.../pinentry-0.9.6-Remove-detection-of-Qt5.patch | 60 ++++++++++++++ |
18 |
app-crypt/pinentry/pinentry-0.9.6-r2.ebuild | 93 ++++++++++++++++++++++ |
19 |
2 files changed, 153 insertions(+) |
20 |
|
21 |
diff --git a/app-crypt/pinentry/files/pinentry-0.9.6-Remove-detection-of-Qt5.patch b/app-crypt/pinentry/files/pinentry-0.9.6-Remove-detection-of-Qt5.patch |
22 |
new file mode 100644 |
23 |
index 0000000..0ab9160 |
24 |
--- /dev/null |
25 |
+++ b/app-crypt/pinentry/files/pinentry-0.9.6-Remove-detection-of-Qt5.patch |
26 |
@@ -0,0 +1,60 @@ |
27 |
+From eb2cd9487749be01a1ad34ce6036366208147290 Mon Sep 17 00:00:00 2001 |
28 |
+From: Kristian Fiskerstrand <kristian.fiskerstrand@××××××××××××××××.com> |
29 |
+Date: Mon, 21 Sep 2015 19:09:04 +0200 |
30 |
+Subject: [PATCH] m4/qt.m4: Remove detection of Qt5 |
31 |
+ |
32 |
+--- |
33 |
+ m4/qt.m4 | 36 +----------------------------------- |
34 |
+ 1 file changed, 1 insertion(+), 35 deletions(-) |
35 |
+ |
36 |
+diff --git a/m4/qt.m4 b/m4/qt.m4 |
37 |
+index 0a7ea99..2982bb8 100644 |
38 |
+--- a/m4/qt.m4 |
39 |
++++ b/m4/qt.m4 |
40 |
+@@ -28,42 +28,8 @@ dnl The moc lookup code is based on libpoppler (rev. d821207) |
41 |
+ |
42 |
+ AC_DEFUN([FIND_QT], |
43 |
+ [ |
44 |
+- PKG_CHECK_MODULES(PINENTRY_QT, |
45 |
+- Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Widgets >= 5.0.0, |
46 |
+- [have_qt5_libs="yes"], |
47 |
+- [have_qt5_libs="no"]) |
48 |
++ have_qt5_libs="no" |
49 |
+ |
50 |
+- if "$PKG_CONFIG" --variable qt_config Qt5Core | grep -q "reduce_relocations"; then |
51 |
+- PINENTRY_QT_CFLAGS="$PINENTRY_QT_CFLAGS -fpic" |
52 |
+- fi |
53 |
+- |
54 |
+- if test "$have_qt5_libs" = "yes"; then |
55 |
+- AC_CHECK_TOOL(MOC, moc) |
56 |
+- AC_MSG_CHECKING([moc version]) |
57 |
+- mocversion=`$MOC -v 2>&1` |
58 |
+- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"` |
59 |
+- if test x"$mocversiongrep" != x"$mocversion"; then |
60 |
+- AC_MSG_RESULT([no]) |
61 |
+- # moc was not the qt5 one, try with moc-qt5 |
62 |
+- AC_CHECK_TOOL(MOC2, moc-qt5) |
63 |
+- mocversion=`$MOC2 -v 2>&1` |
64 |
+- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc-qt5 5\|moc 5"` |
65 |
+- if test x"$mocversiongrep" != x"$mocversion"; then |
66 |
+- AC_CHECK_TOOL(QTCHOOSER, qtchooser) |
67 |
+- qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2` |
68 |
+- mocversion=`$qt5tooldir/moc -v 2>&1` |
69 |
+- mocversiongrep=`echo $mocversion | grep "Qt 5\|moc 5"` |
70 |
+- if test x"$mocversiongrep" != x"$mocversion"; then |
71 |
+- # no valid moc found |
72 |
+- have_qt5_libs="no"; |
73 |
+- else |
74 |
+- MOC=$qt5tooldir/moc |
75 |
+- fi |
76 |
+- else |
77 |
+- MOC=$MOC2 |
78 |
+- fi |
79 |
+- fi |
80 |
+- fi |
81 |
+ if test "$have_qt5_libs" != "yes"; then |
82 |
+ PKG_CHECK_MODULES(PINENTRY_QT, |
83 |
+ QtCore >= 4.4.0 QtGui >= 4.4.0, |
84 |
+-- |
85 |
+2.4.6 |
86 |
+ |
87 |
|
88 |
diff --git a/app-crypt/pinentry/pinentry-0.9.6-r2.ebuild b/app-crypt/pinentry/pinentry-0.9.6-r2.ebuild |
89 |
new file mode 100644 |
90 |
index 0000000..fe19fd0 |
91 |
--- /dev/null |
92 |
+++ b/app-crypt/pinentry/pinentry-0.9.6-r2.ebuild |
93 |
@@ -0,0 +1,93 @@ |
94 |
+# Copyright 1999-2015 Gentoo Foundation |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+# $Id$ |
97 |
+ |
98 |
+EAPI=5 |
99 |
+ |
100 |
+inherit autotools qmake-utils multilib eutils flag-o-matic toolchain-funcs |
101 |
+ |
102 |
+DESCRIPTION="Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol" |
103 |
+HOMEPAGE="http://gnupg.org/aegypten2/index.html" |
104 |
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" |
105 |
+ |
106 |
+LICENSE="GPL-2" |
107 |
+SLOT="0" |
108 |
+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" |
109 |
+IUSE="emacs gtk ncurses qt4 caps gnome-keyring static" |
110 |
+ |
111 |
+RDEPEND=" |
112 |
+ >=dev-libs/libgpg-error-1.17 |
113 |
+ >=dev-libs/libassuan-2 |
114 |
+ app-eselect/eselect-pinentry |
115 |
+ caps? ( sys-libs/libcap ) |
116 |
+ gtk? ( x11-libs/gtk+:2 ) |
117 |
+ ncurses? ( sys-libs/ncurses:0= ) |
118 |
+ qt4? ( >=dev-qt/qtgui-4.4.1:4 ) |
119 |
+ static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) |
120 |
+" |
121 |
+DEPEND="${RDEPEND} |
122 |
+ sys-devel/gettext |
123 |
+ virtual/pkgconfig |
124 |
+ gnome-keyring? ( app-crypt/libsecret ) |
125 |
+" |
126 |
+REQUIRED_USE=" |
127 |
+ || ( ncurses gtk qt4 ) |
128 |
+ gtk? ( !static ) |
129 |
+ qt4? ( !static ) |
130 |
+ static? ( ncurses ) |
131 |
+" |
132 |
+ |
133 |
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) |
134 |
+ |
135 |
+src_prepare() { |
136 |
+ epatch "${FILESDIR}/${PN}-0.8.2-ncurses.patch" |
137 |
+ epatch "${FILESDIR}/${P}-Remove-detection-of-Qt5.patch" |
138 |
+ eautoreconf |
139 |
+} |
140 |
+ |
141 |
+src_configure() { |
142 |
+ use static && append-ldflags -static |
143 |
+ [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 |
144 |
+ |
145 |
+ # Issues finding qt on multilib systems |
146 |
+ export QTLIB="${QTDIR}/$(get_libdir)" |
147 |
+ |
148 |
+ econf \ |
149 |
+ --enable-pinentry-tty \ |
150 |
+ $(use_enable emacs pinentry-emacs) \ |
151 |
+ $(use_enable gtk pinentry-gtk2) \ |
152 |
+ $(use_enable ncurses pinentry-curses) \ |
153 |
+ $(use_enable ncurses fallback-curses) \ |
154 |
+ $(use_enable qt4 pinentry-qt) \ |
155 |
+ $(use_with caps libcap) \ |
156 |
+ $(use_enable gnome-keyring libsecret) \ |
157 |
+ $(use_enable gnome-keyring pinentry-gnome3) \ |
158 |
+ MOC="$(qt4_get_bindir)"/moc |
159 |
+} |
160 |
+ |
161 |
+src_install() { |
162 |
+ default |
163 |
+ rm -f "${ED}"/usr/bin/pinentry || die |
164 |
+ |
165 |
+ if use_enable qt4; then |
166 |
+ dosym pinentry-qt /usr/bin/pinentry-qt4 |
167 |
+ fi |
168 |
+} |
169 |
+ |
170 |
+pkg_postinst() { |
171 |
+ if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then |
172 |
+ elog "We no longer install pinentry-curses and pinentry-qt SUID root by default." |
173 |
+ elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes." |
174 |
+ elog "The soft resource limit for memory locking specifies the limit an" |
175 |
+ elog "unprivileged process may lock into memory. You can also use POSIX" |
176 |
+ elog "capabilities to allow pinentry to lock memory. To do so activate the caps" |
177 |
+ elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" |
178 |
+ elog "your users." |
179 |
+ fi |
180 |
+ |
181 |
+ eselect pinentry update ifunset |
182 |
+} |
183 |
+ |
184 |
+pkg_postrm() { |
185 |
+ eselect pinentry update ifunset |
186 |
+} |