perl: Reorganize patches
authorMarcel Denia <naoir@gmx.net>
Fri, 25 Sep 2015 06:26:58 +0000 (08:26 +0200)
committerMarcel Denia <naoir@gmx.net>
Fri, 25 Sep 2015 09:50:52 +0000 (11:50 +0200)
The old scheme didn't make any sense...not that there was a scheme really.

Signed-off-by: Marcel Denia <naoir@gmx.net>
15 files changed:
lang/perl/README.patches [new file with mode: 0644]
lang/perl/patches/010-musl-compat.patch [new file with mode: 0644]
lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch [new file with mode: 0644]
lang/perl/patches/100-fix-cross-compile-endianness-detection.patch [new file with mode: 0644]
lang/perl/patches/100-musl-compat.patch [deleted file]
lang/perl/patches/101-fix-cross-compile-endianness-detection.patch [deleted file]
lang/perl/patches/110-always_use_miniperl.patch [new file with mode: 0644]
lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch [deleted file]
lang/perl/patches/300-add-relink-hack.patch [new file with mode: 0644]
lang/perl/patches/300-always_use_miniperl.patch [deleted file]
lang/perl/patches/500-add-relink-hack.patch [deleted file]
lang/perl/patches/600-tie_fetch_count_t-handle_missing_crypt.patch [deleted file]
lang/perl/patches/700-threads_join-skip_ps_on_busybox.patch [deleted file]
lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch [new file with mode: 0644]
lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch [new file with mode: 0644]

diff --git a/lang/perl/README.patches b/lang/perl/README.patches
new file mode 100644 (file)
index 0000000..5f3b595
--- /dev/null
@@ -0,0 +1,9 @@
+The patches in this package are loosely sorted into the following categories:
+
+0xx - Bugfixes
+1xx - Cross-compile fixes
+3xx - Workarounds
+7xx - Testsuite fixes
+
+Feel free to add another one if your new patch doesn't seem to fit into an
+existing category.
\ No newline at end of file
diff --git a/lang/perl/patches/010-musl-compat.patch b/lang/perl/patches/010-musl-compat.patch
new file mode 100644 (file)
index 0000000..8dbad78
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/pp.c
++++ b/pp.c
+@@ -43,7 +43,7 @@ extern Pid_t getpid (void);
+  * Some BSDs and Cygwin default to POSIX math instead of IEEE.
+  * This switches them over to IEEE.
+  */
+-#if defined(LIBM_LIB_VERSION)
++#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
+     _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
+ #endif
diff --git a/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch
new file mode 100644 (file)
index 0000000..761f8b9
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/hints/linux.sh
++++ b/hints/linux.sh
+@@ -204,6 +204,24 @@ case "$libc" in
+     ;;
+ esac
++# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
++# (such as -lm) in /lib or /usr/lib.  So we have to ask gcc to tell us
++# where to look.  We don't want gcc's own libraries, however, so we
++# filter those out.
++# This could be conditional on Unbuntu, but other distributions may
++# follow suit, and this scheme seems to work even on rather old gcc's.
++# This unconditionally uses gcc because even if the user is using another
++# compiler, we still need to find the math library and friends, and I don't
++# know how other compilers will cope with that situation.
++# Still, as an escape hatch, allow Configure command line overrides to
++# plibpth to bypass this check.
++case "$plibpth" in
++'') plibpth=`gcc -print-search-dirs | grep libraries |
++      cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'`
++    plibpth="$plibpth"  # Collapse all entries on one line
++    ;;
++esac
++
+ # Are we using ELF?  Thanks to Kenneth Albanowski <kjahds@kjahds.com>
+ # for this test.
+ cat >try.c <<'EOM'
diff --git a/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch b/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch
new file mode 100644 (file)
index 0000000..e187941
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/config_h.SH
++++ b/config_h.SH
+@@ -52,6 +52,19 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
+ #ifndef _config_h_
+ #define _config_h_
++#if defined(USE_CROSS_COMPILE) && !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
++#  include <endian.h>
++#  if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
++#    if (__BYTE_ORDER == __LITTLE_ENDIAN)
++#      define __LITTLE_ENDIAN__
++#    elif (__BYTE_ORDER == __BIG_ENDIAN)
++#      define __BIG_ENDIAN__
++#    else
++#      error Unknown endianness
++#    endif
++#  endif
++#endif
++
+ /* LOC_SED:
+  *    This symbol holds the complete pathname to the sed program.
+  */
diff --git a/lang/perl/patches/100-musl-compat.patch b/lang/perl/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index 8dbad78..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/pp.c
-+++ b/pp.c
-@@ -43,7 +43,7 @@ extern Pid_t getpid (void);
-  * Some BSDs and Cygwin default to POSIX math instead of IEEE.
-  * This switches them over to IEEE.
-  */
--#if defined(LIBM_LIB_VERSION)
-+#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
-     _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
- #endif
diff --git a/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch b/lang/perl/patches/101-fix-cross-compile-endianness-detection.patch
deleted file mode 100644 (file)
index e187941..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/config_h.SH
-+++ b/config_h.SH
-@@ -52,6 +52,19 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#und
- #ifndef _config_h_
- #define _config_h_
-+#if defined(USE_CROSS_COMPILE) && !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
-+#  include <endian.h>
-+#  if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
-+#    if (__BYTE_ORDER == __LITTLE_ENDIAN)
-+#      define __LITTLE_ENDIAN__
-+#    elif (__BYTE_ORDER == __BIG_ENDIAN)
-+#      define __BIG_ENDIAN__
-+#    else
-+#      error Unknown endianness
-+#    endif
-+#  endif
-+#endif
-+
- /* LOC_SED:
-  *    This symbol holds the complete pathname to the sed program.
-  */
diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch
new file mode 100644 (file)
index 0000000..f8f8a65
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/Makefile.SH
++++ b/Makefile.SH
+@@ -315,22 +315,11 @@ MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE
+ !GROK!THIS!
+-case "$usecrosscompile$perl" in
+-define?*)
+-      $spitshell >>$Makefile <<!GROK!THIS!
+-# Macros to invoke a copy of our fully operational perl during the build.
+-PERL_EXE = perl\$(EXE_EXT)
+-RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT)
+-!GROK!THIS!
+-      ;;
+-*)
+-      $spitshell >>$Makefile <<!GROK!THIS!
++$spitshell >>$Makefile <<!GROK!THIS!
+ # Macros to invoke a copy of our fully operational perl during the build.
+ PERL_EXE = perl\$(EXE_EXT)
+-RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib
++RUN_PERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib
+ !GROK!THIS!
+-      ;;
+-esac
+ $spitshell >>$Makefile <<!GROK!THIS!
+ # Macros to run our tests
diff --git a/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/200-host-libc-dir-moved-debian+derivatives.patch
deleted file mode 100644 (file)
index 761f8b9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/hints/linux.sh
-+++ b/hints/linux.sh
-@@ -204,6 +204,24 @@ case "$libc" in
-     ;;
- esac
-+# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
-+# (such as -lm) in /lib or /usr/lib.  So we have to ask gcc to tell us
-+# where to look.  We don't want gcc's own libraries, however, so we
-+# filter those out.
-+# This could be conditional on Unbuntu, but other distributions may
-+# follow suit, and this scheme seems to work even on rather old gcc's.
-+# This unconditionally uses gcc because even if the user is using another
-+# compiler, we still need to find the math library and friends, and I don't
-+# know how other compilers will cope with that situation.
-+# Still, as an escape hatch, allow Configure command line overrides to
-+# plibpth to bypass this check.
-+case "$plibpth" in
-+'') plibpth=`gcc -print-search-dirs | grep libraries |
-+      cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'`
-+    plibpth="$plibpth"  # Collapse all entries on one line
-+    ;;
-+esac
-+
- # Are we using ELF?  Thanks to Kenneth Albanowski <kjahds@kjahds.com>
- # for this test.
- cat >try.c <<'EOM'
diff --git a/lang/perl/patches/300-add-relink-hack.patch b/lang/perl/patches/300-add-relink-hack.patch
new file mode 100644 (file)
index 0000000..fd3d386
--- /dev/null
@@ -0,0 +1,6 @@
+--- /dev/null
++++ b/relink/Makefile.PL
+@@ -0,0 +1,3 @@
++use ExtUtils::MakeMaker;
++
++WriteMakefile(NAME => "relink");
diff --git a/lang/perl/patches/300-always_use_miniperl.patch b/lang/perl/patches/300-always_use_miniperl.patch
deleted file mode 100644 (file)
index f8f8a65..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/Makefile.SH
-+++ b/Makefile.SH
-@@ -315,22 +315,11 @@ MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE
- !GROK!THIS!
--case "$usecrosscompile$perl" in
--define?*)
--      $spitshell >>$Makefile <<!GROK!THIS!
--# Macros to invoke a copy of our fully operational perl during the build.
--PERL_EXE = perl\$(EXE_EXT)
--RUN_PERL = \$(LDLIBPTH) \$(RUN) $perl\$(EXE_EXT)
--!GROK!THIS!
--      ;;
--*)
--      $spitshell >>$Makefile <<!GROK!THIS!
-+$spitshell >>$Makefile <<!GROK!THIS!
- # Macros to invoke a copy of our fully operational perl during the build.
- PERL_EXE = perl\$(EXE_EXT)
--RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib
-+RUN_PERL = \$(LDLIBPTH) \$(RUN) ./miniperl\$(EXE_EXT) -Ilib
- !GROK!THIS!
--      ;;
--esac
- $spitshell >>$Makefile <<!GROK!THIS!
- # Macros to run our tests
diff --git a/lang/perl/patches/500-add-relink-hack.patch b/lang/perl/patches/500-add-relink-hack.patch
deleted file mode 100644 (file)
index fd3d386..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
---- /dev/null
-+++ b/relink/Makefile.PL
-@@ -0,0 +1,3 @@
-+use ExtUtils::MakeMaker;
-+
-+WriteMakefile(NAME => "relink");
diff --git a/lang/perl/patches/600-tie_fetch_count_t-handle_missing_crypt.patch b/lang/perl/patches/600-tie_fetch_count_t-handle_missing_crypt.patch
deleted file mode 100644 (file)
index 32914dd..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: perl-5.22.0/t/op/tie_fetch_count.t
-===================================================================
---- perl-5.22.0.orig/t/op/tie_fetch_count.t
-+++ perl-5.22.0/t/op/tie_fetch_count.t
-@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
-     check_count "$op $args\\\$tied_glob$postargs";
- }
--$dummy  =   crypt $var,0; check_count 'crypt $tied, ...';
--$dummy  =   crypt 0,$var; check_count 'crypt ..., $tied';
--$var = substr(chr 256,0,0);
--$dummy  =   crypt $var,0; check_count 'crypt $tied_utf8, ...';
--$var = substr(chr 256,0,0);
--$dummy  =   crypt 0,$var; check_count 'crypt ..., $tied_utf8';
-+SKIP: {
-+    use Config;
-+    skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'};
-+
-+    $dummy  =   crypt $var,0; check_count 'crypt $tied, ...';
-+    $dummy  =   crypt 0,$var; check_count 'crypt ..., $tied';
-+    $var = substr(chr 256,0,0);
-+    $dummy  =   crypt $var,0; check_count 'crypt $tied_utf8, ...';
-+    $var = substr(chr 256,0,0);
-+    $dummy  =   crypt 0,$var; check_count 'crypt ..., $tied_utf8';
-+}
- SKIP:
- {
diff --git a/lang/perl/patches/700-threads_join-skip_ps_on_busybox.patch b/lang/perl/patches/700-threads_join-skip_ps_on_busybox.patch
deleted file mode 100644 (file)
index 27ee757..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-perl: Skip $0 test on busybox
-
-This test requires a ps which provides the -f option, as well as suitable output.
-We can't provide either with busybox. Just skip it for now.
-
-Signed-off-by: Marcel Denia <naoir@gmx.net>
-
-Index: perl-5.22.0/dist/threads/t/join.t
-===================================================================
---- perl-5.22.0.orig/dist/threads/t/join.t
-+++ perl-5.22.0/dist/threads/t/join.t
-@@ -110,36 +110,41 @@ sub skip {
- # We parse ps output so this is OS-dependent.
- if ($^O eq 'linux') {
--    # First modify $0 in a subthread.
--    #print "# mainthread: \$0 = $0\n";
--    threads->create(sub{ #print "# subthread: \$0 = $0\n";
--                        $0 = "foobar";
--                        #print "# subthread: \$0 = $0\n"
--                 })->join;
--    #print "# mainthread: \$0 = $0\n";
--    #print "# pid = $$\n";
--    if (open PS, "ps -f |") { # Note: must work in (all) systems.
--        my ($sawpid, $sawexe);
--        while (<PS>) {
--            chomp;
--            #print "# [$_]\n";
--            if (/^\s*\S+\s+$$\s/) {
--                $sawpid++;
--                if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces.
--                    $sawexe++;
--                }
--                last;
--            }
--        }
--        close PS or die;
--        if ($sawpid) {
--            ok($sawpid && $sawexe, 'altering $0 is effective');
--        } else {
--            skip("\$0 check: did not see pid $$ in 'ps -f |'");
--        }
--    } else {
--        skip("\$0 check: opening 'ps -f |' failed: $!");
--    }
-+      if (readlink('/bin/ps') ne 'busybox') {
-+              # First modify $0 in a subthread.
-+              #print "# mainthread: \$0 = $0\n";
-+              threads->create(sub{ #print "# subthread: \$0 = $0\n";
-+                                                      $0 = "foobar";
-+                                                      #print "# subthread: \$0 = $0\n"
-+                                      })->join;
-+              #print "# mainthread: \$0 = $0\n";
-+              #print "# pid = $$\n";
-+              if (open PS, "ps -f |") { # Note: must work in (all) systems.
-+                      my ($sawpid, $sawexe);
-+                      while (<PS>) {
-+                              chomp;
-+                              #print "# [$_]\n";
-+                              if (/^\s*\S+\s+$$\s/) {
-+                                      $sawpid++;
-+                                      if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces.
-+                                              $sawexe++;
-+                                      }
-+                                      last;
-+                              }
-+                      }
-+                      close PS or die;
-+                      if ($sawpid) {
-+                              ok($sawpid && $sawexe, 'altering $0 is effective');
-+                      } else {
-+                              skip("\$0 check: did not see pid $$ in 'ps -f |'");
-+                      }
-+              } else {
-+                      skip("\$0 check: opening 'ps -f |' failed: $!");
-+              }
-+      }
-+      else {
-+              skip("\$0 check: incompatible with busybox");
-+      }
- } else {
-     skip("\$0 check: only on Linux");
- }
diff --git a/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch b/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch
new file mode 100644 (file)
index 0000000..32914dd
--- /dev/null
@@ -0,0 +1,28 @@
+Index: perl-5.22.0/t/op/tie_fetch_count.t
+===================================================================
+--- perl-5.22.0.orig/t/op/tie_fetch_count.t
++++ perl-5.22.0/t/op/tie_fetch_count.t
+@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>'
+     check_count "$op $args\\\$tied_glob$postargs";
+ }
+-$dummy  =   crypt $var,0; check_count 'crypt $tied, ...';
+-$dummy  =   crypt 0,$var; check_count 'crypt ..., $tied';
+-$var = substr(chr 256,0,0);
+-$dummy  =   crypt $var,0; check_count 'crypt $tied_utf8, ...';
+-$var = substr(chr 256,0,0);
+-$dummy  =   crypt 0,$var; check_count 'crypt ..., $tied_utf8';
++SKIP: {
++    use Config;
++    skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'};
++
++    $dummy  =   crypt $var,0; check_count 'crypt $tied, ...';
++    $dummy  =   crypt 0,$var; check_count 'crypt ..., $tied';
++    $var = substr(chr 256,0,0);
++    $dummy  =   crypt $var,0; check_count 'crypt $tied_utf8, ...';
++    $var = substr(chr 256,0,0);
++    $dummy  =   crypt 0,$var; check_count 'crypt ..., $tied_utf8';
++}
+ SKIP:
+ {
diff --git a/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch b/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch
new file mode 100644 (file)
index 0000000..27ee757
--- /dev/null
@@ -0,0 +1,83 @@
+perl: Skip $0 test on busybox
+
+This test requires a ps which provides the -f option, as well as suitable output.
+We can't provide either with busybox. Just skip it for now.
+
+Signed-off-by: Marcel Denia <naoir@gmx.net>
+
+Index: perl-5.22.0/dist/threads/t/join.t
+===================================================================
+--- perl-5.22.0.orig/dist/threads/t/join.t
++++ perl-5.22.0/dist/threads/t/join.t
+@@ -110,36 +110,41 @@ sub skip {
+ # We parse ps output so this is OS-dependent.
+ if ($^O eq 'linux') {
+-    # First modify $0 in a subthread.
+-    #print "# mainthread: \$0 = $0\n";
+-    threads->create(sub{ #print "# subthread: \$0 = $0\n";
+-                        $0 = "foobar";
+-                        #print "# subthread: \$0 = $0\n"
+-                 })->join;
+-    #print "# mainthread: \$0 = $0\n";
+-    #print "# pid = $$\n";
+-    if (open PS, "ps -f |") { # Note: must work in (all) systems.
+-        my ($sawpid, $sawexe);
+-        while (<PS>) {
+-            chomp;
+-            #print "# [$_]\n";
+-            if (/^\s*\S+\s+$$\s/) {
+-                $sawpid++;
+-                if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces.
+-                    $sawexe++;
+-                }
+-                last;
+-            }
+-        }
+-        close PS or die;
+-        if ($sawpid) {
+-            ok($sawpid && $sawexe, 'altering $0 is effective');
+-        } else {
+-            skip("\$0 check: did not see pid $$ in 'ps -f |'");
+-        }
+-    } else {
+-        skip("\$0 check: opening 'ps -f |' failed: $!");
+-    }
++      if (readlink('/bin/ps') ne 'busybox') {
++              # First modify $0 in a subthread.
++              #print "# mainthread: \$0 = $0\n";
++              threads->create(sub{ #print "# subthread: \$0 = $0\n";
++                                                      $0 = "foobar";
++                                                      #print "# subthread: \$0 = $0\n"
++                                      })->join;
++              #print "# mainthread: \$0 = $0\n";
++              #print "# pid = $$\n";
++              if (open PS, "ps -f |") { # Note: must work in (all) systems.
++                      my ($sawpid, $sawexe);
++                      while (<PS>) {
++                              chomp;
++                              #print "# [$_]\n";
++                              if (/^\s*\S+\s+$$\s/) {
++                                      $sawpid++;
++                                      if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces.
++                                              $sawexe++;
++                                      }
++                                      last;
++                              }
++                      }
++                      close PS or die;
++                      if ($sawpid) {
++                              ok($sawpid && $sawexe, 'altering $0 is effective');
++                      } else {
++                              skip("\$0 check: did not see pid $$ in 'ps -f |'");
++                      }
++              } else {
++                      skip("\$0 check: opening 'ps -f |' failed: $!");
++              }
++      }
++      else {
++              skip("\$0 check: incompatible with busybox");
++      }
+ } else {
+     skip("\$0 check: only on Linux");
+ }