338.4. qucs-s-26.1.1
Circuit schematic capture and simulation front end for ngspice, with RF filter, attenuator and line calculators
| Version | 26.1.1, release 2 |
| Shelf | eda — Electronics: schematic and PCB, circuit simulation, antenna modelling, FPGA synthesis and simulation, logic analysers and bench instruments |
| Phase | 44_apps (Applications), 71 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://ra3xdh.github.io/ |
| Build time | 30.6 SBU |
| Installed size | 25.9 MiB in 494 files |
| Recipe | ports/core/eda/qucs-s/kpkgbuild |
About
Qucs-S is a circuit simulator with a schematic editor in front of it: draw a circuit, choose an analysis, and plot the result. The simulation itself is done by ngspice, found on PATH at run time, or by qucsator_rf, the RF simulator built from the same archive. The package also carries the filter, active-filter, attenuator, transmission-line, power-combiner and RxCalc calculators and qucs-sspar-viewer, an S-parameter viewer.
Sources
qucs-s-26.1.1.tar.gz(6.1 MiB)
sha2568f898fca5a738383ddeefdcda8f552ea60d966e8f89d9e378e6e10cf174fb06e
upstream: https://github.com/ra3xdh/qucs_s/releases/download/26.1.1/qucs-s-26.1.1.tar.gz
archive copy: sources-2/eda--qucs-s-26.1.1.tar.gz
Dependencies
Depends on: cmake, ninja, qt6-qtbase, qt6-qtsvg, qt6-qttools, qt6-qtwayland, flex, bison, gperf, ngspice.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
gperfapphash-no-dos2unix.patch— Inqucsator_rf/src/CMakeLists.txt, drops thedos2unixrun on the generatedgperfapphash.gph.gperfappgenwrites the file with\nline endings already, and no port providesdos2unix, so the custom command fails and stops the build without the patch.
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 qucs-s'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/eda/qucs-s.
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/qucs-s
echo '8f898fca5a738383ddeefdcda8f552ea60d966e8f89d9e378e6e10cf174fb06e qucs-s-26.1.1.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/qucs-s
SRC=$SRC_ROOT/qucs-s-26.1.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qucs-s-26.1.1.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/gperfapphash-no-dos2unix.patch"
cmake -S . -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_ADMS=OFF \
-DUPDATE_TRANSLATIONS=OFF
ninja -C build
DESTDIR=$PKG ninja -C build install
rm -rf "$PKG/usr/share/qucs-s/lang"
install -Dm644 qucs-s-spar-viewer/qucs-s-spar-viewer.png \
"$PKG/usr/share/icons/hicolor/256x256/apps/qucs-s-spar-viewer.png"
cat > "$PKG/usr/share/applications/qucs-s.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Qucs-S
GenericName=Circuit Simulator
Comment=Draw a schematic and simulate it with ngspice or qucsator
Exec=qucs-s %F
Icon=qucs-s
Terminal=false
Categories=Qt;Education;Science;Electronics;Engineering;
Keywords=circuit;schematic;spice;ngspice;simulation;electronics;filter;rf;
StartupWMClass=qucs-s
DESKTOP
cat > "$PKG/usr/share/applications/qucs-s-spar-viewer.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Qucs-S S-parameter Viewer
GenericName=S-parameter Viewer
Comment=View Touchstone S-parameter files and synthesise RF matching networks
Exec=qucs-sspar-viewer %F
Icon=qucs-s-spar-viewer
Terminal=false
Categories=Qt;Science;Electronics;Engineering;
Keywords=s-parameter;touchstone;smith;rf;matching;
StartupWMClass=qucs-sspar-viewer
DESKTOP
chmod 644 "$PKG"/usr/share/applications/qucs-s*.desktop
test -x "$PKG/usr/bin/qucs-s"
test -x "$PKG/usr/bin/qucsator_rf"
test -x "$PKG/usr/bin/qucs-sspar-viewer"
test -f "$PKG/usr/share/icons/hicolor/256x256/apps/qucs-s.png"
The switches, and why each is set:
-DWITH_ADMS=OFF— Buildqucsator_rfwithout the Verilog-A device models, which are compiled throughadmsXml. ADMS is not a port, and with the option on configure stops onadmsXml required in PATH. Unset, it is off.-DUPDATE_TRANSLATIONS=OFF— Compile the shipped.tscatalogues as they are, rather than regenerate them from the sources. 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/qucs-s, 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 qucs-s-26.1.1-2.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/qucs-s, and runs the triggers its paths call for.
Contents
Installed programs: qucs-s, qucs-sactivefilter, qucs-sattenuator, qucs-sfilter, qucs-spowercombining, qucs-sspar-viewer, qucs-strans, qucs_mkdigilib, qucs_run_hdl, qucs_run_verilog, qucsator_rf, qucsconv_rf, rxcalc.
Installed directories: /usr/share/licenses/qucs-s, /usr/share/qucs-s.
Short descriptions
qucs-s |
An universal GUI for SPICE and not-SPICE circuit simulators |
qucsator_rf |
An integrated electronic circuit simulator. |
qucsconv_rf |
Command line tool for data conversion. |
Notes
The source is upstream’s release archive, not a git archive of the tag. The release archive carries the qucsator_rf, rxcalc and qucs-s-spar-viewer submodules; without them configure prints “submodule not found” and builds on with the RF simulator and both tools left out. The test -x lines at the end of build.sh fail the build when qucsator_rf or the viewer is missing.
The compiled catalogues land in /usr/share/qucs-s/lang, which build.sh removes; the interface falls back to its English source strings. The prune that keeps every package English-only is described in Size and language policy.
Qt takes the Wayland app_id from the executable’s name, so the S-parameter viewer’s entry, which upstream does not install, gives StartupWMClass=qucs-sspar-viewer.
The S-parameter viewer sets the Fusion style and loads its own light style sheet at start-up, whatever the Plasma colour scheme, so it opens light on a dark desktop; its theme menu switches it to its dark sheet, which it remembers. The main Qucs-S window follows its own saved style.