Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh) - Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo - Add placeholder scripts for OpenCASCADE, ngspice, protobuf - Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/) - Add CMake modules for KiCad WASM cross-compilation - Add PCBnew test infrastructure (tests/kicad/) - Add build plan documentation Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2, HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
756feb35da
commit
3034d9d76f
36 changed files with 3708 additions and 0 deletions
57
scripts/deps/build-glm.sh
Executable file
57
scripts/deps/build-glm.sh
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
# Install GLM headers for WebAssembly
|
||||
# GLM is a header-only math library
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "${SCRIPT_DIR}/../common/env.sh"
|
||||
source "${SCRIPT_DIR}/../common/versions.sh"
|
||||
source "${SCRIPT_DIR}/../common/functions.sh"
|
||||
|
||||
GLM_DIR="${DEPS_ROOT}/glm-${GLM_VERSION}"
|
||||
GLM_STAMP="${BUILD_ROOT}/stamps/glm.stamp"
|
||||
|
||||
# Parse arguments
|
||||
CLEAN=0
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--clean)
|
||||
CLEAN=1
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $CLEAN -eq 1 ]; then
|
||||
log_info "Cleaning GLM install..."
|
||||
rm -rf "${GLM_STAMP}"
|
||||
fi
|
||||
|
||||
# Check if already installed
|
||||
if check_stamp "${GLM_STAMP}"; then
|
||||
log_info "GLM already installed, skipping..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Download if needed
|
||||
if [ ! -d "${GLM_DIR}" ]; then
|
||||
log_info "Downloading GLM ${GLM_VERSION}..."
|
||||
mkdir -p "${DEPS_ROOT}"
|
||||
cd "${DEPS_ROOT}"
|
||||
|
||||
GLM_URL="https://github.com/g-truc/glm/releases/download/${GLM_VERSION}/glm-${GLM_VERSION}.zip"
|
||||
download_file "${GLM_URL}" "glm-${GLM_VERSION}.zip"
|
||||
unzip -q "glm-${GLM_VERSION}.zip"
|
||||
mv glm "glm-${GLM_VERSION}"
|
||||
rm "glm-${GLM_VERSION}.zip"
|
||||
fi
|
||||
|
||||
log_info "Installing GLM ${GLM_VERSION} headers..."
|
||||
|
||||
# GLM is header-only, just copy headers
|
||||
mkdir -p "${SYSROOT}/include"
|
||||
cp -r "${GLM_DIR}/glm" "${SYSROOT}/include/"
|
||||
|
||||
create_stamp "${GLM_STAMP}"
|
||||
log_info "GLM install complete!"
|
||||
Loading…
Reference in a new issue