Skip to content

Commit 9988704

Browse files
committed
chore: wip
1 parent 06a8bb6 commit 9988704

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

.github/workflows/precompile-binaries.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
freetype \
165165
oniguruma \
166166
libzip \
167-
postgresql@15 \
167+
postgresql@17 \
168168
readline \
169169
bzip2 \
170170
gmp \
@@ -173,7 +173,8 @@ jobs:
173173
icu4c \
174174
libsodium \
175175
zlib \
176-
libiconv
176+
libiconv \
177+
gettext
177178
178179
# Verify readline installation
179180
echo "Checking readline installation:"
@@ -182,23 +183,30 @@ jobs:
182183
183184
# Verify PostgreSQL installation
184185
echo "Checking PostgreSQL installation:"
185-
ls -la $(brew --prefix postgresql@15)/include/libpq-fe.h || echo "libpq-fe.h not found in expected location"
186-
ls -la $(brew --prefix postgresql@15)/lib/libpq.* || echo "libpq not found in expected location"
186+
ls -la $(brew --prefix postgresql@17)/include/libpq-fe.h || echo "libpq-fe.h not found in expected location"
187+
ls -la $(brew --prefix postgresql@17)/lib/libpq.* || echo "libpq not found in expected location"
187188
which pg_config || echo "pg_config not found in PATH"
188189
189190
# Verify bzip2 installation
190191
echo "Checking bzip2 installation:"
191192
ls -la $(brew --prefix bzip2)/include/bzlib.h || echo "bzlib.h not found in expected location"
192193
ls -la $(brew --prefix bzip2)/lib/libbz2.* || echo "libbz2 not found in expected location"
193194
194-
# Create symlinks to help PHP find readline and bzip2
195-
echo "Creating symlinks for readline and bzip2:"
195+
# Verify gettext installation
196+
echo "Checking gettext installation:"
197+
ls -la $(brew --prefix gettext)/include/libintl.h || echo "libintl.h not found in expected location"
198+
ls -la $(brew --prefix gettext)/lib/libintl.* || echo "libintl not found in expected location"
199+
200+
# Create symlinks to help PHP find readline, bzip2, and gettext
201+
echo "Creating symlinks for readline, bzip2, and gettext:"
196202
sudo mkdir -p /usr/local/include/readline /usr/local/lib
197203
sudo ln -sf $(brew --prefix readline)/include/readline/readline.h /usr/local/include/readline/readline.h
198204
sudo ln -sf $(brew --prefix readline)/include/readline/history.h /usr/local/include/readline/history.h
199205
sudo ln -sf $(brew --prefix readline)/lib/libreadline.* /usr/local/lib/
200206
sudo ln -sf $(brew --prefix bzip2)/include/bzlib.h /usr/local/include/bzlib.h
201207
sudo ln -sf $(brew --prefix bzip2)/lib/libbz2.* /usr/local/lib/
208+
sudo ln -sf $(brew --prefix gettext)/include/libintl.h /usr/local/include/libintl.h
209+
sudo ln -sf $(brew --prefix gettext)/lib/libintl.* /usr/local/lib/
202210
203211
- name: Create build configuration
204212
run: |
@@ -232,10 +240,11 @@ jobs:
232240
if: matrix.platform == 'darwin'
233241
run: |
234242
# Set paths for Homebrew dependencies including keg-only packages
235-
echo "PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig:$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix zlib)/lib/pkgconfig:$(brew --prefix postgresql@15)/lib/pkgconfig:$(brew --prefix bzip2)/lib/pkgconfig" >> $GITHUB_ENV
236-
echo "PATH=$(brew --prefix bison)/bin:$(brew --prefix)/bin:$(brew --prefix postgresql@15)/bin:$PATH" >> $GITHUB_ENV
237-
echo "LDFLAGS=-L$(brew --prefix)/lib -L$(brew --prefix openssl@3)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix libiconv)/lib -L$(brew --prefix postgresql@15)/lib -L$(brew --prefix bzip2)/lib" >> $GITHUB_ENV
238-
echo "CPPFLAGS=-I$(brew --prefix)/include -I$(brew --prefix openssl@3)/include -I$(brew --prefix zlib)/include -I$(brew --prefix libiconv)/include -I$(brew --prefix postgresql@15)/include -I$(brew --prefix bzip2)/include" >> $GITHUB_ENV
243+
echo "PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig:$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix zlib)/lib/pkgconfig:$(brew --prefix postgresql@17)/lib/pkgconfig:$(brew --prefix bzip2)/lib/pkgconfig:$(brew --prefix gettext)/lib/pkgconfig" >> $GITHUB_ENV
244+
echo "PATH=$(brew --prefix bison)/bin:$(brew --prefix)/bin:$(brew --prefix postgresql@17)/bin:$(brew --prefix gettext)/bin:$PATH" >> $GITHUB_ENV
245+
echo "LDFLAGS=-L$(brew --prefix)/lib -L$(brew --prefix openssl@3)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix libiconv)/lib -L$(brew --prefix postgresql@17)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix gettext)/lib" >> $GITHUB_ENV
246+
echo "CPPFLAGS=-I$(brew --prefix)/include -I$(brew --prefix openssl@3)/include -I$(brew --prefix zlib)/include -I$(brew --prefix libiconv)/include -I$(brew --prefix postgresql@17)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix gettext)/include" >> $GITHUB_ENV
247+
echo "CXXFLAGS=-std=c++11" >> $GITHUB_ENV
239248
240249
# Set readline-specific paths
241250
echo "READLINE_CFLAGS=-I$(brew --prefix readline)/include" >> $GITHUB_ENV
@@ -270,14 +279,18 @@ jobs:
270279
export LIBS="$LIBS -lreadline"
271280
272281
# Set PostgreSQL environment variables and PATH
273-
export PGSQL_CFLAGS="-I$(brew --prefix postgresql@15)/include"
274-
export PGSQL_LIBS="-L$(brew --prefix postgresql@15)/lib -lpq"
275-
export PATH="$(brew --prefix postgresql@15)/bin:$PATH"
282+
export PGSQL_CFLAGS="-I$(brew --prefix postgresql@17)/include"
283+
export PGSQL_LIBS="-L$(brew --prefix postgresql@17)/lib -lpq"
284+
export PATH="$(brew --prefix postgresql@17)/bin:$PATH"
276285
277286
# Set bzip2 environment variables
278287
export BZIP2_CFLAGS="-I$(brew --prefix bzip2)/include"
279288
export BZIP2_LIBS="-L$(brew --prefix bzip2)/lib -lbz2"
280289
290+
# Set gettext environment variables
291+
export GETTEXT_CFLAGS="-I$(brew --prefix gettext)/include"
292+
export GETTEXT_LIBS="-L$(brew --prefix gettext)/lib -lintl"
293+
281294
# Try to find readline.h and set the path explicitly
282295
READLINE_PATH=$(brew --prefix readline)
283296
if [[ -f "$READLINE_PATH/include/readline/readline.h" ]]; then
@@ -289,13 +302,15 @@ jobs:
289302
fi
290303
291304
# Check if PostgreSQL is available and working
292-
if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@15)/include/libpq-fe.h" ]]; then
305+
if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@17)/include/libpq-fe.h" ]]; then
293306
echo "PostgreSQL found and working"
294307
else
295308
echo "PostgreSQL not found or not working, will disable PostgreSQL support"
296309
# Remove PostgreSQL extensions from CONFIGURE_EXTENSIONS
297310
export CONFIGURE_EXTENSIONS=$(echo "$CONFIGURE_EXTENSIONS" | sed 's/--with-pdo-pgsql//g' | sed 's/--with-pgsql//g' | sed 's/ */ /g')
298311
echo "Updated CONFIGURE_EXTENSIONS: $CONFIGURE_EXTENSIONS"
312+
# Also disable PostgreSQL in the configuration
313+
EXTRA_CONFIG="$EXTRA_CONFIG --disable-pgsql --disable-pdo-pgsql"
299314
fi
300315
else
301316
# On Linux, use system-installed libraries

0 commit comments

Comments
 (0)