Ticket #51980: perl5-rebuilds.diff

File perl5-rebuilds.diff, 46.8 KB (added by mojca (Mojca Miklavec), 8 years ago)

A patch for zillion things, but one of them should fix a build error of 5.22 on Sierra

  • Portfile

     
    3131# - revision
    3232# - rmd160 sha256
    3333set perl5.versions_info {
    34     5.16 3 2 f25fdd72449156a7cbe989e8bd339fdba1afabc0  bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8
    35     5.18 4 1 d97181a98f7acc80125b0d2a182a6a2cd7542ceb  1fb4d27b75cd244e849f253320260efe1750641aaff4a18ce0d67556ff1b96a5
    36     5.20 3 0 499846a1c92e00dd357cb782bc14787b8cd47051  1b40068166c242e34a536836286e70b78410602a80615143301e52aa2901493b
    37     5.22 2 0 203afca8995ca426db0af48b78eb606b5d24011a  f2322b9b04fe0cdbca9fe755360da04892cb6483d44959457cfebc0bcddc8058
     34    5.16 3 3 f25fdd72449156a7cbe989e8bd339fdba1afabc0  bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8
     35    5.18 4 2 d97181a98f7acc80125b0d2a182a6a2cd7542ceb  1fb4d27b75cd244e849f253320260efe1750641aaff4a18ce0d67556ff1b96a5
     36    5.20 3 1 499846a1c92e00dd357cb782bc14787b8cd47051  1b40068166c242e34a536836286e70b78410602a80615143301e52aa2901493b
     37    5.22 2 1 203afca8995ca426db0af48b78eb606b5d24011a  f2322b9b04fe0cdbca9fe755360da04892cb6483d44959457cfebc0bcddc8058
    3838    5.24 0 0 756bf07069e91eabe3dac3a47aec5097d48f8963  62328a53d157e8153b33e137594155f6f8b64418f7f9238210feb809585290e0
    3939}
    4040#   5.22 3-RC3 0 24f508e342cb824d96254e91ffd35b09ed740382  9074ac008f11aa5ea3df91a646fa8c23fec37923c729e06a8bc54be4fa710d07
     
    6767
    6868        # TODO: revise patch naming scheme
    6969        patchfiles          ${perl5.major}/clean-up-paths.patch \
    70                             ${perl5.major}/avoid-no-cpp-precomp-PR38913.patch \
    71                             ${perl5.major}/fix-ld-modification.patch
     70                            ${perl5.major}/avoid-no-cpp-precomp-PR38913.patch
    7271
     72        # Prevent build from picking up the bind9 port's static libbind, which
     73        # duplicates symbols from /usr/lib/libdl (r10638).
     74        patchfiles-append   ${perl5.major}/avoid-bind9-linking.patch
     75
     76        # Prevent miniperl linking from accidentally finding our libstdc++
     77        # https://trac.macports.org/ticket/36438
     78        patchfiles-append   ${perl5.major}/fix-miniperl-linking-PR36438.patch
     79
     80        # Install perl and modules under 5.x rather than 5.x.y
     81        # https://trac.macports.org/ticket/43480
     82        patchfiles-append   ${perl5.major}/install-under-short-version-PR43480.patch
     83
    7384        if {${perl5.major} == 5.16} {
    7485            patchfiles-append \
    7586                            ${perl5.major}/use-stdbool.patch
     
    7788            # and https://rt.perl.org/Public/Bug/Display.html?id=121714.
    7889            patchfiles-append \
    7990                            ${perl5.major}/fix-cxx-dNOOP-PR43150.patch
    80         } else {
    81             patchfiles-append \
    82                             ${perl5.major}/install-under-short-version-PR43480.patch \
    8391        }
    8492        if {${perl5.major} >= 5.22} {
    85             # failed test
     93            # Failed test
    8694            # https://trac.macports.org/ticket/51327
    8795            patchfiles-append \
    8896                            ${perl5.major}/patch-dist-IO-t-cachepropagate-unix.t.diff
    8997        }
    9098        if {${perl5.major} == 5.24} {
    91             # build error on Sierra (maybe also relevant for other perl versions?)
     99            # Prevent build error on Sierra
    92100            # https://trac.macports.org/ticket/52012
    93101            patchfiles-append \
    94102                            ${perl5.major}/patch-dist-Time-HiRes-HiRes.xs.diff
     103        } else {
     104            # Do not compile for 10.3/10.4
     105            # https://trac.macports.org/ticket/51980
     106            patchfiles-append \
     107                            ${perl5.major}/remove-10.3-target-PR126360.patch
    95108        }
    96109
    97         # Prevent build from picking up the bind9 port's static libbind, which
    98         # duplicates symbols from /usr/lib/libdl (r10638).
    99         patchfiles-append   ${perl5.major}/avoid-bind9-linking.patch
    100 
    101         # Prevent miniperl linking from accidentally finding our libstdc++
    102         # (#36438).
    103         patchfiles-append   ${perl5.major}/fix-miniperl-linking-PR36438.patch
    104 
    105110        post-patch {
    106111            reinplace -W ${worksrcpath} "s|__PREFIX__|${prefix}|g" \
    107112                    Configure Makefile.SH
     
    134139                            -Dvendorman3dir='${prefix}/share/perl${perl5.major}/man/man3' \
    135140                            -Dpager='/usr/bin/less -sR' \
    136141                            -Dperlpath="${perl5.bin}" \
    137                             -Dstartperl="#!${perl5.bin}"
    138         # flags with -A should be used for all versions of perl,
    139         # but for the time being we wanted to avoid rebuilding (revbumping) old perl version
    140         # so changing the flags is scheduled for later
    141         if {${version} > 5.22} {
    142             configure.post_args-append \
    143                             {-Acppflags="$CPPFLAGS"} \
    144                             {-Accflags="$CFLAGS"} \
    145                             {-Aldflags="$LDFLAGS"} \
    146         } else {
    147             configure.post_args-append \
     142                            -Dstartperl="#!${perl5.bin}" \
    148143                            {-Dcppflags="$CPPFLAGS"} \
    149144                            {-Dccflags="$CFLAGS"} \
    150145                            {-Dldflags="$LDFLAGS"} \
    151146                            {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"}
    152         }
    153147
    154148        if {[variant_isset universal]} {
    155149            post-configure {
  • files/5.16/avoid-bind9-linking.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -315,6 +315,8 @@ i_dbm=undef;
     3@@ -317,7 +317,7 @@ i_dbm=undef;
     4 # Configure doesn't detect ranlib on Tiger properly.
    65 # NeilW says this should be acceptable on all darwin versions.
    76 ranlib='ranlib'
    8  
     7-
    98+libswanted="$(echo $libswanted | sed -e 's/bind //' -e 's/ bind//')"
    10 +
    119 ##
    1210 # Build process
    1311 ##
  • files/5.16/avoid-no-cpp-precomp-PR38913.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -129,8 +129,6 @@ esac
     3@@ -129,7 +129,7 @@ esac
    64 
    75 # Avoid Apple's cpp precompiler, better for extensions
    86 if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
    97-    cppflags="${cppflags} -no-cpp-precomp"
    10 -
     8+
     9 
    1110     # This is necessary because perl's build system doesn't
    1211     # apply cppflags to cc compile lines as it should.
    13      ccflags="${ccflags} ${cppflags}"
  • files/5.16/clean-up-paths.patch

     
    1 Index: Configure
    2 ===================================================================
    31--- Configure.orig
    42+++ Configure
    53@@ -106,8 +106,8 @@ if test -d c:/. || ( uname -a | grep -i
  • files/5.16/fix-ld-modification.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    3 --- hints/darwin.sh.orig
    4 +++ hints/darwin.sh
    5 @@ -141,7 +141,6 @@ esac
    6  
    7  # Shared library extension is .dylib.
    8  # Bundle extension is .bundle.
    9 -ld='cc';
    10  so='dylib';
    11  dlext='bundle';
    12  usedl='define';
    13 @@ -182,7 +181,7 @@ case "$osvers" in
    14  *)
    15     lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
    16     case "$ld" in
    17 -       *MACOSX_DEVELOPMENT_TARGET*) ;;
    18 +       *MACOSX_DEPLOYMENT_TARGET*) ;;
    19         *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
    20     esac
    21     ;;
  • files/5.16/fix-miniperl-linking-PR36438.patch

     
    1 Index: Makefile.SH
    2 ===================================================================
    31--- Makefile.SH.orig
    42+++ Makefile.SH
    5 @@ -860,7 +860,8 @@ NAMESPACEFLAGS = -force_flat_namespace
     3@@ -860,7 +860,7 @@ NAMESPACEFLAGS = -force_flat_namespace
    64                $spitshell >>$Makefile <<'!NO!SUBS!'
    75 $(MINIPERL_EXE): $& $(mini_obj)
    86        -@rm -f miniperl.xok
    97-       $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    10 +       unset LIBRARY_PATH && \
    11 +       $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
     8+       unset LIBRARY_PATH && $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    129            $(mini_obj) $(libs)
    1310        $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
    1411 !NO!SUBS!
  • files/5.16/install-under-short-version-PR43480.patch

     
     1https://trac.macports.org/ticket/43480
    12--- Configure.orig
    23+++ Configure
    34@@ -4132,6 +4132,8 @@ dos|vms)
  • files/5.16/remove-10.3-target-PR126360.patch

     
     1https://trac.macports.org/ticket/51980
     2https://rt.perl.org/Ticket/Display.html?id=126360
     3https://rt.perl.org/Ticket/Display.html?id=128980
     4http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
     5
     6--- hints/darwin.sh.orig
     7+++ hints/darwin.sh
     8@@ -143,7 +143,7 @@ esac
     9 
     10 # Shared library extension is .dylib.
     11 # Bundle extension is .bundle.
     12-ld='cc';
     13+
     14 so='dylib';
     15 dlext='bundle';
     16 usedl='define';
     17@@ -167,28 +167,125 @@ case "$ccdlflags" in             # If passed in from command line, presume user knows best
     18 ;;
     19 esac
     20 
     21+# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
     22+#
     23+# OS, Kernel, Xcode Version
     24+# Note that Xcode gets updates on older systems sometimes.
     25+# pkgsrc generally expects that the most up-to-date xcode available for
     26+# an OS version is installed
     27+#
     28+# Codename        OS      Kernel  Xcode
     29+# Cheetah         10.0.x  1.3.1
     30+# Puma            10.1    1.4.1
     31+#                 10.1.x  5.x.y
     32+# Jaguar          10.2.x  6.x.y
     33+# Panther         10.3.x  7.x.y
     34+# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
     35+# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
     36+# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
     37+# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
     38+# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
     39+# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
     40+# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
     41+# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
     42+
     43+# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
     44+#
     45+# It is needed for OS releases before 10.6.
     46+#
     47+# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
     48+#
     49+# If it is set, we also propagate its value to ccflags and ldflags
     50+# using the -mmacosx-version-min flag.  If it is not set, we use
     51+# the OS X release as the min value for the flag.
     52+
     53+# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
     54+add_macosx_version_min () {
     55+  local v
     56+  eval "v=\$$1"
     57+  case " $v " in
     58+  *"-mmacosx-version-min"*)
     59+     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
     60+     ;;
     61+  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
     62+     eval "$1='$v -mmacosx-version-min=$2'"
     63+     ;;
     64+  esac
     65+}
     66+
     67 # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
     68 # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
     69-case "$osvers" in
     70-1.[0-3].*)
     71+case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
     72+1.[0-3].*) # OS X 10.0.x
     73    lddlflags="${ldflags} -bundle -undefined suppress"
     74    ;;
     75-1.*)
     76+1.*)       # OS X 10.1
     77    ldflags="${ldflags} -flat_namespace"
     78    lddlflags="${ldflags} -bundle -undefined suppress"
     79    ;;
     80-[2-6].*)
     81+[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
     82    ldflags="${ldflags} -flat_namespace"
     83    lddlflags="${ldflags} -bundle -undefined suppress"
     84    ;;
     85-*)
     86+[7-9].*)   # OS X 10.3.x - 10.5.x
     87    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     88    case "$ld" in
     89-       *MACOSX_DEVELOPMENT_TARGET*) ;;
     90+       *MACOSX_DEPLOYMENT_TARGET*) ;;
     91        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
     92    esac
     93    ;;
     94+*)        # OS X 10.6.x - current
     95+   # The MACOSX_DEPLOYMENT_TARGET is not needed,
     96+   # but the -mmacosx-version-min option is always used.
     97+
     98+   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
     99+   # capturing its value and adding it to the flags.
     100+    case "$MACOSX_DEPLOYMENT_TARGET" in
     101+    10.*)
     102+      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
     103+      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
     104+      ;;
     105+    '')
     106+      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
     107+      ;;
     108+    *)
     109+      cat <<EOM >&4
     110+
     111+*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
     112+***
     113+*** Please either set it to 10.something, or to empty.
     114+
     115+EOM
     116+      exit 1
     117+      ;;
     118+    esac
     119+
     120+    # Keep the prodvers leading whitespace (Configure magic).
     121+    # Cannot use $osvers here since that is the kernel version.
     122+    # sw_vers output                 what we want
     123+    # "ProductVersion:    10.10.5"   "10.10"
     124+    # "ProductVersion:    10.11"     "10.11"
     125+        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
     126+    case "$prodvers" in
     127+    10.*)
     128+      add_macosx_version_min ccflags $prodvers
     129+      add_macosx_version_min ldflags $prodvers
     130+      ;;
     131+    *)
     132+      cat <<EOM >&4
     133+
     134+*** Unexpected product version $prodvers.
     135+***
     136+*** Try running sw_vers and see what its ProductVersion says.
     137+
     138+EOM
     139+      exit 1
     140+    esac
     141+
     142+   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     143+   ;;
     144 esac
     145+
     146 ldlibpthname='DYLD_LIBRARY_PATH';
     147 
     148 # useshrplib=true results in much slower startup times.
  • files/5.16/use-stdbool.patch

     
    1 Index: handy.h
    2 ===================================================================
    31--- handy.h.orig
    42+++ handy.h
    53@@ -77,41 +77,8 @@ Null SV pointer. (No longer available wh
  • files/5.18/avoid-bind9-linking.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -315,6 +315,8 @@ i_dbm=undef;
     3@@ -317,7 +317,7 @@ i_dbm=undef;
     4 # Configure doesn't detect ranlib on Tiger properly.
    65 # NeilW says this should be acceptable on all darwin versions.
    76 ranlib='ranlib'
    8  
     7-
    98+libswanted="$(echo $libswanted | sed -e 's/bind //' -e 's/ bind//')"
    10 +
    119 ##
    1210 # Build process
    1311 ##
  • files/5.18/avoid-no-cpp-precomp-PR38913.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -129,8 +129,6 @@ esac
     3@@ -129,7 +129,7 @@ esac
    64 
    75 # Avoid Apple's cpp precompiler, better for extensions
    86 if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
    97-    cppflags="${cppflags} -no-cpp-precomp"
    10 -
     8+
     9 
    1110     # This is necessary because perl's build system doesn't
    1211     # apply cppflags to cc compile lines as it should.
    13      ccflags="${ccflags} ${cppflags}"
  • files/5.18/clean-up-paths.patch

     
    1 Index: Configure
    2 ===================================================================
    31--- Configure.orig
    42+++ Configure
    53@@ -106,8 +106,8 @@ if test -d c:/. || ( uname -a | grep -i
  • files/5.18/fix-ld-modification.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    3 --- hints/darwin.sh.orig
    4 +++ hints/darwin.sh
    5 @@ -141,7 +141,6 @@ esac
    6  
    7  # Shared library extension is .dylib.
    8  # Bundle extension is .bundle.
    9 -ld='cc';
    10  so='dylib';
    11  dlext='bundle';
    12  usedl='define';
    13 @@ -182,7 +181,7 @@ case "$osvers" in
    14  *)
    15     lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
    16     case "$ld" in
    17 -       *MACOSX_DEVELOPMENT_TARGET*) ;;
    18 +       *MACOSX_DEPLOYMENT_TARGET*) ;;
    19         *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
    20     esac
    21     ;;
  • files/5.18/fix-miniperl-linking-PR36438.patch

     
    1 Index: Makefile.SH
    2 ===================================================================
    31--- Makefile.SH.orig
    42+++ Makefile.SH
    5 @@ -870,7 +870,8 @@ NAMESPACEFLAGS = -force_flat_namespace
     3@@ -870,7 +870,7 @@ NAMESPACEFLAGS = -force_flat_namespace
    64                $spitshell >>$Makefile <<'!NO!SUBS!'
    75 $(MINIPERL_EXE): $& $(mini_obj)
    86        -@rm -f miniperl.xok
    97-       $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    10 +       unset LIBRARY_PATH && \
    11 +       $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
     8+       unset LIBRARY_PATH && $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    129            $(mini_obj) $(libs)
    1310        $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
    1411 !NO!SUBS!
  • files/5.18/install-under-short-version-PR43480.patch

     
     1https://trac.macports.org/ticket/43480
    12--- Configure.orig
    23+++ Configure
    34@@ -4132,6 +4132,8 @@ dos|vms)
  • files/5.18/remove-10.3-target-PR126360.patch

     
     1https://trac.macports.org/ticket/51980
     2https://rt.perl.org/Ticket/Display.html?id=126360
     3https://rt.perl.org/Ticket/Display.html?id=128980
     4http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
     5
     6--- hints/darwin.sh.orig
     7+++ hints/darwin.sh
     8@@ -143,7 +143,7 @@ esac
     9 
     10 # Shared library extension is .dylib.
     11 # Bundle extension is .bundle.
     12-ld='cc';
     13+
     14 so='dylib';
     15 dlext='bundle';
     16 usedl='define';
     17@@ -167,28 +167,125 @@ case "$ccdlflags" in             # If passed in from command line, presume user knows best
     18 ;;
     19 esac
     20 
     21+# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
     22+#
     23+# OS, Kernel, Xcode Version
     24+# Note that Xcode gets updates on older systems sometimes.
     25+# pkgsrc generally expects that the most up-to-date xcode available for
     26+# an OS version is installed
     27+#
     28+# Codename        OS      Kernel  Xcode
     29+# Cheetah         10.0.x  1.3.1
     30+# Puma            10.1    1.4.1
     31+#                 10.1.x  5.x.y
     32+# Jaguar          10.2.x  6.x.y
     33+# Panther         10.3.x  7.x.y
     34+# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
     35+# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
     36+# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
     37+# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
     38+# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
     39+# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
     40+# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
     41+# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
     42+
     43+# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
     44+#
     45+# It is needed for OS releases before 10.6.
     46+#
     47+# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
     48+#
     49+# If it is set, we also propagate its value to ccflags and ldflags
     50+# using the -mmacosx-version-min flag.  If it is not set, we use
     51+# the OS X release as the min value for the flag.
     52+
     53+# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
     54+add_macosx_version_min () {
     55+  local v
     56+  eval "v=\$$1"
     57+  case " $v " in
     58+  *"-mmacosx-version-min"*)
     59+     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
     60+     ;;
     61+  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
     62+     eval "$1='$v -mmacosx-version-min=$2'"
     63+     ;;
     64+  esac
     65+}
     66+
     67 # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
     68 # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
     69-case "$osvers" in
     70-1.[0-3].*)
     71+case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
     72+1.[0-3].*) # OS X 10.0.x
     73    lddlflags="${ldflags} -bundle -undefined suppress"
     74    ;;
     75-1.*)
     76+1.*)       # OS X 10.1
     77    ldflags="${ldflags} -flat_namespace"
     78    lddlflags="${ldflags} -bundle -undefined suppress"
     79    ;;
     80-[2-6].*)
     81+[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
     82    ldflags="${ldflags} -flat_namespace"
     83    lddlflags="${ldflags} -bundle -undefined suppress"
     84    ;;
     85-*)
     86+[7-9].*)   # OS X 10.3.x - 10.5.x
     87    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     88    case "$ld" in
     89-       *MACOSX_DEVELOPMENT_TARGET*) ;;
     90+       *MACOSX_DEPLOYMENT_TARGET*) ;;
     91        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
     92    esac
     93    ;;
     94+*)        # OS X 10.6.x - current
     95+   # The MACOSX_DEPLOYMENT_TARGET is not needed,
     96+   # but the -mmacosx-version-min option is always used.
     97+
     98+   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
     99+   # capturing its value and adding it to the flags.
     100+    case "$MACOSX_DEPLOYMENT_TARGET" in
     101+    10.*)
     102+      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
     103+      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
     104+      ;;
     105+    '')
     106+      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
     107+      ;;
     108+    *)
     109+      cat <<EOM >&4
     110+
     111+*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
     112+***
     113+*** Please either set it to 10.something, or to empty.
     114+
     115+EOM
     116+      exit 1
     117+      ;;
     118+    esac
     119+
     120+    # Keep the prodvers leading whitespace (Configure magic).
     121+    # Cannot use $osvers here since that is the kernel version.
     122+    # sw_vers output                 what we want
     123+    # "ProductVersion:    10.10.5"   "10.10"
     124+    # "ProductVersion:    10.11"     "10.11"
     125+        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
     126+    case "$prodvers" in
     127+    10.*)
     128+      add_macosx_version_min ccflags $prodvers
     129+      add_macosx_version_min ldflags $prodvers
     130+      ;;
     131+    *)
     132+      cat <<EOM >&4
     133+
     134+*** Unexpected product version $prodvers.
     135+***
     136+*** Try running sw_vers and see what its ProductVersion says.
     137+
     138+EOM
     139+      exit 1
     140+    esac
     141+
     142+   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     143+   ;;
     144 esac
     145+
     146 ldlibpthname='DYLD_LIBRARY_PATH';
     147 
     148 # useshrplib=true results in much slower startup times.
  • files/5.20/avoid-bind9-linking.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -327,6 +327,8 @@ i_dbm=undef;
     3@@ -330,7 +330,7 @@ i_dbm=undef;
     4 # Configure doesn't detect ranlib on Tiger properly.
    65 # NeilW says this should be acceptable on all darwin versions.
    76 ranlib='ranlib'
    8  
     7-
    98+libswanted="$(echo $libswanted | sed -e 's/bind //' -e 's/ bind//')"
    10 +
    119 ##
    1210 # Build process
    1311 ##
  • files/5.20/avoid-no-cpp-precomp-PR38913.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -129,8 +129,6 @@ esac
     3@@ -131,7 +131,7 @@ esac
    64 
    75 # Avoid Apple's cpp precompiler, better for extensions
    86 if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
    97-    cppflags="${cppflags} -no-cpp-precomp"
    10 -
     8+
     9 
    1110     # This is necessary because perl's build system doesn't
    1211     # apply cppflags to cc compile lines as it should.
    13      ccflags="${ccflags} ${cppflags}"
  • files/5.20/clean-up-paths.patch

     
    1 Index: Configure
    2 ===================================================================
    31--- Configure.orig
    42+++ Configure
    53@@ -106,8 +106,8 @@ if test -d c:/. || ( uname -a | grep -i
  • files/5.20/fix-ld-modification.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    3 --- hints/darwin.sh.orig
    4 +++ hints/darwin.sh
    5 @@ -193,7 +193,7 @@ case "$osvers" in
    6  *)
    7     lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
    8     case "$ld" in
    9 -       *MACOSX_DEVELOPMENT_TARGET*) ;;
    10 +       *MACOSX_DEPLOYMENT_TARGET*) ;;
    11         *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
    12     esac
    13     ;;
  • files/5.20/fix-miniperl-linking-PR36438.patch

     
    1 Index: Makefile.SH
    2 ===================================================================
    31--- Makefile.SH.orig
    42+++ Makefile.SH
    5 @@ -914,7 +914,8 @@ NAMESPACEFLAGS = -force_flat_namespace
     3@@ -914,7 +914,7 @@ NAMESPACEFLAGS = -force_flat_namespace
    64                $spitshell >>$Makefile <<'!NO!SUBS!'
    75 lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
    86        -@rm -f miniperl.xok
    97-       $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    10 +       unset LIBRARY_PATH && \
    11 +       $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
     8+       unset LIBRARY_PATH && $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    129            $(mini_obj) $(libs)
    1310        $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
    1411        $(MINIPERL) -f write_buildcustomize.pl
  • files/5.20/remove-10.3-target-PR126360.patch

     
     1https://trac.macports.org/ticket/51980
     2https://rt.perl.org/Ticket/Display.html?id=126360
     3https://rt.perl.org/Ticket/Display.html?id=128980
     4http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
     5
     6--- hints/darwin.sh.orig
     7+++ hints/darwin.sh
     8@@ -180,28 +180,125 @@ case "$ld" in
     9         ;;
     10 esac
     11 
     12+# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
     13+#
     14+# OS, Kernel, Xcode Version
     15+# Note that Xcode gets updates on older systems sometimes.
     16+# pkgsrc generally expects that the most up-to-date xcode available for
     17+# an OS version is installed
     18+#
     19+# Codename        OS      Kernel  Xcode
     20+# Cheetah         10.0.x  1.3.1
     21+# Puma            10.1    1.4.1
     22+#                 10.1.x  5.x.y
     23+# Jaguar          10.2.x  6.x.y
     24+# Panther         10.3.x  7.x.y
     25+# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
     26+# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
     27+# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
     28+# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
     29+# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
     30+# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
     31+# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
     32+# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
     33+
     34+# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
     35+#
     36+# It is needed for OS releases before 10.6.
     37+#
     38+# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
     39+#
     40+# If it is set, we also propagate its value to ccflags and ldflags
     41+# using the -mmacosx-version-min flag.  If it is not set, we use
     42+# the OS X release as the min value for the flag.
     43+
     44+# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
     45+add_macosx_version_min () {
     46+  local v
     47+  eval "v=\$$1"
     48+  case " $v " in
     49+  *"-mmacosx-version-min"*)
     50+     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
     51+     ;;
     52+  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
     53+     eval "$1='$v -mmacosx-version-min=$2'"
     54+     ;;
     55+  esac
     56+}
     57+
     58 # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
     59 # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
     60-case "$osvers" in
     61-1.[0-3].*)
     62+case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
     63+1.[0-3].*) # OS X 10.0.x
     64    lddlflags="${ldflags} -bundle -undefined suppress"
     65    ;;
     66-1.*)
     67+1.*)       # OS X 10.1
     68    ldflags="${ldflags} -flat_namespace"
     69    lddlflags="${ldflags} -bundle -undefined suppress"
     70    ;;
     71-[2-6].*)
     72+[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
     73    ldflags="${ldflags} -flat_namespace"
     74    lddlflags="${ldflags} -bundle -undefined suppress"
     75    ;;
     76-*)
     77+[7-9].*)   # OS X 10.3.x - 10.5.x
     78    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     79    case "$ld" in
     80-       *MACOSX_DEVELOPMENT_TARGET*) ;;
     81+       *MACOSX_DEPLOYMENT_TARGET*) ;;
     82        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
     83    esac
     84    ;;
     85+*)        # OS X 10.6.x - current
     86+   # The MACOSX_DEPLOYMENT_TARGET is not needed,
     87+   # but the -mmacosx-version-min option is always used.
     88+
     89+   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
     90+   # capturing its value and adding it to the flags.
     91+    case "$MACOSX_DEPLOYMENT_TARGET" in
     92+    10.*)
     93+      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
     94+      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
     95+      ;;
     96+    '')
     97+      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
     98+      ;;
     99+    *)
     100+      cat <<EOM >&4
     101+
     102+*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
     103+***
     104+*** Please either set it to 10.something, or to empty.
     105+
     106+EOM
     107+      exit 1
     108+      ;;
     109+    esac
     110+
     111+    # Keep the prodvers leading whitespace (Configure magic).
     112+    # Cannot use $osvers here since that is the kernel version.
     113+    # sw_vers output                 what we want
     114+    # "ProductVersion:    10.10.5"   "10.10"
     115+    # "ProductVersion:    10.11"     "10.11"
     116+        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
     117+    case "$prodvers" in
     118+    10.*)
     119+      add_macosx_version_min ccflags $prodvers
     120+      add_macosx_version_min ldflags $prodvers
     121+      ;;
     122+    *)
     123+      cat <<EOM >&4
     124+
     125+*** Unexpected product version $prodvers.
     126+***
     127+*** Try running sw_vers and see what its ProductVersion says.
     128+
     129+EOM
     130+      exit 1
     131+    esac
     132+
     133+   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     134+   ;;
     135 esac
     136+
     137 ldlibpthname='DYLD_LIBRARY_PATH';
     138 
     139 # useshrplib=true results in much slower startup times.
  • files/5.22/avoid-bind9-linking.patch

     
    22        loclibpth="$loclibpth /opt/local/lib/libgcc" ;;
    33which is new in 5.22 needs some special "treatment".
    44
    5 Index: hints/darwin.sh
    6 ===================================================================
    75--- hints/darwin.sh.orig
    86+++ hints/darwin.sh
    9 @@ -337,6 +337,8 @@ i_dbm=undef;
     7@@ -338,7 +338,7 @@ i_dbm=undef;
     8 # Configure doesn't detect ranlib on Tiger properly.
    109 # NeilW says this should be acceptable on all darwin versions.
    1110 ranlib='ranlib'
    12  
     11-
    1312+libswanted="$(echo $libswanted | sed -e 's/bind //' -e 's/ bind//')"
    14 +
    1513 # Catch MacPorts gcc/g++ extra libdir
    1614 case "$($cc -v 2>&1)" in
    1715 *"MacPorts gcc"*) loclibpth="$loclibpth /opt/local/lib/libgcc" ;;
  • files/5.22/avoid-no-cpp-precomp-PR38913.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -137,8 +137,6 @@ esac
     3@@ -137,7 +137,7 @@ esac
    64 
    75 # Avoid Apple's cpp precompiler, better for extensions
    86 if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
    97-    cppflags="${cppflags} -no-cpp-precomp"
    10 -
     8+
     9 
    1110     # This is necessary because perl's build system doesn't
    1211     # apply cppflags to cc compile lines as it should.
    13      ccflags="${ccflags} ${cppflags}"
  • files/5.22/clean-up-paths.patch

     
    1 Index: Configure
    2 ===================================================================
    31--- Configure.orig
    42+++ Configure
    53@@ -108,8 +108,8 @@ if test -d c:/. || ( uname -a | grep -i
     
    1311 paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
    1412 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
    1513 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
    16 @@ -1404,7 +1404,7 @@ archobjs=''
     14@@ -1405,7 +1405,7 @@ archobjs=''
    1715 archname=''
    1816 : Possible local include directories to search.
    1917 : Set locincpth to "" in a hint file to defeat local include searches.
     
    2220 locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
    2321 :
    2422 : no include file wanted by default
    25 @@ -1418,12 +1418,12 @@ libnames=''
     23@@ -1419,12 +1419,12 @@ libnames=''
    2624 : change the next line if compiling for Xenix/286 on Xenix/386
    2725 xlibpth='/usr/lib/386 /lib/386'
    2826 : Possible local library directories to search.
  • files/5.22/fix-ld-modification.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    3 --- hints/darwin.sh.orig
    4 +++ hints/darwin.sh
    5 @@ -203,7 +203,7 @@ case "$osvers" in
    6     # https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
    7     lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
    8     case "$ld" in
    9 -       *MACOSX_DEVELOPMENT_TARGET*) ;;
    10 +       *MACOSX_DEPLOYMENT_TARGET*) ;;
    11         *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
    12     esac
    13     ;;
  • files/5.22/fix-miniperl-linking-PR36438.patch

     
    1 Index: Makefile.SH
    2 ===================================================================
    31--- Makefile.SH.orig
    42+++ Makefile.SH
    5 @@ -905,7 +905,8 @@ NAMESPACEFLAGS = -force_flat_namespace
     3@@ -908,7 +908,7 @@ NAMESPACEFLAGS = -force_flat_namespace
    64                $spitshell >>$Makefile <<'!NO!SUBS!'
    75 lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
    86        -@rm -f miniperl.xok
    97-       $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    10 +       unset LIBRARY_PATH && \
    11 +       $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
     8+       unset LIBRARY_PATH && $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    129            $(mini_obj) $(libs)
    1310        $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
    1411        $(MINIPERL) -f write_buildcustomize.pl
  • files/5.22/install-under-short-version-PR43480.patch

     
    1919 *)      set dflt privlib lib/$version ;;
    2020 esac
    2121 eval $prefixit
    22 @@ -7490,7 +7494,7 @@ siteprefixexp="$ansexp"
     22@@ -7492,7 +7492,7 @@ siteprefixexp="$ansexp"
    2323 prog=`echo $package | $sed 's/-*[0-9.]*$//'`
    2424 case "$sitelib" in
    2525 '') case "$installstyle" in
  • files/5.22/remove-10.3-target-PR126360.patch

     
     1https://trac.macports.org/ticket/51980
     2https://rt.perl.org/Ticket/Display.html?id=126360
     3https://rt.perl.org/Ticket/Display.html?id=128980
     4http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
     5
     6--- hints/darwin.sh.orig
     7+++ hints/darwin.sh
     8@@ -186,30 +186,125 @@ case "$ld" in
     9         ;;
     10 esac
     11 
     12+# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
     13+#
     14+# OS, Kernel, Xcode Version
     15+# Note that Xcode gets updates on older systems sometimes.
     16+# pkgsrc generally expects that the most up-to-date xcode available for
     17+# an OS version is installed
     18+#
     19+# Codename        OS      Kernel  Xcode
     20+# Cheetah         10.0.x  1.3.1
     21+# Puma            10.1    1.4.1
     22+#                 10.1.x  5.x.y
     23+# Jaguar          10.2.x  6.x.y
     24+# Panther         10.3.x  7.x.y
     25+# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
     26+# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
     27+# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
     28+# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
     29+# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
     30+# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
     31+# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
     32+# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
     33+
     34+# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
     35+#
     36+# It is needed for OS releases before 10.6.
     37+#
     38+# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
     39+#
     40+# If it is set, we also propagate its value to ccflags and ldflags
     41+# using the -mmacosx-version-min flag.  If it is not set, we use
     42+# the OS X release as the min value for the flag.
     43+
     44+# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
     45+add_macosx_version_min () {
     46+  local v
     47+  eval "v=\$$1"
     48+  case " $v " in
     49+  *"-mmacosx-version-min"*)
     50+     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
     51+     ;;
     52+  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
     53+     eval "$1='$v -mmacosx-version-min=$2'"
     54+     ;;
     55+  esac
     56+}
     57+
     58 # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
     59 # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
     60-case "$osvers" in
     61-1.[0-3].*)
     62+case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
     63+1.[0-3].*) # OS X 10.0.x
     64    lddlflags="${ldflags} -bundle -undefined suppress"
     65    ;;
     66-1.*)
     67+1.*)       # OS X 10.1
     68    ldflags="${ldflags} -flat_namespace"
     69    lddlflags="${ldflags} -bundle -undefined suppress"
     70    ;;
     71-[2-6].*)
     72+[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
     73    ldflags="${ldflags} -flat_namespace"
     74    lddlflags="${ldflags} -bundle -undefined suppress"
     75    ;;
     76-*)
     77-   # MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
     78-   # https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
     79+[7-9].*)   # OS X 10.3.x - 10.5.x
     80    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     81    case "$ld" in
     82-       *MACOSX_DEVELOPMENT_TARGET*) ;;
     83+       *MACOSX_DEPLOYMENT_TARGET*) ;;
     84        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
     85    esac
     86    ;;
     87+*)        # OS X 10.6.x - current
     88+   # The MACOSX_DEPLOYMENT_TARGET is not needed,
     89+   # but the -mmacosx-version-min option is always used.
     90+
     91+   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
     92+   # capturing its value and adding it to the flags.
     93+    case "$MACOSX_DEPLOYMENT_TARGET" in
     94+    10.*)
     95+      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
     96+      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
     97+      ;;
     98+    '')
     99+      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
     100+      ;;
     101+    *)
     102+      cat <<EOM >&4
     103+
     104+*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
     105+***
     106+*** Please either set it to 10.something, or to empty.
     107+
     108+EOM
     109+      exit 1
     110+      ;;
     111+    esac
     112+
     113+    # Keep the prodvers leading whitespace (Configure magic).
     114+    # Cannot use $osvers here since that is the kernel version.
     115+    # sw_vers output                 what we want
     116+    # "ProductVersion:    10.10.5"   "10.10"
     117+    # "ProductVersion:    10.11"     "10.11"
     118+        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
     119+    case "$prodvers" in
     120+    10.*)
     121+      add_macosx_version_min ccflags $prodvers
     122+      add_macosx_version_min ldflags $prodvers
     123+      ;;
     124+    *)
     125+      cat <<EOM >&4
     126+
     127+*** Unexpected product version $prodvers.
     128+***
     129+*** Try running sw_vers and see what its ProductVersion says.
     130+
     131+EOM
     132+      exit 1
     133+    esac
     134+
     135+   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     136+   ;;
     137 esac
     138+
     139 ldlibpthname='DYLD_LIBRARY_PATH';
     140 
     141 # useshrplib=true results in much slower startup times.
     142
  • files/5.24/avoid-bind9-linking.patch

     
    22        loclibpth="$loclibpth /opt/local/lib/libgcc" ;;
    33which is new in 5.22 needs some special "treatment".
    44
    5 Index: hints/darwin.sh
    6 ===================================================================
    75--- hints/darwin.sh.orig
    86+++ hints/darwin.sh
    9 @@ -482,6 +482,8 @@ i_dbm=undef;
     7@@ -483,7 +483,7 @@ i_dbm=undef;
     8 # Configure doesn't detect ranlib on Tiger properly.
    109 # NeilW says this should be acceptable on all darwin versions.
    1110 ranlib='ranlib'
    12  
     11-
    1312+libswanted="$(echo $libswanted | sed -e 's/bind //' -e 's/ bind//')"
    14 +
    1513 # Catch MacPorts gcc/g++ extra libdir
    1614 case "$($cc -v 2>&1)" in
    1715 *"MacPorts gcc"*) loclibpth="$loclibpth /opt/local/lib/libgcc" ;;
  • files/5.24/avoid-no-cpp-precomp-PR38913.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    5 @@ -137,8 +137,6 @@ esac
     3@@ -137,7 +137,7 @@ esac
    64 
    75 # Avoid Apple's cpp precompiler, better for extensions
    86 if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then
    97-    cppflags="${cppflags} -no-cpp-precomp"
    10 -
     8+
     9 
    1110     # This is necessary because perl's build system doesn't
    1211     # apply cppflags to cc compile lines as it should.
    13      ccflags="${ccflags} ${cppflags}"
  • files/5.24/clean-up-paths.patch

     
    1 Index: Configure
    2 ===================================================================
    31--- Configure.orig
    42+++ Configure
    53@@ -111,8 +111,8 @@ if test -d c:/. || ( uname -a | grep -i
  • files/5.24/fix-ld-modification.patch

     
    1 Index: hints/darwin.sh
    2 ===================================================================
    31--- hints/darwin.sh.orig
    42+++ hints/darwin.sh
    53@@ -292,7 +292,7 @@ case "$osvers" in
  • files/5.24/fix-miniperl-linking-PR36438.patch

     
    1 Index: Makefile.SH
    2 ===================================================================
    31--- Makefile.SH.orig
    42+++ Makefile.SH
    5 @@ -964,7 +964,8 @@ NAMESPACEFLAGS = -force_flat_namespace
     3@@ -964,7 +964,7 @@ NAMESPACEFLAGS = -force_flat_namespace
    64                $spitshell >>$Makefile <<'!NO!SUBS!'
    75 lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl
    86        -@rm -f miniperl.xok
    97-       $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    10 +       unset LIBRARY_PATH && \
    11 +       $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
     8+       unset LIBRARY_PATH && $(CC) $(subst -L__PREFIX__/lib,,$(CLDFLAGS)) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
    129            $(miniperl_objs) $(libs)
    1310        $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl.  Please run make minitest; exit 1'
    1411        $(MINIPERL) -f write_buildcustomize.pl