Christian Wiese
12 years ago
6 changed files with 127 additions and 79 deletions
@ -1,7 +1,8 @@ |
|||||||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
# |
# |
||||||
# Filename: package/.../perl/cross-lm.patch |
# Filename: package/.../perl/cross-lm.patch.disabled |
||||||
|
# Copyright (C) 2012 The OpenSDE Project |
||||||
# Copyright (C) 2006 The T2 SDE Project |
# Copyright (C) 2006 The T2 SDE Project |
||||||
# |
# |
||||||
# More information can be found in the files COPYING and README. |
# More information can be found in the files COPYING and README. |
@ -1,8 +1,8 @@ |
|||||||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
# |
# |
||||||
# Filename: package/.../perl/install.patch.cross |
# Filename: package/.../perl/install.patch.cross.disabled |
||||||
# Copyright (C) 2009 - 2010 The OpenSDE Project |
# Copyright (C) 2009 - 2012 The OpenSDE Project |
||||||
# Copyright (C) 2004 - 2006 The T2 SDE Project |
# Copyright (C) 2004 - 2006 The T2 SDE Project |
||||||
# |
# |
||||||
# More information can be found in the files COPYING and README. |
# More information can be found in the files COPYING and README. |
@ -1,8 +1,8 @@ |
|||||||
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
# |
# |
||||||
# Filename: package/.../perl/perl-5.8.8-libc-2.patch |
# Filename: package/.../perl/perl-5.8.8-libc-2.patch.disabled |
||||||
# Copyright (C) 2008 The OpenSDE Project |
# Copyright (C) 2008 - 2012 The OpenSDE Project |
||||||
# |
# |
||||||
# More information can be found in the files COPYING and README. |
# More information can be found in the files COPYING and README. |
||||||
# |
# |
@ -0,0 +1,99 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||||
|
# |
||||||
|
# Filename: package/.../perl/perl.conf.disabled |
||||||
|
# Copyright (C) 2009 - 2012 The OpenSDE Project |
||||||
|
# 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 |
||||||
|
sed -e '/^d_futimes/d' -e '/^d_sockatmark/d' -i config.sh |
||||||
|
cat >> config.sh <<-EOT |
||||||
|
cc='$CC' |
||||||
|
ccname='$CC' |
||||||
|
ld='$CC' |
||||||
|
libs='-ldl -lm -lcrypt -lutil -lc' |
||||||
|
d_futimes='undef' |
||||||
|
d_sockatmark='undef' |
||||||
|
d_sockatmarkproto='undef' |
||||||
|
EOT |
||||||
|
touch config.sh |
||||||
|
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=$cc -Darchname=$arch_target -Dprefix=/$prefix \ |
||||||
|
-Dmyhostname=$SDECFG_PKG_PERL5_HOST_NAME \ |
||||||
|
-Dsiteprefix=/$SDECFG_PKG_PERL5_SITE_PREFIX \ |
||||||
|
-Dvendorprefix=/$SDECFG_PKG_PERL5_VENDOR_PREFIX" |
||||||
|
|
||||||
|
# build a shared libperl |
||||||
|
if [ "$SDECFG_STATIC" != 1 ]; then |
||||||
|
var_append confopt ' ' "-Duseshrplib" |
||||||
|
fi |
||||||
|
|
||||||
|
[ "$SDECFG_PKG_PERL5_THREADS" = "1" ] && confopt="$confopt -Dusethreads" |
||||||
|
|
||||||
|
hook_add preconf 2 "( rm -f config.sh Policy.sh; eval sh Configure \$confopt; )" |
||||||
|
if ! atstage native; then |
||||||
|
var_append confopt " " "-Ddynamic_ext=none" |
||||||
|
var_append confopt " " "-Dstatic_ext=\"Data/Dumper IO Fcntl POSIX\"" |
||||||
|
hook_add premake 3 "perl_cross_bootstrap" |
||||||
|
fi |
||||||
|
|
||||||
|
hook_add postmake 4 "perl_postmake" |
||||||
|
|
||||||
|
PERL_CROSS_MODULES="File/Basename.pm Errno.pm Config.pm IO/File.pm Symbol.pm \ |
||||||
|
SelectSaver.pm IO/Seekable.pm IO/Handle.pm IO.pm XSLoader.pm \ |
||||||
|
DynaLoader.pm AutoLoader.pm Carp/Heavy.pm" |
||||||
|
|
||||||
|
perl_cross_modules() |
||||||
|
{ |
||||||
|
moddir=${root}/${SDECFG_PKG_PERL5_SITE_PREFIX}/lib/perl5/$ver |
||||||
|
for mod in $PERL_CROSS_MODULES; do |
||||||
|
[ -d $moddir/`dirname $mod` ] || mkdir -p $moddir/`dirname $mod`; |
||||||
|
cp -vdpf lib/$mod $moddir/$mod |
||||||
|
done; |
||||||
|
} |
||||||
|
atstage cross && hook_add postmake 3 "perl_cross_modules" |
Loading…
Reference in new issue