Skip to content

Commit fd3b0e8

Browse files
committed
chore: wip
1 parent e200a20 commit fd3b0e8

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

.github/workflows/build-binaries.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,24 @@ jobs:
263263
# On macOS, point to Homebrew iconv installation
264264
EXTRA_CONFIG="--with-iconv=$(brew --prefix libiconv)"
265265
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
268284
fi
269285
270286
echo "Configuring PHP with:"
@@ -301,14 +317,26 @@ jobs:
301317
pkg-config --exists libxml-2.0 && echo "✓ libxml-2.0 found" || echo "✗ libxml-2.0 not found"
302318
pkg-config --exists sqlite3 && echo "✓ sqlite3 found" || echo "✗ sqlite3 not found"
303319
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+
304332
./configure \
305333
--prefix="$INSTALL_PREFIX" \
306334
--disable-debug \
307335
--enable-shared \
308336
--with-pic \
309337
${{ env.CONFIGURE_EXTENSIONS }} \
310338
$EXTRA_CONFIG \
311-
$CURL_CONFIG
339+
$CURL_CONFIG
312340
313341
- name: Build PHP
314342
run: |

0 commit comments

Comments
 (0)