@@ -263,8 +263,24 @@ jobs:
263
263
# On macOS, point to Homebrew iconv installation
264
264
EXTRA_CONFIG="--with-iconv=$(brew --prefix libiconv)"
265
265
else
266
- # On Linux, explicitly enable iconv (usually available in system)
267
- EXTRA_CONFIG="--with-iconv"
266
+ # On Linux, use launchpad-installed iconv
267
+ # Find the launchpad iconv installation
268
+ LAUNCHPAD_ICONV_DIR="$HOME/.local/share/launchpad/global/gnu.org/libiconv"
269
+ if [[ -d "$LAUNCHPAD_ICONV_DIR" ]]; then
270
+ # Find the latest version
271
+ ICONV_VERSION=$(ls "$LAUNCHPAD_ICONV_DIR" | grep "^v" | sort -V | tail -1)
272
+ if [[ -n "$ICONV_VERSION" ]]; then
273
+ ICONV_PATH="$LAUNCHPAD_ICONV_DIR/$ICONV_VERSION"
274
+ echo "Found launchpad iconv at: $ICONV_PATH"
275
+ EXTRA_CONFIG="--with-iconv=$ICONV_PATH"
276
+ else
277
+ echo "No iconv version found in $LAUNCHPAD_ICONV_DIR"
278
+ EXTRA_CONFIG="--with-iconv"
279
+ fi
280
+ else
281
+ echo "Launchpad iconv not found, using system iconv"
282
+ EXTRA_CONFIG="--with-iconv"
283
+ fi
268
284
fi
269
285
270
286
echo "Configuring PHP with:"
@@ -301,14 +317,26 @@ jobs:
301
317
pkg-config --exists libxml-2.0 && echo "✓ libxml-2.0 found" || echo "✗ libxml-2.0 not found"
302
318
pkg-config --exists sqlite3 && echo "✓ sqlite3 found" || echo "✗ sqlite3 not found"
303
319
320
+ # Ensure launchpad iconv is properly linked and available
321
+ if [[ "${{ matrix.platform }}" != "darwin" ]]; then
322
+ echo "Ensuring launchpad iconv is properly configured..."
323
+ # Check if launchpad iconv is available and working
324
+ if command -v iconv >/dev/null 2>&1; then
325
+ echo "✓ iconv found in PATH"
326
+ iconv --version 2>/dev/null | head -1 || echo "iconv version check failed"
327
+ else
328
+ echo "⚠️ iconv not found in PATH"
329
+ fi
330
+ fi
331
+
304
332
./configure \
305
333
--prefix="$INSTALL_PREFIX" \
306
334
--disable-debug \
307
335
--enable-shared \
308
336
--with-pic \
309
337
${{ env.CONFIGURE_EXTENSIONS }} \
310
338
$EXTRA_CONFIG \
311
- $CURL_CONFIG
339
+ $CURL_CONFIG
312
340
313
341
- name : Build PHP
314
342
run : |
0 commit comments