You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.2 KiB
79 lines
2.2 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../perl/perl.conf |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# Copyright (C) 1998 - 2004 Clifford Wolf |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This program is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
# GNU General Public License can be found in the file COPYING. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
perl_cross_bootstrap() |
|
{ |
|
# build a native miniperl |
|
eval $MAKE miniperl |
|
cp miniperl miniperl.native |
|
$MAKE clean |
|
|
|
# setup cross compiler |
|
cat >> config.sh <<-EOT |
|
cc='$CC' |
|
ccname='$CC' |
|
ld='$CC' |
|
EOT |
|
eval $MAKE $makeopt miniperl |
|
cp -f miniperl.native miniperl |
|
} |
|
|
|
perl_postmake() { |
|
cat > $root/usr/bin/cpan <<- EOT |
|
#!/usr/bin/perl |
|
use POSIX; |
|
use locale; |
|
use CPAN; |
|
|
|
setlocale(LANGUAGE, "en_US"); |
|
setlocale(LC_ALL, "en_US"); |
|
shell; |
|
EOT |
|
chmod +x $root/usr/bin/cpan |
|
|
|
if atstage native; then |
|
eval `perl -V:archlib` |
|
touch ${archlib}/perllocal.pod |
|
|
|
h2ph $( grep ' usr/include/.*\.h$' \ |
|
$root/var/adm/flists/glibc* | sed 's,^.*: ,/,' ) |
|
fi |
|
} |
|
|
|
runconfig=0 |
|
|
|
[[ $libdir = *lib64 ]] && var_append patchfiles ' ' "$confdir/lib64.diff" |
|
libpth="/usr/local/${libdir##*/} /${libdir##*/} /usr/${libdir##*/}" |
|
confopt="-des -Dcc=gcc -Darchname=$arch_target -Dprefix=/$prefix \ |
|
-Dmyhostname=$SDECFG_PKG_PERL5_HOST_NAME \ |
|
-Dsiteprefix=/$SDECFG_PKG_PERL5_SITE_PREFIX \ |
|
-Dvendorprefix=/$SDECFG_PKG_PERL5_VENDOR_PREFIX" |
|
|
|
for lp in $libpth; do |
|
var_append confopt ' ' "-Alibpth=$lp" |
|
done |
|
|
|
[ "$SDECFG_PKG_PERL5_SUIDPERL" != "0" ] && confopt="$confopt -Dd_dosuid" |
|
[ "$SDECFG_PKG_PERL5_THREADS" = "1" ] && confopt="$confopt -Dusethreads" |
|
[ "$SDECFG_PKG_PERL5_USE_DB3" = "1" ] && patchfiles="$patchfiles $confdir/use_db3.diff" |
|
|
|
hook_add preconf 2 "( rm -f config.sh Policy.sh; sh Configure \$confopt; )" |
|
if ! atstage native; then |
|
var_append confopt " " "-Ddynamic_ext=none -Dstatic_ext=none" |
|
hook_add premake 3 "perl_cross_bootstrap" |
|
fi |
|
|
|
hook_add postmake 4 "perl_postmake" |
|
|
|
|