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

Contents of /app-crypt/gnupg/gnupg-1.4.14.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Aug 4 11:46:31 2013 UTC (11 months, 3 weeks ago) by ago
Branch: MAIN
Changes since 1.7: +2 -2 lines
Stable for ia64, wrt bug #478184

(Portage version: 2.1.12.2/cvs/Linux ppc64, RepoMan options: --include-arches="ia64", signed Manifest commit with key 7194459F)

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.14.ebuild,v 1.7 2013/07/30 12:31:11 ago Exp $
4
5 EAPI="5"
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 # bug#469388
48 sed -i -e 's/--batch --dearmor/--homedir . --batch --dearmor/' checks/Makefile.in
49
50 # Fix PIC definitions
51 sed -i -e 's:PIC:__PIC__:' mpi/i386/mpih-{add,sub}1.S intl/relocatable.c \
52 || die "sed PIC failed"
53 sed -i -e 's:if PIC:ifdef __PIC__:' mpi/sparc32v8/mpih-mul{1,2}.S || \
54 die "sed PIC failed"
55 }
56
57 src_configure() {
58 # Certain sparc32 machines seem to have trouble building correctly with
59 # -mcpu enabled. While this is not a gnupg problem, it is a temporary
60 # fix until the gcc problem can be tracked down.
61 if [ "${ARCH}" == "sparc" ] && [ "${PROFILE_ARCH}" == "sparc" ]; then
62 filter-flags -mcpu=supersparc -mcpu=v8 -mcpu=v7
63 fi
64
65 # 'USE=static' support was requested in #29299
66 use static && append-ldflags -static
67
68 econf \
69 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
70 $(use_enable ldap) \
71 $(use_enable mta mailto) \
72 --enable-hkp \
73 --enable-finger \
74 $(use_with !zlib included-zlib) \
75 $(use_with curl libcurl /usr) \
76 $(use_enable nls) \
77 $(use_enable bzip2) \
78 $(use_enable smartcard card-support) \
79 $(use_enable selinux selinux-support) \
80 --without-capabilities \
81 $(use_with readline) \
82 $(use_with usb libusb /usr) \
83 --enable-static-rnd=linux \
84 --libexecdir="${EPREFIX}/usr/libexec" \
85 --enable-noexecstack \
86 CC_FOR_BUILD=$(tc-getBUILD_CC) \
87 ${myconf}
88 }
89
90 src_install() {
91 default
92
93 # keep the documentation in /usr/share/doc/...
94 rm -rf "${ED}usr/share/gnupg/FAQ" "${ED}usr/share/gnupg/faq.html" || die
95
96 dodoc AUTHORS BUGS ChangeLog NEWS PROJECTS README THANKS \
97 TODO VERSION doc/{FAQ,HACKING,DETAILS,OpenPGP}
98
99 exeinto /usr/libexec/gnupg
100 doexe tools/make-dns-cert
101
102 # install RU documentation in right location
103 if use linguas_ru; then
104 cp doc/gpg.ru.1 "${T}/gpg.1" || die
105 doman -i18n=ru "${T}/gpg.1"
106 fi
107 }
108
109 pkg_postinst() {
110 ewarn "If you are using a non-Linux system, or a kernel older than 2.6.9,"
111 ewarn "you MUST make the gpg binary setuid."
112 echo
113 # if use !bindist && use ecc; then
114 # ewarn
115 # ewarn "The elliptical curves patch is experimental"
116 # ewarn "Further info available at http://alumnes.eps.udl.es/%7Ed4372211/index.en.html"
117 # fi
118 elog
119 elog "See http://www.gentoo.org/doc/en/gnupg-user.xml for documentation on gnupg"
120 elog
121 elog "If you wish to view images emerge:"
122 elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
123 elog "Remember to use photo-viewer option in configuration file to activate the right viewer"
124 }

  ViewVC Help
Powered by ViewVC 1.1.20