[111147] trunk/dports/java/mars
ryandesign at macports.org
ryandesign at macports.org
Sun Sep 15 18:26:49 PDT 2013
Revision: 111147
https://trac.macports.org/changeset/111147
Author: ryandesign at macports.org
Date: 2013-09-15 18:26:49 -0700 (Sun, 15 Sep 2013)
Log Message:
-----------
mars: update to 4.4 (#40444)
Modified Paths:
--------------
trunk/dports/java/mars/Portfile
trunk/dports/java/mars/files/mars.in
Added Paths:
-----------
trunk/dports/java/mars/files/patch-mars-venus-editors-jeditsyntax-DefaultInputHandler.java
Modified: trunk/dports/java/mars/Portfile
===================================================================
--- trunk/dports/java/mars/Portfile 2013-09-16 01:22:45 UTC (rev 111146)
+++ trunk/dports/java/mars/Portfile 2013-09-16 01:26:49 UTC (rev 111147)
@@ -4,8 +4,8 @@
PortSystem 1.0
name mars
-version 4.3
-set releasedate Jan2013
+version 4.4
+set releasedate Aug2013
set fileversion [join [split ${version} .] _]
revision 0
categories java devel
@@ -27,8 +27,8 @@
use_zip yes
extract.suffix .jar
-checksums sha1 5a8608ba0a8548d12c035d9817769d86edfa77f8 \
- rmd160 21e419cd2cd181e48e651e6beeae88cd4273466f
+checksums sha1 54544a2f212cc5cc96868efe7ea8973be3f778fb \
+ rmd160 15480082329e9b9cc8d7ea81dc84cd3922dfbefc
depends_lib bin:java:kaffe
@@ -36,30 +36,53 @@
build {}
-destroot {
- # Install Mars JAR
- xinstall -m 755 -d ${destroot}${prefix}/share/java
- xinstall -m 644 -W ${distpath} ${distname}.jar ${destroot}${prefix}/share/java
-
- # Install and configure mars command line wrapper
- xinstall -m 755 ${filespath}/mars.in ${destroot}${prefix}/bin/mars
- reinplace "s|@MARSJARPATH@|${prefix}/share/java/${distname}.jar|g" ${destroot}${prefix}/bin/mars
-}
-
-# The only reason we extract the zip file is to get the image for the OS X app icon,
+# The only reason we extract the zip file is to get the image for the
+# OS X app icon (and patch the sources for the OS-X-specific jedit bug),
# so we don't need to extract it on other platforms.
-if {${os.platform} != "darwin"} {
+if {${os.platform} ne "darwin"} {
extract.only
+ destroot {
+ # Install Mars JAR
+ xinstall -m 755 -d ${destroot}${prefix}/share/java
+ xinstall -m 644 -W ${distpath} ${distname}.jar ${destroot}${prefix}/share/java
+
+ # Install and configure mars command line wrapper
+ xinstall -m 755 ${filespath}/mars.in ${destroot}${prefix}/bin/mars
+ reinplace "s|@MARSJARPATH@|${prefix}/share/java/${distname}.jar|g" ${destroot}${prefix}/bin/mars
+ }
}
platform darwin {
depends_build-append port:makeicns
-
+
extract.mkdir yes
- pre-extract {
- extract.post_args-append images/MarsThumbnail.gif
+# As long as the OS-X-specific jedit bug is present in the editor of Mars,
+# we have to unpack the whole JAR.
+# pre-extract {
+# extract.post_args-append images/MarsThumbnail.gif
+# }
+
+ # The jedit-based editor of MARS requires a patch on OS X to enable
+ # entering characters requiring the ALT key.
+ patchfiles patch-mars-venus-editors-jeditsyntax-DefaultInputHandler.java
+ build {
+ # Recompile patched source file
+ # mars/venus/editors/jeditsyntax/DefaultInputHandler.java
+ system "cd ${worksrcpath} && javac ${worksrcpath}/mars/venus/editors/jeditsyntax/DefaultInputHandler.java"
+ # Create new JAR archive
+ system "cd ${worksrcpath} && sh ${worksrcpath}/CreateMarsJar.bat"
}
-
+
+ destroot {
+ # Install Mars JAR
+ xinstall -m 755 -d ${destroot}${prefix}/share/java
+ xinstall -m 644 ${worksrcpath}/Mars.jar ${destroot}${prefix}/share/java/${distname}.jar
+
+ # Install and configure mars command line wrapper
+ xinstall -m 755 ${filespath}/mars.in ${destroot}${prefix}/bin/mars
+ reinplace "s|@MARSJARPATH@|${prefix}/share/java/${distname}.jar|g" ${destroot}${prefix}/bin/mars
+ }
+
# Build a nice .app
post-destroot {
set MarsAppPath ${destroot}${applications_dir}/MARS.app
Modified: trunk/dports/java/mars/files/mars.in
===================================================================
--- trunk/dports/java/mars/files/mars.in 2013-09-16 01:22:45 UTC (rev 111146)
+++ trunk/dports/java/mars/files/mars.in 2013-09-16 01:26:49 UTC (rev 111147)
@@ -1,2 +1,3 @@
#!/bin/sh
-java -jar @MARSJARPATH@
+java -jar "@MARSJARPATH@" "$@"
+
Added: trunk/dports/java/mars/files/patch-mars-venus-editors-jeditsyntax-DefaultInputHandler.java
===================================================================
--- trunk/dports/java/mars/files/patch-mars-venus-editors-jeditsyntax-DefaultInputHandler.java (rev 0)
+++ trunk/dports/java/mars/files/patch-mars-venus-editors-jeditsyntax-DefaultInputHandler.java 2013-09-16 01:26:49 UTC (rev 111147)
@@ -0,0 +1,69 @@
+--- mars/venus/editors/jeditsyntax/DefaultInputHandler.java.orig 2013-03-07 17:51:06.000000000 +0100
++++ mars/venus/editors/jeditsyntax/DefaultInputHandler.java 2013-03-07 18:21:45.000000000 +0100
+@@ -14,6 +14,7 @@
+ import java.awt.Toolkit;
+ import java.util.Hashtable;
+ import java.util.StringTokenizer;
++ import java.util.Properties;
+
+ /**
+ * The default input handler. It maps sequences of keystrokes into actions
+@@ -232,19 +233,45 @@
+ // matches KeyEvent.META_MASK. DPS 30-Nov-2010
+ if ((modifiers & KeyEvent.META_MASK) != 0)
+ return;
+- // DPS 9-Jan-2013. Umberto Villano from Italy describes Alt combinations
+- // not working on Italian Mac keyboards, where # requires Alt (Option).
+- // This is preventing him from writing comments. Similar complaint from
+- // Joachim Parrow in Sweden, only for the $ character. Villano pointed
+- // me to this method. Plus a Google search on "jeditsyntax alt key"
+- // (without quotes) took me to
+- // http://compgroups.net/comp.lang.java.programmer/option-key-in-jedit-syntax-package/1068227
+- // which says to comment out the second condition in this IF statement:
+- // if(c != KeyEvent.CHAR_UNDEFINED && (modifiers & KeyEvent.ALT_MASK) == 0)
+- // So let's give it a try!
+- // (...later) Bummer, it results in keystroke echoed into editing area when I use Alt
+- // combination for shortcut menu access (e.g. Alt+f to open the File menu).
+- if(c != KeyEvent.CHAR_UNDEFINED && (modifiers & KeyEvent.ALT_MASK) == 0)
++ // DPS 9-Jan-2013. Umberto Villano from Italy describes Alt combinations
++ // not working on Italian Mac keyboards, where # requires Alt (Option).
++ // This is preventing him from writing comments. Similar complaint from
++ // Joachim Parrow in Sweden, only for the $ character. Villano pointed
++ // me to this method. Plus a Google search on "jeditsyntax alt key"
++ // (without quotes) took me to
++ // http://compgroups.net/comp.lang.java.programmer/option-key-in-jedit-syntax-package/1068227
++ // which says to comment out the second condition in this IF statement:
++ // if(c != KeyEvent.CHAR_UNDEFINED && (modifiers & KeyEvent.ALT_MASK) == 0)
++ // So let's give it a try!
++ // (...later) Bummer, it results in keystroke echoed into editing area when I use Alt
++ // combination for shortcut menu access (e.g. Alt+f to open the File menu).
++ //
++ // Torsten Maehne: This is a shortcoming of the menu
++ // shortcuts handling in the jedit component: It assumes that
++ // modifier keys are the same across all platforms. However,
++ // the menu shortcut keymask varies between OS X and
++ // Windows/Linux, it is Cmd + <key> instead of Alt +
++ // <key>. The "Java Development Guide for Mac" explicitly
++ // discusses the issue in:
++ // <https://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/07-NativePlatformIntegration/NativePlatformIntegration.html#//apple_ref/doc/uid/TP40001909-211884-TPXREF130>
++ //
++ // As jedit always considers Alt + <key> as a keyboard
++ // shortcut, they block their output in the editor, which
++ // prevents the entry of special characters on OS X that uses
++ // Alt + <key> for this purpose instead of AltGr + <key>, as
++ // on Windows or Linux.
++ //
++ // For the latest jedit version (5.0.0), the menu
++ // accelerators don't work on OS X, at least the special
++ // characters can be entered using Alt + <key>. The issue is
++ // still open, but there seems to be progress:
++ //
++ // http://sourceforge.net/tracker/index.php?func=detail&aid=3558572&group_id=588&atid=300588
++ // http://sourceforge.net/tracker/?func=detail&atid=300588&aid=3604532&group_id=588
++ //
++ // Until this is resolved upstream, don't ignore characters
++ // on OS X, which have been entered with the ALT modifier:
++ if(c != KeyEvent.CHAR_UNDEFINED && (((modifiers & KeyEvent.ALT_MASK) == 0) || System.getProperty("os.name").contains("OS X")))
+ {
+ if(c >= 0x20 && c != 0x7f)
+ {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130915/bf08a281/attachment-0001.html>
More information about the macports-changes
mailing list