/[gentoo-x86]/dev-libs/apr/apr-1.4.5.ebuild
Gentoo

Contents of /dev-libs/apr/apr-1.4.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri Nov 11 19:17:50 2011 UTC (3 years, 1 month ago) by hwoarang
Branch: MAIN
Changes since 1.7: +15 -11 lines
 Use EAPI=4. Add static-libs USE flag. Patch by Arfrever.

(Portage version: 2.2.0_alpha73/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/apr/apr-1.4.5.ebuild,v 1.7 2011/10/29 18:36:35 armin76 Exp $
4
5 EAPI="4"
6
7 inherit autotools eutils libtool multilib
8
9 DESCRIPTION="Apache Portable Runtime Library"
10 HOMEPAGE="http://apr.apache.org/"
11 SRC_URI="mirror://apache/apr/${P}.tar.bz2"
12
13 LICENSE="Apache-2.0"
14 SLOT="1"
15 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
16 IUSE="doc elibc_FreeBSD older-kernels-compatibility static-libs +urandom +uuid"
17 RESTRICT="test"
18
19 RDEPEND="uuid? ( !elibc_FreeBSD? ( >=sys-apps/util-linux-2.16 ) )"
20 DEPEND="${RDEPEND}
21 doc? ( app-doc/doxygen )"
22
23 DOCS=(CHANGES NOTICE README)
24
25 src_prepare() {
26 # Ensure that system libtool is used.
27 sed -e 's:${installbuilddir}/libtool:/usr/bin/libtool:' -i apr-config.in || die "sed failed"
28 sed -e 's:@LIBTOOL@:$(SHELL) /usr/bin/libtool:' -i build/apr_rules.mk.in || die "sed failed"
29
30 AT_M4DIR="build" eautoreconf
31 elibtoolize
32
33 epatch "${FILESDIR}/config.layout.patch"
34 }
35
36 src_configure() {
37 local myconf
38
39 if use older-kernels-compatibility; then
40 local apr_cv_accept4 apr_cv_dup3 apr_cv_epoll_create1 apr_cv_sock_cloexec
41 export apr_cv_accept4="no"
42 export apr_cv_dup3="no"
43 export apr_cv_epoll_create1="no"
44 export apr_cv_sock_cloexec="no"
45 fi
46
47 if use urandom; then
48 myconf+=" --with-devrandom=/dev/urandom"
49 else
50 myconf+=" --with-devrandom=/dev/random"
51 fi
52
53 if ! use uuid; then
54 local apr_cv_osuuid
55 export apr_cv_osuuid="no"
56 fi
57
58 CONFIG_SHELL="/bin/bash" econf \
59 --enable-layout=gentoo \
60 --enable-nonportable-atomics \
61 --enable-threads \
62 ${myconf}
63
64 rm -f libtool
65 }
66
67 src_compile() {
68 emake
69
70 if use doc; then
71 emake dox
72 fi
73 }
74
75 src_install() {
76 default
77
78 find "${ED}" -name "*.la" -exec rm -f {} +
79
80 if use doc; then
81 dohtml -r docs/dox/html/*
82 fi
83
84 if ! use static-libs; then
85 find "${ED}" -name "*.a" -exec rm -f {} +
86 fi
87
88 # This file is only used on AIX systems, which Gentoo is not,
89 # and causes collisions between the SLOTs, so remove it.
90 rm -f "${ED}usr/$(get_libdir)/apr.exp"
91 }

  ViewVC Help
Powered by ViewVC 1.1.20