[33623] trunk/dports/java/eclipse-ecj32

ryandesign at macports.org ryandesign at macports.org
Thu Jan 31 14:33:23 PST 2008


Revision: 33623
          http://trac.macosforge.org/projects/macports/changeset/33623
Author:   ryandesign at macports.org
Date:     2008-01-31 14:33:22 -0800 (Thu, 31 Jan 2008)

Log Message:
-----------
eclipse-ecj:

 * Add ecj script to execute eclipse-ecj.jar

See #14011.

Modified Paths:
--------------
    trunk/dports/java/eclipse-ecj32/Portfile
    trunk/dports/java/eclipse-ecj32/files/build.xml

Added Paths:
-----------
    trunk/dports/java/eclipse-ecj32/files/MANIFEST.MF
    trunk/dports/java/eclipse-ecj32/files/ecj

Modified: trunk/dports/java/eclipse-ecj32/Portfile
===================================================================
--- trunk/dports/java/eclipse-ecj32/Portfile	2008-01-31 20:46:17 UTC (rev 33622)
+++ trunk/dports/java/eclipse-ecj32/Portfile	2008-01-31 22:33:22 UTC (rev 33623)
@@ -4,6 +4,7 @@
 
 name                    eclipse-ecj32
 version                 3.2.2-200702121330
+revision                1
 categories              java
 maintainers             gmail.com:mvfranz openmaintainer
 platforms               darwin
@@ -30,6 +31,9 @@
 
 post-patch {
     copy ${filespath}/build.xml ${worksrcpath}
+    copy ${filespath}/ecj ${worksrcpath}
+    file mkdir ${worksrcpath}/META-INF
+    copy ${filespath}/MANIFEST.MF ${worksrcpath}/META-INF
 }
 
 build.cmd               ${prefix}/bin/ant
@@ -37,5 +41,6 @@
 
 destroot {
     xinstall -d ${destroot}${prefix}/share/java
-    xinstall -W ${worksrcpath} ecj.jar ${destroot}${prefix}/share/java/
+    xinstall -W ${worksrcpath} eclipse-ecj.jar ${destroot}${prefix}/share/java
+    xinstall -W ${worksrcpath} ecj ${destroot}${prefix}/bin
 }

Added: trunk/dports/java/eclipse-ecj32/files/MANIFEST.MF
===================================================================
--- trunk/dports/java/eclipse-ecj32/files/MANIFEST.MF	                        (rev 0)
+++ trunk/dports/java/eclipse-ecj32/files/MANIFEST.MF	2008-01-31 22:33:22 UTC (rev 33623)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Created-By: 1.2.2 (Sun Microsystems Inc.)
+Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
+
+Name: org/eclipse/jdt/internal/compiler
+Comment: Eclipse Java Compiler
+Implementation-Title: org.eclipse.jdt.internal.compiler.batch.Main
+Implementation-Version: 1.0
+Implementation-Vendor: IBM
+Implementation-URL: http://eclipse.org
+

Modified: trunk/dports/java/eclipse-ecj32/files/build.xml
===================================================================
--- trunk/dports/java/eclipse-ecj32/files/build.xml	2008-01-31 20:46:17 UTC (rev 33622)
+++ trunk/dports/java/eclipse-ecj32/files/build.xml	2008-01-31 22:33:22 UTC (rev 33623)
@@ -2,7 +2,7 @@
 <project name="export-executable" default="build" basedir=".">
 
 	<property name="output" value="bin" />
-	<property name="jar_file" value="ecj.jar" />
+	<property name="jar_file" value="eclipse-ecj.jar" />
 
 	<target name="build">
 		<delete file="${basedir}/${jar_file}" failonerror="no" />

Added: trunk/dports/java/eclipse-ecj32/files/ecj
===================================================================
--- trunk/dports/java/eclipse-ecj32/files/ecj	                        (rev 0)
+++ trunk/dports/java/eclipse-ecj32/files/ecj	2008-01-31 22:33:22 UTC (rev 33623)
@@ -0,0 +1,31 @@
+#!/bin/bash
+# remove double bootclasspath entries:
+BOOTCLASSPATH=""
+BOOTCLASSPATH=$(find /opt/local/share/java -name "libgcj*.jar" -print | tr "\n" ":"):$(find /opt/local/share/java/ -name "glibj*.jar" -print | tr "\n" ":")
+OPTIONS=""
+while [ $# -gt 0 ]
+do
+  if [ $1 = "-bootclasspath" ]
+  then
+    BOOTCLASSPATH=$2:$BOOTCLASSPATH
+    shift
+    shift
+    continue
+  fi
+  OPTIONS="$OPTIONS $1"
+  shift
+done
+GIJ_EXECUTABLE=$(ls /opt/local/bin/gij* | tail -n1)
+if [ -e /usr/bin/java ]
+then
+  exec /usr/bin/java -jar /opt/local/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS
+elif [ -e /usr/bin/cacao ]
+then
+  exec /usr/bin/cacao -jar /opt/local/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS
+elif [ -e  ]
+then
+  exec $GIJ_EXECUTABLE -jar /opt/local/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS
+else
+  echo "no java vm found :("
+  exit -1
+fi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080131/c0865cc8/attachment.html


More information about the macports-changes mailing list