Skip to content

Commit 1cacacc

Browse files
committed
chore: wip
1 parent fd3b0e8 commit 1cacacc

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

.github/workflows/build-binaries.yml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
# On macOS, point to Homebrew iconv installation
264264
EXTRA_CONFIG="--with-iconv=$(brew --prefix libiconv)"
265265
else
266-
# On Linux, use launchpad-installed iconv
266+
# On Linux, use launchpad-installed iconv and readline
267267
# Find the launchpad iconv installation
268268
LAUNCHPAD_ICONV_DIR="$HOME/.local/share/launchpad/global/gnu.org/libiconv"
269269
if [[ -d "$LAUNCHPAD_ICONV_DIR" ]]; then
@@ -281,6 +281,22 @@ jobs:
281281
echo "Launchpad iconv not found, using system iconv"
282282
EXTRA_CONFIG="--with-iconv"
283283
fi
284+
285+
# Find the launchpad readline installation
286+
LAUNCHPAD_READLINE_DIR="$HOME/.local/share/launchpad/global/gnu.org/readline"
287+
if [[ -d "$LAUNCHPAD_READLINE_DIR" ]]; then
288+
# Find the latest version
289+
READLINE_VERSION=$(ls "$LAUNCHPAD_READLINE_DIR" | grep "^v" | sort -V | tail -1)
290+
if [[ -n "$READLINE_VERSION" ]]; then
291+
READLINE_PATH="$LAUNCHPAD_READLINE_DIR/$READLINE_VERSION"
292+
echo "Found launchpad readline at: $READLINE_PATH"
293+
EXTRA_CONFIG="$EXTRA_CONFIG --with-readline=$READLINE_PATH"
294+
else
295+
echo "No readline version found in $LAUNCHPAD_READLINE_DIR"
296+
fi
297+
else
298+
echo "Launchpad readline not found, using system readline"
299+
fi
284300
fi
285301
286302
echo "Configuring PHP with:"
@@ -317,16 +333,36 @@ jobs:
317333
pkg-config --exists libxml-2.0 && echo "✓ libxml-2.0 found" || echo "✗ libxml-2.0 not found"
318334
pkg-config --exists sqlite3 && echo "✓ sqlite3 found" || echo "✗ sqlite3 not found"
319335
320-
# Ensure launchpad iconv is properly linked and available
336+
# Ensure launchpad iconv and readline are properly linked and available
321337
if [[ "${{ matrix.platform }}" != "darwin" ]]; then
322-
echo "Ensuring launchpad iconv is properly configured..."
338+
echo "Ensuring launchpad iconv and readline are properly configured..."
323339
# Check if launchpad iconv is available and working
324340
if command -v iconv >/dev/null 2>&1; then
325341
echo "✓ iconv found in PATH"
326342
iconv --version 2>/dev/null | head -1 || echo "iconv version check failed"
327343
else
328344
echo "⚠️ iconv not found in PATH"
329345
fi
346+
347+
# Check if readline headers are available
348+
if [[ -f "/usr/include/readline/readline.h" ]] || [[ -f "/usr/local/include/readline/readline.h" ]]; then
349+
echo "✓ readline.h found in system include paths"
350+
else
351+
echo "⚠️ readline.h not found in system include paths"
352+
# Check if we can find it in launchpad paths
353+
LAUNCHPAD_READLINE_DIR="$HOME/.local/share/launchpad/global/gnu.org/readline"
354+
if [[ -d "$LAUNCHPAD_READLINE_DIR" ]]; then
355+
READLINE_VERSION=$(ls "$LAUNCHPAD_READLINE_DIR" | grep "^v" | sort -V | tail -1)
356+
if [[ -n "$READLINE_VERSION" ]]; then
357+
READLINE_INCLUDE="$LAUNCHPAD_READLINE_DIR/$READLINE_VERSION/include"
358+
if [[ -f "$READLINE_INCLUDE/readline/readline.h" ]]; then
359+
echo "✓ readline.h found in launchpad: $READLINE_INCLUDE/readline/readline.h"
360+
else
361+
echo "⚠️ readline.h not found in launchpad include path"
362+
fi
363+
fi
364+
fi
365+
fi
330366
fi
331367
332368
./configure \

0 commit comments

Comments
 (0)