338.6. kicad-10.0.6
Schematic capture, PCB layout, Gerber viewer and SPICE simulation for electronics design
| Version | 10.0.6, release 1 |
| Shelf | eda — Electronics: schematic and PCB, circuit simulation, antenna modelling, FPGA synthesis and simulation, logic analysers and bench instruments |
| Phase | 44_apps (Applications), 73 of 422 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://www.kicad.org/ |
| Build time | 74.4 SBU |
| Installed size | 533.7 MiB in 949 files |
| Recipe | ports/core/eda/kicad/kpkgbuild |
About
KiCad is the full electronics design suite: schematic capture (Eeschema), board layout (Pcbnew), the Gerber viewer, the footprint and symbol editors, a SPICE simulator front end driving ngspice, and kicad-cli for plotting and exporting from scripts. It is built on wxwidgets with GTK 3. The symbol, footprint and template libraries are ports of their own, kicad-symbols, kicad-footprints and kicad-templates.
Sources
kicad-10.0.6.tar.gz(254.9 MiB)
sha256528788c342461536bee3331998a8aa609975723f07b816287146ab8d4d9af3cb
upstream: https://gitlab.com/kicad/code/kicad/-/archive/10.0.6/kicad-10.0.6.tar.gz
archive copy: sources-2/eda--kicad-10.0.6.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, swig, python3, python3-wxpython, wxwidgets, gtk3, webkitgtk, glib, cairo, pixman, freetype2, harfbuzz, fontconfig, mesa, libglvnd, glu, wayland, libsecret, poppler, glm, zlib, zstd, curl, boost, libgit2, libspnav, ngspice, opencascade, protobuf, abseil-cpp, nng, unixodbc.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
app-id.patch— Set the Wayland app id to the desktop entry's name with wxWidgets before 3.3.1PGM_BASE::InitPgm names each program's desktop entry as its Wayland app id only when wxWidgets is 3.3.1 or later, through SetClassName. With an older wxGTK, set GTK's program name to the same id through a new KIPLATFORM::UI::SetDesktopId, so the windows of kicad, eeschema, pcbnew, gerbview, pcb_calculator and bitmap2component take org.kicad.<name> rather than the executable's name.
fix-swig-iterator-next.patch— Fix swig api iterators usageSWIG 4.4.0 and later drops python 2 style .next() methods for SwigPyIterator and only uses __next__() which are used by the python 3 next() builtin.
Fixes https://gitlab.com/kicad/code/kicad/-/work_items/25423
startwizard-no-update-check.patch— startwizard: hide the KiCad update checkbox when KICAD_UPDATE_CHECK is offPreferences hides its KiCad update checkbox in a build without the update check; the start wizard's Updates & Privacy page does not, and its ticked box does nothing. Hide it there too and word the intro for package updates only.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install kicad'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/eda/kicad.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/eda/kicad
echo '528788c342461536bee3331998a8aa609975723f07b816287146ab8d4d9af3cb kicad-10.0.6.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/kicad
SRC=$SRC_ROOT/kicad-10.0.6
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf kicad-10.0.6.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/fix-swig-iterator-next.patch"
patch -p1 -i "$PORT_SRC/app-id.patch"
patch -p1 -i "$PORT_SRC/startwizard-no-update-check.patch"
cmake -S . -B build -G Ninja -Wno-dev \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DKICAD_UPDATE_CHECK=OFF \
-DKICAD_USE_SENTRY=OFF \
-DKICAD_BUILD_I18N=OFF \
-DKICAD_BUILD_QA_TESTS=OFF \
-DKICAD_SPICE_QA=OFF \
-DKICAD_SCRIPTING_WXPYTHON=ON \
-DKICAD_WAYLAND=ON \
-DKICAD_IPC_API=ON \
-DKICAD_SIGNAL_INTEGRITY=ON \
-DKICAD_IDF_TOOLS=ON \
-DKICAD_INSTALL_DEMOS=ON \
-DKICAD_BUILD_FLATPAK=OFF
cmake --build build --target common/pcb_lexer.h
cmake --build build
DESTDIR=$PKG cmake --install build
test -x "$PKG/usr/bin/kicad"
test -x "$PKG/usr/bin/kicad-cli"
test -f "$PKG/usr/share/applications/org.kicad.kicad.desktop"
test -f "$PKG/usr/share/icons/hicolor/48x48/apps/kicad.png"
ls "$PKG"/usr/lib/python3*/site-packages/_pcbnew.so >/dev/null
The switches, and why each is set:
-DKICAD_UPDATE_CHECK=OFF— Compile out the check for a new release, which is on by default. Preferences then hides its checkbox; the first-run start wizard’s Updates & Privacy page does not consult the setting, sostartwizard-no-update-check.patchhides the box there too and words the page for package updates only. The patch is to be offered upstream.-DKICAD_USE_SENTRY=OFF— No Sentry crash and metrics reporting. It is upstream’s default, and turning it on needs a Sentry DSN set at configure time.-DKICAD_BUILD_I18N=OFF— Build no translations. It is upstream’s default.-DKICAD_BUILD_QA_TESTS=OFF— Leave out the unit test suites, which upstream builds by default.-DKICAD_SPICE_QA=OFF— Leave out the simulator’s own test suite, also on by default.-DKICAD_SCRIPTING_WXPYTHON=ON— Build the wxPython support of the Python scripting, through the python3-wxpython port: Python plugins that build wx interfaces, and thepy.shellconsole. It is upstream’s default.-DKICAD_WAYLAND=ON— Compile KiCad’s Wayland code inlibs/kiplatform, which moves the pointer from the program (warping) through the pointer-constraints protocol under a Wayland compositor. On by default on Linux.-DKICAD_IPC_API=ON— The IPC interface through which external programs drive a running KiCad. It is upstream’s default, and configure then requires nng.-DKICAD_SIGNAL_INTEGRITY=ON— Build the signal integrity tools. It is upstream’s default.-DKICAD_IDF_TOOLS=ON— Buildidfcyl,idfrect,dxf2idfandidf2vrml, the helpers for IDF board exchange files. It is upstream’s default.-DKICAD_INSTALL_DEMOS=ON— Install the demo projects and examples. It is upstream’s default.-DKICAD_BUILD_FLATPAK=OFF— Install the desktop entries, icons and MIME data under their ordinary names, not flatpak’s. It is upstream’s default.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/kicad, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf kicad-10.0.6-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/kicad, and runs the triggers its paths call for.
Contents
Installed programs: _cvpcb.kiface, _eeschema.kiface, _gerbview.kiface, _kipython.kiface, _pcb_calculator.kiface, _pcbnew.kiface, _pl_editor.kiface, bitmap2component, dxf2idf, eeschema, gerbview, idf2vrml, idfcyl, idfrect, kicad, kicad-cli, pcb_calculator, pcbnew, pl_editor.
Installed libraries: libkiapi.so, libkicad_3dsg.so, libkicommon.so, libkigal.so.
Installed directories: /usr/lib/kicad, /usr/share/kicad/demos, /usr/share/kicad/plugins, /usr/share/kicad/resources, /usr/share/kicad/schemas, /usr/share/kicad/scripting, /usr/share/licenses/kicad.
Notes
build.sh builds the target common/pcb_lexer.h on its own before the full build. That generated header is not ordered before its first consumer, so a parallel build can compile a file that includes it before it exists.
SWIG from version 4.4 drops the Python 2 style .next() method of its iterators, which the pcbnew bindings call; fix-swig-iterator-next.patch, upstream’s merge request, calls Python 3’s next() instead. Without it a script that iterates over a board’s item or track lists (the std::deque<BOARD_ITEM *> and std::deque<PCB_TRACK *> wrappers in pcbnew/python/swig/board.i) fails with an AttributeError.
Each program’s Wayland app id is the name of its desktop entry, org.kicad.kicad, org.kicad.eeschema, org.kicad.pcbnew, org.kicad.gerbview, org.kicad.pcbcalculator and org.kicad.bitmap2component, which is the only name KWin looks a window’s icon up by. KiCad sets it through wxWidgets only from wxWidgets 3.3.1, and wxwidgets is 3.2, so app-id.patch sets GTK’s program name to the same id there; without it every window takes its executable’s name and shows the generic icon. An editor opened from the project manager runs in its process and takes org.kicad.kicad. The patch is to be offered upstream.
The plugin and content manager reads an online repository, so on a machine with no network it lists nothing.