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

Contents of /net-libs/gnutls/gnutls-2.12.20.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Tue Oct 30 18:07:48 2012 UTC (2 years ago) by zerochaos
Branch: MAIN
Changes since 1.10: +2 -1 lines
gnutls-2 is not compatible with libtasn1-3 so adjust deps accordingly

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)

1 # Copyright 1999-2012 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.20.ebuild,v 1.10 2012/10/19 19:28:47 c1pher Exp $
4
5 EAPI=4
6
7 inherit autotools libtool eutils
8
9 DESCRIPTION="A TLS 1.2 and SSL 3.0 implementation for the GNU project"
10 HOMEPAGE="http://www.gnutls.org/"
11
12 if [[ "${PV}" == *pre* ]]; then
13 SRC_URI="http://daily.josefsson.org/${P%.*}/${P%.*}-${PV#*pre}.tar.gz"
14 else
15 MINOR_VERSION="${PV#*.}"
16 MINOR_VERSION="${MINOR_VERSION%%.*}"
17 if [[ $((MINOR_VERSION % 2)) == 0 ]]; then
18 #SRC_URI="ftp://ftp.gnu.org/pub/gnu/${PN}/${P}.tar.bz2"
19 SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
20 else
21 SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.bz2"
22 fi
23 unset MINOR_VERSION
24 fi
25
26 # LGPL-2.1 for libgnutls library and GPL-3 for libgnutls-extra library.
27 LICENSE="GPL-3 LGPL-2.1"
28 SLOT="0"
29 KEYWORDS="alpha amd64 arm 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"
30 IUSE="bindist +cxx doc examples guile lzo +nettle nls pkcs11 static-libs test zlib"
31
32 RDEPEND=">=dev-libs/libtasn1-0.3.4
33 <dev-libs/libtasn1-3
34 guile? ( >=dev-scheme/guile-1.8[networking] )
35 nettle? ( >=dev-libs/nettle-2.1[gmp] )
36 !nettle? ( >=dev-libs/libgcrypt-1.4.0 )
37 nls? ( virtual/libintl )
38 pkcs11? ( >=app-crypt/p11-kit-0.11 )
39 zlib? ( >=sys-libs/zlib-1.2.3.1 )
40 !bindist? ( lzo? ( >=dev-libs/lzo-2 ) )"
41 DEPEND="${RDEPEND}
42 virtual/pkgconfig
43 sys-devel/libtool
44 doc? ( dev-util/gtk-doc )
45 nls? ( sys-devel/gettext )
46 test? ( app-misc/datefudge )"
47
48 S="${WORKDIR}/${P%_pre*}"
49
50 DOCS=( AUTHORS ChangeLog NEWS README THANKS doc/TODO )
51
52 pkg_setup() {
53 if use lzo && use bindist; then
54 ewarn "lzo support is disabled for binary distribution of GnuTLS due to licensing issues."
55 fi
56 }
57
58 src_prepare() {
59 # tests/suite directory is not distributed.
60 sed -i -e 's|AC_CONFIG_FILES(\[tests/suite/Makefile\])|:|' \
61 configure.ac || die
62
63 sed -i -e 's/imagesdir = $(infodir)/imagesdir = $(htmldir)/' \
64 doc/Makefile.am || die
65
66 local dir
67 for dir in m4 lib/m4 libextra/m4; do
68 rm -f "${dir}/lt"* "${dir}/libtool.m4"
69 done
70 find . -name ltmain.sh -exec rm {} \;
71
72 epatch "${FILESDIR}"/${P}-AF_UNIX.patch
73 epatch "${FILESDIR}"/${P}-libadd.patch
74 epatch "${FILESDIR}"/${P}-glibc-2.16.patch
75 epatch "${FILESDIR}"/${P}-guile-parallelmake.patch
76
77 # support user patches
78 epatch_user
79
80 for dir in . lib libextra; do
81 pushd "${dir}" > /dev/null
82 sed -i -e '/^AM_INIT_AUTOMAKE/s/-Werror//' configure.ac || die
83 eautoreconf
84 popd > /dev/null
85 done
86
87 # Use sane .so versioning on FreeBSD.
88 elibtoolize
89 }
90
91 src_configure() {
92 local myconf
93 use bindist && myconf="--without-lzo" || myconf="$(use_with lzo)"
94 [[ "${VALGRIND_TESTS}" != "1" ]] && myconf+=" --disable-valgrind-tests"
95
96 econf \
97 --htmldir="${EPREFIX}"/usr/share/doc/${P}/html \
98 --disable-silent-rules \
99 $(use_enable cxx) \
100 $(use_enable doc gtk-doc) \
101 $(use_enable doc gtk-doc-pdf) \
102 $(use_enable guile) \
103 $(use_with !nettle libgcrypt) \
104 $(use_enable nls) \
105 $(use_with pkcs11 p11-kit) \
106 $(use_enable static-libs static) \
107 $(use_with zlib) \
108 ${myconf}
109 }
110
111 src_test() {
112 if has_version dev-util/valgrind && [[ ${VALGRIND_TESTS} != 1 ]]; then
113 elog
114 elog "You can set VALGRIND_TESTS=\"1\" to enable Valgrind tests."
115 elog
116 fi
117
118 default
119 }
120
121 src_install() {
122 default
123
124 find "${ED}" -name '*.la' -exec rm -f {} +
125
126 if use doc; then
127 dodoc doc/gnutls.{pdf,ps}
128 dohtml doc/gnutls.html
129 fi
130
131 if use examples; then
132 docinto examples
133 dodoc doc/examples/*.c
134 fi
135 }

  ViewVC Help
Powered by ViewVC 1.1.20