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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jan 1 16:19:30 2013 UTC (18 months, 1 week ago) by alonbl
Branch: MAIN
Version bump, per bug#449546, remove idea USE and handling as it is provided by package, minor cleanups

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, unsigned Manifest commit)

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

  ViewVC Help
Powered by ViewVC 1.1.20