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/, app-crypt/pinentry/files/
Date: Wed, 21 Mar 2018 19:35:28
Message-Id: 1521660884.1dd048d3aea02a2cfbec81db25008e7098ac895c.k_f@gentoo
1 commit: 1dd048d3aea02a2cfbec81db25008e7098ac895c
2 Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 21 19:34:44 2018 +0000
4 Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 21 19:34:44 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dd048d3
7
8 app-crypt/pinentry: Make pinentry-qt icon show under Plasma-Wayland
9
10 Bug: https://dev.gnupg.org/T3449
11 Closes: https://bugs.gentoo.org/634356
12 Thanks-To: Andrius Štikonas
13 Package-Manager: Portage-2.3.24, Repoman-2.3.6
14
15 ...1.0.0-make-icon-work-under-Plasma-Wayland.patch | 52 +++++++++++
16 app-crypt/pinentry/pinentry-1.0.0-r3.ebuild | 103 +++++++++++++++++++++
17 2 files changed, 155 insertions(+)
18
19 diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-make-icon-work-under-Plasma-Wayland.patch b/app-crypt/pinentry/files/pinentry-1.0.0-make-icon-work-under-Plasma-Wayland.patch
20 new file mode 100644
21 index 00000000000..646df196376
22 --- /dev/null
23 +++ b/app-crypt/pinentry/files/pinentry-1.0.0-make-icon-work-under-Plasma-Wayland.patch
24 @@ -0,0 +1,52 @@
25 +From 7218becac7132c2508d4e8f42c693d69c406795a Mon Sep 17 00:00:00 2001
26 +From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@××××××××.eu>
27 +Date: Wed, 7 Mar 2018 15:14:22 +0100
28 +Subject: [PATCH] Make pinentry-qt icon work under Plasma Wayland.
29 +
30 +---
31 + qt/Makefile.am | 2 ++
32 + qt/main.cpp | 2 ++
33 + qt/org.gnupg.pinentry-qt.desktop | 5 +++++
34 + 3 files changed, 9 insertions(+)
35 + create mode 100644 qt/org.gnupg.pinentry-qt.desktop
36 +
37 +diff --git a/qt/Makefile.am b/qt/Makefile.am
38 +index 698005e..bbf39d1 100644
39 +--- a/qt/Makefile.am
40 ++++ b/qt/Makefile.am
41 +@@ -24,6 +24,8 @@ bin_PROGRAMS = pinentry-qt
42 +
43 + EXTRA_DIST = document-encrypt.png pinentry.qrc
44 +
45 ++desktopdir = $(datadir)/applications
46 ++dist_desktop_DATA = org.gnupg.pinentry-qt.desktop
47 +
48 + if FALLBACK_CURSES
49 + ncurses_include = $(NCURSES_INCLUDE)
50 +diff --git a/qt/main.cpp b/qt/main.cpp
51 +index fe88d26..b767cb4 100644
52 +--- a/qt/main.cpp
53 ++++ b/qt/main.cpp
54 +@@ -372,6 +372,8 @@ main(int argc, char *argv[])
55 + i = argc;
56 + app = new QApplication(i, new_argv);
57 + app->setWindowIcon(QIcon(QLatin1String(":/document-encrypt.png")));
58 ++ app->setOrganizationDomain(QStringLiteral("gnupg.org"));
59 ++ app->setDesktopFileName(QStringLiteral("org.gnupg.pinentry-qt"));
60 + }
61 +
62 + pinentry_parse_opts(argc, argv);
63 +diff --git a/qt/org.gnupg.pinentry-qt.desktop b/qt/org.gnupg.pinentry-qt.desktop
64 +new file mode 100644
65 +index 0000000..0ac89aa
66 +--- /dev/null
67 ++++ b/qt/org.gnupg.pinentry-qt.desktop
68 +@@ -0,0 +1,5 @@
69 ++[Desktop Entry]
70 ++Type=Application
71 ++Name=Pinentry dialog
72 ++Icon=document-encrypt
73 ++NoDisplay=true
74 +--
75 +2.16.1
76 +
77
78 diff --git a/app-crypt/pinentry/pinentry-1.0.0-r3.ebuild b/app-crypt/pinentry/pinentry-1.0.0-r3.ebuild
79 new file mode 100644
80 index 00000000000..86f29751d3f
81 --- /dev/null
82 +++ b/app-crypt/pinentry/pinentry-1.0.0-r3.ebuild
83 @@ -0,0 +1,103 @@
84 +# Copyright 1999-2018 Gentoo Foundation
85 +# Distributed under the terms of the GNU General Public License v2
86 +
87 +EAPI=6
88 +
89 +inherit autotools flag-o-matic qmake-utils toolchain-funcs
90 +
91 +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
92 +HOMEPAGE="https://gnupg.org/aegypten2/index.html"
93 +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
94 +
95 +LICENSE="GPL-2"
96 +SLOT="0"
97 +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"
98 +IUSE="caps emacs gnome-keyring gtk ncurses qt5 static"
99 +
100 +CDEPEND="
101 + app-eselect/eselect-pinentry
102 + >=dev-libs/libassuan-2.1
103 + >=dev-libs/libgcrypt-1.6.3
104 + >=dev-libs/libgpg-error-1.17
105 + caps? ( sys-libs/libcap )
106 + gnome-keyring? ( app-crypt/libsecret )
107 + gtk? ( x11-libs/gtk+:2 )
108 + ncurses? ( sys-libs/ncurses:0= )
109 + qt5? (
110 + dev-qt/qtcore:5
111 + dev-qt/qtgui:5
112 + dev-qt/qtwidgets:5
113 + )
114 + static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] )
115 +"
116 +DEPEND="${CDEPEND}
117 + sys-devel/gettext
118 + virtual/pkgconfig
119 +"
120 +RDEPEND="${CDEPEND}
121 + gnome-keyring? ( app-crypt/gcr )
122 +"
123 +
124 +REQUIRED_USE="
125 + gtk? ( !static )
126 + qt5? ( !static )
127 +"
128 +
129 +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
130 +
131 +PATCHES=(
132 + "${FILESDIR}/${PN}-0.8.2-ncurses.patch"
133 + "${FILESDIR}/${P}-build.patch"
134 + "${FILESDIR}/${P}-Disable-tooltips-in-keyboard-grabbing-mode.patch"
135 + "${FILESDIR}/${P}-gtk2-Fix-a-problem-with-fvwm.patch"
136 + "${FILESDIR}/${P}-make-icon-work-under-Plasma-Wayland.patch"
137 +)
138 +
139 +src_prepare() {
140 + default
141 + eautoreconf
142 +}
143 +
144 +src_configure() {
145 + use static && append-ldflags -static
146 + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
147 +
148 + export QTLIB="$(qt5_get_libdir)"
149 +
150 + econf \
151 + --enable-pinentry-tty \
152 + $(use_with caps libcap) \
153 + $(use_enable emacs pinentry-emacs) \
154 + $(use_enable gnome-keyring libsecret) \
155 + $(use_enable gnome-keyring pinentry-gnome3) \
156 + $(use_enable gtk pinentry-gtk2) \
157 + $(use_enable ncurses pinentry-curses) \
158 + $(use_enable ncurses fallback-curses) \
159 + $(use_enable qt5 pinentry-qt) \
160 + MOC="$(qt5_get_bindir)"/moc
161 +}
162 +
163 +src_install() {
164 + default
165 + rm -f "${ED}"/usr/bin/pinentry || die
166 +
167 + use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4
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 +}