/[gentoo-x86]/net-libs/gnutls/gnutls-2.12.23-r6.ebuild
Gentoo

Contents of /net-libs/gnutls/gnutls-2.12.23-r6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Sat May 16 08:52:41 2015 UTC (5 years, 6 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +2 -1 lines
Fix from Chromium OS for cross-compiling.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/gnutls/gnutls-2.12.23-r6.ebuild,v 1.13 2015/04/03 17:21:34 vapier Exp $
4
5 EAPI=5
6
7 inherit autotools libtool eutils versionator
8
9 DESCRIPTION="A TLS 1.2 and SSL 3.0 implementation for the GNU project"
10 HOMEPAGE="http://www.gnutls.org/"
11 SRC_URI="ftp://ftp.gnutls.org/gcrypt/gnutls/v$(get_version_component_range 1-2)/${P}.tar.bz2"
12
13 # LGPL-2.1 for libgnutls library and GPL-3 for libgnutls-extra library.
14 LICENSE="GPL-3 LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
17 IUSE="bindist +cxx doc examples guile lzo +nettle nls pkcs11 static-libs test zlib"
18
19 RDEPEND=">=dev-libs/libtasn1-0.3.4
20 guile? ( >=dev-scheme/guile-1.8[networking] )
21 nettle? ( >=dev-libs/nettle-2.1[gmp] )
22 !nettle? ( >=dev-libs/libgcrypt-1.4.0:0 )
23 nls? ( virtual/libintl )
24 pkcs11? ( >=app-crypt/p11-kit-0.11 )
25 zlib? ( >=sys-libs/zlib-1.2.3.1 )
26 !bindist? ( lzo? ( >=dev-libs/lzo-2 ) )"
27 DEPEND="${RDEPEND}
28 virtual/pkgconfig
29 sys-devel/libtool
30 doc? ( dev-util/gtk-doc )
31 nls? ( sys-devel/gettext )
32 test? ( app-misc/datefudge )"
33
34 DOCS=( AUTHORS ChangeLog NEWS README THANKS doc/TODO )
35
36 pkg_setup() {
37 if use lzo && use bindist; then
38 ewarn "lzo support is disabled for binary distribution of GnuTLS due to licensing issues."
39 fi
40 }
41
42 src_prepare() {
43 # tests/suite directory is not distributed
44 sed -i -e 's|AC_CONFIG_FILES(\[tests/suite/Makefile\])|:|' \
45 configure.ac || die
46
47 sed -i -e 's/imagesdir = $(infodir)/imagesdir = $(htmldir)/' \
48 doc/Makefile.am || die
49
50 for dir in . lib libextra; do
51 sed -i -e '/^AM_INIT_AUTOMAKE/s/-Werror//' "${dir}/configure.ac" || die
52 done
53
54 epatch "${FILESDIR}"/${PN}-2.12.20-AF_UNIX.patch
55 epatch "${FILESDIR}"/${PN}-2.12.20-libadd.patch
56 epatch "${FILESDIR}"/${PN}-2.12.20-guile-parallelmake.patch
57 epatch "${FILESDIR}"/${P}-hppa.patch
58 epatch "${FILESDIR}"/${P}-gl-tests-getaddrinfo-skip-if-no-network.patch
59 epatch "${FILESDIR}"/${P}-gdoc-perl-5.18.patch
60 epatch "${FILESDIR}"/${P}-CVE-2013-2116.patch
61 epatch "${FILESDIR}"/${P}-CVE-2014-0092.patch
62 epatch "${FILESDIR}"/${P}-CVE-2014-1959.patch
63 epatch "${FILESDIR}"/${P}-CVE-2014-3466.patch
64 epatch "${FILESDIR}"/${P}-CVE-2014-3467.patch
65 epatch "${FILESDIR}"/${P}-CVE-2014-3468.patch
66 epatch "${FILESDIR}"/${P}-CVE-2014-3469.patch
67 epatch "${FILESDIR}"/${P}-cross-compile.patch
68
69 # support user patches
70 epatch_user
71
72 eautoreconf
73
74 # Use sane .so versioning on FreeBSD.
75 elibtoolize
76 }
77
78 src_configure() {
79 local myconf
80 use bindist && myconf="--without-lzo" || myconf="$(use_with lzo)"
81 [[ "${VALGRIND_TESTS}" != "1" ]] && myconf+=" --disable-valgrind-tests"
82
83 econf \
84 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
85 --without-libgcrypt-prefix \
86 --without-libnettle-prefix \
87 --without-libpth-prefix \
88 --without-libreadline-prefix \
89 $(use_enable cxx) \
90 $(use_enable doc gtk-doc) \
91 $(use_enable doc gtk-doc-pdf) \
92 $(use_enable guile) \
93 $(use_with !nettle libgcrypt) \
94 $(use_enable nls) \
95 $(use_with pkcs11 p11-kit) \
96 $(use_enable static-libs static) \
97 $(use_with zlib) \
98 ${myconf}
99 }
100
101 src_test() {
102 if has_version dev-util/valgrind && [[ ${VALGRIND_TESTS} != 1 ]]; then
103 elog
104 elog "You can set VALGRIND_TESTS=\"1\" to enable Valgrind tests."
105 elog
106 fi
107
108 # parallel testing often fails
109 emake -j1 check
110 }
111
112 src_install() {
113 default
114
115 prune_libtool_files
116
117 if use doc; then
118 dodoc doc/gnutls.{pdf,ps}
119 dohtml doc/gnutls.html
120 fi
121
122 if use examples; then
123 docinto examples
124 dodoc doc/examples/*.c
125 fi
126 }

  ViewVC Help
Powered by ViewVC 1.1.20