Browse Source

perl: changed to always use the perl cross patchset (HACK! NEEDS CLEANUP!)

http://perlcross.berlios.de
user/chris/wip/musl
Christian Wiese 12 years ago
parent
commit
4b61f5281b
  1. 3
      perl/perl/cross-lm.patch.disabled
  2. 4
      perl/perl/install.patch.cross.disabled
  3. 4
      perl/perl/perl-5.8.8-libc-2.patch.disabled
  4. 94
      perl/perl/perl.conf
  5. 99
      perl/perl/perl.conf.disabled
  6. 2
      perl/perl/perl.desc

3
perl/perl/cross-lm.patch → perl/perl/cross-lm.patch.disabled

@ -1,7 +1,8 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# 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
#
# More information can be found in the files COPYING and README.

4
perl/perl/install.patch.cross → perl/perl/install.patch.cross.disabled

@ -1,8 +1,8 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../perl/install.patch.cross
# Copyright (C) 2009 - 2010 The OpenSDE Project
# Filename: package/.../perl/install.patch.cross.disabled
# Copyright (C) 2009 - 2012 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.

4
perl/perl/perl-5.8.8-libc-2.patch → perl/perl/perl-5.8.8-libc-2.patch.disabled

@ -1,8 +1,8 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../perl/perl-5.8.8-libc-2.patch
# Copyright (C) 2008 The OpenSDE Project
# Filename: package/.../perl/perl-5.8.8-libc-2.patch.disabled
# Copyright (C) 2008 - 2012 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#

94
perl/perl/perl.conf

@ -2,9 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../perl/perl.conf
# Copyright (C) 2009 - 2011 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2004 Clifford Wolf
# Copyright (C) 2012 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -14,86 +12,34 @@
# 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
untar_cross_perl() {
tar -v $taropt $( match_source_file -p cross perl ) -C $builddir/
}
hook_add prepatch 1 "untar_cross_perl"
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
# configure is not standard
cleanconfopt=0
if atstage native; then
eval `perl -V:archlib`
touch ${archlib}/perllocal.pod
confopt="--prefix=/$prefix \$extraconfopt"
extraconfopt=
h2ph $( grep ' usr/include/.*\.h$' \
$root/var/adm/flists/glibc* | sed 's,^.*: ,/,' )
fi
}
makeinstopt="install"
runconfig=0
if ! atstage native; then
var_append extraconfopt ' ' "--build=$arch_build"
var_append extraconfopt ' ' "--target=$arch_target"
var_insert makeinstopt ' ' "DESTDIR=$root"
fi
[[ $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"
# let -D and -U override definitions from loaded configuration file
var_append extraconfopt ' ' "-O"
# build a shared libperl
if [ "$SDECFG_STATIC" != 1 ]; then
var_append confopt ' ' "-Duseshrplib"
var_append extraconfopt ' ' "-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"
# thread support
if [ "$SDECFG_PKG_PERL5_THREADS" = "1" ]; then
var_append extraconfopt ' ' "-Dusethreads"
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"

99
perl/perl/perl.conf.disabled

@ -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"

2
perl/perl/perl.desc

@ -37,3 +37,5 @@
[P] X -1-3---7-9 102.000
[D] 356532305 perl-5.16.0.tar.gz http://www.cpan.org/src/5.0/
#[D] 625481311 perl-5.16.0-cross-0.7.tar.gz http://dl.sourceforge.net/sourceforge/perlcross.berlios/
[D] 625481311 perl-5.16.0-cross-0.7.tar.gz http://download.berlios.de/perlcross/

Loading…
Cancel
Save