aboutsummaryrefslogtreecommitdiff
path: root/java/classpath
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2012-10-04 16:13:00 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2012-10-04 16:13:00 +0000
commite2756cb8359659a62a4b5b44143af8d741b3fae2 (patch)
tree8db06bea383aeba6a65868bf99a46c3ba12cd8ec /java/classpath
parente65d0885c0b996d1f063468022f012492ea44f12 (diff)
downloadports-e2756cb8359659a62a4b5b44143af8d741b3fae2.tar.gz
ports-e2756cb8359659a62a4b5b44143af8d741b3fae2.zip
Notes
Diffstat (limited to 'java/classpath')
-rw-r--r--java/classpath/Makefile131
-rw-r--r--java/classpath/distinfo6
-rw-r--r--java/classpath/files/ecj.sh.in2
-rw-r--r--java/classpath/files/patch-lib__Makefile.in11
-rw-r--r--java/classpath/files/patch-tools__gnu__classpath__tools__jar__Updater.java27
-rw-r--r--java/classpath/pkg-plist6
6 files changed, 137 insertions, 46 deletions
diff --git a/java/classpath/Makefile b/java/classpath/Makefile
index eaadaac0c5ce..fc7785db45fe 100644
--- a/java/classpath/Makefile
+++ b/java/classpath/Makefile
@@ -1,49 +1,44 @@
-# ex:ts=8
-# Ports collection makefile for: classpath
-# Date created: Sep 1, 2004
-# Whom: ijliao
-#
+# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$
-#
PORTNAME= classpath
PORTVERSION= 0.99
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= ${MASTER_SITE_GNU} \
${MASTER_SITE_SAVANNAH}
-MASTER_SITE_SUBDIR= ${PORTNAME}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+MASTER_SITE_SUBDIR= ${PORTNAME:S|$|:src|}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= java@FreeBSD.org
COMMENT= A GNU project to create a free Java class library
LICENSE= GPLv2
-BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \
- ${JAVALIBDIR}/antlr.jar:${PORTSDIR}/devel/antlr
-
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_ICONV= yes
-USE_JAVA= yes
-JAVA_VERSION= 1.5+
USE_LDCONFIG= yes
USE_PERL5_BUILD=yes
USE_PKGCONFIG= build
USE_XORG= x11 ice xtst xaw xproto xext
WANT_GNOME= yes
-CXXFLAGS+= -I${LOCALBASE}/include
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
CONFIGURE_ARGS= --enable-jni --disable-alsa --disable-dssi --disable-plugin
-CONFIGURE_ARGS+=--with-antlr-jar=${JAVALIBDIR}/antlr.jar
CONFIGURE_ARGS+=--with-jar=${JAR}
+CONFIGURE_ENV= JAVA="${JAVA}" JAVAC="${JAVAC}"
+CONFIGURE_ENV+= JAVACFLAGS="${JAVACFLAGS}"
+MAKE_ENV+= JAVACFLAGS="${JAVACFLAGS}"
MAN1= gappletviewer.1 \
gcjh.1 \
gjar.1 \
gjarsigner.1 \
gjavah.1 \
- gjdoc.1 \
gkeytool.1 \
gnative2ascii.1 \
gorbd.1 \
@@ -54,27 +49,38 @@ MAN1= gappletviewer.1 \
INFO= cp-hacking cp-tools cp-vmintegration
-CONFLICTS= sablevm-classpath-*
+CONFLICTS= sablevm-classpath-1.13 sablevm-classpath-1.13_[1-9]
-OPTIONS_DEFINE= CAIRO ECJ GCONF GTK2 QT4
-OPTIONS_DEFAULT=GTK2
+OPTIONS_DEFINE= CAIRO ECJ GCONF GJDOC GMP GTK2 JDK QT4
+OPTIONS_DEFAULT=GMP GJDOC GTK2 JDK
CAIRO_DESC= Use Gtk+ Cairo based Graphics2D
-ECJ_DESC= Build with Eclipse Java Compiler
+ECJ_DESC= Embed ECJ as com.sun.tools.javac
+GJDOC_DESC= Build javadoc replacement
+GMP_DESC= Enable native java.math.BigInteger
GTK2_DESC= Enable Gtk+ AWT peer
+JDK_DESC= Build with native JDK
QT4_DESC= Enable Qt AWT peer
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MECJ}
-ECJ_VERSION= 4.2
-ECJ_DROPDATE= 201206081400
-ECJ_JAR= ecj-${ECJ_VERSION}.jar
-ECJ_SUBDIR= R-${ECJ_VERSION}-${ECJ_DROPDATE}
-MASTER_SITES+= http://download.eclipse.org/eclipse/downloads/drops4/${ECJ_SUBDIR}/:ecj
+.if ${PORT_OPTIONS:MECJ} || \
+ (!defined(WITH_GCJ) && empty(PORT_OPTIONS:MJDK))
+MASTER_SITES+= ${MASTER_SITE_ECLIPSE:S|$|:ecj|}
+MASTER_SITE_SUBDIR+= R-${ECJ_VERSION}-${ECJ_DROPDATE}/:ecj
DISTFILES+= ${ECJ_JAR}:ecj
-CONFIGURE_ARGS+= --with-ecj-jar="${DISTDIR}/${ECJ_JAR}"
-CONFIGURE_ENV+= PATH="${WRKDIR}:${PATH}"
-MAKE_ENV+= PATH="${WRKDIR}:${PATH}"
+ECJ_VERSION= 3.8
+ECJ_DROPDATE= 201206081200
+ECJ_JAR= ecj-${ECJ_VERSION}.jar
+.endif
+
+.if ${PORT_OPTIONS:MECJ}
+CONFIGURE_ARGS+= --with-ecj-jar=${DISTDIR}/${ECJ_JAR}
+.endif
+
+.if ${PORT_OPTIONS:MEXAMPLES}
+EXAMPLESDIR= ${DATADIR}/examples
+.else
+CONFIGURE_ARGS+= --disable-examples
.endif
.if ${PORT_OPTIONS:MGCONF}
@@ -82,10 +88,32 @@ USE_GNOME+= gconf2
CONFIGURE_ARGS+= --enable-default-preferences-peer=gconf
PLIST_SUB+= GCONF=""
.else
-CONFIGURE_ARGS+= --enable-default-preferences-peer=file --disable-gconf-peer
+CONFIGURE_ARGS+= --enable-default-preferences-peer=file \
+ --disable-gconf-peer
PLIST_SUB+= GCONF="@comment "
.endif
+.if ${PORT_OPTIONS:MGJDOC}
+ANTLR_JAR= antlr-2.7.7.jar
+MASTER_SITES+= http://www.antlr2.org/download/:antlr
+DISTFILES+= ${ANTLR_JAR}:antlr
+MAN1+= gjdoc.1
+CONFIGURE_ARGS+= --with-antlr-jar=${DISTDIR}/${ANTLR_JAR}
+PLIST_SUB+= GJDOC=""
+.else
+CONFIGURE_ARGS+= --disable-gjdoc
+PLIST_SUB+= GJDOC="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MGMP}
+LIB_DEPENDS+= gmp:${PORTSDIR}/math/gmp
+CONFIGURE_ARGS+= --with-gmp=${LOCALBASE}
+PLIST_SUB+= GMP=""
+.else
+CONFIGURE_ARGS+= --disable-gmp
+PLIST_SUB+= GMP="@comment "
+.endif
+
.if ${PORT_OPTIONS:MGTK2}
USE_GNOME+= gtk20
PLIST_SUB+= GTK2=""
@@ -100,6 +128,26 @@ IGNORE=you need to enable the Gtk+ AWT peer in order to use Cairo based Graphics
.endif
.endif
+.if ${PORT_OPTIONS:MJDK}
+USE_JAVA= yes
+JAVA_BUILD= jdk
+JAVA_VERSION= 1.5+
+.else
+.if defined(WITH_GCC)
+GCC_SUFX= ${WITH_GCC:S/.//}
+.endif
+GCC_SUFX?= 46
+BUILD_DEPENDS+= gcj${GCC_SUFX}:${PORTSDIR}/lang/gcc${GCC_SUFX}
+JAR= ${LOCALBASE}/bin/gjar${GCC_SUFX}
+JAVA= ${LOCALBASE}/bin/gij${GCC_SUFX}
+.if defined(WITH_GCJ)
+JAVAC= ${LOCALBASE}/bin/gcj${GCC_SUFX}
+JAVACFLAGS?= -C
+.else
+JAVAC= ${WRKDIR}/ecj.sh
+.endif
+.endif
+
.if ${PORT_OPTIONS:MQT4}
CONFIGURE_ARGS+= --enable-qt-peer
.if empty(PORT_OPTIONS:MGTK2)
@@ -112,17 +160,20 @@ PLIST_SUB+= QT4=""
PLIST_SUB+= QT4="@comment "
.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
-EXAMPLESDIR= ${DATADIR}/examples
-.else
-CONFIGURE_ARGS+= --disable-examples
-.endif
-
-.if ${PORT_OPTIONS:MECJ}
post-patch:
- @${SED} -e 's|%%ECJ_JAR%%|${DISTDIR}/${ECJ_JAR}|' \
- -e 's|%%JAVA%%|${JAVA}|' < ${FILESDIR}/ecj.sh.in > ${WRKDIR}/ecj
- @${CHMOD} 755 ${WRKDIR}/ecj
+ @${REINPLACE_CMD} -i.bak -e 's|@JAVA@|$${JAVACMD:-${java}}|g' \
+ ${WRKSRC}/tools/g*.in
+
+.if !defined(WITH_GCJ) && empty(PORT_OPTIONS:MJDK)
+pre-configure:
+ @if [ ! -x ${JAVAC} ]; then \
+ ${PRINTF} "%s\n%s\n%s\n%s\n" \
+ '#!/bin/sh' \
+ '"${JAVA}" -classpath "${DISTDIR}/${ECJ_JAR}" \' \
+ ' org.eclipse.jdt.internal.compiler.batch.Main \' \
+ ' "$${@:--help}"' > ${JAVAC}; \
+ ${CHMOD} 755 ${JAVAC}; \
+ fi
.endif
.include <bsd.port.mk>
diff --git a/java/classpath/distinfo b/java/classpath/distinfo
index 504dea3a7f50..1bd681144326 100644
--- a/java/classpath/distinfo
+++ b/java/classpath/distinfo
@@ -1,4 +1,6 @@
SHA256 (classpath-0.99.tar.gz) = f929297f8ae9b613a1a167e231566861893260651d913ad9b6c11933895fecc8
SIZE (classpath-0.99.tar.gz) = 11078232
-SHA256 (ecj-4.2.jar) = 9694970ac1f8a4a2774b7f64f6be535dc46e25dbecb71d36007b8af2bdce1001
-SIZE (ecj-4.2.jar) = 1796149
+SHA256 (ecj-3.8.jar) = 3ff091d668cb40a4eebb562f60d25e2b81d3f1140a26e94b8f427e6417875e27
+SIZE (ecj-3.8.jar) = 1796148
+SHA256 (antlr-2.7.7.jar) = 88fbda4b912596b9f56e8e12e580cc954bacfb51776ecfddd3e18fc1cf56dc4c
+SIZE (antlr-2.7.7.jar) = 445288
diff --git a/java/classpath/files/ecj.sh.in b/java/classpath/files/ecj.sh.in
deleted file mode 100644
index c2562fbcc4fd..000000000000
--- a/java/classpath/files/ecj.sh.in
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-"%%JAVA%%" -classpath "%%ECJ_JAR%%" org.eclipse.jdt.internal.compiler.batch.Main "${@:--help}"
diff --git a/java/classpath/files/patch-lib__Makefile.in b/java/classpath/files/patch-lib__Makefile.in
new file mode 100644
index 000000000000..49fb4086548d
--- /dev/null
+++ b/java/classpath/files/patch-lib__Makefile.in
@@ -0,0 +1,11 @@
+--- lib/Makefile.in.orig 2012-03-08 18:54:14.000000000 -0500
++++ lib/Makefile.in 2012-10-03 18:17:34.000000000 -0400
+@@ -316,7 +316,7 @@
+ @INSTALL_GLIBJ_ZIP_TRUE@glibj_DATA = glibj.zip $(COLLECTIONS)
+ @BUILD_CLASS_FILES_TRUE@noinst_DATA = genclasses compile-classes resources
+ @USE_PREBUILT_GLIBJ_ZIP_FALSE@@WITH_JAR_FALSE@CREATE_GLIBJ_ZIP = $(ZIP) -r -D glibj.zip gnu java javax org sun META-INF > /dev/null
+-@USE_PREBUILT_GLIBJ_ZIP_FALSE@@WITH_JAR_TRUE@CREATE_GLIBJ_ZIP = $(JAR) cf glibj.zip gnu java javax org sun META-INF && $(JAR) i glibj.zip
++@USE_PREBUILT_GLIBJ_ZIP_FALSE@@WITH_JAR_TRUE@CREATE_GLIBJ_ZIP = $(JAR) cf glibj.zip gnu java javax org sun META-INF && $(JAR) i $(builddir)/glibj.zip
+ #endif
+ EXTRA_DIST = standard.omit.in mkcollections.pl.in Makefile.gcj split-for-gcj.sh glibj.zip
+ CLEANFILES = compile-classes resources classes \
diff --git a/java/classpath/files/patch-tools__gnu__classpath__tools__jar__Updater.java b/java/classpath/files/patch-tools__gnu__classpath__tools__jar__Updater.java
new file mode 100644
index 000000000000..9185d8bae3cc
--- /dev/null
+++ b/java/classpath/files/patch-tools__gnu__classpath__tools__jar__Updater.java
@@ -0,0 +1,27 @@
+--- tools/gnu/classpath/tools/jar/Updater.java.orig 2010-06-03 15:14:36.000000000 -0400
++++ tools/gnu/classpath/tools/jar/Updater.java 2012-09-20 16:26:23.000000000 -0400
+@@ -70,9 +70,13 @@
+ // Set this early so that createManifest can use it.
+ inputJar = new JarFile(parameters.archiveFile);
+
++ // Find the current directory.
++ File tmpDir = parameters.archiveFile.getParentFile();
++ if (tmpDir == null)
++ tmpDir = new File(".");
++
+ // Write all the new entries to a temporary file.
+- File tmpFile = File.createTempFile("jarcopy", null,
+- parameters.archiveFile.getParentFile());
++ File tmpFile = File.createTempFile("jarcopy", null, tmpDir);
+ OutputStream os = new BufferedOutputStream(new FileOutputStream(tmpFile));
+ writeCommandLineEntries(parameters, os);
+
+@@ -91,7 +95,7 @@
+ if (!tmpFile.renameTo(parameters.archiveFile))
+ {
+ throw new IOException("Couldn't rename new JAR file " + tmpFile +
+- "to " + parameters.archiveFile);
++ " to " + parameters.archiveFile);
+ }
+ }
+
diff --git a/java/classpath/pkg-plist b/java/classpath/pkg-plist
index eaa8832a0052..a2a5a29db820 100644
--- a/java/classpath/pkg-plist
+++ b/java/classpath/pkg-plist
@@ -2,7 +2,7 @@ bin/gappletviewer
bin/gjavah
bin/gjar
bin/gjarsigner
-bin/gjdoc
+%%GJDOC%%bin/gjdoc
bin/gkeytool
bin/gnative2ascii
bin/gorbd
@@ -40,6 +40,8 @@ lib/classpath/libjavanio.so.0
lib/classpath/libjavautil.la
lib/classpath/libjavautil.so
lib/classpath/libjavautil.so.0
+%%GMP%%lib/classpath/libjavamath.la
+%%GMP%%lib/classpath/libjavamath.so
%%GTK2%%lib/classpath/libjawt.so
%%GTK2%%lib/classpath/libjawt.la
%%QT4%%lib/classpath/libqtpeer.so
@@ -47,7 +49,7 @@ lib/classpath/libjavautil.so.0
lib/logging.properties
lib/security/classpath.security
@dirrm lib/classpath
-@dirrm lib/security
+@dirrmtry lib/security
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.java2d
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.jawt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README