| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/libtool/libtool-2.4-r4.ebuild,v 1.1 2011/10/20 03:39:19 vapier Exp $
|
| 4 |
|
| 5 |
EAPI="2" #356089
|
| 6 |
|
| 7 |
LIBTOOLIZE="true" #225559
|
| 8 |
WANT_LIBTOOL="none"
|
| 9 |
inherit eutils autotools multilib
|
| 10 |
|
| 11 |
if [[ ${PV} == "9999" ]] ; then
|
| 12 |
EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
|
| 13 |
http://git.savannah.gnu.org/r/${PN}.git"
|
| 14 |
inherit git-2
|
| 15 |
else
|
| 16 |
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
|
| 17 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
| 18 |
fi
|
| 19 |
|
| 20 |
DESCRIPTION="A shared library tool for developers"
|
| 21 |
HOMEPAGE="http://www.gnu.org/software/libtool/"
|
| 22 |
|
| 23 |
LICENSE="GPL-2"
|
| 24 |
SLOT="2"
|
| 25 |
IUSE="static-libs test vanilla"
|
| 26 |
|
| 27 |
RDEPEND="sys-devel/gnuconfig
|
| 28 |
!<sys-devel/autoconf-2.62:2.5
|
| 29 |
!<sys-devel/automake-1.11.1:1.11
|
| 30 |
!=sys-devel/libtool-2*:1.5"
|
| 31 |
DEPEND="${RDEPEND}
|
| 32 |
test? ( !<sys-devel/binutils-2.20 )
|
| 33 |
app-arch/xz-utils"
|
| 34 |
[[ ${PV} == "9999" ]] && DEPEND+=" sys-apps/help2man"
|
| 35 |
|
| 36 |
src_unpack() {
|
| 37 |
if [[ ${PV} == "9999" ]] ; then
|
| 38 |
git-2_src_unpack
|
| 39 |
cd "${S}"
|
| 40 |
./bootstrap || die
|
| 41 |
else
|
| 42 |
xz -dc "${DISTDIR}"/${A} > ${P}.tar #356089
|
| 43 |
unpack ./${P}.tar
|
| 44 |
fi
|
| 45 |
}
|
| 46 |
|
| 47 |
src_prepare() {
|
| 48 |
use vanilla && return 0
|
| 49 |
|
| 50 |
epatch "${FILESDIR}"/${P}-openmp.patch #349078
|
| 51 |
|
| 52 |
cd libltdl/m4
|
| 53 |
epatch "${FILESDIR}"/1.5.20/${PN}-1.5.20-use-linux-version-in-fbsd.patch #109105
|
| 54 |
cd ..
|
| 55 |
AT_NOELIBTOOLIZE=yes eautoreconf
|
| 56 |
cd ..
|
| 57 |
AT_NOELIBTOOLIZE=yes eautoreconf
|
| 58 |
}
|
| 59 |
|
| 60 |
src_configure() {
|
| 61 |
# the libtool script uses bash code in it and at configure time, tries
|
| 62 |
# to find a bash shell. if /bin/sh is bash, it uses that. this can
|
| 63 |
# cause problems for people who switch /bin/sh on the fly to other
|
| 64 |
# shells, so just force libtool to use /bin/bash all the time.
|
| 65 |
export CONFIG_SHELL=/bin/bash
|
| 66 |
|
| 67 |
econf $(use_enable static-libs static)
|
| 68 |
}
|
| 69 |
|
| 70 |
src_install() {
|
| 71 |
emake DESTDIR="${D}" install || die
|
| 72 |
dodoc AUTHORS ChangeLog* NEWS README THANKS TODO doc/PLATFORMS
|
| 73 |
|
| 74 |
# While the libltdl.la file is not used directly, the m4 ltdl logic
|
| 75 |
# keys off of its existence when searching for ltdl support. #293921
|
| 76 |
#use static-libs || find "${D}" -name libltdl.la -delete
|
| 77 |
|
| 78 |
# Building libtool with --disable-static will cause the installed
|
| 79 |
# helper to not build static objects by default. This is undesirable
|
| 80 |
# for crappy packages that utilize the system libtool, so undo that.
|
| 81 |
dosed '1,/^build_old_libs=/{/^build_old_libs=/{s:=.*:=yes:}}' /usr/bin/libtool || die
|
| 82 |
|
| 83 |
for x in $(find "${D}" -name config.guess -o -name config.sub) ; do
|
| 84 |
rm -f "${x}" ; ln -sf /usr/share/gnuconfig/${x##*/} "${x}"
|
| 85 |
done
|
| 86 |
}
|
| 87 |
|
| 88 |
pkg_preinst() {
|
| 89 |
preserve_old_lib /usr/$(get_libdir)/libltdl.so.3
|
| 90 |
}
|
| 91 |
|
| 92 |
pkg_postinst() {
|
| 93 |
preserve_old_lib_notify /usr/$(get_libdir)/libltdl.so.3
|
| 94 |
}
|