Ticket #62779: patch-lang-perl5-Portfile.diff

File patch-lang-perl5-Portfile.diff, 2.0 KB (added by ghosthound, 4 years ago)

use patch files to back port upstream fix for macOS 11.0 to 5.28 and 5.30, do not use workaround for perl5.28 and higher.

  • lang/perl5/Portfile

    diff --git a/lang/perl5/Portfile b/lang/perl5/Portfile
    index 04525a969d9..f704d381ebd 100644
    a b foreach {perl5.v perl5.subversion perl5.revision perl5.rmd160 perl5.sha256 perl5 
    140140                            ${perl5.major}/dont-write-invalid-write_buildcustomize.pl.patch \
    141141                            ${perl5.major}/fallback-to-built-in-getcwd.patch \
    142142        }
     143        if {${perl5.major} >= 5.28 && ${perl5.major} <= 5.30} {
     144            ## backport the fix for "macOS 11.x" that went into 5.32.1
     145            ## see https://github.com/Perl/perl5/pull/17946
     146            patchfiles-append \
     147                            ${perl5.major}/patch-hints-darwin_sh.diff \
     148        }
    143149
    144150        post-patch {
    145151            reinplace -W ${worksrcpath} "s|__PREFIX__|${prefix}|g" \
    foreach {perl5.v perl5.subversion perl5.revision perl5.rmd160 perl5.sha256 perl5 
    180186                           {-Alddlflags="$LDFLAGS"} \
    181187                           {-Aldflags="$LDFLAGS"}
    182188
    183         # Workaround buggy configure scripts that expect 10.x
    184         if {[vercmp ${macosx_deployment_target} 11.0] >= 0} {
    185             macosx_deployment_target 10.16
    186         }
    187         if {${os.major} >= 20} {
    188             configure.env-append SYSTEM_VERSION_COMPAT=1
     189        ## perl5.28 and 5.30 will compile on macOS 11.3 / Xcode 12.5 with
     190        ##   the above patch-hints-darwin_sh.diff, and perl5.32(.1) has
     191        ##   the fix in that patch included.  So only use the below
     192        ##   work-around for "bugging configure scripts" for perl < 5.28
     193        if {${perl5.major} < 5.28} {
     194            # Workaround buggy configure scripts that expect 10.x
     195            if {[vercmp ${macosx_deployment_target} 11.0] >= 0} {
     196                macosx_deployment_target 10.16
     197            }
     198            if {${os.major} >= 20} {
     199                configure.env-append SYSTEM_VERSION_COMPAT=1
     200            }
    189201        }
    190202
    191203        post-configure {