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-1.4.13.ebuild,v 1.11 2013/01/13 19:33:20 armin76 Exp $ |
4 |
|
|
|
5 |
|
|
EAPI="4" |
6 |
|
|
|
7 |
|
|
inherit eutils flag-o-matic toolchain-funcs |
8 |
|
|
|
9 |
|
|
ECCVER="0.2.0" |
10 |
|
|
ECCVER_GNUPG="1.4.9" |
11 |
|
|
ECC_PATCH="${PN}-${ECCVER_GNUPG}-ecc${ECCVER}.diff" |
12 |
|
|
MY_P=${P/_/} |
13 |
|
|
|
14 |
|
|
DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement" |
15 |
|
|
HOMEPAGE="http://www.gnupg.org/" |
16 |
|
|
SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2" |
17 |
|
|
|
18 |
|
|
LICENSE="GPL-2" |
19 |
|
|
SLOT="0" |
20 |
|
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos" |
21 |
|
|
IUSE="bzip2 curl ldap mta nls readline selinux smartcard static usb zlib linguas_ru" |
22 |
|
|
|
23 |
|
|
COMMON_DEPEND=" |
24 |
|
|
ldap? ( net-nds/openldap ) |
25 |
|
|
bzip2? ( app-arch/bzip2 ) |
26 |
|
|
zlib? ( sys-libs/zlib ) |
27 |
|
|
curl? ( net-misc/curl ) |
28 |
|
|
mta? ( virtual/mta ) |
29 |
|
|
readline? ( sys-libs/readline ) |
30 |
|
|
smartcard? ( =virtual/libusb-0* ) |
31 |
|
|
usb? ( =virtual/libusb-0* )" |
32 |
|
|
|
33 |
|
|
RDEPEND="!static? ( ${COMMON_DEPEND} ) |
34 |
|
|
selinux? ( sec-policy/selinux-gpg ) |
35 |
|
|
nls? ( virtual/libintl )" |
36 |
|
|
|
37 |
|
|
DEPEND="${COMMON_DEPEND} |
38 |
|
|
dev-lang/perl |
39 |
|
|
nls? ( sys-devel/gettext )" |
40 |
|
|
|
41 |
|
|
S="${WORKDIR}/${MY_P}" |
42 |
|
|
|
43 |
|
|
src_prepare() { |
44 |
|
|
# Install RU man page in right location |
45 |
|
|
sed -e "/^man_MANS =/s/ gpg\.ru\.1//" -i doc/Makefile.in || die "sed doc/Makefile.in failed" |
46 |
|
|
|
47 |
|
|
# Fix PIC definitions |
48 |
|
|
sed -i -e 's:PIC:__PIC__:' mpi/i386/mpih-{add,sub}1.S intl/relocatable.c \ |
49 |
|
|
|| die "sed PIC failed" |
50 |
|
|
sed -i -e 's:if PIC:ifdef __PIC__:' mpi/sparc32v8/mpih-mul{1,2}.S || \ |
51 |
|
|
die "sed PIC failed" |
52 |
|
|
} |
53 |
|
|
|
54 |
|
|
src_configure() { |
55 |
|
|
# Certain sparc32 machines seem to have trouble building correctly with |
56 |
|
|
# -mcpu enabled. While this is not a gnupg problem, it is a temporary |
57 |
|
|
# fix until the gcc problem can be tracked down. |
58 |
|
|
if [ "${ARCH}" == "sparc" ] && [ "${PROFILE_ARCH}" == "sparc" ]; then |
59 |
|
|
filter-flags -mcpu=supersparc -mcpu=v8 -mcpu=v7 |
60 |
|
|
fi |
61 |
|
|
|
62 |
|
|
# 'USE=static' support was requested in #29299 |
63 |
|
|
use static && append-ldflags -static |
64 |
|
|
|
65 |
|
|
econf \ |
66 |
|
|
--docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
67 |
|
|
$(use_enable ldap) \ |
68 |
|
|
$(use_enable mta mailto) \ |
69 |
|
|
--enable-hkp \ |
70 |
|
|
--enable-finger \ |
71 |
|
|
$(use_with !zlib included-zlib) \ |
72 |
|
|
$(use_with curl libcurl /usr) \ |
73 |
|
|
$(use_enable nls) \ |
74 |
|
|
$(use_enable bzip2) \ |
75 |
|
|
$(use_enable smartcard card-support) \ |
76 |
|
|
$(use_enable selinux selinux-support) \ |
77 |
|
|
--without-capabilities \ |
78 |
|
|
$(use_with readline) \ |
79 |
|
|
$(use_with usb libusb /usr) \ |
80 |
|
|
--enable-static-rnd=linux \ |
81 |
|
|
--libexecdir="${EPREFIX}/usr/libexec" \ |
82 |
|
|
--enable-noexecstack \ |
83 |
|
|
CC_FOR_BUILD=$(tc-getBUILD_CC) \ |
84 |
|
|
${myconf} |
85 |
|
|
} |
86 |
|
|
|
87 |
|
|
src_install() { |
88 |
|
|
emake DESTDIR="${D}" install |
89 |
|
|
|
90 |
|
|
# keep the documentation in /usr/share/doc/... |
91 |
|
|
rm -rf "${ED}usr/share/gnupg/FAQ" "${ED}usr/share/gnupg/faq.html" || die |
92 |
|
|
|
93 |
|
|
dodoc AUTHORS BUGS ChangeLog NEWS PROJECTS README THANKS \ |
94 |
|
|
TODO VERSION doc/{FAQ,HACKING,DETAILS,OpenPGP} |
95 |
|
|
|
96 |
|
|
exeinto /usr/libexec/gnupg |
97 |
|
|
doexe tools/make-dns-cert |
98 |
|
|
|
99 |
|
|
# install RU documentation in right location |
100 |
|
|
if use linguas_ru; then |
101 |
|
|
cp doc/gpg.ru.1 "${T}/gpg.1" || die |
102 |
|
|
doman -i18n=ru "${T}/gpg.1" |
103 |
|
|
fi |
104 |
|
|
} |
105 |
|
|
|
106 |
|
|
pkg_postinst() { |
107 |
|
|
ewarn "If you are using a non-Linux system, or a kernel older than 2.6.9," |
108 |
|
|
ewarn "you MUST make the gpg binary setuid." |
109 |
|
|
echo |
110 |
|
|
# if use !bindist && use ecc; then |
111 |
|
|
# ewarn |
112 |
|
|
# ewarn "The elliptical curves patch is experimental" |
113 |
|
|
# ewarn "Further info available at http://alumnes.eps.udl.es/%7Ed4372211/index.en.html" |
114 |
|
|
# fi |
115 |
|
|
elog |
116 |
|
|
elog "See http://www.gentoo.org/doc/en/gnupg-user.xml for documentation on gnupg" |
117 |
|
|
elog |
118 |
|
|
elog "If you wish to view images emerge:" |
119 |
|
|
elog "media-gfx/xloadimage, media-gfx/xli or any other viewer" |
120 |
|
|
elog "Remember to use photo-viewer option in configuration file to activate the right viewer" |
121 |
|
|
} |