summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Redaelli <drizzt@gentoo.org>2009-03-26 14:24:48 +0000
committerTimothy Redaelli <drizzt@gentoo.org>2009-03-26 14:24:48 +0000
commitf823db18fc5b5b6e59e9cd8bab93ed62c4e9a8e3 (patch)
treecb962fccd2c62bf1154a99e173ed94a687a35da4 /dev-libs/gnulib
parentPartial sync from Emacs overlay. (diff)
downloadgentoo-2-f823db18fc5b5b6e59e9cd8bab93ed62c4e9a8e3.tar.gz
gentoo-2-f823db18fc5b5b6e59e9cd8bab93ed62c4e9a8e3.tar.bz2
gentoo-2-f823db18fc5b5b6e59e9cd8bab93ed62c4e9a8e3.zip
Create a static libgnu.a.
Backport from prefix overlay (Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/gnulib')
-rw-r--r--dev-libs/gnulib/ChangeLog6
-rw-r--r--dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild40
2 files changed, 43 insertions, 3 deletions
diff --git a/dev-libs/gnulib/ChangeLog b/dev-libs/gnulib/ChangeLog
index 5debc5b7d05d..a305e56c9813 100644
--- a/dev-libs/gnulib/ChangeLog
+++ b/dev-libs/gnulib/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/gnulib
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/gnulib/ChangeLog,v 1.8 2009/03/04 15:37:25 drizzt Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gnulib/ChangeLog,v 1.9 2009/03/26 14:24:48 drizzt Exp $
+
+ 26 Mar 2009; Timothy Redaelli <drizzt@gentoo.org>
+ gnulib-2009.03.03.14.07.45.ebuild:
+ Create a static libgnu.a. Backport from prefix overlay
04 Mar 2009; Timothy Redaelli <drizzt@gentoo.org>
gnulib-2009.03.03.14.07.45.ebuild, gnulib-9999-r1.ebuild:
diff --git a/dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild b/dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild
index 05e39e06234e..ee8341961c24 100644
--- a/dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild
+++ b/dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild,v 1.2 2009/03/04 15:37:25 drizzt Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gnulib/gnulib-2009.03.03.14.07.45.ebuild,v 1.3 2009/03/26 14:24:48 drizzt Exp $
-inherit eutils
+inherit eutils autotools
DESCRIPTION="Gnulib is a library of common routines intended to be shared at the source level."
HOMEPAGE="http://www.gnu.org/software/gnulib"
@@ -32,8 +32,17 @@ DEPEND=""
RDEPEND=""
S="${WORKDIR}"/${PN}
+MY_S="${WORKDIR}"/${P}
src_unpack() {
+ local requested_gnulib_modules
+
+ case ${CHOST} in
+ *-freebsd*)
+ requested_gnulib_modules="mathl strndup"
+ ;;
+ esac
+
unpack ${A}
cd "${S}" || die
epatch "${FILESDIR}"/${PN}-2008.07.23-rpl_getopt.patch
@@ -41,12 +50,36 @@ src_unpack() {
# Remove the broken pxref
sed -i '$d' doc/ld-version-script.texi || die "cannot fix ld-version-script.texi"
+
+ [[ -z "$requested_gnulib_modules" ]] && return
+
+ "${S}"/gnulib-tool --create-testdir --dir="${MY_S}" \
+ ${requested_gnulib_modules} || die
+
+ cd "${MY_S}" || die
+
+ # define both libgnu.a and the headers as to-be-installed
+ LANG=C \
+ sed -e '
+ s,noinst_HEADERS,include_HEADERS,;
+ s,noinst_LIBRARIES,lib_LIBRARIES,;
+ s,noinst_LTLIBRARIES,lib_LTLIBRARIES,;
+ s,EXTRA_DIST =$,&\
+EXTRA_HEADERS =,;
+ s,BUILT_SOURCES += \([/a-zA-Z0-9_-][/a-zA-Z0-9_-]*\.h\|\$([_A-Z0-9][_A-Z0-9]*_H)\)$,&\
+include_HEADERS += \1,;
+ ' -i gllib/Makefile.am || die "cannot fix gllib/Makefile.am"
+
+ eautoreconf
}
src_compile() {
if use doc; then
emake -C doc info html || die "emake failed"
fi
+ cd "${MY_S}" || return
+ econf --prefix=/usr/$(get_libdir)/${PN}
+ emake || die "cannot make ${P}"
}
src_install() {
@@ -69,4 +102,7 @@ src_install() {
# create and install the wrapper
dosym /usr/share/${PN}/gnulib-tool /usr/bin/gnulib-tool
+
+ cd "${MY_S}" || return
+ emake install DESTDIR="${D}" || die "make install failed"
}