1 # Copyright 1999-2014 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.1.0_beta751.ebuild,v 1.2 2014/07/25 03:53:22 zx2c4 Exp $
7 inherit eutils flag-o-matic toolchain-funcs
9 DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
10 HOMEPAGE="http://www.gnupg.org/"
12 SRC_URI="mirror://gnupg/gnupg/unstable/${MY_P}.tar.bz2"
17 IUSE="adns bzip2 doc nls readline static selinux smartcard usb"
21 >=dev-libs/libassuan-2
22 >=dev-libs/libgcrypt-1.6.1
23 >=dev-libs/libgpg-error-1.13
24 >=dev-libs/libksba-1.0.7
28 adns? ( >=net-libs/adns-1.4 )
29 bzip2? ( app-arch/bzip2 )
30 readline? ( sys-libs/readline )
31 smartcard? ( usb? ( virtual/libusb:0 ) )
33 COMMON_DEPEND_BINS="|| ( app-crypt/pinentry app-crypt/pinentry-qt )"
35 # Existence of executables is checked during configuration.
36 DEPEND="${COMMON_DEPEND_LIBS}
39 >=dev-libs/libassuan-2[static-libs]
40 >=dev-libs/libgcrypt-1.4[static-libs]
41 >=dev-libs/libgpg-error-1.7[static-libs]
42 >=dev-libs/libksba-1.0.7[static-libs]
43 >=dev-libs/pth-1.3.7[static-libs]
44 >=net-misc/curl-7.10[static-libs]
45 sys-libs/zlib[static-libs]
46 bzip2? ( app-arch/bzip2[static-libs] )
48 nls? ( sys-devel/gettext )
49 doc? ( sys-apps/texinfo )"
51 RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
53 !<=app-crypt/gnupg-2.0.1
54 selinux? ( sec-policy/selinux-gpg )
55 nls? ( virtual/libintl )"
57 REQUIRED_USE="smartcard? ( !static )"
59 S="${WORKDIR}/${MY_P}"
62 epatch "${FILESDIR}/${PN}-2.0.17-gpgsm-gencert.patch"
69 # 'USE=static' support was requested:
72 use static && append-ldflags -static
74 if use smartcard; then
77 $(use_enable usb ccid-driver)
80 myconf+=( --disable-scdaemon )
83 if use elibc_SunOS || use elibc_AIX; then
84 myconf+=( --disable-symcryptrun )
86 myconf+=( --enable-symcryptrun )
90 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
98 $(use_with readline) \
99 CC_FOR_BUILD="$(tc-getBUILD_CC)"
115 dobin tools/gpgsplit tools/gpg-zip
117 emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
118 rm "${ED}"/usr/share/gnupg/help* || die
120 dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
121 doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
123 dosym gpg2 /usr/bin/gpg
124 dosym gpgv2 /usr/bin/gpgv
125 dosym gpg2keys_hkp /usr/libexec/gpgkeys_hkp
126 dosym gpg2keys_finger /usr/libexec/gpgkeys_finger
127 dosym gpg2keys_curl /usr/libexec/gpgkeys_curl
128 echo ".so man1/gpg2.1" > "${ED}"/usr/share/man/man1/gpg.1
129 echo ".so man1/gpgv2.1" > "${ED}"/usr/share/man/man1/gpgv.1
132 echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg
135 dohtml doc/gnupg.html/* doc/*.png
140 elog "If you wish to view images emerge:"
141 elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
142 elog "Remember to use photo-viewer option in configuration file to activate"
143 elog "the right viewer."
146 if use smartcard; then
147 elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
148 use usb && elog " - a CCID-compatible reader, used directly through libusb;"
149 elog " - sys-apps/pcsc-lite and a compatible reader device;"
150 elog " - dev-libs/openct and a compatible reader device;"
151 elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
153 elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
154 elog "app-crypt/ccid first."
157 ewarn "Please remember to restart gpg-agent if a different version"
158 ewarn "of the agent is currently used. If you are unsure of the gpg"
159 ewarn "agent you are using please run 'killall gpg-agent',"
160 ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."