aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2006-08-03 00:22:06 +0000
committerMaho Nakata <maho@FreeBSD.org>2006-08-03 00:22:06 +0000
commit4def9726efa65aceeb1e0a7c4004ab099531fab4 (patch)
tree49e052e3e29184f85a965a93a427a61c2a38a956 /java
parent7b313cf2930ed63f7df1de44fd42fd6afea208c0 (diff)
downloadports-4def9726efa65aceeb1e0a7c4004ab099531fab4.tar.gz
ports-4def9726efa65aceeb1e0a7c4004ab099531fab4.zip
Notes
Diffstat (limited to 'java')
-rw-r--r--java/Makefile1
-rw-r--r--java/ecj-bootstrap/Makefile56
-rw-r--r--java/ecj-bootstrap/distinfo6
-rw-r--r--java/ecj-bootstrap/files/build.sh68
-rw-r--r--java/ecj-bootstrap/files/patch-encoding32
-rw-r--r--java/ecj-bootstrap/files/patch-gcjant22
-rw-r--r--java/ecj-bootstrap/pkg-descr5
-rw-r--r--java/ecj-bootstrap/pkg-plist4
8 files changed, 194 insertions, 0 deletions
diff --git a/java/Makefile b/java/Makefile
index 8cbf39f7fb75..36d610c21a32 100644
--- a/java/Makefile
+++ b/java/Makefile
@@ -16,6 +16,7 @@
SUBDIR += diablo-jdk15
SUBDIR += diablo-jre15
SUBDIR += drexelsnmp
+ SUBDIR += ecj-bootstrap
SUBDIR += eclipse
SUBDIR += eclipse-EPIC
SUBDIR += eclipse-cdt
diff --git a/java/ecj-bootstrap/Makefile b/java/ecj-bootstrap/Makefile
new file mode 100644
index 000000000000..98af3f974a34
--- /dev/null
+++ b/java/ecj-bootstrap/Makefile
@@ -0,0 +1,56 @@
+# New ports collection makefile for: ecj-bootstrap
+# Date created: August 2, 2006
+# Whom: NAKATA, Maho <maho@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ecj-bootstrap
+PORTVERSION= 3.2
+CATEGORIES= java devel
+MASTER_SITES= ${MASTER_SITE_ECLIPSE:S,%SUBDIR%/,R-${PORTVERSION}-200606291905/,} \
+ ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:antbin,}
+DISTFILES= eclipse-sourceBuild-srcIncluded-${PORTVERSION}.zip \
+ ${ANT_DISTFILE}:antbin
+DIST_SUBDIR= eclipse
+EXTRACT_ONLY= eclipse-sourceBuild-srcIncluded-${PORTVERSION}.zip
+
+MAINTAINER= maho@FreeBSD.org
+COMMENT= The JDT Core Batch Compiler
+
+USE_ZIP= yes
+
+BUILD_DEPENDS+= ${LOCALBASE}/libdata/ldconfig/gcc41-withgcjawt:${PORTSDIR}/lang/gcc41-withgcjawt
+RUN_DEPENDS+= ${LOCALBASE}/libdata/ldconfig/gcc41-withgcjawt:${PORTSDIR}/lang/gcc41-withgcjawt
+
+ANT_DISTFILE= apache-ant-${ANT_VERSION}-bin.tar.bz2
+ANT_VERSION= 1.6.5
+
+GCJ= gcj41
+GIJ= gij41
+JAR= fastjar41
+ANT= ${WRKDIR}/apache-ant-${ANT_VERSION}/bin/ant
+GCJDBTOOL= gcj-dbtool41
+WRKSRC= ${WRKDIR}
+
+MAKE_ENV+= WRKDIR="${WRKDIR}" GCJ="${GCJ}" JAR="${JAR}" GCJDBTOOL="${GCJDBTOOL}"\
+ ANT="${ANT}" JAVACMD="${WRKDIR}/gnugcj/bin/gij" PATH="${WRKDIR}/gnugcj/bin:${PATH}"
+
+post-extract:
+ @cd ${WRKDIR} ; ${CAT} ${DISTDIR}/${DIST_SUBDIR}/${ANT_DISTFILE} | ${BZIP2_CMD} -d | ${TAR} xf -
+
+pre-build:
+ @${MKDIR} ${WRKDIR}/gnugcj/bin
+ @${LN} -sf ${LOCALBASE}/bin/${GCJ} ${WRKDIR}/gnugcj/bin/gcj
+ @${LN} -sf ${LOCALBASE}/bin/${GIJ} ${WRKDIR}/gnugcj/bin/gij
+
+do-build:
+ @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} ${SH} -x ${FILESDIR}/build.sh
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/ecj-bootstrap-gcj ${PREFIX}/bin
+ ${LN} -fs ${PREFIX}/bin/ecj-bootstrap-gcj ${PREFIX}/bin/ecj
+ ${INSTALL_DATA} ${WRKDIR}/ecj.jar.so ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKDIR}/ecj.jar ${PREFIX}/share/java/
+# ${INSTALL_DATA} ${WRKDIR}/ecj.db ${PREFIX}/share/gcj-4.1/classmap.d
+.include <bsd.port.mk>
diff --git a/java/ecj-bootstrap/distinfo b/java/ecj-bootstrap/distinfo
new file mode 100644
index 000000000000..3ea6ac154eb2
--- /dev/null
+++ b/java/ecj-bootstrap/distinfo
@@ -0,0 +1,6 @@
+MD5 (eclipse/eclipse-sourceBuild-srcIncluded-3.2.zip) = 67b41802092d4b2f779fb756dcaec85c
+SHA256 (eclipse/eclipse-sourceBuild-srcIncluded-3.2.zip) = e9366fd3046be753f821be786156c472148928101cf6bf8f9d31b455cb6039da
+SIZE (eclipse/eclipse-sourceBuild-srcIncluded-3.2.zip) = 82018640
+MD5 (eclipse/apache-ant-1.6.5-bin.tar.bz2) = 26031ee1a2fd248ad0cc2e7f17c44c39
+SHA256 (eclipse/apache-ant-1.6.5-bin.tar.bz2) = d463b8259cb199cd26799c817756c73e4e7808b0cf915f86841ac9779e0f9936
+SIZE (eclipse/apache-ant-1.6.5-bin.tar.bz2) = 6743024
diff --git a/java/ecj-bootstrap/files/build.sh b/java/ecj-bootstrap/files/build.sh
new file mode 100644
index 000000000000..aa8b03563348
--- /dev/null
+++ b/java/ecj-bootstrap/files/build.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+# taken from eclipse.spec of
+# <fedora mirror>/fedora/core/5/source/SRPMS/eclipse-3.1.2-1jpp_13fc.src.rpm
+# for fedora mirror, please consult following site.
+# http://fedora.redhat.com/download/mirrors.html
+
+ # Bootstrapping is 3 parts:
+ # 1. Build ecj with gcj -C
+ # 2. Build ecj with gcj-built ecj ("javac")
+ # 3. Re-build ecj with output of 2.
+
+ # Unzip the "stable compiler" source into a temp dir and build it.
+ # Note: we don't want to build the CompilerAdapter.
+
+ mkdir ecj-bootstrap-tmp
+ unzip -qq -d ecj-bootstrap-tmp jdtcoresrc/src/ecj.zip
+ rm -f ecj-bootstrap-tmp/org/eclipse/jdt/core/JDTCompilerAdapter.java
+
+ # 1a. Build ecj with gcj -C
+ cd ecj-bootstrap-tmp
+ for f in `find . -name '*.java' | cut -c 3-`; do
+ ${GCJ} -Wno-deprecated -C $f
+ done
+ find . -name '*.class' -or -name '*.properties' -or -name '*.rsc' |\
+ xargs ${JAR} cf ../ecj-bootstrap.jar
+ cd ..
+
+ # Delete our modified ecj and restore the backup
+ rm -rf ecj-bootstrap-tmp
+
+ # 1b. Natively-compile it
+
+ ${GCJ} -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic -o ecj-bootstrap.jar.so ecj-bootstrap.jar
+
+ ${GCJDBTOOL} -n ecj-bootstrap.db 30000
+ ${GCJDBTOOL} -a ecj-bootstrap.db ecj-bootstrap.jar ecj-bootstrap.jar.so
+
+ # 2a. Build ecj
+ export CLASSPATH=ecj-bootstrap.jar:$ORIGCLASSPATH
+ export ANT_OPTS="-Dgnu.gcj.precompiled.db.path=`pwd`/ecj-bootstrap.db"
+ ${ANT} -Dbuild.compiler=gcj -buildfile jdtcoresrc/compilejdtcorewithjavac.xml
+
+ ${GCJ} -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
+ -o jdtcoresrc/ecj.jar.so jdtcoresrc/ecj.jar
+
+ ${GCJDBTOOL} -n jdtcoresrc/ecj.db 30000
+ ${GCJDBTOOL} -a jdtcoresrc/ecj.db jdtcoresrc/ecj.jar jdtcoresrc/ecj.jar.so
+
+ # Remove our gcj-built ecj
+ rm ecj-bootstrap.db ecj-bootstrap.jar ecj-bootstrap.jar.so
+
+ # To enSURE we're not using any pre-compiled ecj on the build system, set this
+ export ANT_OPTS="-Dgnu.gcj.precompiled.db.path=`pwd`/jdtcoresrc/ecj.db"
+
+ # 3. Use this ecj to rebuild itself
+ export CLASSPATH=`pwd`/jdtcoresrc/ecj.jar:$ORIGCLASSPATH
+ ${ANT} -Dbuild.compiler=gcj -buildfile jdtcoresrc/compilejdtcore.xml
+
+ # Natively-compile it
+ ${GCJ} -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
+ -o ecj.jar.so ecj.jar
+ ${GCJDBTOOL} -n ecj.db 30000
+ ${GCJDBTOOL} -a ecj.db ecj.jar ecj.jar.so
+ export ANT_OPTS="-Dgnu.gcj.precompiled.db.path=`pwd`/ecj.db"
+ rm jdtcoresrc/ecj.db jdtcoresrc/ecj.jar.so
+
+ # Creating native executable
+ ${GCJ} -O2 -g -Wl,-Bsymbolic -fPIC -fjni -findirect-dispatch --main=org.eclipse.jdt.internal.compiler.batch.Main -o ecj-bootstrap-gcj ecj.jar
diff --git a/java/ecj-bootstrap/files/patch-encoding b/java/ecj-bootstrap/files/patch-encoding
new file mode 100644
index 000000000000..f3a2d16eee91
--- /dev/null
+++ b/java/ecj-bootstrap/files/patch-encoding
@@ -0,0 +1,32 @@
+A workaround for running ant with gcj.
+
+--- jdtcoresrc/compilejdtcorewithjavac.xml~ Fri Jun 30 08:20:48 2006
++++ jdtcoresrc/compilejdtcorewithjavac.xml Wed Aug 2 23:09:35 2006
+@@ -15,7 +15,7 @@
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+
+- <property name="compilerArg" value="-encoding ISO-8859-1" />
++ <property name="compilerArg" value="-encoding=ISO-8859-1" />
+ <property name="javacSource" value="1.3" />
+ <property name="javacTarget" value="1.2" />
+ <property name="javacDebugInfo" value="on" />
+--- jdtcoresrc/compilejdtcore.xml~ Fri Jun 30 08:20:48 2006
++++ jdtcoresrc/compilejdtcore.xml Wed Aug 2 23:11:00 2006
+@@ -25,14 +25,14 @@
+ </condition>
+ </fail>
+
+- <condition property="compilerArg" value="-encoding ISO-8859-1">
++ <condition property="compilerArg" value="-encoding=ISO-8859-1">
+ <equals arg1="${build.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
+ </condition>
+
+ <echo message="compilerArg ${compilerArg}"/>
+ <echo message="build compiler ${build.compiler}"/>
+
+- <property name="compilerArg" value="-encoding ISO-8859-1" />
++ <property name="compilerArg" value="-encoding=ISO-8859-1" />
+ <property name="javacSource" value="1.3" />
+ <property name="javacTarget" value="1.2" />
+ <property name="javacDebugInfo" value="on" />
diff --git a/java/ecj-bootstrap/files/patch-gcjant b/java/ecj-bootstrap/files/patch-gcjant
new file mode 100644
index 000000000000..0581579cfcb6
--- /dev/null
+++ b/java/ecj-bootstrap/files/patch-gcjant
@@ -0,0 +1,22 @@
+a workaround for running ant with gcj. ant+gcj
+somehow doesn't find ecj.jar.
+
+--- jdtcoresrc/compilejdtcore.xml~ Thu Aug 3 00:17:48 2006
++++ jdtcoresrc/compilejdtcore.xml Thu Aug 3 00:19:33 2006
+@@ -14,16 +14,6 @@
+ <delete dir="${destdir}"/>
+ <mkdir dir="${destdir}"/>
+
+- <condition property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter">
+- <available file="ecj.jar" />
+- </condition>
+- <fail message="The Eclipse compiler (ecj.jar) cannot be found.">
+- <condition>
+- <not>
+- <equals arg1="${build.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
+- </not>
+- </condition>
+- </fail>
+
+ <condition property="compilerArg" value="-encoding=ISO-8859-1">
+ <equals arg1="${build.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
diff --git a/java/ecj-bootstrap/pkg-descr b/java/ecj-bootstrap/pkg-descr
new file mode 100644
index 000000000000..03bf1dfb22ac
--- /dev/null
+++ b/java/ecj-bootstrap/pkg-descr
@@ -0,0 +1,5 @@
+The JDT Core Batch Compiler (stand alone verison of the Eclipse
+Java Compiler).
+This compiler is compatible with Java 1.3, 1.4 and 1.5.
+
+WWW: http://www.eclipse.org/
diff --git a/java/ecj-bootstrap/pkg-plist b/java/ecj-bootstrap/pkg-plist
new file mode 100644
index 000000000000..af6143de7fbf
--- /dev/null
+++ b/java/ecj-bootstrap/pkg-plist
@@ -0,0 +1,4 @@
+bin/ecj-bootstrap-gcj
+bin/ecj
+lib/ecj.jar.so
+share/java/ecj.jar