# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /var/cvsroot/gentoo-x86/sys-devel/perl/perl-5.6.1-r3.ebuild,v 1.8 2002/08/14 11:56:44 murphy Exp $ S=${WORKDIR}/${P} DESCRIPTION="Larry Wall's Practical Extraction and Reporting Language" SRC_URI="ftp://ftp.perl.org/pub/perl/CPAN/src/${P}.tar.gz" HOMEPAGE="http://www.perl.org" LICENSE="Artistic GPL-2" SLOT="0" KEYWORDS="x86 ppc sparc sparc64" DEPEND="virtual/glibc sys-apps/groff berkdb? ( >=sys-libs/db-3.2.3h-r3 =sys-libs/db-1.85-r1 ) gdbm? ( >=sys-libs/gdbm-1.8.0 )" RDEPEND="virtual/glibc berkdb? ( >=sys-libs/db-3.2.3h-r3 =sys-libs/db-1.85-r1 ) gdbm? ( >=sys-libs/gdbm-1.8.0 )" src_compile() { local myconf if [ "`use gdbm`" ] then myconf="-Di_gdbm" fi if [ "`use berkdb`" ] then myconf="${myconf} -Di_db -Di_ndbm" else myconf="${myconf} -Ui_db -Ui_ndbm" fi # configure for libperl.so sh Configure -des \ -Darchname=${CHOST%%-*}-linux \ -Dcccdlflags='-fPIC' \ -Dccdlflags='-rdynamic' \ -Dprefix=/usr \ -Doptimize="${CFLAGS}" \ -Duselargefiles \ -Duseshrplib \ -Dlibperl=libperl.so \ -Dd_dosuid \ -Dd_semctl_semun \ ${myconf} || die # add optimization flags cp config.sh config.sh.orig sed -e "s/optimize='-O2'/optimize=\'${CFLAGS}\'/" config.sh.orig > config.sh # create libperl.so and move it out of the way mv -f Makefile Makefile_orig sed -e 's#^CCDLFLAGS = -rdynamic -Wl,-rpath,/usr/lib/perl5/.*#CCDLFLAGS = -rdynamic#' \ Makefile_orig > Makefile export PARCH=`grep myarchname config.sh | cut -f2 -d"'"` make libperl.so || die mv libperl.so ${WORKDIR} # starting from scratch again cd ${WORKDIR} rm -rf ${S} unpack ${A} cd ${S} # configure for libperl.a # this is gross -- from Christian Gafton, Red Hat cat > config.over < config.sh #THIS IS USED LATER: export PARCH=`grep myarchname config.sh | cut -f2 -d"'"` # Umm, for some reason this doesn't want to work, so we'll just remove # the makefiles and let make rebuild them itself. (It seems to do it # right the second time... -- pete # cp makefile makefile.orig # sed -e "s:^0::" makefile.orig > makefile #for some reason, this rm -f doesn't seem to actually do anything. So we explicitly use "Makefile" #(rather than the default "makefile") in all make commands below. rm -f makefile x2p/makefile make -f Makefile || die # Parallel make fails # dont use the || die since some tests fail on bootstrap make -f Makefile test } src_install() { insinto /usr/lib/perl5/${PV}/i686-linux/CORE/ doins ${WORKDIR}/libperl.so dosym /usr/lib/perl5/${PV}/i686-linux/CORE/libperl.so /usr/lib/libperl.so export PARCH=`grep myarchname config.sh | cut -f2 -d"'"` make -f Makefile INSTALLMAN1DIR=${D}/usr/share/man/man1 INSTALLMAN3DIR=${D}/usr/share/man/man3 install || die install -m 755 utils/pl2pm ${D}/usr/bin/pl2pm make all -f - <