Add static-libs USE flag. Patch by Arfrever.
authorMarkos Chandras <hwoarang@gentoo.org>
Fri, 11 Nov 2011 19:19:13 +0000 (19:19 +0000)
committerMarkos Chandras <hwoarang@gentoo.org>
Fri, 11 Nov 2011 19:19:13 +0000 (19:19 +0000)
Package-Manager: portage-2.2.0_alpha73/cvs/Linux x86_64

dev-libs/apr-util/ChangeLog
dev-libs/apr-util/apr-util-1.3.12.ebuild

index 9782af8a2d7308df1191b9c6492b54161f769f21..6ed7fdf4dd301f48015333f61122b2b5e3705e37 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for dev-libs/apr-util
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.170 2011/10/29 18:43:37 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.171 2011/11/11 19:19:13 hwoarang Exp $
+
+  11 Nov 2011; Markos Chandras <hwoarang@gentoo.org> apr-util-1.3.12.ebuild:
+  Add static-libs USE flag. Patch by Arfrever.
 
   29 Oct 2011; Raúl Porcel <armin76@gentoo.org> apr-util-1.3.12.ebuild:
   alpha/ia64/s390/sh/sparc stable wrt #385859
index e263dd5d6f15563639df483c7ae2d74cc3abe620..ce284863f137a88d080e45487bd87289b84f4d01 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.12.ebuild,v 1.8 2011/10/29 18:43:37 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.12.ebuild,v 1.9 2011/11/11 19:19:13 hwoarang Exp $
 
-EAPI=4
+EAPI="4"
 
 # Usually apr-util has the same PV as apr, but in case of security fixes, this may change.
 # APR_PV="${PV}"
@@ -17,7 +17,7 @@ SRC_URI="mirror://apache/apr/${P}.tar.bz2"
 LICENSE="Apache-2.0"
 SLOT="1"
 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="berkdb doc freetds gdbm ldap mysql odbc postgres sqlite"
+IUSE="berkdb doc freetds gdbm ldap mysql odbc postgres sqlite static-libs"
 RESTRICT="test"
 
 RDEPEND="dev-libs/expat
@@ -33,7 +33,7 @@ RDEPEND="dev-libs/expat
 DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )"
 
-DOCS=( CHANGES NOTICE README )
+DOCS=(CHANGES NOTICE README)
 
 src_prepare() {
        epatch "${FILESDIR}/${P}-bdb-5.2.patch"
@@ -71,23 +71,25 @@ src_configure() {
 }
 
 src_compile() {
-       emake CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
+       emake CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
 
        if use doc; then
-               emake dox || die "emake dox failed"
+               emake dox
        fi
 }
 
 src_install() {
        default
 
-       # --disable-static does not work
-       find "${ED}" -name "*.a" -exec rm -f {} +
-
-       find "${ED}" -name '*.la' -exec rm -f {} +
+       find "${ED}" -name "*.la" -exec rm -f {} +
+       find "${ED}usr/$(get_libdir)/apr-util-${SLOT}" -name "*.a" -exec rm -f {} +
 
        if use doc; then
-               dohtml -r docs/dox/html/* || die "dohtml failed"
+               dohtml -r docs/dox/html/*
+       fi
+
+       if ! use static-libs; then
+               find "${ED}" -name "*.a" -exec rm -f {} +
        fi
 
        # This file is only used on AIX systems, which Gentoo is not,