218.2. logisim-evolution-5.0.0
Digital logic designer and simulator with FPGA synthesis export (Java Swing)
| Version | 5.0.0, release 1 |
| Shelf | eda — Electronics: schematic and PCB, circuit simulation, antenna modelling, FPGA synthesis and simulation, logic analysers and bench instruments |
| Phase | 42_graphics (Graphics Stack), 87 of 189 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://github.com/logisim-evolution/logisim-evolution |
| Build time | 1.7 SBU |
| Installed size | 20.1 MiB in 5 files |
| Recipe | ports/core/eda/logisim-evolution/kpkgbuild |
About
Logisim-evolution is a digital logic designer and simulator: circuits of gates, flip-flops, memories and subcircuits, drawn and simulated, with chronograms, test vectors, and VHDL and Verilog export for synthesis onto FPGA boards. It is a Java Swing program; on KDOS it is an X11 client under Xwayland. Upstream builds with Gradle and bundles its dependencies’ class files; this port compiles Logisim and every library it uses from their published sources with javac, and fetches nothing at build time.
Sources
annotations-24.1.0-sources.jar(37.7 KiB)
sha2560590a3ec06b522b4aae684ddb63c063cd11bd547fd9baaa5e71f6b020e2a7df4
upstream: https://repo1.maven.org/maven2/org/jetbrains/annotations/24.1.0/annotations-24.1.0-sources.jar
archive copy: sources-2/eda--annotations-24.1.0-sources.jarcolorpicker-2.0.1-sources.jar(59.0 KiB)
sha25679f310f4ffb7eea5845a71dcb573980bb12ebd0e6a093a1d5bac9fee65b445bc
upstream: https://repo1.maven.org/maven2/org/drjekyll/colorpicker/2.0.1/colorpicker-2.0.1-sources.jar
archive copy: sources-2/eda--colorpicker-2.0.1-sources.jarcommons-cli-1.11.0-sources.jar(109.2 KiB)
sha256c65b544468eafd3e1036671fb22fd9ba4c3f67c03f76298e8aaeb6943755a70b
upstream: https://repo1.maven.org/maven2/commons-cli/commons-cli/1.11.0/commons-cli-1.11.0-sources.jar
archive copy: sources-2/eda--commons-cli-1.11.0-sources.jarcommons-lang3-3.20.0-sources.jar(754.6 KiB)
sha256eec245e820ec2800a1780cf756aefb427c1c6170e06902e67ac15b6910ce6335
upstream: https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.20.0/commons-lang3-3.20.0-sources.jar
archive copy: sources-2/eda--commons-lang3-3.20.0-sources.jarcommons-text-1.15.0-sources.jar(290.3 KiB)
sha2566fa2f1db12dc4147094be928a5b54d567cea287df54e4c76b7dfb6096c05439d
upstream: https://repo1.maven.org/maven2/org/apache/commons/commons-text/1.15.0/commons-text-1.15.0-sources.jar
archive copy: sources-2/eda--commons-text-1.15.0-sources.jarflatlaf-3.7.2-sources.jar(675.9 KiB)
sha256f3c232cde899335b3fc342e9fbd0e584bfe4bc24e20eddc415858d0d2d7cda10
upstream: https://repo1.maven.org/maven2/com/formdev/flatlaf/3.7.2/flatlaf-3.7.2-sources.jar
archive copy: sources-2/eda--flatlaf-3.7.2-sources.jarflexmark-0.64.8-sources.jar(240.2 KiB)
sha25641740277308867e41377ef4f60331ebbe03ab7b2f49362de80d18c6b8798773a
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark/0.64.8/flexmark-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-0.64.8-sources.jarflexmark-util-ast-0.64.8-sources.jar(36.0 KiB)
sha2564e36e21ec7a4ac9e976ae35a6c09544585c24f5fe7682178014e53f755aa3456
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-ast/0.64.8/flexmark-util-ast-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-ast-0.64.8-sources.jarflexmark-util-builder-0.64.8-sources.jar(4.2 KiB)
sha256e1250a03bf9f478193094e25c8e8193d64a5290c8dfacd2322a8d277d90d03e9
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-builder/0.64.8/flexmark-util-builder-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-builder-0.64.8-sources.jarflexmark-util-collection-0.64.8-sources.jar(28.0 KiB)
sha256a1484f5cb100b2a8a9f732748bf6d4ee75f72892e3915900d901c134403dedcf
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-collection/0.64.8/flexmark-util-collection-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-collection-0.64.8-sources.jarflexmark-util-data-0.64.8-sources.jar(15.6 KiB)
sha25612dbc4e9e5fa92c20113ad6381fdc9ed2f4eed4ee3f6c29eb12b911e17a99b45
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-data/0.64.8/flexmark-util-data-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-data-0.64.8-sources.jarflexmark-util-dependency-0.64.8-sources.jar(10.2 KiB)
sha2566606ced6643520748893fa39186705c9f99406178240fa06a08f131e06c139f6
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-dependency/0.64.8/flexmark-util-dependency-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-dependency-0.64.8-sources.jarflexmark-util-format-0.64.8-sources.jar(53.5 KiB)
sha256e5200a49b80877159ce13e1ea588f315d0f62e27ae05685dc9420ba2d3660649
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-format/0.64.8/flexmark-util-format-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-format-0.64.8-sources.jarflexmark-util-html-0.64.8-sources.jar(26.7 KiB)
sha25688fabc24d8c94f9ef27204f8c9cf679daeff61ae970c71eafd5a9a94891fdec9
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-html/0.64.8/flexmark-util-html-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-html-0.64.8-sources.jarflexmark-util-misc-0.64.8-sources.jar(31.1 KiB)
sha25693d87943c488545fa7e4ec5f6d7a1869febeb9ab781852afa51930c3d67628fb
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-misc/0.64.8/flexmark-util-misc-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-misc-0.64.8-sources.jarflexmark-util-sequence-0.64.8-sources.jar(130.9 KiB)
sha256d83ac60aff8c7f55b2dff38ea89c2cc8c57b8a36db91943136f355303cb73f14
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-sequence/0.64.8/flexmark-util-sequence-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-sequence-0.64.8-sources.jarflexmark-util-visitor-0.64.8-sources.jar(5.2 KiB)
sha256ac98028eb53715db30ae025e90394e8ad6c276e26dfe47b77d6c18369873673e
upstream: https://repo1.maven.org/maven2/com/vladsch/flexmark/flexmark-util-visitor/0.64.8/flexmark-util-visitor-0.64.8-sources.jar
archive copy: sources-2/eda--flexmark-util-visitor-0.64.8-sources.jarjavahelp-2.0_05.tar.gz(4.9 MiB)
sha256f72641b8b602c9f740ce0f4e8e3c41e68f2a1e24bd9c67b38ea69b8afce93c02
upstream: https://github.com/javaee/javahelp/archive/refs/tags/2.0_05.tar.gz
archive copy: sources-2/eda--javahelp-2.0_05.tar.gzlogisim-evolution-5.0.0.tar.gz(45.6 MiB)
sha256f988340da25e65ae3e8e8b29e6b16b4014661ed730a8952fc5c618337828f9ca
upstream: https://github.com/logisim-evolution/logisim-evolution/archive/refs/tags/v5.0.0.tar.gz
archive copy: sources-2/eda--logisim-evolution-5.0.0.tar.gzmetainf-services-1.11-sources.jar(4.7 KiB)
sha256f12680d9a598797a0197f88117d2bfbf49b48c65f9bdb6596286e68f18bec983
upstream: https://repo1.maven.org/maven2/org/kohsuke/metainf-services/metainf-services/1.11/metainf-services-1.11-sources.jar
archive copy: sources-2/eda--metainf-services-1.11-sources.jarrsyntaxtextarea-4.0.1-sources.jar(1.6 MiB)
sha25652d5368b78b84ee27d8b278891e613e6620b85c7336966efd1ea276e38a0a5c1
upstream: https://repo1.maven.org/maven2/com/fifesoft/rsyntaxtextarea/4.0.1/rsyntaxtextarea-4.0.1-sources.jar
archive copy: sources-2/eda--rsyntaxtextarea-4.0.1-sources.jarslf4j-api-2.0.19-sources.jar(75.6 KiB)
sha2565653861a44b3865dd6a2d42c0a7c953568c06c4e36a9b172328d0341e9aaab41
upstream: https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.19/slf4j-api-2.0.19-sources.jar
archive copy: sources-2/eda--slf4j-api-2.0.19-sources.jarslf4j-simple-2.0.19-sources.jar(12.9 KiB)
sha2569038025c69aa15c89ad9149ad43a6ad0e8e61c624f6f60ca7d454fe5875985ba
upstream: https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/2.0.19/slf4j-simple-2.0.19-sources.jar
archive copy: sources-2/eda--slf4j-simple-2.0.19-sources.jarswing-checkbox-tree-1.0.2-sources.jar(9.0 KiB)
sha2567917ec585ea038d3d7045867de09ee81b7eb38431dab4e3e085a0384c104cae5
upstream: https://repo1.maven.org/maven2/org/scijava/swing-checkbox-tree/1.0.2/swing-checkbox-tree-1.0.2-sources.jar
archive copy: sources-2/eda--swing-checkbox-tree-1.0.2-sources.jarswingx-action-1.6.8-sources.jar(37.1 KiB)
sha2566972c1a7fdeeb4372145532edf54fb166f061d28e63a072ce5ca0d5c2f254420
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-action/1.6.8/swingx-action-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-action-1.6.8-sources.jarswingx-autocomplete-1.6.8-sources.jar(31.5 KiB)
sha256a0cba2a8558e5e24322eb28267b1f2c3e1201e62f40f4d4b51fe57a31ec56476
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-autocomplete/1.6.8/swingx-autocomplete-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-autocomplete-1.6.8-sources.jarswingx-common-1.6.8-sources.jar(37.3 KiB)
sha256e288a2d7ad34a59f6ce132bdc1be0e93b185397907c3c8b84e6d2b8c18417bc9
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-common/1.6.8/swingx-common-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-common-1.6.8-sources.jarswingx-core-1.6.8-sources.jar(1.0 MiB)
sha2561cbf375b8439eda3fbf17a16f4e9416c55519743440e74d64f881e53f5d93172
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-core/1.6.8/swingx-core-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-core-1.6.8-sources.jarswingx-graphics-1.6.8-sources.jar(48.7 KiB)
sha2568351711e954684e2ce48fecc216f547cb1eaeb3487ed2e4775ed10d52a48717c
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-graphics/1.6.8/swingx-graphics-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-graphics-1.6.8-sources.jarswingx-mavensupport-1.6.8-sources.jar(4.0 KiB)
sha256b12d97728795c87693a08c65d600ea2bd71cf51b0a8eb05e507c8d86470f861c
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-mavensupport/1.6.8/swingx-mavensupport-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-mavensupport-1.6.8-sources.jarswingx-painters-1.6.8-sources.jar(60.7 KiB)
sha2569c68fb36fa1d391b7d8fdcaa74055dcbd2f59e08f5a2caf5ee8d772a48a3b264
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-painters/1.6.8/swingx-painters-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-painters-1.6.8-sources.jarswingx-plaf-1.6.8-sources.jar(53.4 KiB)
sha2569bed7d230eb3a400e066916ed437d91e9305a34a250bedee5ccd5cea8bd990f3
upstream: https://repo1.maven.org/maven2/at/swimmesberger/swingx-plaf/1.6.8/swingx-plaf-1.6.8-sources.jar
archive copy: sources-2/eda--swingx-plaf-1.6.8-sources.jar
Dependencies
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
colorpicker-no-lombok.patch— The colour picker’s sources use Lombok annotations (@RequiredArgsConstructor,@Getter,@Slf4j,@NonNull), which generate code at compile time and need Lombok’s annotation processor. The patch removes them and writes out what they generate: the constructors,ColorPickerMode.getMax(), the SLF4J logger field, andObjects.requireNonNullchecks where@NonNullguarded a field; the@NonNullonColorSliderUI’s constructor parameters is dropped with no check in its place.javahelp-no-awt-peer.patch— Removes the unusedimport java.awt.dnd.peer.*from JavaHelp’sBasicFavoritesNavigatorUI; the JDK does not export that package, so the import fails to compile.
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/42_graphics/phase.env && kpkg install logisim-evolution'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/eda/logisim-evolution.
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/logisim-evolution
echo '0590a3ec06b522b4aae684ddb63c063cd11bd547fd9baaa5e71f6b020e2a7df4 annotations-24.1.0-sources.jar' | sha256sum -c -
echo '79f310f4ffb7eea5845a71dcb573980bb12ebd0e6a093a1d5bac9fee65b445bc colorpicker-2.0.1-sources.jar' | sha256sum -c -
echo 'c65b544468eafd3e1036671fb22fd9ba4c3f67c03f76298e8aaeb6943755a70b commons-cli-1.11.0-sources.jar' | sha256sum -c -
echo 'eec245e820ec2800a1780cf756aefb427c1c6170e06902e67ac15b6910ce6335 commons-lang3-3.20.0-sources.jar' | sha256sum -c -
echo '6fa2f1db12dc4147094be928a5b54d567cea287df54e4c76b7dfb6096c05439d commons-text-1.15.0-sources.jar' | sha256sum -c -
echo 'f3c232cde899335b3fc342e9fbd0e584bfe4bc24e20eddc415858d0d2d7cda10 flatlaf-3.7.2-sources.jar' | sha256sum -c -
echo '41740277308867e41377ef4f60331ebbe03ab7b2f49362de80d18c6b8798773a flexmark-0.64.8-sources.jar' | sha256sum -c -
echo '4e36e21ec7a4ac9e976ae35a6c09544585c24f5fe7682178014e53f755aa3456 flexmark-util-ast-0.64.8-sources.jar' | sha256sum -c -
echo 'e1250a03bf9f478193094e25c8e8193d64a5290c8dfacd2322a8d277d90d03e9 flexmark-util-builder-0.64.8-sources.jar' | sha256sum -c -
echo 'a1484f5cb100b2a8a9f732748bf6d4ee75f72892e3915900d901c134403dedcf flexmark-util-collection-0.64.8-sources.jar' | sha256sum -c -
echo '12dbc4e9e5fa92c20113ad6381fdc9ed2f4eed4ee3f6c29eb12b911e17a99b45 flexmark-util-data-0.64.8-sources.jar' | sha256sum -c -
echo '6606ced6643520748893fa39186705c9f99406178240fa06a08f131e06c139f6 flexmark-util-dependency-0.64.8-sources.jar' | sha256sum -c -
echo 'e5200a49b80877159ce13e1ea588f315d0f62e27ae05685dc9420ba2d3660649 flexmark-util-format-0.64.8-sources.jar' | sha256sum -c -
echo '88fabc24d8c94f9ef27204f8c9cf679daeff61ae970c71eafd5a9a94891fdec9 flexmark-util-html-0.64.8-sources.jar' | sha256sum -c -
echo '93d87943c488545fa7e4ec5f6d7a1869febeb9ab781852afa51930c3d67628fb flexmark-util-misc-0.64.8-sources.jar' | sha256sum -c -
echo 'd83ac60aff8c7f55b2dff38ea89c2cc8c57b8a36db91943136f355303cb73f14 flexmark-util-sequence-0.64.8-sources.jar' | sha256sum -c -
echo 'ac98028eb53715db30ae025e90394e8ad6c276e26dfe47b77d6c18369873673e flexmark-util-visitor-0.64.8-sources.jar' | sha256sum -c -
echo 'f72641b8b602c9f740ce0f4e8e3c41e68f2a1e24bd9c67b38ea69b8afce93c02 javahelp-2.0_05.tar.gz' | sha256sum -c -
echo 'f988340da25e65ae3e8e8b29e6b16b4014661ed730a8952fc5c618337828f9ca logisim-evolution-5.0.0.tar.gz' | sha256sum -c -
echo 'f12680d9a598797a0197f88117d2bfbf49b48c65f9bdb6596286e68f18bec983 metainf-services-1.11-sources.jar' | sha256sum -c -
echo '52d5368b78b84ee27d8b278891e613e6620b85c7336966efd1ea276e38a0a5c1 rsyntaxtextarea-4.0.1-sources.jar' | sha256sum -c -
echo '5653861a44b3865dd6a2d42c0a7c953568c06c4e36a9b172328d0341e9aaab41 slf4j-api-2.0.19-sources.jar' | sha256sum -c -
echo '9038025c69aa15c89ad9149ad43a6ad0e8e61c624f6f60ca7d454fe5875985ba slf4j-simple-2.0.19-sources.jar' | sha256sum -c -
echo '7917ec585ea038d3d7045867de09ee81b7eb38431dab4e3e085a0384c104cae5 swing-checkbox-tree-1.0.2-sources.jar' | sha256sum -c -
echo '6972c1a7fdeeb4372145532edf54fb166f061d28e63a072ce5ca0d5c2f254420 swingx-action-1.6.8-sources.jar' | sha256sum -c -
echo 'a0cba2a8558e5e24322eb28267b1f2c3e1201e62f40f4d4b51fe57a31ec56476 swingx-autocomplete-1.6.8-sources.jar' | sha256sum -c -
echo 'e288a2d7ad34a59f6ce132bdc1be0e93b185397907c3c8b84e6d2b8c18417bc9 swingx-common-1.6.8-sources.jar' | sha256sum -c -
echo '1cbf375b8439eda3fbf17a16f4e9416c55519743440e74d64f881e53f5d93172 swingx-core-1.6.8-sources.jar' | sha256sum -c -
echo '8351711e954684e2ce48fecc216f547cb1eaeb3487ed2e4775ed10d52a48717c swingx-graphics-1.6.8-sources.jar' | sha256sum -c -
echo 'b12d97728795c87693a08c65d600ea2bd71cf51b0a8eb05e507c8d86470f861c swingx-mavensupport-1.6.8-sources.jar' | sha256sum -c -
echo '9c68fb36fa1d391b7d8fdcaa74055dcbd2f59e08f5a2caf5ee8d772a48a3b264 swingx-painters-1.6.8-sources.jar' | sha256sum -c -
echo '9bed7d230eb3a400e066916ed437d91e9305a34a250bedee5ccd5cea8bd990f3 swingx-plaf-1.6.8-sources.jar' | 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/logisim-evolution
SRC=$SRC_ROOT/logisim-evolution-5.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf logisim-evolution-5.0.0.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf javahelp-2.0_05.tar.gz -C "$SRC_ROOT"
cp rsyntaxtextarea-4.0.1-sources.jar "$SRC"
cp colorpicker-2.0.1-sources.jar "$SRC"
cp swingx-core-1.6.8-sources.jar "$SRC"
cp swingx-common-1.6.8-sources.jar "$SRC"
cp swingx-plaf-1.6.8-sources.jar "$SRC"
cp swingx-painters-1.6.8-sources.jar "$SRC"
cp swingx-action-1.6.8-sources.jar "$SRC"
cp swingx-graphics-1.6.8-sources.jar "$SRC"
cp swingx-autocomplete-1.6.8-sources.jar "$SRC"
cp swingx-mavensupport-1.6.8-sources.jar "$SRC"
cp metainf-services-1.11-sources.jar "$SRC"
cp swing-checkbox-tree-1.0.2-sources.jar "$SRC"
cp slf4j-api-2.0.19-sources.jar "$SRC"
cp slf4j-simple-2.0.19-sources.jar "$SRC"
cp flatlaf-3.7.2-sources.jar "$SRC"
cp commons-cli-1.11.0-sources.jar "$SRC"
cp flexmark-0.64.8-sources.jar "$SRC"
cp flexmark-util-ast-0.64.8-sources.jar "$SRC"
cp flexmark-util-builder-0.64.8-sources.jar "$SRC"
cp flexmark-util-collection-0.64.8-sources.jar "$SRC"
cp flexmark-util-data-0.64.8-sources.jar "$SRC"
cp flexmark-util-dependency-0.64.8-sources.jar "$SRC"
cp flexmark-util-format-0.64.8-sources.jar "$SRC"
cp flexmark-util-html-0.64.8-sources.jar "$SRC"
cp flexmark-util-misc-0.64.8-sources.jar "$SRC"
cp flexmark-util-sequence-0.64.8-sources.jar "$SRC"
cp flexmark-util-visitor-0.64.8-sources.jar "$SRC"
cp annotations-24.1.0-sources.jar "$SRC"
cp commons-text-1.15.0-sources.jar "$SRC"
cp commons-lang3-3.20.0-sources.jar "$SRC"
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 recipe’s helpers _maven, _javahelp, _rsta, _colorpick, _swingx, _mis, _cbtree, _slf4j, _flatlaf, _cli, _flexmark, _jbannot, _text, _lang3, _sx, _fm and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
_dep=build/depsrc
mkdir -p "$_dep" build/classes build/proc build/gen build/docgen
for _j in rsyntaxtextarea-$_rsta colorpicker-$_colorpick \
swingx-core-$_swingx swingx-common-$_swingx swingx-plaf-$_swingx \
swingx-painters-$_swingx swingx-action-$_swingx swingx-graphics-$_swingx \
swingx-autocomplete-$_swingx swingx-mavensupport-$_swingx swing-checkbox-tree-$_cbtree \
slf4j-api-$_slf4j slf4j-simple-$_slf4j flatlaf-$_flatlaf commons-cli-$_cli \
flexmark-$_flexmark flexmark-util-ast-$_flexmark flexmark-util-builder-$_flexmark \
flexmark-util-collection-$_flexmark flexmark-util-data-$_flexmark \
flexmark-util-dependency-$_flexmark flexmark-util-format-$_flexmark \
flexmark-util-html-$_flexmark flexmark-util-misc-$_flexmark \
flexmark-util-sequence-$_flexmark flexmark-util-visitor-$_flexmark \
annotations-$_jbannot commons-text-$_text commons-lang3-$_lang3; do
unzip -q -o "$_j-sources.jar" -d "$_dep"
done
patch -p1 -d "$SRC_ROOT/javahelp-$_javahelp" -i "$PORT_SRC/javahelp-no-awt-peer.patch"
_jh="$SRC_ROOT/javahelp-$_javahelp/jhMaster"
cp -r "$_jh/JavaHelp/src/new/." "$_jh/JavaHelp/src/impl/." "$_jh/JSearch/client/." "$_dep/"
rm -rf "$_dep/META-INF/maven" "$_dep/META-INF/MANIFEST.MF" "$_dep/META-INF/versions"
find "$_dep" -name module-info.java -delete
rm -rf "$_dep/javax/help/tagext" "$_dep/javax/help/ServletHelpBroker.java" \
"$_dep/javax/help/plaf/basic/BasicNativeContentViewerUI.java"
patch -p1 -d "$_dep" -i "$PORT_SRC/colorpicker-no-lombok.patch"
unzip -q "metainf-services-$_mis-sources.jar" -d build/proc-src
javac -encoding UTF-8 -nowarn -d build/proc \
build/proc-src/org/kohsuke/MetaInfServices.java \
build/proc-src/org/kohsuke/metainf_services/AnnotationProcessorImpl.java
install -Dm644 build/proc-src/org/kohsuke/MetaInfServices.java "$_dep/org/kohsuke/MetaInfServices.java"
_gen=build/gen/com/cburch/logisim/generated
mkdir -p "$_gen"
_millis=$((SOURCE_DATE_EPOCH * 1000))
_year=$(date -u -d "@$SOURCE_DATE_EPOCH" +%Y)
_iso=$(date -u -d "@$SOURCE_DATE_EPOCH" '+%Y-%m-%dT%H:%M:%S+0000')
cat > "$_gen/BuildInfo.java" <<JAVA
package com.cburch.logisim.generated;
import com.cburch.logisim.LogisimVersion;
import java.util.Date;
public final class BuildInfo {
public static final String branchName = "";
public static final String branchLastCommitHash = "";
public static final String buildId = "v$version";
public static final long millis = ${_millis}L;
public static final String year = "$_year";
public static final String dateIso8601 = "$_iso";
public static final Date date = new Date();
static { date.setTime(millis); }
public static final LogisimVersion version = LogisimVersion.fromString("$version");
public static final String name = "Logisim-evolution";
public static final String displayName = "Logisim-evolution v$version";
public static final String url = "https://github.com/logisim-evolution/";
public static final String jvm_version =
String.format("%s v%s", System.getProperty("java.vm.name"), System.getProperty("java.version"));
public static final String jvm_vendor = System.getProperty("java.vendor");
}
JAVA
{
find src/main/java build/gen -name '*.java'
find "$_dep/com/formdev/flatlaf" "$_dep/org/fife" "$_dep/javax/help" \
"$_dep/com/sun/java/help" "$_dep/org/jdesktop/swingx/plaf" \
"$_dep/org/slf4j/simple" -name '*.java' ! -name package-info.java
} | LC_ALL=C sort > build/sources.list
javac -encoding UTF-8 -nowarn -implicit:class --release 21 \
-processorpath build/proc -processor org.kohsuke.metainf_services.AnnotationProcessorImpl \
-d build/classes -sourcepath "$_dep:src/main/java:build/gen" @build/sources.list
cp -r src/main/resources/. build/classes/
( cd "$_dep" && find . -type f ! -name '*.java' ! -name '*.html' ! -name 'GNUmakefile' \
! -path './META-INF/LICENSE*' ! -path './META-INF/NOTICE*' \
-exec cp --parents {} "$SRC/build/classes/" \; )
javac -encoding UTF-8 -nowarn -d build/docgen $(find src/docgen/java -name '*.java')
java -cp build/docgen com.cburch.logisim.docs.DocumentationGenerator --help-sets \
src/main/doc/help-sets.xml build/classes/doc build/classes/doc
( cd build/classes/doc && for _l in */; do
_l=${_l%/}
case $_l in en|icons|img-*) ;; *) [ -f "map_$_l.jhm" ] && rm -rf "$_l" "map_$_l.jhm" "search_lookup_$_l" "doc_$_l.hs" ;; esac
done )
printf 'Main-Class: com.cburch.logisim.Main\nEnable-Native-Access: ALL-UNNAMED\n' > build/manifest.txt
( cd build/classes && find . -type f | LC_ALL=C sort | sed 's/.*/"&"/' > ../classes.list )
( cd build/classes && jar --create --file ../logisim-evolution.jar --manifest ../manifest.txt \
--date="$(date -u -d "@$SOURCE_DATE_EPOCH" '+%Y-%m-%dT%H:%M:%SZ')" @../classes.list )
install -Dm644 build/logisim-evolution.jar "$PKG/usr/share/logisim-evolution/logisim-evolution.jar"
install -d "$PKG/usr/bin"
cat > "$PKG/usr/bin/logisim-evolution" <<'LAUNCHER'
#!/bin/sh
exec java --enable-native-access=ALL-UNNAMED -jar /usr/share/logisim-evolution/logisim-evolution.jar "$@"
LAUNCHER
chmod 755 "$PKG/usr/bin/logisim-evolution"
install -Dm644 src/main/resources/resources/logisim/img/logisim-icon-128.png \
"$PKG/usr/share/icons/hicolor/128x128/apps/logisim-evolution.png"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/logisim-evolution.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Logisim-evolution
GenericName=Logic Simulator
Comment=Design and simulate digital logic circuits, and export them to FPGAs
Exec=logisim-evolution %f
Icon=logisim-evolution
Terminal=false
StartupWMClass=com-cburch-logisim-Main
Categories=Education;Electronics;Engineering;
Keywords=logic;circuit;simulator;gate;fpga;vhdl;verilog;cpu;
DESKTOP
chmod 644 "$PKG/usr/share/applications/logisim-evolution.desktop"
The switches, and why each is set:
--release 21— Compile against the Java 21 platform API, the source and target level upstream’s Gradle build sets.-processorpath build/proc,-processor org.kohsuke.metainf_services.AnnotationProcessorImpl— Run themetainf-servicesannotation processor, compiled first intobuild/proc, during the main compile. It writes theMETA-INF/servicesfiles through which SwingX registers its look-and-feel add-ons.-sourcepath "$_dep:src/main/java:build/gen",-implicit:class— Letjavacfind every class it is not handed on the command line in the unpacked dependency sources, in Logisim’s own tree and in the generatedBuildInfo, and write a class file for each one it compiles that way.-encoding UTF-8,-nowarn— Read the sources as UTF-8 and print no compiler warnings.--enable-native-access=ALL-UNNAMED— In thelogisim-evolutionlauncher, and asEnable-Native-Accessin the jar’s manifest: allow code on the class path to use the JDK’s restricted native-access methods without a warning, as upstream’s own launchers do.
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/logisim-evolution, 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 logisim-evolution-5.0.0-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/logisim-evolution, and runs the triggers its paths call for.
Contents
Installed programs: logisim-evolution.
Installed directories: /usr/share/licenses/logisim-evolution, /usr/share/logisim-evolution.
Notes
- What is compiled, and how it is chosen. Every library is a
-sources.jarfrom Maven Central, or for JavaHelp its git archive, each with its ownsha256 =line, unpacked intobuild/depsrc. Libraries that find their parts by name at run time are handed tojavacwhole: FlatLaf’s UI delegates, RSyntaxTextArea’s token makers, JavaHelp’s views and search engine, SwingX’s look-and-feel add-ons and slf4j-simple’s provider. Everything else is compiled only as far as Logisim’s own classes reach it. - One unnamed module.
build.shdeletes everymodule-info.javaand the dependencies’META-INF/versionstrees: a module descriptor on the source path would turn the whole compilation into that module. It also deletes JavaHelp’s JSP tag library and servlet broker, which need a servlet container, and its native browser view, which needs JDIC; Logisim uses none of them. - BuildInfo is written by hand. Gradle’s
genBuildInfotask writescom.cburch.logisim.generated.BuildInfofrom the git checkout;build.shwrites the same class with the build IDv<version>, empty branch fields, and dates taken fromSOURCE_DATE_EPOCH. - The help is generated and cut to English. Logisim’s
DocumentationGeneratoris compiled and run to write the JavaHelp descriptors fromsrc/main/doc/help-sets.xml.build.shthen removes every language’s manual and help set except English. - The jar is reproducible. Class and resource files go into
logisim-evolution.jarsorted by name, one quoted name per line because some resource names contain spaces, every entry datedSOURCE_DATE_EPOCH. Licence and notice files under the dependencies’META-INFare not copied into it. - The menu entry. Its
StartupWMClassiscom-cburch-logisim-Main, the main class with its dots turned into dashes, which is theWM_CLASSSwing gives the window.