[154367] trunk/dports/lang/perl5

mojca at macports.org mojca at macports.org
Fri Oct 28 21:57:18 CEST 2016


Revision: 154367
          https://trac.macports.org/changeset/154367
Author:   mojca at macports.org
Date:     2016-10-28 21:57:18 +0200 (Fri, 28 Oct 2016)
Log Message:
-----------
perl5: backport fixes to 5.16-5.20 (closes #51980)

* backport fixes for MACOSX_DEPLOYMENT_TARGET from 5.24 and fix build on 10.12 for 5.16-5.20 (closes #51980)
* add `-Dinstallstyle='lib/perl5'` to avoid problems with a prefix like `/opt/perl5`
* replace `-D(cc|cpp|ld)flags` with `-A(cc|cpp|ld)flags` for all perl versions

Modified Paths:
--------------
    trunk/dports/lang/perl5/Portfile
    trunk/dports/lang/perl5/files/5.24/fix-ld-modification.patch

Added Paths:
-----------
    trunk/dports/lang/perl5/files/5.16/remove-10.3-target-PR126360.patch
    trunk/dports/lang/perl5/files/5.18/remove-10.3-target-PR126360.patch
    trunk/dports/lang/perl5/files/5.20/remove-10.3-target-PR126360.patch

Removed Paths:
-------------
    trunk/dports/lang/perl5/files/5.18/fix-ld-modification.patch
    trunk/dports/lang/perl5/files/5.20/fix-ld-modification.patch

Modified: trunk/dports/lang/perl5/Portfile
===================================================================
--- trunk/dports/lang/perl5/Portfile	2016-10-28 19:44:19 UTC (rev 154366)
+++ trunk/dports/lang/perl5/Portfile	2016-10-28 19:57:18 UTC (rev 154367)
@@ -31,9 +31,9 @@
 # - revision
 # - rmd160 sha256
 set perl5.versions_info {
-    5.16 3 2 f25fdd72449156a7cbe989e8bd339fdba1afabc0  bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8
-    5.18 4 1 d97181a98f7acc80125b0d2a182a6a2cd7542ceb  1fb4d27b75cd244e849f253320260efe1750641aaff4a18ce0d67556ff1b96a5
-    5.20 3 0 499846a1c92e00dd357cb782bc14787b8cd47051  1b40068166c242e34a536836286e70b78410602a80615143301e52aa2901493b
+    5.16 3 3 f25fdd72449156a7cbe989e8bd339fdba1afabc0  bb7bc735e6813b177dcfccd480defcde7eddefa173b5967eac11babd1bfa98e8
+    5.18 4 2 d97181a98f7acc80125b0d2a182a6a2cd7542ceb  1fb4d27b75cd244e849f253320260efe1750641aaff4a18ce0d67556ff1b96a5
+    5.20 3 1 499846a1c92e00dd357cb782bc14787b8cd47051  1b40068166c242e34a536836286e70b78410602a80615143301e52aa2901493b
     5.22 2 1 203afca8995ca426db0af48b78eb606b5d24011a  f2322b9b04fe0cdbca9fe755360da04892cb6483d44959457cfebc0bcddc8058
     5.24 0 0 756bf07069e91eabe3dac3a47aec5097d48f8963  62328a53d157e8153b33e137594155f6f8b64418f7f9238210feb809585290e0
 }
@@ -67,8 +67,7 @@
 
         # TODO: revise patch naming scheme
         patchfiles          ${perl5.major}/clean-up-paths.patch \
-                            ${perl5.major}/avoid-no-cpp-precomp-PR38913.patch \
-                            ${perl5.major}/fix-ld-modification.patch
+                            ${perl5.major}/avoid-no-cpp-precomp-PR38913.patch
 
         # Prevent build from picking up the bind9 port's static libbind, which
         # duplicates symbols from /usr/lib/libdl (r10638).
@@ -75,9 +74,13 @@
         patchfiles-append   ${perl5.major}/avoid-bind9-linking.patch
 
         # Prevent miniperl linking from accidentally finding our libstdc++
-        # (#36438).
+        # https://trac.macports.org/ticket/36438
         patchfiles-append   ${perl5.major}/fix-miniperl-linking-PR36438.patch
 
+        # Install files under 5.xx rather than 5.xx.yy
+        # https://trac.macports.org/ticket/43480
+        patchfiles-append   ${perl5.major}/install-under-short-version-PR43480.patch
+
         if {${perl5.major} == 5.16} {
             patchfiles-append \
                             ${perl5.major}/use-stdbool.patch
@@ -85,9 +88,6 @@
             # and https://rt.perl.org/Public/Bug/Display.html?id=121714.
             patchfiles-append \
                             ${perl5.major}/fix-cxx-dNOOP-PR43150.patch
-        } else {
-            patchfiles-append \
-                            ${perl5.major}/install-under-short-version-PR43480.patch
         }
         if {${perl5.major} >= 5.22} {
             # failed test
@@ -100,11 +100,9 @@
             # https://trac.macports.org/ticket/52012
             patchfiles-append \
                             ${perl5.major}/patch-dist-Time-HiRes-HiRes.xs.diff
-        }
-        # This should be added to other perl versions as well
-        if {${perl5.major} == 5.22} {
-            patchfiles-delete \
+            patchfiles-append \
                             ${perl5.major}/fix-ld-modification.patch
+        } else {
             # Do not compile for 10.3/10.4
             # https://trac.macports.org/ticket/51980
             patchfiles-append \
@@ -133,6 +131,7 @@
                            {-Dcc="$CC"} \
                             -Dman1ext=1pm \
                             -Dman3ext=3pm \
+                            -Dinstallstyle='lib/perl5' \
                             -Dman1dir='${prefix}/share/man/man1p' \
                             -Dman3dir='${prefix}/share/man/man3p' \
                             -Dsitebin='${prefix}/libexec/perl${perl5.major}/sitebin' \
@@ -143,23 +142,10 @@
                             -Dvendorman3dir='${prefix}/share/perl${perl5.major}/man/man3' \
                             -Dpager='/usr/bin/less -sR' \
                             -Dperlpath="${perl5.bin}" \
-                            -Dstartperl="#!${perl5.bin}"
-        # flags with -A should be used for all versions of perl,
-        # but for the time being we wanted to avoid rebuilding (revbumping) old perl version
-        # so changing the flags is scheduled for later
-        if {${version} >= 5.22} {
-            configure.post_args-append \
-                            {-Acppflags="$CPPFLAGS"} \
-                            {-Accflags="$CFLAGS"} \
-                            {-Aldflags="$LDFLAGS"} \
-                            {-Dinstallstyle="lib/perl5"}
-        } else {
-            configure.post_args-append \
-                            {-Dcppflags="$CPPFLAGS"} \
-                            {-Dccflags="$CFLAGS"} \
-                            {-Dldflags="$LDFLAGS"} \
-                            {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"}
-        }
+                            -Dstartperl="#!${perl5.bin}" \
+                           {-Acppflags="$CPPFLAGS"} \
+                           {-Accflags="$CFLAGS"} \
+                           {-Aldflags="$LDFLAGS"}
 
         if {[variant_isset universal]} {
             post-configure {

Copied: trunk/dports/lang/perl5/files/5.16/remove-10.3-target-PR126360.patch (from rev 152002, trunk/dports/lang/perl5/files/5.22/remove-10.3-target-PR126360.patch)
===================================================================
--- trunk/dports/lang/perl5/files/5.16/remove-10.3-target-PR126360.patch	                        (rev 0)
+++ trunk/dports/lang/perl5/files/5.16/remove-10.3-target-PR126360.patch	2016-10-28 19:57:18 UTC (rev 154367)
@@ -0,0 +1,160 @@
+https://trac.macports.org/ticket/51980
+https://rt.perl.org/Ticket/Display.html?id=126360
+https://rt.perl.org/Ticket/Display.html?id=128980
+http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
+
+--- hints/darwin.sh.orig
++++ hints/darwin.sh
+@@ -143,7 +143,7 @@ esac
+ 
+ # Shared library extension is .dylib.
+ # Bundle extension is .bundle.
+-ld='cc';
++
+ so='dylib';
+ dlext='bundle';
+ usedl='define';
+@@ -167,28 +167,137 @@ case "$ccdlflags" in		# If passed in from command line, presume user knows best
+ ;;
+ esac
+ 
++# Allow the user to override ld, but modify it as necessary below
++case "$ld" in
++    '') case "$cc" in
++        # If the cc is explicitly something else than cc (or empty),
++        # set the ld to be that explicitly something else.  Conversely,
++        # if the cc is 'cc' (or empty), set the ld to be 'cc'.
++        cc|'') ld='cc';;
++        *) ld="$cc" ;;
++        esac
++        ;;
++esac
++
++# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
++#
++# OS, Kernel, Xcode Version
++# Note that Xcode gets updates on older systems sometimes.
++# pkgsrc generally expects that the most up-to-date xcode available for
++# an OS version is installed
++#
++# Codename        OS      Kernel  Xcode
++# Cheetah         10.0.x  1.3.1
++# Puma            10.1    1.4.1
++#                 10.1.x  5.x.y
++# Jaguar          10.2.x  6.x.y
++# Panther         10.3.x  7.x.y
++# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
++# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
++# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
++# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
++# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
++# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
++# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
++# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
++
++# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
++#
++# It is needed for OS releases before 10.6.
++#
++# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
++#
++# If it is set, we also propagate its value to ccflags and ldflags
++# using the -mmacosx-version-min flag.  If it is not set, we use
++# the OS X release as the min value for the flag.
++
++# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
++add_macosx_version_min () {
++  local v
++  eval "v=\$$1"
++  case " $v " in
++  *"-mmacosx-version-min"*)
++     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
++     ;;
++  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
++     eval "$1='$v -mmacosx-version-min=$2'"
++     ;;
++  esac
++}
++
+ # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
+ # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
+-case "$osvers" in
+-1.[0-3].*)
++case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
++1.[0-3].*) # OS X 10.0.x
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-1.*)
++1.*)       # OS X 10.1
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-[2-6].*)
++[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-*) 
++[7-9].*)   # OS X 10.3.x - 10.5.x
+    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
+    case "$ld" in
+-       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *MACOSX_DEPLOYMENT_TARGET*) ;;
+        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
+    esac
+    ;;
++*)        # OS X 10.6.x - current
++   # The MACOSX_DEPLOYMENT_TARGET is not needed,
++   # but the -mmacosx-version-min option is always used.
++
++   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
++   # capturing its value and adding it to the flags.
++    case "$MACOSX_DEPLOYMENT_TARGET" in
++    10.*)
++      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
++      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
++      ;;
++    '')
++      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
++      ;;
++    *)
++      cat <<EOM >&4
++
++*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
++***
++*** Please either set it to 10.something, or to empty.
++
++EOM
++      exit 1
++      ;;
++    esac
++
++    # Keep the prodvers leading whitespace (Configure magic).
++    # Cannot use $osvers here since that is the kernel version.
++    # sw_vers output                 what we want
++    # "ProductVersion:    10.10.5"   "10.10"
++    # "ProductVersion:    10.11"     "10.11"
++        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
++    case "$prodvers" in
++    10.*)
++      add_macosx_version_min ccflags $prodvers
++      add_macosx_version_min ldflags $prodvers
++      ;;
++    *)
++      cat <<EOM >&4
++
++*** Unexpected product version $prodvers.
++***
++*** Try running sw_vers and see what its ProductVersion says.
++
++EOM
++      exit 1
++    esac
++
++   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
++   ;;
+ esac
++
+ ldlibpthname='DYLD_LIBRARY_PATH';
+ 
+ # useshrplib=true results in much slower startup times.

Deleted: trunk/dports/lang/perl5/files/5.18/fix-ld-modification.patch
===================================================================
--- trunk/dports/lang/perl5/files/5.18/fix-ld-modification.patch	2016-10-28 19:44:19 UTC (rev 154366)
+++ trunk/dports/lang/perl5/files/5.18/fix-ld-modification.patch	2016-10-28 19:57:18 UTC (rev 154367)
@@ -1,20 +0,0 @@
---- hints/darwin.sh.orig
-+++ hints/darwin.sh
-@@ -143,7 +143,7 @@ esac
- 
- # Shared library extension is .dylib.
- # Bundle extension is .bundle.
--ld='cc';
-+
- so='dylib';
- dlext='bundle';
- usedl='define';
-@@ -184,7 +184,7 @@ case "$osvers" in
- *) 
-    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
-    case "$ld" in
--       *MACOSX_DEVELOPMENT_TARGET*) ;;
-+       *MACOSX_DEPLOYMENT_TARGET*) ;;
-        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
-    esac
-    ;;

Copied: trunk/dports/lang/perl5/files/5.18/remove-10.3-target-PR126360.patch (from rev 152002, trunk/dports/lang/perl5/files/5.22/remove-10.3-target-PR126360.patch)
===================================================================
--- trunk/dports/lang/perl5/files/5.18/remove-10.3-target-PR126360.patch	                        (rev 0)
+++ trunk/dports/lang/perl5/files/5.18/remove-10.3-target-PR126360.patch	2016-10-28 19:57:18 UTC (rev 154367)
@@ -0,0 +1,160 @@
+https://trac.macports.org/ticket/51980
+https://rt.perl.org/Ticket/Display.html?id=126360
+https://rt.perl.org/Ticket/Display.html?id=128980
+http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
+
+--- hints/darwin.sh.orig
++++ hints/darwin.sh
+@@ -143,7 +143,7 @@ esac
+ 
+ # Shared library extension is .dylib.
+ # Bundle extension is .bundle.
+-ld='cc';
++
+ so='dylib';
+ dlext='bundle';
+ usedl='define';
+@@ -167,28 +167,137 @@ case "$ccdlflags" in		# If passed in from command line, presume user knows best
+ ;;
+ esac
+ 
++# Allow the user to override ld, but modify it as necessary below
++case "$ld" in
++    '') case "$cc" in
++        # If the cc is explicitly something else than cc (or empty),
++        # set the ld to be that explicitly something else.  Conversely,
++        # if the cc is 'cc' (or empty), set the ld to be 'cc'.
++        cc|'') ld='cc';;
++        *) ld="$cc" ;;
++        esac
++        ;;
++esac
++
++# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
++#
++# OS, Kernel, Xcode Version
++# Note that Xcode gets updates on older systems sometimes.
++# pkgsrc generally expects that the most up-to-date xcode available for
++# an OS version is installed
++#
++# Codename        OS      Kernel  Xcode
++# Cheetah         10.0.x  1.3.1
++# Puma            10.1    1.4.1
++#                 10.1.x  5.x.y
++# Jaguar          10.2.x  6.x.y
++# Panther         10.3.x  7.x.y
++# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
++# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
++# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
++# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
++# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
++# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
++# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
++# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
++
++# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
++#
++# It is needed for OS releases before 10.6.
++#
++# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
++#
++# If it is set, we also propagate its value to ccflags and ldflags
++# using the -mmacosx-version-min flag.  If it is not set, we use
++# the OS X release as the min value for the flag.
++
++# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
++add_macosx_version_min () {
++  local v
++  eval "v=\$$1"
++  case " $v " in
++  *"-mmacosx-version-min"*)
++     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
++     ;;
++  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
++     eval "$1='$v -mmacosx-version-min=$2'"
++     ;;
++  esac
++}
++
+ # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
+ # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
+-case "$osvers" in
+-1.[0-3].*)
++case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
++1.[0-3].*) # OS X 10.0.x
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-1.*)
++1.*)       # OS X 10.1
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-[2-6].*)
++[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-*) 
++[7-9].*)   # OS X 10.3.x - 10.5.x
+    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
+    case "$ld" in
+-       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *MACOSX_DEPLOYMENT_TARGET*) ;;
+        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
+    esac
+    ;;
++*)        # OS X 10.6.x - current
++   # The MACOSX_DEPLOYMENT_TARGET is not needed,
++   # but the -mmacosx-version-min option is always used.
++
++   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
++   # capturing its value and adding it to the flags.
++    case "$MACOSX_DEPLOYMENT_TARGET" in
++    10.*)
++      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
++      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
++      ;;
++    '')
++      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
++      ;;
++    *)
++      cat <<EOM >&4
++
++*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
++***
++*** Please either set it to 10.something, or to empty.
++
++EOM
++      exit 1
++      ;;
++    esac
++
++    # Keep the prodvers leading whitespace (Configure magic).
++    # Cannot use $osvers here since that is the kernel version.
++    # sw_vers output                 what we want
++    # "ProductVersion:    10.10.5"   "10.10"
++    # "ProductVersion:    10.11"     "10.11"
++        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
++    case "$prodvers" in
++    10.*)
++      add_macosx_version_min ccflags $prodvers
++      add_macosx_version_min ldflags $prodvers
++      ;;
++    *)
++      cat <<EOM >&4
++
++*** Unexpected product version $prodvers.
++***
++*** Try running sw_vers and see what its ProductVersion says.
++
++EOM
++      exit 1
++    esac
++
++   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
++   ;;
+ esac
++
+ ldlibpthname='DYLD_LIBRARY_PATH';
+ 
+ # useshrplib=true results in much slower startup times.

Deleted: trunk/dports/lang/perl5/files/5.20/fix-ld-modification.patch
===================================================================
--- trunk/dports/lang/perl5/files/5.20/fix-ld-modification.patch	2016-10-28 19:44:19 UTC (rev 154366)
+++ trunk/dports/lang/perl5/files/5.20/fix-ld-modification.patch	2016-10-28 19:57:18 UTC (rev 154367)
@@ -1,11 +0,0 @@
---- hints/darwin.sh.orig
-+++ hints/darwin.sh
-@@ -197,7 +197,7 @@ case "$osvers" in
- *) 
-    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
-    case "$ld" in
--       *MACOSX_DEVELOPMENT_TARGET*) ;;
-+       *MACOSX_DEPLOYMENT_TARGET*) ;;
-        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
-    esac
-    ;;

Copied: trunk/dports/lang/perl5/files/5.20/remove-10.3-target-PR126360.patch (from rev 152002, trunk/dports/lang/perl5/files/5.22/remove-10.3-target-PR126360.patch)
===================================================================
--- trunk/dports/lang/perl5/files/5.20/remove-10.3-target-PR126360.patch	                        (rev 0)
+++ trunk/dports/lang/perl5/files/5.20/remove-10.3-target-PR126360.patch	2016-10-28 19:57:18 UTC (rev 154367)
@@ -0,0 +1,139 @@
+https://trac.macports.org/ticket/51980
+https://rt.perl.org/Ticket/Display.html?id=126360
+https://rt.perl.org/Ticket/Display.html?id=128980
+http://perl5.git.perl.org/perl.git/commit/53d1d41c81e1de9cc6416dcae828c13d4c5a470a
+
+--- hints/darwin.sh.orig
++++ hints/darwin.sh
+@@ -180,28 +180,125 @@ case "$ld" in
+         ;;
+ esac
+ 
++# From http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/mk/platform/Darwin.mk
++#
++# OS, Kernel, Xcode Version
++# Note that Xcode gets updates on older systems sometimes.
++# pkgsrc generally expects that the most up-to-date xcode available for
++# an OS version is installed
++#
++# Codename        OS      Kernel  Xcode
++# Cheetah         10.0.x  1.3.1
++# Puma            10.1    1.4.1
++#                 10.1.x  5.x.y
++# Jaguar          10.2.x  6.x.y
++# Panther         10.3.x  7.x.y
++# Tiger           10.4.x  8.x.y   2.x (gcc 4.0, 4.0.1 from 2.2)
++# Leopard         10.5.x  9.x.y   3.x (gcc 4.0.1, 4.0.1 and 4.2.1 from 3.1)
++# Snow Leopard    10.6.x  10.x.y  3.2+ (gcc 4.0.1 and 4.2.1)
++# Lion            10.7.x  11.x.y  4.1 (llvm gcc 4.2.1)
++# Mountain Lion   10.8.x  12.x.y  4.5 (llvm gcc 4.2.1)
++# Mavericks       10.9.x  13.x.y  6 (llvm clang 6.0)
++# Yosemite        10.10.x 14.x.y  6 (llvm clang 6.0)
++# El Capitan      10.11.x 15.x.y  7 (llvm clang 7.0)
++
++# MACOSX_DEPLOYMENT_TARGET selects the minimum OS level we want to support
++#
++# It is needed for OS releases before 10.6.
++#
++# https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html
++#
++# If it is set, we also propagate its value to ccflags and ldflags
++# using the -mmacosx-version-min flag.  If it is not set, we use
++# the OS X release as the min value for the flag.
++
++# Adds "-mmacosx-version-min=$2" to "$1" unless it already is there.
++add_macosx_version_min () {
++  local v
++  eval "v=\$$1"
++  case " $v " in
++  *"-mmacosx-version-min"*)
++     echo "NOT adding -mmacosx-version-min=$2 to $1 ($v)" >&4
++     ;;
++  *) echo "Adding -mmacosx-version-min=$2 to $1" >&4
++     eval "$1='$v -mmacosx-version-min=$2'"
++     ;;
++  esac
++}
++
+ # Perl bundles do not expect two-level namespace, added in Darwin 1.4.
+ # But starting from perl 5.8.1/Darwin 7 the default is the two-level.
+-case "$osvers" in
+-1.[0-3].*)
++case "$osvers" in  # Note: osvers is the kernel version, not the 10.x
++1.[0-3].*) # OS X 10.0.x
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-1.*)
++1.*)       # OS X 10.1
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-[2-6].*)
++[2-6].*)   # OS X 10.1.x - 10.2.x (though [2-4] never existed publicly)
+    ldflags="${ldflags} -flat_namespace"
+    lddlflags="${ldflags} -bundle -undefined suppress"
+    ;;
+-*) 
++[7-9].*)   # OS X 10.3.x - 10.5.x
+    lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
+    case "$ld" in
+-       *MACOSX_DEVELOPMENT_TARGET*) ;;
++       *MACOSX_DEPLOYMENT_TARGET*) ;;
+        *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
+    esac
+    ;;
++*)        # OS X 10.6.x - current
++   # The MACOSX_DEPLOYMENT_TARGET is not needed,
++   # but the -mmacosx-version-min option is always used.
++
++   # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by
++   # capturing its value and adding it to the flags.
++    case "$MACOSX_DEPLOYMENT_TARGET" in
++    10.*)
++      add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET
++      add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET
++      ;;
++    '')
++      # Empty MACOSX_DEPLOYMENT_TARGET is okay.
++      ;;
++    *)
++      cat <<EOM >&4
++
++*** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
++***
++*** Please either set it to 10.something, or to empty.
++
++EOM
++      exit 1
++      ;;
++    esac
++
++    # Keep the prodvers leading whitespace (Configure magic).
++    # Cannot use $osvers here since that is the kernel version.
++    # sw_vers output                 what we want
++    # "ProductVersion:    10.10.5"   "10.10"
++    # "ProductVersion:    10.11"     "10.11"
++        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
++    case "$prodvers" in
++    10.*)
++      add_macosx_version_min ccflags $prodvers
++      add_macosx_version_min ldflags $prodvers
++      ;;
++    *)
++      cat <<EOM >&4
++
++*** Unexpected product version $prodvers.
++***
++*** Try running sw_vers and see what its ProductVersion says.
++
++EOM
++      exit 1
++    esac
++
++   lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
++   ;;
+ esac
++
+ ldlibpthname='DYLD_LIBRARY_PATH';
+ 
+ # useshrplib=true results in much slower startup times.

Modified: trunk/dports/lang/perl5/files/5.24/fix-ld-modification.patch
===================================================================
--- trunk/dports/lang/perl5/files/5.24/fix-ld-modification.patch	2016-10-28 19:44:19 UTC (rev 154366)
+++ trunk/dports/lang/perl5/files/5.24/fix-ld-modification.patch	2016-10-28 19:57:18 UTC (rev 154367)
@@ -1,6 +1,6 @@
 --- hints/darwin.sh.orig
 +++ hints/darwin.sh
-@@ -292,7 +292,7 @@ case "$osvers" in
+@@ -294,7 +294,7 @@ case "$osvers" in
  [7-9].*)   # OS X 10.3.x - 10.5.x
     lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
     case "$ld" in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161028/dc853a7b/attachment-0002.html>


More information about the macports-changes mailing list