From 3656067792e6fd702cc1ce3a727a709d011c3f2e Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Fri, 23 Apr 2010 02:03:51 +0000 Subject: [PATCH] Update the perl install commands to properly install and create a package. Regenerated the patch with a contribution from andreasf to install the haikuish.h header. Should fix haikuports tickets #302 and #323 --- dev-lang/perl/patches/perl-5.10.1.patch | 59 ++++++++++++++++--------- dev-lang/perl/perl-5.10.1.bep | 8 ++-- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/dev-lang/perl/patches/perl-5.10.1.patch b/dev-lang/perl/patches/perl-5.10.1.patch index e0ce80c0f..8aaa47ae7 100644 --- a/dev-lang/perl/patches/perl-5.10.1.patch +++ b/dev-lang/perl/patches/perl-5.10.1.patch @@ -1,20 +1,22 @@ -diff -ruw perl-5.10.1/lib/File/Temp/t/lock.t perl-5.10.1-haiku/lib/File/Temp/t/lock.t ---- perl-5.10.1/lib/File/Temp/t/lock.t 2009-02-12 23:58:13.000000000 +0100 -+++ perl-5.10.1-haiku/lib/File/Temp/t/lock.t 2009-09-08 18:58:33.000000000 +0200 -@@ -8,7 +8,8 @@ - BEGIN { - # see if we have O_EXLOCK - eval { &Fcntl::O_EXLOCK; }; -- if ($@) { -+ if ($@ || $^O eq 'haiku') { -+ # haiku doesn't implement O_EXLOCK yet (but it defines the value) - plan skip_all => 'Do not seem to have O_EXLOCK'; - } else { - plan tests => 4; -diff -ruw perl-5.10.1/lib/File/Temp.pm perl-5.10.1-haiku/lib/File/Temp.pm ---- perl-5.10.1/lib/File/Temp.pm 2009-06-30 15:13:54.000000000 +0200 -+++ perl-5.10.1-haiku/lib/File/Temp.pm 2009-09-08 18:59:58.000000000 +0200 -@@ -1978,7 +1978,8 @@ +diff -up perl-5.10.1/installperl.orig perl-5.10.1/installperl +--- perl-5.10.1/installperl.orig 2009-08-13 16:40:10.023330816 -0600 ++++ perl-5.10.1/installperl 2010-04-22 19:31:00.720633856 -0600 +@@ -409,6 +409,11 @@ elsif ($Is_Cygwin) { # On Cygwin symlink + mkpath("$installarchlib/CORE/mpeix", $opts{verbose}, 0777); + push(@corefiles,'mpeix/mpeixish.h'); + } ++ if ($^O eq 'haiku') { ++ # Haiku needs haikuish.h installed as well. ++ mkpath("$installarchlib/CORE/haiku", $opts{verbose}, 0777); ++ push(@corefiles,'haiku/haikuish.h'); ++ } + # If they have built sperl.o... + push(@corefiles,'sperl.o') if -f 'sperl.o'; + } +diff -up perl-5.10.1/lib/File/Temp.pm.orig perl-5.10.1/lib/File/Temp.pm +--- perl-5.10.1/lib/File/Temp.pm.orig 2009-06-30 07:13:54.062914560 -0600 ++++ perl-5.10.1/lib/File/Temp.pm 2010-04-22 19:25:11.867172352 -0600 +@@ -1978,7 +1978,8 @@ sub unlink0 { # on Win9x the link count remains 1 # On NFS the link count may still be 1 but we cant know that # we are on NFS @@ -24,10 +26,23 @@ diff -ruw perl-5.10.1/lib/File/Temp.pm perl-5.10.1-haiku/lib/File/Temp.pm } else { _deferred_unlink($fh, $path, 0); -diff -ruw perl-5.10.1/t/run/exit.t perl-5.10.1-haiku/t/run/exit.t ---- perl-5.10.1/t/run/exit.t 2009-08-04 17:48:30.000000000 +0200 -+++ perl-5.10.1-haiku/t/run/exit.t 2009-09-05 15:09:02.000000000 +0200 -@@ -57,18 +57,18 @@ +diff -up perl-5.10.1/lib/File/Temp/t/lock.t.orig perl-5.10.1/lib/File/Temp/t/lock.t +--- perl-5.10.1/lib/File/Temp/t/lock.t.orig 2009-02-12 15:58:13.059506688 -0700 ++++ perl-5.10.1/lib/File/Temp/t/lock.t 2010-04-22 19:25:11.860094464 -0600 +@@ -8,7 +8,8 @@ use Fcntl; + BEGIN { + # see if we have O_EXLOCK + eval { &Fcntl::O_EXLOCK; }; +- if ($@) { ++ if ($@ || $^O eq 'haiku') { ++ # haiku doesn't implement O_EXLOCK yet (but it defines the value) + plan skip_all => 'Do not seem to have O_EXLOCK'; + } else { + plan tests => 4; +diff -up perl-5.10.1/t/run/exit.t.orig perl-5.10.1/t/run/exit.t +--- perl-5.10.1/t/run/exit.t.orig 2009-08-04 09:48:30.001310720 -0600 ++++ perl-5.10.1/t/run/exit.t 2010-04-22 19:25:11.870580224 -0600 +@@ -57,18 +57,18 @@ is( ${^CHILD_ERROR_NATIVE}, $native_succ if (!$vms_exit_mode) { my $posix_ok = eval { require POSIX; }; my $wait_macros_ok = defined &POSIX::WIFEXITED; @@ -51,7 +66,7 @@ diff -ruw perl-5.10.1/t/run/exit.t perl-5.10.1-haiku/t/run/exit.t } SKIP: { -@@ -87,9 +87,9 @@ +@@ -87,9 +87,9 @@ if (!$vms_exit_mode) { SKIP: { skip("No POSIX", 3) unless $posix_ok; skip("No POSIX wait macros", 3) unless $wait_macros_ok; diff --git a/dev-lang/perl/perl-5.10.1.bep b/dev-lang/perl/perl-5.10.1.bep index 6d832efc1..bca32ee2b 100644 --- a/dev-lang/perl/perl-5.10.1.bep +++ b/dev-lang/perl/perl-5.10.1.bep @@ -14,6 +14,8 @@ BUILD { INSTALL { cd perl-5.10.1 make install - chmod a+x `finddir B_COMMON_BIN_DIRECTORY`/perl - ln -sf perl5/5.10.1/BePC-haiku/CORE/libperl.so `finddir B_COMMON_LIB_DIRECTORY` -} \ No newline at end of file + cd "${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`" + chmod a+x perl psed pstruct perlthanks + cd "${DESTDIR}`finddir B_COMMON_LIB_DIRECTORY`" + ln -sf perl5/5.10.1/BePC-haiku/CORE/libperl.so . +}