Reduce KiCad fork divergence with CMake cleanup

- Update kicad submodule: reverted 12 Find*.cmake to upstream,
  deleted FindCURL.cmake (-284 lines, -13 files changed)
- Add GLM_VERSION to build-pcbnew.sh (workaround for KiCad
  overwriting CMAKE_MODULE_PATH)
- Update kicad-diff-stats.sh to compare working tree vs upstream

Fork diff reduced from 81 to 68 files.

🤖 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 2026-01-05 14:03:03 +01:00
commit 85e0f2f59a
4 changed files with 14 additions and 9 deletions

View file

@ -14,6 +14,8 @@ Always check screenshots for validating tests
Build wxwidgets with scripts/build-wxuniversal-wasm.sh
Build kicad with docker/build.sh
Build CPP wxwidgets tests with scripts/builds-wasm-test.sh
The build scripts pipe their outputs into log files so that they won't clog the LLM context.
Don't pipe outputs, just run the scripts. Maybe with flex if you need that.
Don't change the wxwidgets core unless absolutely necessary, try to fix things in the wasm layer.
Don't change kicad unless absolutely necessary - keep our fork as close to upstream as possible.

2
kicad

@ -1 +1 @@
Subproject commit a61d2ea4063937eb9536a05b89b2d3d5ead6dd28
Subproject commit 3bc2ef3a1cffadf19d7414dffe46d403e1e7b57d

View file

@ -1,8 +1,10 @@
#!/bin/bash
# Show diff statistics between current KiCad HEAD and last upstream commit
# Show diff statistics between current KiCad working tree and last upstream commit
#
# This helps track how far our KiCad fork has diverged from upstream.
# We want to keep changes minimal to ease future porting.
#
# Note: Compares working tree (including uncommitted changes) vs upstream
set -e
@ -81,19 +83,19 @@ OUR_COMMIT_COUNT=$(git rev-list --count "$UPSTREAM_COMMIT"..HEAD)
echo "Our commits on top of upstream: $OUR_COMMIT_COUNT" | tee -a "$LOG_FILE"
echo "" | tee -a "$LOG_FILE"
# Get diff statistics
# Get diff statistics (comparing working tree to upstream)
echo "=== Diff Statistics ===" | tee -a "$LOG_FILE"
echo "" | tee -a "$LOG_FILE"
# Overall stats
DIFF_STAT=$(git diff --stat "$UPSTREAM_COMMIT"..HEAD)
DIFF_SHORTSTAT=$(git diff --shortstat "$UPSTREAM_COMMIT"..HEAD)
# Overall stats - compare working tree to upstream (not HEAD)
DIFF_STAT=$(git diff --stat "$UPSTREAM_COMMIT")
DIFF_SHORTSTAT=$(git diff --shortstat "$UPSTREAM_COMMIT")
echo "Summary: $DIFF_SHORTSTAT" | tee -a "$LOG_FILE"
echo "" | tee -a "$LOG_FILE"
# Detailed breakdown
DIFF_NUMSTAT=$(git diff --numstat "$UPSTREAM_COMMIT"..HEAD)
DIFF_NUMSTAT=$(git diff --numstat "$UPSTREAM_COMMIT")
# Count files by type
TOTAL_FILES=0
@ -155,8 +157,8 @@ echo "" | tee -a "$LOG_FILE"
echo "=== Changed Files ===" | tee -a "$LOG_FILE"
echo "" | tee -a "$LOG_FILE"
# Get list with change type
git diff --name-status "$UPSTREAM_COMMIT"..HEAD | while IFS=$'\t' read -r status filename; do
# Get list with change type (working tree vs upstream)
git diff --name-status "$UPSTREAM_COMMIT" | while IFS=$'\t' read -r status filename; do
case "$status" in
A) status_text="[ADDED] " ;;
M) status_text="[MODIFIED] " ;;

View file

@ -254,6 +254,7 @@ emcmake cmake "${KICAD_DIR}" \
-DZSTD_INCLUDE_DIR="${SYSROOT}/include" \
-DZSTD_LIBRARY="${SYSROOT}/lib/libzstd.a" \
-DGLM_INCLUDE_DIR="${SYSROOT}/include" \
-DGLM_VERSION="0.9.9.8" \
-DBOOST_ROOT="${SYSROOT}" \
-DBoost_INCLUDE_DIR="${SYSROOT}/include" \
-DBoost_LIBRARY_DIR="${SYSROOT}/lib" \