Skip to content

Commit 60ee77e

Browse files
committed
Upgrade to macOS 14 and backport necessary changes
1 parent 3aaa8d3 commit 60ee77e

File tree

4 files changed

+30
-38
lines changed

4 files changed

+30
-38
lines changed

.github/actions/brew/action.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,25 @@ runs:
55
- shell: bash
66
run: |
77
set -x
8+
9+
# Patch brew to overwrite always
10+
formula_installer="$(brew --repo)"/Library/Homebrew/formula_installer.rb
11+
code=" keg.link\(verbose: verbose\?"
12+
sudo sed -Ei '' "s/$code.*/$code, overwrite: true\)/" "$formula_installer"
13+
14+
# Some packages exist on x86 but not arm, or vice versa.
15+
# Install them with reinstall to avoid warnings.
16+
brew reinstall autoconf webp tidy-html5 libzip libsodium icu4c
817
brew install \
9-
pkg-config \
10-
autoconf \
1118
bison \
1219
re2c
1320
brew install \
14-
15-
curl \
16-
krb5 \
1721
bzip2 \
1822
enchant \
1923
libffi \
20-
libpng \
21-
webp \
22-
freetype \
2324
intltool \
2425
libiconv \
25-
zlib \
2626
t1lib \
27-
gd \
28-
libzip \
29-
gmp \
30-
tidy-html5 \
3127
libxml2 \
3228
libjpeg \
33-
libxslt \
34-
postgresql
35-
brew link gettext --force
29+
libxslt

.github/actions/configure-macos/action.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ runs:
1010
run: |
1111
set -x
1212
BREW_OPT="$(brew --prefix)"/opt
13-
export PATH="/usr/local/opt/bison/bin:$PATH"
14-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/[email protected]/lib/pkgconfig"
15-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/curl/lib/pkgconfig"
16-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig"
17-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
18-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
19-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxslt/lib/pkgconfig"
20-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig"
21-
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c@74/lib/pkgconfig"
13+
export PATH="$BREW_OPT/bison/bin:$PATH"
14+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/[email protected]/lib/pkgconfig"
15+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/curl/lib/pkgconfig"
16+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libffi/lib/pkgconfig"
17+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxml2/lib/pkgconfig"
18+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxslt/lib/pkgconfig"
19+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/zlib/lib/pkgconfig"
20+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/icu4c/lib/pkgconfig"
2221
sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
2322
./buildconf --force
2423
./configure \
@@ -28,8 +27,8 @@ runs:
2827
--enable-fpm \
2928
--with-pdo-mysql=mysqlnd \
3029
--with-mysqli=mysqlnd \
31-
--with-pgsql=/usr/local/opt/libpq \
32-
--with-pdo-pgsql=/usr/local/opt/libpq \
30+
--with-pgsql="$BREW_OPT"/libpq \
31+
--with-pdo-pgsql="$BREW_OPT"/libpq \
3332
--with-pdo-sqlite \
3433
--without-pear \
3534
--enable-gd \
@@ -42,30 +41,29 @@ runs:
4241
--enable-soap \
4342
--enable-xmlreader \
4443
--with-xsl \
45-
--with-tidy=/usr/local/opt/tidy-html5 \
44+
--with-tidy="$BREW_OPT"/tidy-html5 \
4645
--with-libxml \
4746
--enable-sysvsem \
4847
--enable-sysvshm \
4948
--enable-shmop \
5049
--enable-pcntl \
51-
--with-readline=/usr/local/opt/readline \
50+
--with-readline="$BREW_OPT"/readline \
5251
--enable-mbstring \
5352
--with-curl \
54-
--with-gettext=/usr/local/opt/gettext \
53+
--with-gettext="$BREW_OPT"/gettext \
5554
--enable-sockets \
56-
--with-bz2=/usr/local/opt/bzip2 \
55+
--with-bz2="$BREW_OPT"/bzip2 \
5756
--with-openssl \
58-
--with-gmp=/usr/local/opt/gmp \
59-
--with-iconv=/usr/local/opt/libiconv \
57+
--with-gmp="$BREW_OPT"/gmp \
58+
--with-iconv="$BREW_OPT"/libiconv \
6059
--enable-bcmath \
6160
--enable-calendar \
6261
--enable-ftp \
63-
--with-pspell=/usr/local/opt/aspell \
64-
--with-kerberos \
6562
--enable-sysvmsg \
6663
--with-ffi \
6764
--enable-zend-test \
6865
--enable-dl-test=shared \
66+
--enable-intl \
6967
--with-mhash \
7068
--with-sodium \
7169
--enable-dba \

.github/actions/verify-generated-files/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
- shell: bash
66
run: |
77
set -x
8-
[[ "$OSTYPE" == "darwin"* ]] && export PATH="/usr/local/opt/bison/bin:$PATH"
8+
[[ "$OSTYPE" == "darwin"* ]] && export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
99
scripts/dev/genfiles
1010
Zend/zend_vm_gen.php
1111
build/gen_stub.php -f

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
uses: ./.github/actions/verify-generated-files
114114
MACOS_DEBUG_NTS:
115115
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
116-
runs-on: macos-13
116+
runs-on: macos-14
117117
steps:
118118
- name: git checkout
119119
uses: actions/checkout@v4
@@ -130,7 +130,7 @@ jobs:
130130
configurationParameters: --enable-debug --disable-zts
131131
- name: make
132132
run: |-
133-
export PATH="/usr/local/opt/bison/bin:$PATH"
133+
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
134134
make -j$(sysctl -n hw.logicalcpu) >/dev/null
135135
- name: make install
136136
run: sudo make install

0 commit comments

Comments
 (0)