--- perl-5.16.3.ebuild +++ perl-5.16.3.ebuild @@ -7,6 +7,7 @@ EAPI=5 inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing PATCH_VER=1 +CROSS_VER="0.7.4" PERL_OLDVERSEN="5.16.2 5.16.1 5.16.0" MODULE_AUTHOR=RJBS @@ -22,6 +23,7 @@ SRC_URI=" mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2 mirror://gentoo/${MY_P}-${PATCH_VER}.tar.bz2 http://dev.gentoo.org/~tove/distfiles/${CATEGORY}/${PN}/${MY_P}-${PATCH_VER}.tar.bz2 + ${CROSS_VER:+mirror://berlios/perlcross/${P}-cross-${CROSS_VER}.tar.gz} " HOMEPAGE="http://www.perl.org/" --- files/eblits/src_configure-v50160001.eblit +++ files/eblits/src_configure-v50160001.eblit @@ -51,7 +51,9 @@ eblit-perl-src_configure() { myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db" - if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then + tc-export CC + + if use alpha && [[ "${CC}" == "ccc" ]] ; then ewarn "Perl will not be built with berkdb support, use gcc if you needed it..." myconf -Ui_db -Ui_ndbm fi @@ -83,7 +85,7 @@ eblit-perl-src_configure() { echo "int main() {}" > "${T}"/t.c # need to ensure dirs contain compatible libs, # bugs #358875, #400839, use scanelf for #425538 - $(tc-getCC) -o "${T}"/t "${T}"/t.c > /dev/null || die + ${CC} -o "${T}"/t "${T}"/t.c > /dev/null || die local scantool=scanelf [[ ${CHOST} == *-darwin* ]] && scantool=scanmacho local mtype=$(${scantool} -BF "%M%D#f" "${T}"/t) @@ -104,11 +106,10 @@ eblit-perl-src_configure() { # don't try building ODBM, bug #354453 myconf -Dnoextensions=ODBM_File - sh Configure \ - -des \ + set -- \ -Duseshrplib \ -Darchname="${myarch}" \ - -Dcc="$(tc-getCC)" \ + -Dcc="${CC}" \ -Doptimize="${CFLAGS}" \ -Dldflags="${LDFLAGS}" \ -Dprefix="${EPREFIX}"'/usr' \ @@ -138,8 +139,20 @@ eblit-perl-src_configure() { -Dcf_by='Gentoo' \ -Dmyhostname='localhost' \ -Dperladmin='root@localhost' \ - -Dinstallusrbinperl='n' \ + -Dinstallusrbinperl='undef' \ -Ud_csh \ -Uusenm \ - "${myconf[@]}" || die "Unable to configure" + "${myconf[@]}" + if tc-is-cross-compiler ; then + set -- \ + ./configure \ + --target=${CHOST} \ + --sysroot="${SYSROOT:-$(${CC} -print-sysroot)}" \ + "$@" + MAKEOPTS+=" -j1" + else + set -- sh Configure -des "$@" + fi + printf '%q ' "$@"; echo + "$@" || die }