summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/libperl/libperl-5.8.6.ebuild')
-rw-r--r--sys-devel/libperl/libperl-5.8.6.ebuild79
1 files changed, 31 insertions, 48 deletions
diff --git a/sys-devel/libperl/libperl-5.8.6.ebuild b/sys-devel/libperl/libperl-5.8.6.ebuild
index 59456b4378e2..b490fb81ca16 100644
--- a/sys-devel/libperl/libperl-5.8.6.ebuild
+++ b/sys-devel/libperl/libperl-5.8.6.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/libperl/libperl-5.8.6.ebuild,v 1.18 2005/11/14 21:42:02 mcummings Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/libperl/libperl-5.8.6.ebuild,v 1.1 2004/11/30 21:01:58 rac Exp $
# The basic theory based on comments from Daniel Robbins <drobbins@gentoo.org>.
#
@@ -52,9 +52,14 @@
#
# Martin Schlemmer <azarah@gentoo.org> (28 Dec 2002).
-IUSE="berkdb debug gdbm ithreads"
+IUSE="berkdb debug gdbm ithreads uclibc"
-inherit eutils flag-o-matic toolchain-funcs
+inherit eutils flag-o-matic
+
+# Perl has problems compiling with -Os in your flags
+use uclibc || replace-flags "-Os" "-O2"
+# This flag makes compiling crash in interesting ways
+filter-flags "-malign-double"
# The slot of this binary compat version of libperl.so
PERLSLOT="1"
@@ -68,7 +73,7 @@ HOMEPAGE="http://www.perl.org"
SLOT="${PERLSLOT}"
LIBPERL="libperl.so.${PERLSLOT}.${SHORT_PV}"
LICENSE="Artistic GPL-2"
-KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh sparc x86"
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390 ~sh"
# rac 2004.08.06
@@ -78,11 +83,12 @@ KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh sparc x86
# badly when you -n it, because it won't exist and will therefore try
# to build itself again ad infinitum.
-RESTRICT="test"
+RESTRICT="maketest"
-DEPEND="!elibc_uclibc? ( sys-apps/groff )
+DEPEND="!uclibc? ( sys-apps/groff )
berkdb? ( sys-libs/db )
- gdbm? ( >=sys-libs/gdbm-1.8.0 )"
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ >=sys-apps/portage-2.0.45-r4"
RDEPEND="
berkdb? ( sys-libs/db )
@@ -129,52 +135,33 @@ src_unpack() {
#
# LIBPERL=libperl.so.${SLOT}.`echo ${PV} | cut -d. -f1,2`
#
- cd ${S}; epatch ${FILESDIR}/${PN}-create-libperl-soname.patch
+ cd ${S}; epatch ${FILESDIR}/${P}-create-libperl-soname.patch
# uclibc support - dragonheart 2004.06.16
- cd ${S}; epatch ${FILESDIR}/${PN}-uclibc.patch
+ cd ${S}; epatch ${FILESDIR}/${P}-uclibc.patch
# Configure makes an unwarranted assumption that /bin/ksh is a
# good shell. This patch makes it revert to using /bin/sh unless
# /bin/ksh really is executable. Should fix bug 42665.
# rac 2004.06.09
- cd ${S}; epatch ${FILESDIR}/${PN}-noksh.patch
-
- # we need the same @INC-inversion magic here we do in perl
- cd ${S}; epatch ${FILESDIR}/${PN}-reorder-INC.patch
+ cd ${S}; epatch ${FILESDIR}/${P}-noksh.patch
}
src_compile() {
- # Perl has problems compiling with -Os in your flags
- use elibc_uclibc || replace-flags "-Os" "-O2"
- # This flag makes compiling crash in interesting ways
- filter-flags "-malign-double"
export LC_ALL="C"
local myconf=""
- if [[ ${KERNEL} == "FreeBSD" && "${ELIBC}" = "FreeBsd" ]]; then
- osname="freebsd"
- elif [[ ${KERNEL} == "NetBSD" ]]; then
- osname="netbsd"
- else
- osname="linux"
- fi
-
if use ithreads
then
einfo "using ithreads"
mythreading="-multi"
myconf="-Dusethreads ${myconf}"
- myarch=$(get_abi_CHOST)
- myarch="${myarch%%-*}-${osname}-thread"
+ myarch="${CHOST%%-*}-linux-thread"
else
- myarch=$(get_abi_CHOST)
- myarch="${myarch%%-*}-${osname}"
+ myarch="${CHOST%%-*}-linux"
fi
- ewarn "myarch: ${myarch}"
-
if use gdbm
then
myconf="${myconf} -Di_gdbm"
@@ -205,15 +192,11 @@ src_compile() {
rm -f config.sh Policy.sh
- [ -n "${ABI}" ] && myconf="${myconf} -Dusrinc=$(get_ml_incdir)"
-
- [[ ${ELIBC} == "FreeBSD" ]] && myconf="${myconf} -Dlibc=/usr/lib/libc.a"
-
sh Configure -des \
-Darchname="${myarch}" \
-Dcccdlflags='-fPIC' \
-Dccdlflags='-rdynamic' \
- -Dcc="$(tc-getCC)" \
+ -Dcc="${CC:-gcc}" \
-Dprefix='/usr' \
-Dvendorprefix='/usr' \
-Dsiteprefix='/usr' \
@@ -230,7 +213,7 @@ src_compile() {
${myconf} || die
emake -j1 -f Makefile depend || die "Couldn't make libperl.so depends"
- emake -j1 -f Makefile LIBPERL=${LIBPERL} ${LIBPERL} || die "Unable to make libperl.so"
+ emake -j1 -f Makefile ${LIBPERL} || die "Unable to make libperl.so"
mv ${LIBPERL} ${WORKDIR}
}
@@ -247,9 +230,9 @@ src_install() {
# the library ...
local coredir="/usr/lib/perl5/${PV}/${myarch}${mythreading}/CORE"
dodir ${coredir}
- dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/${LIBPERL}
- dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl.so.${PERLSLOT}
- dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl.so
+ dosym ../../../../${LIBPERL} ${coredir}/${LIBPERL}
+ dosym ../../../../${LIBPERL} ${coredir}/libperl.so.${PERLSLOT}
+ dosym ../../../../${LIBPERL} ${coredir}/libperl.so
# Fix for "stupid" modules and programs
dodir /usr/lib/perl5/site_perl/${PV}/${myarch}${mythreading}
@@ -319,19 +302,19 @@ EOF
pkg_postinst() {
# Make sure we do not have stale/invalid libperl.so 's ...
- if [ -f "${ROOT}usr/$(get_libdir)/libperl.so" -a ! -L "${ROOT}usr/$(get_libdir)/libperl.so" ]
+ if [ -f "${ROOT}usr/lib/libperl.so" -a ! -L "${ROOT}usr/lib/libperl.so" ]
then
- mv -f ${ROOT}usr/$(get_libdir)/libperl.so ${ROOT}usr/$(get_libdir)/libperl.so.old
+ mv -f ${ROOT}usr/lib/libperl.so ${ROOT}usr/lib/libperl.so.old
fi
# Next bit is to try and setup the /usr/lib/libperl.so symlink
# properly ...
- local libnumber="`ls -1 ${ROOT}usr/$(get_libdir)/libperl.so.?.* | grep -v '\.old' | wc -l`"
+ local libnumber="`ls -1 ${ROOT}usr/lib/libperl.so.?.* | grep -v '\.old' | wc -l`"
if [ "${libnumber}" -eq 1 ]
then
# Only this version of libperl is installed, so just link libperl.so
# to the *soname* version of it ...
- ln -snf libperl.so.${PERLSLOT} ${ROOT}usr/$(get_libdir)/libperl.so
+ ln -snf libperl.so.${PERLSLOT} ${ROOT}usr/lib/libperl.so
else
if [ -x "${ROOT}/usr/bin/perl" ]
then
@@ -340,7 +323,7 @@ pkg_postinst() {
# to that *soname* version of libperl.so ...
local perlversion="`${ROOT}/usr/bin/perl -V:version | cut -d\' -f2 | cut -d. -f1,2`"
- cd ${ROOT}usr/$(get_libdir)
+ cd ${ROOT}usr/lib
# Link libperl.so to the *soname* versioned lib ...
ln -snf `echo libperl.so.?.${perlversion} | cut -d. -f1,2,3` libperl.so
else
@@ -348,12 +331,12 @@ pkg_postinst() {
# Nope, we are not so lucky ... try to figure out what version
# is the latest, and keep fingers crossed ...
- for x in `ls -1 ${ROOT}usr/$(get_libdir)/libperl.so.?.*`
+ for x in `ls -1 ${ROOT}usr/lib/libperl.so.?.*`
do
latest="${x}"
done
- cd ${ROOT}usr/$(get_libdir)
+ cd ${ROOT}usr/lib
# Link libperl.so to the *soname* versioned lib ...
ln -snf `echo ${latest##*/} | cut -d. -f1,2,3` libperl.so
fi