/[gentoo-x86]/app-crypt/gnupg/gnupg-2.0.19-r2.ebuild
Gentoo

Contents of /app-crypt/gnupg/gnupg-2.0.19-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Apr 7 18:18:37 2013 UTC (12 months, 1 week ago) by alonbl
Branch: MAIN
Backport openpgp key>=3072 support from upstream master, per bug#464890, thanks to Andreas K. Hüttel

(Portage version: 2.2.0_alpha171/cvs/Linux x86_64, signed Manifest commit with key BF20DC51)

1 alonbl 1.1 # Copyright 1999-2013 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/app-crypt/gnupg/gnupg-2.0.19-r1.ebuild,v 1.4 2013/02/21 19:29:59 zmedico Exp $
4    
5     EAPI="4"
6    
7     inherit eutils flag-o-matic toolchain-funcs
8    
9     DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
10     HOMEPAGE="http://www.gnupg.org/"
11     SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2"
12     # SRC_URI="ftp://ftp.gnupg.org/gcrypt/${PN}/${P}.tar.bz2"
13    
14     LICENSE="GPL-3"
15     SLOT="0"
16     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17     IUSE="adns bzip2 doc ldap nls mta readline static selinux smartcard usb"
18    
19     COMMON_DEPEND_LIBS="
20     >=dev-libs/libassuan-2
21     >=dev-libs/libgcrypt-1.4
22     >=dev-libs/libgpg-error-1.7
23     >=dev-libs/libksba-1.0.7
24     >=dev-libs/pth-1.3.7
25     >=net-misc/curl-7.10
26     sys-libs/zlib
27     adns? ( >=net-libs/adns-1.4 )
28     bzip2? ( app-arch/bzip2 )
29     readline? ( sys-libs/readline )
30     smartcard? ( usb? ( virtual/libusb:0 ) )
31     ldap? ( net-nds/openldap )"
32     COMMON_DEPEND_BINS="|| ( app-crypt/pinentry app-crypt/pinentry-qt )"
33    
34     # Existence of executables is checked during configuration.
35     DEPEND="${COMMON_DEPEND_LIBS}
36     ${COMMON_DEPEND_BINS}
37     static? (
38     >=dev-libs/libassuan-2[static-libs]
39     >=dev-libs/libgcrypt-1.4[static-libs]
40     >=dev-libs/libgpg-error-1.7[static-libs]
41     >=dev-libs/libksba-1.0.7[static-libs]
42     >=dev-libs/pth-1.3.7[static-libs]
43     >=net-misc/curl-7.10[static-libs]
44     sys-libs/zlib[static-libs]
45     bzip2? ( app-arch/bzip2[static-libs] )
46     )
47     nls? ( sys-devel/gettext )
48     doc? ( sys-apps/texinfo )"
49    
50     RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
51     ${COMMON_DEPEND_BINS}
52     mta? ( virtual/mta )
53     !<=app-crypt/gnupg-2.0.1
54     selinux? ( sec-policy/selinux-gpg )
55     nls? ( virtual/libintl )"
56    
57     REQUIRED_USE="smartcard? ( !static )"
58    
59     src_prepare() {
60     epatch "${FILESDIR}"/${PN}-2.0.17-gpgsm-gencert.patch
61     epatch -l "${FILESDIR}/${P}-support-sc-key-3072.patch"
62     }
63    
64     src_configure() {
65     local myconf
66    
67     # 'USE=static' support was requested:
68     # gnupg1: bug #29299
69     # gnupg2: bug #159623
70     use static && append-ldflags -static
71    
72     if use smartcard; then
73     myconf+=" --enable-scdaemon $(use_enable usb ccid-driver)"
74     else
75     myconf+=" --disable-scdaemon"
76     fi
77    
78     econf \
79     --docdir="${EPREFIX}/usr/share/doc/${PF}" \
80     --enable-gpg \
81     --enable-gpgsm \
82     --enable-agent \
83     ${myconf} \
84     $(use_with adns) \
85     $(use_enable bzip2) \
86     $(use_enable !elibc_SunOS symcryptrun) \
87     $(use_enable nls) \
88     $(use_enable mta mailto) \
89     $(use_enable ldap) \
90     $(use_with readline) \
91     CC_FOR_BUILD="$(tc-getBUILD_CC)"
92     }
93    
94     src_compile() {
95     emake
96    
97     if use doc; then
98     cd doc
99     emake html
100     fi
101     }
102    
103     src_install() {
104     emake DESTDIR="${D}" install
105     emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
106     rm -r "${ED}usr/share/gnupg/help"*
107    
108     dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
109     doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
110    
111     dosym gpg2 /usr/bin/gpg
112     dosym gpgv2 /usr/bin/gpgv
113     dosym gpg2keys_hkp /usr/libexec/gpgkeys_hkp
114     dosym gpg2keys_finger /usr/libexec/gpgkeys_finger
115     dosym gpg2keys_curl /usr/libexec/gpgkeys_curl
116     if use ldap; then
117     dosym gpg2keys_ldap /usr/libexec/gpgkeys_ldap
118     fi
119     echo ".so man1/gpg2.1" > "${ED}usr/share/man/man1/gpg.1"
120     echo ".so man1/gpgv2.1" > "${ED}usr/share/man/man1/gpgv.1"
121    
122     dodir /etc/env.d
123     echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >>"${ED}etc/env.d/30gnupg"
124    
125     if use doc; then
126     dohtml doc/gnupg.html/* doc/*.png
127     fi
128     }
129    
130     pkg_postinst() {
131     elog "If you wish to view images emerge:"
132     elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
133     elog "Remember to use photo-viewer option in configuration file to activate"
134     elog "the right viewer."
135     elog
136    
137     if use smartcard; then
138     elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
139     use usb && elog " - a CCID-compatible reader, used directly through libusb;"
140     elog " - sys-apps/pcsc-lite and a compatible reader device;"
141     elog " - dev-libs/openct and a compatible reader device;"
142     elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
143     elog ""
144     elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
145     elog "app-crypt/ccid first."
146     fi
147    
148     ewarn "Please remember to restart gpg-agent if a different version"
149     ewarn "of the agent is currently used. If you are unsure of the gpg"
150     ewarn "agent you are using please run 'killall gpg-agent',"
151     ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."
152     }

  ViewVC Help
Powered by ViewVC 1.1.20