Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

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

Dependencies

Depends on: openjdk, unzip.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

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:

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