/[gentoo-x86]/app-crypt/pinentry/pinentry-0.8.0-r1.ebuild
Gentoo

Contents of /app-crypt/pinentry/pinentry-0.8.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Oct 29 10:52:56 2012 UTC (23 months, 3 weeks ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Drop older.

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 8EEE3BE8)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-crypt/pinentry/pinentry-0.8.0-r1.ebuild,v 1.5 2012/09/03 13:53:02 kensington Exp $
4
5 EAPI=3
6 inherit multilib eutils flag-o-matic
7
8 DESCRIPTION="Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol"
9 HOMEPAGE="http://gnupg.org/aegypten2/index.html"
10 SRC_URI="mirror://gnupg/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="gtk ncurses qt4 caps static"
16
17 RDEPEND="app-admin/eselect-pinentry
18 static? ( >=sys-libs/ncurses-5.7-r5[static-libs] )
19 !static? (
20 gtk? ( x11-libs/gtk+:2 )
21 ncurses? ( sys-libs/ncurses )
22 qt4? ( >=x11-libs/qt-gui-4.4.1:4 )
23 !gtk? ( !qt4? ( !ncurses? ( sys-libs/ncurses ) ) )
24 )
25 caps? ( sys-libs/libcap )"
26 DEPEND="${RDEPEND}
27 !static? (
28 gtk? ( virtual/pkgconfig )
29 qt4? ( virtual/pkgconfig )
30 )"
31
32 pkg_setup() {
33 use static && append-ldflags -static
34
35 if use static && { use gtk || use qt4; }; then
36 ewarn
37 ewarn "The static USE flag is only supported with the ncurses USE flags, disabling the gtk and qt4 USE flags."
38 ewarn
39 fi
40 }
41
42 src_prepare() {
43 epatch "${FILESDIR}"/${PN}-0.7.5-grab.patch
44
45 # https://bugs.g10code.com/gnupg/issue1162
46 epatch "${FILESDIR}"/${P}-qt-fix.patch
47
48 if use qt4; then
49 local file
50 for file in qt4/*.moc; do
51 "${EPREFIX}"/usr/bin/moc ${file/.moc/.h} > ${file} || die
52 done
53 fi
54 }
55
56 src_configure() {
57 local myconf=""
58
59 if ! { use qt4 || use gtk || use ncurses; }
60 then
61 myconf="--enable-pinentry-curses --enable-fallback-curses"
62 elif use static
63 then
64 myconf="--enable-pinentry-curses --enable-fallback-curses --disable-pinentry-gtk2 --disable-pinentry-qt4"
65 fi
66
67 # Issues finding qt on multilib systems
68 export QTLIB="${QTDIR}/$(get_libdir)"
69
70 econf \
71 --disable-dependency-tracking \
72 --enable-maintainer-mode \
73 --disable-pinentry-gtk \
74 $(use_enable gtk pinentry-gtk2) \
75 --disable-pinentry-qt \
76 $(use_enable ncurses pinentry-curses) \
77 $(use_enable ncurses fallback-curses) \
78 $(use_enable qt4 pinentry-qt4) \
79 $(use_with caps libcap) \
80 ${myconf}
81 }
82
83 src_install() {
84 emake DESTDIR="${D}" install || die
85 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
86 rm -f "${D}"/usr/bin/pinentry || die
87 }
88
89 pkg_postinst() {
90 elog "We no longer install pinentry-curses and pinentry-qt SUID root by default."
91 elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes."
92 elog "The soft resource limit for memory locking specifies the limit an"
93 elog "unprivileged process may lock into memory. You can also use POSIX"
94 elog "capabilities to allow pinentry to lock memory. To do so activate the caps"
95 elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of"
96 elog "your users."
97 eselect pinentry update ifunset
98 }
99
100 pkg_postrm() {
101 eselect pinentry update ifunset
102 }

  ViewVC Help
Powered by ViewVC 1.1.20