Skip to content

Commit 144f115

Browse files
committed
chore: wip
1 parent 021dbf3 commit 144f115

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/build-binaries.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,14 @@ jobs:
306306
if [[ -n "$BZIP2_VERSION" ]]; then
307307
BZIP2_PATH="$LAUNCHPAD_BZIP2_DIR/$BZIP2_VERSION"
308308
echo "Found launchpad bzip2 at: $BZIP2_PATH"
309-
EXTRA_CONFIG="$EXTRA_CONFIG --with-bz2=$BZIP2_PATH"
309+
# Check if bzlib.h exists in the include directory
310+
if [[ -f "$BZIP2_PATH/include/bzlib.h" ]]; then
311+
echo "✓ bzlib.h found at $BZIP2_PATH/include/bzlib.h"
312+
EXTRA_CONFIG="$EXTRA_CONFIG --with-bz2=$BZIP2_PATH"
313+
else
314+
echo "⚠️ bzlib.h not found at $BZIP2_PATH/include/bzlib.h"
315+
echo " Using system bzip2 instead"
316+
fi
310317
else
311318
echo "No bzip2 version found in $LAUNCHPAD_BZIP2_DIR"
312319
fi
@@ -447,6 +454,27 @@ jobs:
447454
EXTRA_CONFIG="$EXTRA_CONFIG --with-ldap=$OPENLDAP_PATH"
448455
fi
449456
fi
457+
458+
# Clean up EXTRA_CONFIG to remove any duplicate options
459+
echo "Cleaning up EXTRA_CONFIG to remove duplicates..."
460+
# Remove duplicate --with-* options
461+
CLEANED_EXTRA_CONFIG=""
462+
for option in $EXTRA_CONFIG; do
463+
if [[ "$option" =~ ^--with- ]]; then
464+
# Extract the option name (e.g., --with-bz2, --with-iconv)
465+
option_name=$(echo "$option" | cut -d'=' -f1)
466+
# Only add if not already present
467+
if [[ "$CLEANED_EXTRA_CONFIG" != *"$option_name"* ]]; then
468+
CLEANED_EXTRA_CONFIG="$CLEANED_EXTRA_CONFIG $option"
469+
else
470+
echo "Removing duplicate option: $option"
471+
fi
472+
else
473+
CLEANED_EXTRA_CONFIG="$CLEANED_EXTRA_CONFIG $option"
474+
fi
475+
done
476+
EXTRA_CONFIG="$CLEANED_EXTRA_CONFIG"
477+
echo "Cleaned EXTRA_CONFIG: $EXTRA_CONFIG"
450478
fi
451479
452480
echo "Configuring PHP with:"
@@ -456,6 +484,10 @@ jobs:
456484
echo " PKG_CONFIG_PATH: $PKG_CONFIG_PATH"
457485
echo " LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
458486
487+
# Debug: Show the final configure command
488+
echo "Final configure command will be:"
489+
echo "./configure --prefix=\"$INSTALL_PREFIX\" --disable-debug --enable-shared --with-pic ${{ env.CONFIGURE_EXTENSIONS }} $EXTRA_CONFIG $CURL_CONFIG"
490+
459491
# Debug: Show available pkg-config files
460492
echo "Available pkg-config files:"
461493
pkg-config --list-all | grep -i curl || echo "No curl pkg-config found"

0 commit comments

Comments
 (0)