debian/0000755000000000000000000000000011756255075007203 5ustar debian/menu0000644000000000000000000000017011751653416010064 0ustar ?package(logisim):needs="X11" section="Applications/Science/Electronics" \ title="logisim" command="/usr/bin/logisim" debian/logisim.10000644000000000000000000000141611751650614010723 0ustar .TH LOGISIM "1" "May 2012" "logisim 2.7.1" .SH NAME logisim \- a graphical tool for designing and simulating logic circuits .SH SYNOPSIS .B logisim .SH DESCRIPTION \fBlogisim\fR is an educational tool for designing and simulating digital logic circuits. With its simple toolbar interface and simulation of circuits as you build them, it is simple enough to facilitate learning the most basic concepts related to logic circuits. With the capacity to build larger circuits from smaller subcircuits, and to draw bundles of wires with a single mouse drag, Logisim can be used (and is used) to design and simulate entire CPUs for educational purposes. .SH AUTHOR This manual page was written by Vincent Cheng , for the Debian project (and may be used by others). debian/javabuild0000644000000000000000000000003011751443261011047 0ustar logisim.jar src/com debian/links0000644000000000000000000000006011751420102010216 0ustar usr/share/logisim/logisim.jar usr/bin/logisim debian/copyright0000644000000000000000000000357411756252151011137 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: logisim Source: http://ozark.hendrix.edu/~burch/logisim/ Files: * Copyright: 2005-2011 Carl Burch License: GPL-2.0+ Files: src/com/cburch/logisim/file/ReaderInputStream.java Copyright: 2004-2005 The Apache Software Foundation License: Apache-2.0 Files: debian/* Copyright: 2012 Vincent Cheng License: GPL-2.0+ License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian systems, the complete text of the Apache version 2.0 license can be found in "/usr/share/common-licenses/Apache-2.0". debian/logisim.desktop0000644000000000000000000000032611754122325012227 0ustar [Desktop Entry] Name=Logisim Comment=Graphical tool for designing and simulating logic circuits Exec=logisim Icon=logisim-icon-128 Terminal=false Type=Application Categories=Education;Science;ComputerScience;Java; debian/watch0000644000000000000000000000013311756253024010221 0ustar version=3 opts=dversionmangle=s/\~dfsg// \ http://sf.net/circuit/logisim-generic-(.*)\.jar debian/control0000644000000000000000000000215511756252151010601 0ustar Source: logisim Section: java Priority: optional Maintainer: Vincent Cheng Build-Depends: debhelper (>= 9), javahelper (>= 0.25) Build-Depends-Indep: default-jdk, javahelp2, libcolorpicker-java, libfontchooser-java Standards-Version: 3.9.3 Homepage: http://ozark.hendrix.edu/~burch/logisim/ Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/logisim/trunk Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/deb-maint/logisim/trunk Package: logisim Architecture: all Depends: ${java:Depends}, ${misc:Depends} Recommends: ${java:Recommends} Description: graphical tool for designing and simulating logic circuits Logisim is an educational tool for designing and simulating digital logic circuits. With its simple toolbar interface and simulation of circuits as you build them, it is simple enough to facilitate learning the most basic concepts related to logic circuits. With the capacity to build larger circuits from smaller subcircuits, and to draw bundles of wires with a single mouse drag, Logisim can be used (and is used) to design and simulate entire CPUs for educational purposes. debian/install0000644000000000000000000000106111756255075010572 0ustar debian/logisim.desktop usr/share/applications/ logisim.jar usr/share/logisim/ resources/logisim/img/logisim-icon-128.png usr/share/icons/hicolor/128x128/apps/ resources/logisim/img/logisim-icon-20.png usr/share/icons/hicolor/20x20/apps/ resources/logisim/img/logisim-icon-24.png usr/share/icons/hicolor/24x24/apps/ resources/logisim/img/logisim-icon-48.png usr/share/icons/hicolor/48x48/apps/ resources/logisim/img/logisim-icon-64.png usr/share/icons/hicolor/64x64/apps/ debian/changelog0000644000000000000000000000024111756252635011051 0ustar logisim (2.7.1~dfsg-1) unstable; urgency=low * Initial release (Closes: #652954) -- Vincent Cheng Sat, 05 May 2012 23:24:00 -0700 debian/rules0000755000000000000000000000234511756254165010266 0ustar #!/usr/bin/make -f export JAVA_HOME=/usr/lib/jvm/default-java export CLASSPATH=/usr/share/java/jhall.jar:/usr/share/java/ColorPicker.jar:/usr/share/java/FontChooser.jar %: dh $@ --with javahelper override_jh_build: jh_build jar uf logisim.jar doc/ resources/logisim/ # Used by get-orig-source target DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-~]+).*,\1,p') TMPDIR=logisim-$(DEB_UPSTREAM_VERSION) get-orig-source: mkdir -p $(TMPDIR) # Fetch current upstream JAR file uscan --noconf --force-download --download-current-version --destdir=$(TMPDIR) # Unpack and remove JAR file cd $(TMPDIR) && jar xf logisim-generic-$(DEB_UPSTREAM_VERSION).jar rm -f $(TMPDIR)/logisim-generic-$(DEB_UPSTREAM_VERSION).jar # Remove all unwanted binary files (i.e. .jar files, .class files) rm -rf $(TMPDIR)/com/ rm -rf $(TMPDIR)/javax/ rm -rf $(TMPDIR)/net/ rm -rf $(TMPDIR)/resources/bric/ rm -rf $(TMPDIR)/resources/connectina/ # Remove BOM to stop javac from complaining about illegal characters sed -i '1 s/^\xef\xbb\xbf//' $(TMPDIR)/src/com/cburch/draw/shapes/CurveUtil.java # Repackage into a tarball tar -czf logisim_$(DEB_UPSTREAM_VERSION)~dfsg.orig.tar.gz logisim-$(DEB_UPSTREAM_VERSION) rm -rf $(TMPDIR) debian/compat0000644000000000000000000000000211751417614010373 0ustar 9 debian/manpages0000644000000000000000000000002111751650356010706 0ustar debian/logisim.1 debian/patches/0000755000000000000000000000000011751444331010620 5ustar debian/patches/series0000644000000000000000000000003011751440261012024 0ustar remove_mrjadapter.patch debian/patches/remove_mrjadapter.patch0000644000000000000000000002350511751444331015354 0ustar Description: Rip out MRJAdapter from Logisim's source MRJAdapter is only useful on Mac OS X and with Apple's JVM; it's not available in Debian anyways and makes logisim FTBFS, so let's get rid of it. Forwarded: not-needed Author: Vincent Cheng Last-Update: 05-06-2012 --- a/src/com/cburch/logisim/gui/start/MacOsAdapter.java +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2010, Carl Burch. License information is located in the - * com.cburch.logisim.Main source code and at www.cburch.com/logisim/. */ - -package com.cburch.logisim.gui.start; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -//MAC import java.io.File; - -import net.roydesign.event.ApplicationEvent; -import net.roydesign.mac.MRJAdapter; - -//MAC import com.apple.eawt.Application; -//MAC import com.apple.eawt.ApplicationAdapter; -import com.cburch.logisim.gui.prefs.PreferencesFrame; -import com.cburch.logisim.proj.ProjectActions; - -class MacOsAdapter { //MAC extends ApplicationAdapter { - - private static class MyListener implements ActionListener { - public void actionPerformed(ActionEvent event) { - ApplicationEvent event2 = (ApplicationEvent) event; - int type = event2.getType(); - switch (type) { - case ApplicationEvent.ABOUT: - About.showAboutDialog(null); - break; - case ApplicationEvent.QUIT_APPLICATION: - ProjectActions.doQuit(); - break; - case ApplicationEvent.OPEN_DOCUMENT: - Startup.doOpen(event2.getFile()); - break; - case ApplicationEvent.PRINT_DOCUMENT: - Startup.doPrint(event2.getFile()); - break; - case ApplicationEvent.PREFERENCES: - PreferencesFrame.showPreferences(); - break; - } - } - } - - static void addListeners(boolean added) { - MyListener myListener = new MyListener(); - if (!added) MRJAdapter.addOpenDocumentListener(myListener); - if (!added) MRJAdapter.addPrintDocumentListener(myListener); - MRJAdapter.addPreferencesListener(myListener); - MRJAdapter.addQuitApplicationListener(myListener); - MRJAdapter.addAboutListener(myListener); - } - - /* MAC - public void handleOpenFile(com.apple.eawt.ApplicationEvent event) { - Startup.doOpen(new File(event.getFilename())); - } - - public void handlePrintFile(com.apple.eawt.ApplicationEvent event) { - Startup.doPrint(new File(event.getFilename())); - } - - public void handlePreferences(com.apple.eawt.ApplicationEvent event) { - PreferencesFrame.showPreferences(); - } - */ - - public static void register() { - //MAC Application.getApplication().addApplicationListener(new MacOsAdapter()); - } -} \ No newline at end of file --- a/src/com/cburch/logisim/util/MacCompatibility.java +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (c) 2010, Carl Burch. License information is located in the - * com.cburch.logisim.Main source code and at www.cburch.com/logisim/. */ - -package com.cburch.logisim.util; - -import java.io.File; -import java.io.IOException; - -import javax.swing.JMenuBar; - -import net.roydesign.mac.MRJAdapter; - -public class MacCompatibility { - private MacCompatibility() { } - - public static final double mrjVersion; - - static { - double versionValue; - try { - versionValue = MRJAdapter.mrjVersion; - } catch (Throwable t) { - versionValue = 0.0; - } - mrjVersion = versionValue; - } - - public static boolean isAboutAutomaticallyPresent() { - try { - return MRJAdapter.isAboutAutomaticallyPresent(); - } catch (Throwable t) { - return false; - } - } - - public static boolean isPreferencesAutomaticallyPresent() { - try { - return MRJAdapter.isPreferencesAutomaticallyPresent(); - } catch (Throwable t) { - return false; - } - } - - public static boolean isQuitAutomaticallyPresent() { - try { - return MRJAdapter.isQuitAutomaticallyPresent(); - } catch (Throwable t) { - return false; - } - } - - public static boolean isSwingUsingScreenMenuBar() { - try { - return MRJAdapter.isSwingUsingScreenMenuBar(); - } catch (Throwable t) { - return false; - } - } - - public static void setFramelessJMenuBar(JMenuBar menubar) { - try { - MRJAdapter.setFramelessJMenuBar(menubar); - } catch (Throwable t) { } - } - - public static void setFileCreatorAndType(File dest, String app, String type) - throws IOException { - IOException ioExcept = null; - try { - try { - MRJAdapter.setFileCreatorAndType(dest, app, type); - } catch (IOException e) { - ioExcept = e; - } - } catch (Throwable t) { } - if (ioExcept != null) throw ioExcept; - } - -} --- a/src/com/cburch/logisim/util/WindowMenu.java +++ b/src/com/cburch/logisim/util/WindowMenu.java @@ -24,8 +24,7 @@ WindowMenu.this.setText(Strings.get("windowMenu")); minimize.setText(Strings.get("windowMinimizeItem")); close.setText(Strings.get("windowCloseItem")); - zoom.setText(MacCompatibility.isQuitAutomaticallyPresent() ? - Strings.get("windowZoomItemMac") : Strings.get("windowZoomItem")); + zoom.setText(Strings.get("windowZoomItem")); } public void actionPerformed(ActionEvent e) { --- a/src/com/cburch/logisim/file/Loader.java +++ b/src/com/cburch/logisim/file/Loader.java @@ -22,7 +22,6 @@ import com.cburch.logisim.std.Builtin; import com.cburch.logisim.tools.Library; import com.cburch.logisim.util.JFileChoosers; -import com.cburch.logisim.util.MacCompatibility; import com.cburch.logisim.util.StringUtil; import com.cburch.logisim.util.ZipClassLoader; @@ -185,9 +184,6 @@ FileOutputStream fwrite = null; try { - try { - MacCompatibility.setFileCreatorAndType(dest, "LGSM", "circ"); - } catch (IOException e) { } fwrite = new FileOutputStream(dest); file.write(fwrite, this); file.setName(toProjectName(dest)); --- a/src/com/cburch/logisim/proj/Projects.java +++ b/src/com/cburch/logisim/proj/Projects.java @@ -17,7 +17,6 @@ import com.cburch.logisim.file.Loader; import com.cburch.logisim.gui.main.Frame; -import com.cburch.logisim.util.MacCompatibility; import com.cburch.logisim.util.PropertyChangeWeakSupport; public class Projects { @@ -59,7 +58,7 @@ if (frame == proj.getFrame()) { projectRemoved(proj, frame, this); } - if (openProjects.isEmpty() && !MacCompatibility.isSwingUsingScreenMenuBar()) { + if (openProjects.isEmpty()) { ProjectActions.doQuit(); } } --- a/src/com/cburch/logisim/gui/menu/MenuHelp.java +++ b/src/com/cburch/logisim/gui/menu/MenuHelp.java @@ -5,7 +5,6 @@ import com.cburch.logisim.gui.generic.LFrame; import com.cburch.logisim.gui.start.About; -import com.cburch.logisim.util.MacCompatibility; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -41,10 +40,9 @@ add(tutorial); add(guide); add(library); - if (!MacCompatibility.isAboutAutomaticallyPresent()) { - addSeparator(); - add(about); - } + addSeparator(); + add(about); + } public void localeChanged() { --- a/src/com/cburch/logisim/gui/menu/MenuFile.java +++ b/src/com/cburch/logisim/gui/menu/MenuFile.java @@ -16,7 +16,6 @@ import com.cburch.logisim.gui.prefs.PreferencesFrame; import com.cburch.logisim.proj.Project; import com.cburch.logisim.proj.ProjectActions; -import com.cburch.logisim.util.MacCompatibility; class MenuFile extends Menu implements ActionListener { private LogisimMenuBar menubar; @@ -62,14 +61,10 @@ addSeparator(); add(exportImage); add(print); - if (!MacCompatibility.isPreferencesAutomaticallyPresent()) { - addSeparator(); - add(prefs); - } - if (!MacCompatibility.isQuitAutomaticallyPresent()) { - addSeparator(); - add(quit); - } + addSeparator(); + add(prefs); + addSeparator(); + add(quit); Project proj = menubar.getProject(); newi.addActionListener(this); --- a/src/com/cburch/logisim/gui/start/Startup.java +++ b/src/com/cburch/logisim/gui/start/Startup.java @@ -24,7 +24,6 @@ import com.cburch.logisim.proj.Project; import com.cburch.logisim.proj.ProjectActions; import com.cburch.logisim.util.LocaleManager; -import com.cburch.logisim.util.MacCompatibility; import com.cburch.logisim.util.StringUtil; public class Startup { @@ -61,13 +60,10 @@ if (needed1 == null) return; Class needed2 = Class.forName("com.apple.eawt.ApplicationAdapter"); if (needed2 == null) return; - MacOsAdapter.register(); - MacOsAdapter.addListeners(true); } catch (ClassNotFoundException e) { return; } catch (Throwable t) { try { - MacOsAdapter.addListeners(false); } catch (Throwable t2) { } } } @@ -153,14 +149,10 @@ // interface initialization if (showSplash) monitor.setProgress(SplashScreen.GUI_INIT); WindowManagers.initialize(); - if (MacCompatibility.isSwingUsingScreenMenuBar()) { - MacCompatibility.setFramelessJMenuBar(new LogisimMenuBar(null, null)); - } else { - new LogisimMenuBar(null, null); - // most of the time occupied here will be in loading menus, which - // will occur eventually anyway; we might as well do it when the - // monitor says we are - } + new LogisimMenuBar(null, null); + // most of the time occupied here will be in loading menus, which + // will occur eventually anyway; we might as well do it when the + // monitor says we are // if user has double-clicked a file to open, we'll // use that as the file to open now. --- a/src/com/cburch/logisim/gui/generic/CanvasPane.java +++ b/src/com/cburch/logisim/gui/generic/CanvasPane.java @@ -14,8 +14,6 @@ import javax.swing.JScrollPane; import javax.swing.SwingConstants; -import com.cburch.logisim.util.MacCompatibility; - public class CanvasPane extends JScrollPane { private class Listener implements ComponentListener, PropertyChangeListener { @@ -59,10 +57,6 @@ this.contents = contents; this.listener = new Listener(); this.zoomModel = null; - if (MacCompatibility.mrjVersion >= 0.0) { - setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); - setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); - } addComponentListener(listener); contents.setCanvasPane(this); debian/lintian-overrides0000644000000000000000000000030411751647274012562 0ustar # Debian Java policy allows for executable jar files as long as package # depends on jarwrapper. See #539315 in the Debian BTS. logisim: executable-not-elf-or-script usr/share/logisim/logisim.jar debian/source/0000755000000000000000000000000011674604160010473 5ustar debian/source/format0000644000000000000000000000001411674604160011701 0ustar 3.0 (quilt) debian/manifest0000644000000000000000000000016111751444523010723 0ustar usr/share/logisim/logisim.jar: Main-Class: com.cburch.logisim.Main Debian-Java-Home: /usr/lib/jvm/default-java