Fix clean build issues

- Add autoreconf step for bundled PCRE in wxWidgets build script
  (fixes automake version mismatch between 1.16.1 and 1.16.5)
- Fix apply-finalize.sh to use get-wasm-opt.sh for consistent tool paths
  (tools moved to build-wasm/tools/ in previous commit)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2025-12-27 15:28:20 +01:00
commit 98b523c2bc
2 changed files with 12 additions and 9 deletions

View file

@ -103,6 +103,14 @@ if [ $NEEDS_CONFIGURE -eq 1 ]; then
echo ""
echo "=== Configuring ==="
# Regenerate autotools files in bundled PCRE to fix version mismatch
# The bundled PCRE was generated with automake 1.16.1 but build systems
# may have different versions. Running autoreconf ensures compatibility.
if command -v autoreconf &> /dev/null; then
echo "Regenerating autotools files for bundled PCRE..."
(cd "$WX_SOURCE/3rdparty/pcre" && autoreconf -fi 2>/dev/null || true)
fi
# Ensure Emscripten's zlib port is built (works in Docker and on host)
# This populates the cache sysroot with zlib.h and libz.a
echo "Building Emscripten zlib port..."

View file

@ -9,15 +9,10 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
# Get wasm-emscripten-finalize from same Binaryen install as wasm-opt
BINARYEN_DIR="${PROJECT_ROOT}/tools/binaryen-121"
FINALIZE="${BINARYEN_DIR}/bin/wasm-emscripten-finalize"
# Ensure Binaryen is downloaded
if [ ! -x "${FINALIZE}" ]; then
echo "Downloading Binaryen v121..."
"${SCRIPT_DIR}/get-wasm-opt.sh" > /dev/null
fi
# Get wasm-opt path (this downloads Binaryen if needed)
WASM_OPT=$("${SCRIPT_DIR}/get-wasm-opt.sh")
BINARYEN_BIN=$(dirname "${WASM_OPT}")
FINALIZE="${BINARYEN_BIN}/wasm-emscripten-finalize"
INPUT_WASM="${1:-output/pcbnew.wasm}"
OUTPUT_WASM="${2:-${INPUT_WASM}}"