1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# 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.3 2009/03/26 14:24:48 drizzt Exp $
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"
# This tar.gz is created on-the-fly when downloaded from
# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=${GNULIB_COMMIT_GITID};sf=tgz
# So to have persistent checksums, we need to download once and cache it.
#
# To get a new version, download a "snapshot" from
# http://git.savannah.gnu.org/gitweb/?p=gnulib.git
# take the commit-id as GNULIB_COMMIT_GITID
# and the committer's timestamp (not the author's one), year to second, UTC
# as the ebuild version.
#
# To see what the last commit message for the current version was, use
# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=${GNULIB_COMMIT_GITID}
#
GNULIB_COMMIT_GITID=8d2524ce78ca107074727cbd8780c26a203a107c
SRC_URI="http://dev.gentoo.org/~drizzt/distfiles/${PN}-${GNULIB_COMMIT_GITID}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86-fbsd"
IUSE="doc"
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
epatch "${FILESDIR}"/${P}-scandir.patch
# 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() {
dodoc README ChangeLog
if use doc; then
dohtml doc/gnulib.html
doinfo doc/gnulib.info
fi
insinto /usr/share/${PN}
doins -r lib
doins -r m4
doins -r modules
doins -r build-aux
doins -r top
# install the real script
exeinto /usr/share/${PN}
doexe gnulib-tool
# 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"
}
|