Skip to content

Commit e9e432a

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

File tree

4 files changed

+33
-36
lines changed

4 files changed

+33
-36
lines changed

.github/actions/brew/action.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,27 @@ 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 \
21+
aspell \
1622
krb5 \
1723
bzip2 \
1824
enchant \
1925
libffi \
20-
libpng \
21-
webp \
22-
freetype \
2326
intltool \
2427
libiconv \
25-
zlib \
2628
t1lib \
27-
gd \
28-
libzip \
29-
gmp \
30-
tidy-html5 \
3129
libxml2 \
3230
libjpeg \
33-
libxslt \
34-
postgresql
35-
brew link gettext --force
31+
libxslt

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

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ 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/krb5/lib/pkgconfig"
17+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libffi/lib/pkgconfig"
18+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxml2/lib/pkgconfig"
19+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/libxslt/lib/pkgconfig"
20+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/zlib/lib/pkgconfig"
21+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/icu4c/lib/pkgconfig"
2222
sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
2323
./buildconf --force
2424
./configure \
@@ -28,8 +28,8 @@ runs:
2828
--enable-fpm \
2929
--with-pdo-mysql=mysqlnd \
3030
--with-mysqli=mysqlnd \
31-
--with-pgsql=/usr/local/opt/libpq \
32-
--with-pdo-pgsql=/usr/local/opt/libpq \
31+
--with-pgsql="$BREW_OPT"/libpq \
32+
--with-pdo-pgsql="$BREW_OPT"/libpq \
3333
--with-pdo-sqlite \
3434
--without-pear \
3535
--enable-gd \
@@ -42,30 +42,31 @@ runs:
4242
--enable-soap \
4343
--enable-xmlreader \
4444
--with-xsl \
45-
--with-tidy=/usr/local/opt/tidy-html5 \
45+
--with-tidy="$BREW_OPT"/tidy-html5 \
4646
--with-libxml \
4747
--enable-sysvsem \
4848
--enable-sysvshm \
4949
--enable-shmop \
5050
--enable-pcntl \
51-
--with-readline=/usr/local/opt/readline \
51+
--with-readline="$BREW_OPT"/readline \
5252
--enable-mbstring \
5353
--with-curl \
54-
--with-gettext=/usr/local/opt/gettext \
54+
--with-gettext="$BREW_OPT"/gettext \
5555
--enable-sockets \
56-
--with-bz2=/usr/local/opt/bzip2 \
56+
--with-bz2="$BREW_OPT"/bzip2 \
5757
--with-openssl \
58-
--with-gmp=/usr/local/opt/gmp \
59-
--with-iconv=/usr/local/opt/libiconv \
58+
--with-gmp="$BREW_OPT"/gmp \
59+
--with-iconv="$BREW_OPT"/libiconv \
6060
--enable-bcmath \
6161
--enable-calendar \
6262
--enable-ftp \
63-
--with-pspell=/usr/local/opt/aspell \
63+
--with-pspell="$BREW_OPT"/aspell \
6464
--with-kerberos \
6565
--enable-sysvmsg \
6666
--with-ffi \
6767
--enable-zend-test \
6868
--enable-dl-test=shared \
69+
--enable-intl \
6970
--with-mhash \
7071
--with-sodium \
7172
--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)