| 1 |
# Copyright 1999-2006 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/libtool/libtool-1.5.20.ebuild,v 1.8 2005/10/18 13:03:11 agriffis Exp ${P}-r1.ebuild,v 1.8 2002/10/04 06:34:42 kloeri Exp $
|
| 4 |
|
| 5 |
EAPI="prefix"
|
| 6 |
|
| 7 |
inherit eutils
|
| 8 |
|
| 9 |
DESCRIPTION="A shared library tool for developers"
|
| 10 |
HOMEPAGE="http://www.gnu.org/software/libtool/libtool.html"
|
| 11 |
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="GPL-2"
|
| 14 |
SLOT="1.5"
|
| 15 |
KEYWORDS="~amd64 ~ppc-macos ~x86 ~x86-macos"
|
| 16 |
IUSE=""
|
| 17 |
|
| 18 |
RDEPEND="sys-devel/gnuconfig
|
| 19 |
>=sys-devel/autoconf-2.59
|
| 20 |
>=sys-devel/automake-1.9"
|
| 21 |
DEPEND="${RDEPEND}
|
| 22 |
sys-apps/help2man"
|
| 23 |
|
| 24 |
lt_setup() {
|
| 25 |
export WANT_AUTOCONF=2.5
|
| 26 |
export WANT_AUTOMAKE=1.9
|
| 27 |
}
|
| 28 |
|
| 29 |
gen_ltmain_sh() {
|
| 30 |
local date=
|
| 31 |
local PACKAGE=
|
| 32 |
local VERSION=
|
| 33 |
|
| 34 |
rm -f ltmain.shT
|
| 35 |
date=`./mkstamp < ./ChangeLog` && \
|
| 36 |
eval `egrep '^[[:space:]]*PACKAGE.*=' configure` && \
|
| 37 |
eval `egrep '^[[:space:]]*VERSION.*=' configure` && \
|
| 38 |
sed -e "s/@PACKAGE@/${PACKAGE}/" -e "s/@VERSION@/${VERSION}/" \
|
| 39 |
-e "s%@TIMESTAMP@%$date%" ./ltmain.in > ltmain.shT || return 1
|
| 40 |
|
| 41 |
mv -f ltmain.shT ltmain.sh || {
|
| 42 |
(rm -f ltmain.sh && cp ltmain.shT ltmain.sh && rm -f ltmain.shT)
|
| 43 |
return 1
|
| 44 |
}
|
| 45 |
|
| 46 |
return 0
|
| 47 |
}
|
| 48 |
|
| 49 |
src_unpack() {
|
| 50 |
lt_setup
|
| 51 |
unpack ${A}
|
| 52 |
cd "${S}"
|
| 53 |
|
| 54 |
# Make sure non of the patches touch ltmain.sh, but rather ltmain.in
|
| 55 |
rm -f ltmain.sh*
|
| 56 |
|
| 57 |
# Seems to be included in shipped tarball ...
|
| 58 |
# epatch "${FILESDIR}"/1.4.3/${PN}-1.4.2-relink-58664.patch
|
| 59 |
# epatch "${FILESDIR}"/1.4.3/${PN}-1.4.2-multilib.patch
|
| 60 |
# Mandrake patches
|
| 61 |
# epatch "${FILESDIR}"/1.4.3/${PN}-1.4.3-lib64.patch
|
| 62 |
# Fix bug #43244
|
| 63 |
# epatch "${FILESDIR}"/1.4.3/${PN}-1.4.2-fix-linkage-of-cxx-code-with-gcc.patch
|
| 64 |
epatch "${FILESDIR}"/1.4.3/${PN}-1.4.2-archive-shared.patch
|
| 65 |
epatch "${FILESDIR}"/1.5.6/${PN}-1.5.6-ltmain-SED.patch
|
| 66 |
epatch "${FILESDIR}"/1.4.3/${PN}-1.4.2-expsym-linux.patch
|
| 67 |
epatch "${FILESDIR}"/1.5.20/${PN}-1.5.20-use-linux-version-in-fbsd.patch #109105
|
| 68 |
|
| 69 |
# Gentoo Patches
|
| 70 |
# Do not create bogus entries in $dependency_libs or $libdir
|
| 71 |
# with ${D} or ${S} in them.
|
| 72 |
# <azarah@gentoo.org> - (07 April 2002)
|
| 73 |
epatch "${FILESDIR}"/1.5.10/${PN}-1.5.10-portage.patch
|
| 74 |
# If a package use an older libtool, and libtool.m4 for that
|
| 75 |
# package is updated, but not libtool, then we may run into an
|
| 76 |
# issue where internal variables are named differently. Often
|
| 77 |
# this shows up as libs being built without '.so' extension #73140
|
| 78 |
# Note: concept has already been integrated into libtool-2+
|
| 79 |
epatch "${FILESDIR}"/1.5.20/${PN}-1.5.20-version-checking.patch
|
| 80 |
sed -i "s:@_LT_VERSION@:${PV}:" libtool.m4 || die "sed libtool.m4"
|
| 81 |
# For older autoconf setups's that do not support libtool.m4,
|
| 82 |
# $max_cmd_len are never set, causing all tests against it to
|
| 83 |
# fail, resulting in 'integer expression expected' errors and
|
| 84 |
# possible misbehaviour.
|
| 85 |
# <azarah@gentoo.org> - (11 Feb 2004)
|
| 86 |
epatch "${FILESDIR}"/1.5.20/${PN}-1.5.20-ltmain_sh-max_cmd_len.patch
|
| 87 |
|
| 88 |
# Libtool's autoguessing at tag's sucks ... it get's confused
|
| 89 |
# if the tag's CC says '<CHOST>-gcc' and the env CC says 'gcc'
|
| 90 |
# or vice versa ... newer automakes specify the tag so no
|
| 91 |
# guessing is needed #67692
|
| 92 |
epatch "${FILESDIR}"/1.5.6/libtool-1.5-filter-host-tags.patch
|
| 93 |
|
| 94 |
# Libtool uses links to handle locking object files with
|
| 95 |
# dependencies. Hard links can't cross filesystems though,
|
| 96 |
# so we have to use a diff source for the link. #40992
|
| 97 |
epatch "${FILESDIR}"/1.5.10/libtool-1.5.10-locking.patch
|
| 98 |
|
| 99 |
# In some cases EGREP is not set by the build system.
|
| 100 |
epatch "${FILESDIR}"/1.5.14/libtool-1.5.14-egrep.patch
|
| 101 |
|
| 102 |
# Make sure LD_LIBRARY_PATH doesn't override RUNPATH #99593
|
| 103 |
# Note: concept has already been integrated into libtool-2+
|
| 104 |
epatch "${FILESDIR}"/1.5.20/libtool-1.5.20-override-LD_LIBRARY_PATH.patch
|
| 105 |
|
| 106 |
ebegin "Generating ltmain.sh"
|
| 107 |
gen_ltmain_sh || die "Failed to generate ltmain.sh!"
|
| 108 |
eend 0
|
| 109 |
|
| 110 |
# Now let's run all our autotool stuff so that files we patch
|
| 111 |
# below don't get regenerated on us later
|
| 112 |
cp libtool.m4 acinclude.m4
|
| 113 |
local d p
|
| 114 |
for d in . libltdl ; do
|
| 115 |
ebegin "Running autotools in '${d}'"
|
| 116 |
cd "${S}"/${d}
|
| 117 |
touch acinclude.m4
|
| 118 |
for p in aclocal "automake -c -a" autoconf ; do
|
| 119 |
${p} || die "${p}"
|
| 120 |
done
|
| 121 |
eend 0
|
| 122 |
done
|
| 123 |
cd "${S}"
|
| 124 |
|
| 125 |
epunt_cxx
|
| 126 |
}
|
| 127 |
|
| 128 |
src_compile() {
|
| 129 |
local myconf
|
| 130 |
[[ ${USERLAND} == "Darwin" ]] && myconf="--program-prefix=g"
|
| 131 |
lt_setup
|
| 132 |
econf ${myconf} || die
|
| 133 |
emake || die
|
| 134 |
}
|
| 135 |
|
| 136 |
src_install() {
|
| 137 |
make DESTDIR="${EDEST}" install || die
|
| 138 |
dodoc AUTHORS ChangeLog* NEWS README THANKS TODO doc/PLATFORMS
|
| 139 |
|
| 140 |
local x
|
| 141 |
for x in libtool libtoolize ; do
|
| 142 |
help2man ${x} > ${x}.1
|
| 143 |
doman ${x}.1
|
| 144 |
done
|
| 145 |
|
| 146 |
for x in $(find "${D}" -name config.guess -o -name config.sub) ; do
|
| 147 |
rm -f "${x}" ; ln -sf ../gnuconfig/$(basename "${x}") "${x}"
|
| 148 |
done
|
| 149 |
cd "${D}"/usr/share/libtool/libltdl
|
| 150 |
for x in config.guess config.sub ; do
|
| 151 |
rm -f ${x} ; ln -sfn ../${x} ${x}
|
| 152 |
done
|
| 153 |
}
|