Browse Source

Restore macOS 10.13 (High Sierra) support (#10778)

* Differentiate PCRE2 from PCRE, fix missed version substitution

* cd back out of source folders after building dependencies

* Build pcre from source to fix macOS 10.13 compatibility

pcre is linked into Haxe, so it's important that it honors our macOS
deployment target.

43df805dbb0788567027de1dd6cca577907a3031 replaced pcre with pcre2. This
commit brings pcre back so both are built side by side.

This fixes https://github.com/HaxeFoundation/haxe/issues/10723

* Update pcre download links

From pcre.org:

> Note that the former ftp.pcre.org FTP site is no longer available.

and

> You can also download PCRE2 or the older, unmaintained PCRE library
> from an unofficial mirror at SourceForge:
>
> https://sourceforge.net/projects/pcre/files/

* Remove unused pcre2 build

Until the pcre2 migration is actually done, only build pcre.

Context: https://github.com/HaxeFoundation/haxe/issues/10491
Justin Espedal 2 years ago
parent
commit
b350eb222f
2 changed files with 14 additions and 8 deletions
  1. 7 4
      .github/workflows/main.yml
  2. 7 4
      extra/github-actions/build-mac.yml

+ 7 - 4
.github/workflows/main.yml

@@ -411,7 +411,7 @@ jobs:
           # For compatibility with macOS 10.13
           # For compatibility with macOS 10.13
           ZLIB_VERSION: 1.2.13
           ZLIB_VERSION: 1.2.13
           MBEDTLS_VERSION: 2.25.0
           MBEDTLS_VERSION: 2.25.0
-          PCRE_VERSION: 10.39
+          PCRE_VERSION: 8.44
         run: |
         run: |
           set -ex
           set -ex
           brew uninstall [email protected] || echo
           brew uninstall [email protected] || echo
@@ -428,13 +428,16 @@ jobs:
           cd zlib-$ZLIB_VERSION
           cd zlib-$ZLIB_VERSION
           ./configure
           ./configure
           make && make install
           make && make install
+          cd ..
           curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
           curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
           cd mbedtls-$MBEDTLS_VERSION
           cd mbedtls-$MBEDTLS_VERSION
           make && make install
           make && make install
-          curl -L https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.39/pcre2-$PCRE_VERSION.tar.gz | tar xz
-          cd pcre2-$PCRE_VERSION
-          ./configure --enable-utf8 --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-jit
+          cd ..
+          curl -L https://downloads.sourceforge.net/project/pcre/pcre/$PCRE_VERSION/pcre-$PCRE_VERSION.tar.gz | tar xz
+          cd pcre-$PCRE_VERSION
+          ./configure --enable-utf8 --enable-pcre8 --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-jit
           make && make install
           make && make install
+          cd ..
 
 
 
 
       - name: Install OCaml libraries
       - name: Install OCaml libraries

+ 7 - 4
extra/github-actions/build-mac.yml

@@ -3,7 +3,7 @@
     # For compatibility with macOS 10.13
     # For compatibility with macOS 10.13
     ZLIB_VERSION: 1.2.13
     ZLIB_VERSION: 1.2.13
     MBEDTLS_VERSION: 2.25.0
     MBEDTLS_VERSION: 2.25.0
-    PCRE_VERSION: 10.39
+    PCRE_VERSION: 8.44
   run: |
   run: |
     set -ex
     set -ex
     brew uninstall [email protected] || echo
     brew uninstall [email protected] || echo
@@ -20,13 +20,16 @@
     cd zlib-$ZLIB_VERSION
     cd zlib-$ZLIB_VERSION
     ./configure
     ./configure
     make && make install
     make && make install
+    cd ..
     curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
     curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
     cd mbedtls-$MBEDTLS_VERSION
     cd mbedtls-$MBEDTLS_VERSION
     make && make install
     make && make install
-    curl -L https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.39/pcre2-$PCRE_VERSION.tar.gz | tar xz
-    cd pcre2-$PCRE_VERSION
-    ./configure --enable-utf8 --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-jit
+    cd ..
+    curl -L https://downloads.sourceforge.net/project/pcre/pcre/$PCRE_VERSION/pcre-$PCRE_VERSION.tar.gz | tar xz
+    cd pcre-$PCRE_VERSION
+    ./configure --enable-utf8 --enable-pcre8 --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-jit
     make && make install
     make && make install
+    cd ..
 
 
 
 
 - name: Install OCaml libraries
 - name: Install OCaml libraries