aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/cacao/Makefile41
-rw-r--r--java/cacao/distinfo4
-rw-r--r--java/cacao/files/patch-boehm-gc-configure10
-rw-r--r--java/cacao/files/patch-boehm-gc-dbg_ml.c56
-rw-r--r--java/cacao/files/patch-boehm-gc-dyn_load.c15
-rw-r--r--java/cacao/files/patch-boehm-gc-include-private-gcconfig.h74
-rw-r--r--java/cacao/files/patch-boehm-gc-os_dep.c29
-rw-r--r--java/cacao/files/patch-configure30
-rw-r--r--java/cacao/files/patch-src-native-jni.h16
-rw-r--r--java/cacao/pkg-plist6
-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
-rw-r--r--java/openjdk7/Makefile1
-rw-r--r--java/sablevm-classpath/Makefile75
-rw-r--r--java/sablevm-classpath/files/patch-include-Makefile.in55
-rw-r--r--java/sablevm-classpath/files/patch-resource-Makefile.in11
-rw-r--r--java/sablevm-classpath/pkg-plist15
-rw-r--r--java/sablevm/Makefile42
-rw-r--r--java/sablevm/pkg-plist14
23 files changed, 375 insertions, 302 deletions
diff --git a/java/cacao/Makefile b/java/cacao/Makefile
index 2d2f7bd301ad..5369c02b4cda 100644
--- a/java/cacao/Makefile
+++ b/java/cacao/Makefile
@@ -1,40 +1,39 @@
-# New ports collection makefile for: cacao
-# Date created: 2005-04-28
-# Whom: arved
-#
+# Created by: Tilman Keskinoz <arved@FreeBSD.org>
# $FreeBSD$
PORTNAME= cacao
-PORTVERSION= 0.98
-PORTREVISION= 7
+PORTVERSION= 1.6.0
CATEGORIES= java devel
MASTER_SITES= http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PORTVERSION}/
-MAINTAINER= bkoenig@alpha-tierchen.de
+MAINTAINER= java@FreeBSD.org
COMMENT= JIT compiler for JAVA
+LICENSE= GPLv2
+
BUILD_DEPENDS= ${LOCALBASE}/share/classpath/glibj.zip:${PORTSDIR}/java/classpath
-USE_BZIP2= yes
+GNU_CONFIGURE= yes
USE_AUTOTOOLS= libltdl
+USE_GMAKE= yes
USE_JAVA= yes
JAVA_VERSION= 1.5+
-GNU_CONFIGURE= yes
-MAN1= cacao.1
-CONFIGURE_ARGS+= --with-classpath-prefix=${LOCALBASE}
-LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS+= -I${LOCALBASE}/include
+USE_XZ= yes
-.include <bsd.port.pre.mk>
+MAN1= cacao.1
-.if ${ARCH} == amd64
-IGNORE= unsupported architecture
-.endif
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
-post-patch:
- ${REINPLACE_CMD} -e "s, man,," ${WRKSRC}/Makefile.in
+CONFIGURE_ARGS+= --enable-jre-layout
+CONFIGURE_ARGS+= --with-java-runtime-library-prefix=${LOCALBASE}
+CONFIGURE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}"
-post-install:
+do-install:
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/cacao/cacao ${PREFIX}/bin
+ ${INSTALL_LIB} ${WRKSRC}/src/cacao/.libs/libjvm.so ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/src/classes/vm.zip ${DATADIR}
${INSTALL_MAN} ${WRKSRC}/man/cacao.1 ${MANPREFIX}/man/man1
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/java/cacao/distinfo b/java/cacao/distinfo
index 9cb95d1a26ed..c3430b1c32d1 100644
--- a/java/cacao/distinfo
+++ b/java/cacao/distinfo
@@ -1,2 +1,2 @@
-SHA256 (cacao-0.98.tar.bz2) = cb9363add825cedf77764fc49a223aaf43f0a9f485b711ba8c92f16b13fff188
-SIZE (cacao-0.98.tar.bz2) = 2393690
+SHA256 (cacao-1.6.0.tar.xz) = e654e5f158b8fdc0b1282efacc370f6e65ee6c0336945506e86fd7e705d98626
+SIZE (cacao-1.6.0.tar.xz) = 2394588
diff --git a/java/cacao/files/patch-boehm-gc-configure b/java/cacao/files/patch-boehm-gc-configure
new file mode 100644
index 000000000000..b7b7a162b5ff
--- /dev/null
+++ b/java/cacao/files/patch-boehm-gc-configure
@@ -0,0 +1,10 @@
+--- src/mm/boehm-gc/configure.orig 2012-09-03 12:10:04.000000000 -0400
++++ src/mm/boehm-gc/configure 2012-09-19 14:42:52.000000000 -0400
+@@ -5063,6 +5063,7 @@
+ $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
+
+ INCLUDES="$INCLUDES -pthread"
++ THREADDLLIBS=$PTHREAD_LIBS
+ ;;
+ *-*-kfreebsd*-gnu)
+ $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
diff --git a/java/cacao/files/patch-boehm-gc-dbg_ml.c b/java/cacao/files/patch-boehm-gc-dbg_ml.c
index 6af1b9490cbe..216ff347a3e2 100644
--- a/java/cacao/files/patch-boehm-gc-dbg_ml.c
+++ b/java/cacao/files/patch-boehm-gc-dbg_ml.c
@@ -1,6 +1,6 @@
---- src/boehm-gc/dbg_mlc.c.orig Tue May 13 16:59:49 2003
-+++ src/mm/boehm-gc/dbg_mlc.c Wed May 12 20:13:19 2004
-@@ -414,6 +414,23 @@
+--- src/mm/boehm-gc/dbg_mlc.c.orig 2012-09-03 12:10:00.000000000 -0400
++++ src/mm/boehm-gc/dbg_mlc.c 2012-09-19 13:02:15.000000000 -0400
+@@ -466,10 +466,34 @@
GC_register_displacement((word)sizeof(oh) + offset);
}
@@ -13,46 +13,43 @@
+{
+ Dl_info caller;
+ if (dladdr((const void *)ad, &caller) && caller.dli_sname != NULL) {
-+ *symp = caller.dli_sname;
-+ *offp = (const char *)ad - (const char *)caller.dli_saddr;
++ *symp = caller.dli_sname;
++ *offp = (const char *)ad - (const char *)caller.dli_saddr;
+ }
+}
+#else
+#define GC_caller_func(ad, symp, offp)
+#endif
+
- # ifdef __STDC__
- GC_PTR GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
- # else
-@@ -428,6 +445,13 @@
+ GC_API void * GC_CALL GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
{
- GC_PTR result = GC_malloc(lb + DEBUG_BYTES);
-
+ void * result = GC_malloc(lb + DEBUG_BYTES);
+
+#ifdef GC_ADD_CALLER
+ if (s == NULL) {
-+ GC_caller_func_offset(ra, &s, &i);
-+ if (s == NULL)
-+ s = "unknown";
++ GC_caller_func_offset(ra, &s, &i);
++ if (s == NULL)
++ s = "unknown";
+ }
+#endif
if (result == 0) {
- GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
- (unsigned long) lb);
-@@ -789,6 +813,13 @@
- register size_t old_sz;
- register hdr * hhdr;
-
+ GC_err_printf("GC_debug_malloc(%lu) returning NIL (",
+ (unsigned long) lb);
+@@ -792,6 +816,13 @@
+ size_t old_sz;
+ hdr * hhdr;
+
+#ifdef GC_ADD_CALLER
+ if (s == NULL) {
-+ GC_caller_func_offset(ra, &s, &i);
-+ if (s == NULL)
-+ s = "unknown";
++ GC_caller_func_offset(ra, &s, &i);
++ if (s == NULL)
++ s = "unknown";
+ }
+#endif
if (p == 0) return(GC_debug_malloc(lb, OPT_RA s, i));
+ base = GC_base(p);
if (base == 0) {
- GC_err_printf1(
-@@ -1094,7 +1125,11 @@
+@@ -1098,17 +1129,21 @@
}
#ifdef GC_ADD_CALLER
@@ -65,17 +62,14 @@
#else
# define RA
#endif
-@@ -1102,12 +1137,12 @@
- GC_PTR GC_debug_malloc_replacement(lb)
- size_t lb;
+
+ GC_API void * GC_CALL GC_debug_malloc_replacement(size_t lb)
{
- return GC_debug_malloc(lb, RA "unknown", 0);
+ return GC_debug_malloc(lb, RA NULL, 0);
}
- GC_PTR GC_debug_realloc_replacement(p, lb)
- GC_PTR p;
- size_t lb;
+ GC_API void * GC_CALL GC_debug_realloc_replacement(void *p, size_t lb)
{
- return GC_debug_realloc(p, lb, RA "unknown", 0);
+ return GC_debug_realloc(p, lb, RA NULL, 0);
diff --git a/java/cacao/files/patch-boehm-gc-dyn_load.c b/java/cacao/files/patch-boehm-gc-dyn_load.c
deleted file mode 100644
index f9d834e8f59e..000000000000
--- a/java/cacao/files/patch-boehm-gc-dyn_load.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/boehm-gc/dyn_load.c.orig Thu May 6 08:03:06 2004
-+++ src/mm/boehm-gc/dyn_load.c Sun Oct 31 01:53:01 2004
-@@ -97,6 +97,12 @@
- # else
- # define ElfW(type) Elf64_##type
- # endif
-+# elif defined(__FreeBSD__)
-+# if __ELF_WORD_SIZE == 32
-+# define ElfW(type) Elf32_##type
-+# else
-+# define ElfW(type) Elf64_##type
-+# endif
- # else
- # if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
- # define ElfW(type) Elf32_##type
diff --git a/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h b/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h
index 5c70445450c8..5f7dc735c541 100644
--- a/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h
+++ b/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h
@@ -1,31 +1,21 @@
---- src/boehm-gc/include/private/gcconfig.h.rorig Sat Oct 15 16:40:25 2005
-+++ src/mm/boehm-gc/include/private/gcconfig.h Sat Oct 15 16:42:43 2005
-@@ -62,7 +62,7 @@
+--- src/mm/boehm-gc/include/private/gcconfig.h.orig 2012-09-03 12:10:00.000000000 -0400
++++ src/mm/boehm-gc/include/private/gcconfig.h 2012-09-19 13:39:49.000000000 -0400
+@@ -69,8 +69,9 @@
/* Determine the machine type: */
# if defined(__arm__) || defined(__thumb__)
# define ARM32
--# if !defined(LINUX) && !defined(NETBSD)
-+# if !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD)
+-# if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) \
+- && !defined(DARWIN) && !defined(_WIN32) && !defined(__CEGCC__)
++# if !defined(LINUX) && !defined(FREEBSD) && !defined(NETBSD) \
++ && !defined(OPENBSD) && !defined(DARWIN) && !defined(_WIN32) \
++ && !defined(__CEGCC__)
# define NOSYS
# define mach_type_known
# endif
-@@ -334,10 +334,22 @@
- # define X86_64
- # define mach_type_known
- # endif
-+# if defined(__FreeBSD__) && defined(__amd64__)
-+# define X86_64
-+# define mach_type_known
-+# endif
- # if defined(FREEBSD) && defined(__sparc__)
+@@ -366,6 +367,10 @@
# define SPARC
# define mach_type_known
--#endif
-+# endif
-+# if defined(FREEBSD) && defined(__powerpc__)
-+# define POWERPC
-+# define mach_type_known
-+# endif
+ # endif
+# if defined(FREEBSD) && defined(__arm__)
+# define ARM32
+# define mach_type_known
@@ -33,8 +23,8 @@
# if defined(bsdi) && (defined(i386) || defined(__i386__))
# define I386
# define BSDI
-@@ -845,6 +857,16 @@
- # define DATASTART GC_data_start
+@@ -1898,6 +1903,16 @@
+ # define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
+# ifdef FREEBSD
@@ -48,41 +38,5 @@
+# define SEARCH_FOR_DATA_START
+# endif
# ifdef NOSYS
- # define ALIGNMENT 4
- # define OS_TYPE "NOSYS"
-@@ -1807,6 +1829,17 @@
- # endif
- # define USE_GENERIC_PUSH_REGS
- # endif
-+# ifdef FREEBSD
-+# define ALIGNMENT 4
-+# define OS_TYPE "FREEBSD"
-+# ifdef __ELF__
-+# define DYNAMIC_LOADING
-+# endif
-+# define HEURISTIC2
-+ extern char etext[];
-+# define SEARCH_FOR_DATA_START
-+# endif
-+
- # ifdef LINUX
- # define OS_TYPE "LINUX"
- # define LINUX_STACKBOTTOM
-@@ -1957,6 +1990,17 @@
- # ifdef __ELF__
- # define DYNAMIC_LOADING
- # endif
-+# define HEURISTIC2
-+ extern char etext[];
-+# define SEARCH_FOR_DATA_START
-+# endif
-+# ifdef FREEBSD
-+# define OS_TYPE "FREEBSD"
-+# define SIG_SUSPEND SIGUSR1
-+# define SIG_THR_RESTART SIGUSR2
-+# ifdef __ELF__
-+# define DYNAMIC_LOADING
-+# endif
- # define HEURISTIC2
- extern char etext[];
- # define SEARCH_FOR_DATA_START
+ /* __data_start is usually defined in the target linker script. */
+ extern int __data_start[];
diff --git a/java/cacao/files/patch-boehm-gc-os_dep.c b/java/cacao/files/patch-boehm-gc-os_dep.c
deleted file mode 100644
index 657ac9500dd5..000000000000
--- a/java/cacao/files/patch-boehm-gc-os_dep.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/boehm-gc/os_dep.c.orig Thu May 19 20:48:49 2005
-+++ src/mm/boehm-gc/os_dep.c Fri Jun 17 21:28:07 2005
-@@ -699,7 +699,7 @@
- || defined(HURD) || defined(NETBSD)
- static struct sigaction old_segv_act;
- # if defined(IRIX5) || defined(HPUX) \
-- || defined(HURD) || defined(NETBSD)
-+ || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
- static struct sigaction old_bus_act;
- # endif
- # else
-@@ -714,7 +714,7 @@
- # endif
- {
- # if defined(SUNOS5SIGS) || defined(IRIX5) \
-- || defined(OSF1) || defined(HURD) || defined(NETBSD)
-+ || defined(OSF1) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
- struct sigaction act;
-
- act.sa_handler = h;
-@@ -736,7 +736,7 @@
- # else
- (void) sigaction(SIGSEGV, &act, &old_segv_act);
- # if defined(IRIX5) \
-- || defined(HPUX) || defined(HURD) || defined(NETBSD)
-+ || defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
- /* Under Irix 5.x or HP/UX, we may get SIGBUS. */
- /* Pthreads doesn't exist under Irix 5.x, so we */
- /* don't have to worry in the threads case. */
diff --git a/java/cacao/files/patch-configure b/java/cacao/files/patch-configure
index 813d8e010b3c..266529eeb03c 100644
--- a/java/cacao/files/patch-configure
+++ b/java/cacao/files/patch-configure
@@ -1,11 +1,29 @@
---- configure.orig Sun Feb 4 14:38:16 2007
-+++ configure Sun Feb 4 15:30:30 2007
-@@ -2662,7 +2661,7 @@
- ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
+--- configure.orig 2012-09-03 12:10:16.000000000 -0400
++++ configure 2012-09-19 19:08:48.000000000 -0400
+@@ -3626,7 +3626,7 @@
+ JAVA_ARCH="sparc"
;;
-x86_64 )
+x86_64 | amd64 )
ARCH_DIR="x86_64"
- ARCH_CFLAGS="-D__X86_64__"
- ;;
+ ARCH_FLAGS="-m64 -D__X86_64__"
+ JAVA_ARCH="amd64"
+@@ -9731,7 +9731,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpthread $LIBS"
++LIBS="$PTHREAD_LIBS $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -9760,7 +9760,7 @@
+ #define HAVE_LIBPTHREAD 1
+ _ACEOF
+
+- LIBS="-lpthread $LIBS"
++ LIBS="$PTHREAD_LIBS $LIBS"
+
+ fi
+
diff --git a/java/cacao/files/patch-src-native-jni.h b/java/cacao/files/patch-src-native-jni.h
deleted file mode 100644
index 048fa5709b0c..000000000000
--- a/java/cacao/files/patch-src-native-jni.h
+++ /dev/null
@@ -1,16 +0,0 @@
---- src/native/jni.h.orig 2007-04-02 13:23:24.000000000 +0200
-+++ src/native/jni.h 2009-01-15 20:32:31.000000000 +0100
-@@ -45,10 +45,12 @@
-
- #include CLASSPATH_JNI_H
-
--
- #ifndef _JNI_H
- #define _JNI_H
-
-+#define JNINativeInterface JNINativeInterface_
-+#define JNIInvokeInterface JNIInvokeInterface_
-+
- /* forward typedefs ***********************************************************/
-
- typedef struct localref_table localref_table;
diff --git a/java/cacao/pkg-plist b/java/cacao/pkg-plist
index 01a3b1a51278..885e80e1cb75 100644
--- a/java/cacao/pkg-plist
+++ b/java/cacao/pkg-plist
@@ -1,6 +1,4 @@
bin/cacao
-lib/libjvm.la
lib/libjvm.so
-lib/libjvm-0.98.so
-share/cacao/vm.zip
-@dirrm share/cacao
+%%DATADIR%%/vm.zip
+@dirrm %%DATADIR%%
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
diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile
index 8c896a251354..ecdb85ee13dd 100644
--- a/java/openjdk7/Makefile
+++ b/java/openjdk7/Makefile
@@ -83,6 +83,7 @@ MAKE_ENV+= LANG="C" \
ALT_PKG_PATH="${LOCALBASE}" \
ALT_PACKAGE_PATH="${LOCALBASE}" \
ANT_HOME="${WRKDIR}/apache-ant-${ANT_VERSION}" \
+ JAVACMD="${BOOTSTRAPJDKDIR}/bin/java" \
X11DIR="${LOCALBASE}" \
LOCALDIR="${LOCALBASE}" \
NO_DOCS="true" \
diff --git a/java/sablevm-classpath/Makefile b/java/sablevm-classpath/Makefile
index 91f8771db4dd..2f52b360327e 100644
--- a/java/sablevm-classpath/Makefile
+++ b/java/sablevm-classpath/Makefile
@@ -1,61 +1,64 @@
-# ex:ts=8
-# New ports collection makefile for: sablevm
-# Date created: 26 Nov 2007
-# Whom: Björn König <bkoenig@alpha-tierchen.de>
-#
+# Created by: Björn König <bkoenig@alpha-tierchen.de>
# $FreeBSD$
-#
PORTNAME= sablevm-classpath
PORTVERSION= 1.13
-PORTREVISION= 9
-CATEGORIES= java
+PORTREVISION= 10
+CATEGORIES= java devel
MASTER_SITES= SF/sablevm/sablevm/${PORTVERSION}
-MAINTAINER= bkoenig@alpha-tierchen.de
+MAINTAINER= java@FreeBSD.org
COMMENT= Classpath of SableVM
-BUILD_DEPENDS= jikes:${PORTSDIR}/java/jikes
-
-OPTIONS= ZIP "Compress class library" ON \
- GTK2 "Enable Gtk+ AWT peer" ON \
- CAIRO "Use Cairo based Graphics2D" OFF
+LICENSE= GPLv2
-CONFLICTS= classpath-[0-9]*
+BUILD_DEPENDS= jikes:${PORTSDIR}/java/jikes
-USE_XORG= x11 ice xtst sm
GNU_CONFIGURE= yes
-USE_GNOME= # empty
USE_GMAKE= yes
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}
+USE_XORG= x11 ice xtst sm
+WANT_GNOME= yes
PLIST_SUB+= PORTVERSION=${PORTVERSION}
-CFLAGS+= -I${PREFIX}/include -L${PREFIX}/lib -I${LOCALBASE}/include -L${LOCALBASE}/lib
-.include <bsd.port.pre.mk>
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ARGS+=--disable-alsa --disable-dssi
-.if defined(WITHOUT_ZIP)
-CONFIGURE_ARGS+= --with-compressed-classes=no
-PLIST_SUB+= WITHOUT_ZIP="" WITH_ZIP="@comment "
-.else
-CONFIGURE_ARGS+= --with-compressed-classes=zip
-BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip
-PLIST_SUB+= WITHOUT_ZIP="@comment " WITH_ZIP=""
-.endif
+OPTIONS_DEFINE= CAIRO GTK2 ZIP
+OPTIONS_DEFAULT=GTK2 ZIP
+CAIRO_DESC= Use Cairo based Graphics2D
+GTK2_DESC= Enable Gtk+ AWT peer
+ZIP_DESC= Compress class library
-.if defined(WITHOUT_GTK2)
-CONFIGURE_ARGS+= --disable-gtk-peer
-PLIST_SUB+= GTK2="@comment "
-.else
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MGTK2}
USE_GNOME+= gtk20
PLIST_SUB+= GTK2=""
-.if defined(WITH_CAIRO)
+.if ${PORT_OPTIONS:MCAIRO}
CONFIGURE_ARGS+= --enable-gtk-cairo
.endif
+.else
+CONFIGURE_ARGS+= --disable-gtk-peer
+PLIST_SUB+= GTK2="@comment "
+.if ${PORT_OPTIONS:MCAIRO}
+IGNORE=you need to enable the Gtk+ AWT peer in order to use Cairo based Graphics2D.
+.endif
+.endif
+
+.if ${PORT_OPTIONS:MZIP}
+CONFIGURE_ARGS+= --with-compressed-classes=zip
+BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip
+PLIST_SUB+= WITHOUT_ZIP="@comment " WITH_ZIP=""
+.else
+CONFIGURE_ARGS+= --with-compressed-classes=no
+PLIST_SUB+= WITHOUT_ZIP="" WITH_ZIP="@comment "
.endif
-post-extract:
- @${REINPLACE_CMD} -e 's,^\(include_HEADERS = \)jni.h jni_md.h \(.*\),\1\2,' \
- ${WRKSRC}/include/Makefile.in
+post-patch:
+ @${CP} -f ${WRKSRC}/resource/java/security/classpath.security \
+ ${WRKSRC}/resource/java/security/SableVM.security
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/java/sablevm-classpath/files/patch-include-Makefile.in b/java/sablevm-classpath/files/patch-include-Makefile.in
new file mode 100644
index 000000000000..154d0b3be8a4
--- /dev/null
+++ b/java/sablevm-classpath/files/patch-include-Makefile.in
@@ -0,0 +1,55 @@
+--- include/Makefile.in.orig 2007-03-30 02:30:43.000000000 -0400
++++ include/Makefile.in 2012-09-28 12:17:30.000000000 -0400
+@@ -59,7 +59,7 @@
+ *) f=$$p;; \
+ esac;
+ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+-am__installdirs = "$(DESTDIR)$(includedir)"
++am__installdirs = "$(DESTDIR)$(pkgincludedir)"
+ includeHEADERS_INSTALL = $(INSTALL_HEADER)
+ HEADERS = $(include_HEADERS)
+ ETAGS = etags
+@@ -271,7 +271,7 @@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+ vm_classes = @vm_classes@
+-include_HEADERS = jni.h jni_md.h jawt.h jawt_md.h
++include_HEADERS = jawt.h jawt_md.h
+ DISTCLEANFILES = jni_md.h
+ ARG_JNI_JAVAH = -jni
+ ARG_CLASSPATH_JAVAH = -bootclasspath
+@@ -470,20 +470,20 @@
+ uninstall-info-am:
+ install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+- test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
++ test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+- echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+- $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
++ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
++ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
+ done
+
+ uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+- echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+- rm -f "$(DESTDIR)$(includedir)/$$f"; \
++ echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
++ rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
+ done
+
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+@@ -566,7 +566,7 @@
+ @CREATE_JNI_HEADERS_FALSE@all-local:
+ all-am: Makefile $(HEADERS) config.h all-local
+ installdirs:
+- for dir in "$(DESTDIR)$(includedir)"; do \
++ for dir in "$(DESTDIR)$(pkgincludedir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+ install: install-am
diff --git a/java/sablevm-classpath/files/patch-resource-Makefile.in b/java/sablevm-classpath/files/patch-resource-Makefile.in
new file mode 100644
index 000000000000..54e67b7a746d
--- /dev/null
+++ b/java/sablevm-classpath/files/patch-resource-Makefile.in
@@ -0,0 +1,11 @@
+--- resource/Makefile.in.orig 2007-03-30 02:30:09.000000000 -0400
++++ resource/Makefile.in 2012-10-01 17:02:09.000000000 -0400
+@@ -268,7 +268,7 @@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+ vm_classes = @vm_classes@
+-security_DATA = java/security/classpath.security
++security_DATA = java/security/SableVM.security
+ securitydir = $(libdir)/security
+ all: all-am
+
diff --git a/java/sablevm-classpath/pkg-plist b/java/sablevm-classpath/pkg-plist
index 1b9804652069..22e11e9542b7 100644
--- a/java/sablevm-classpath/pkg-plist
+++ b/java/sablevm-classpath/pkg-plist
@@ -1,5 +1,5 @@
-include/jawt.h
-include/jawt_md.h
+include/sablevm-classpath/jawt.h
+include/sablevm-classpath/jawt_md.h
%%WITH_ZIP%%lib/sablevm/lib/libclasspath.jar
%%WITH_ZIP%%lib/sablevm/lib/resources.jar
%%WITH_ZIP%%lib/sablevm/jre/lib/libclasspath.jar
@@ -29,7 +29,7 @@ lib/sablevm-classpath/libjavautil.so
%%GTK2%%lib/sablevm-classpath/libjawtgnu-1.13.so
%%GTK2%%lib/sablevm-classpath/libjawtgnu.la
%%GTK2%%lib/sablevm-classpath/libjawtgnu.so
-lib/security/classpath.security
+lib/security/SableVM.security
%%WITH_ZIP%%%%DATADIR%%/libclasspath.jar
%%WITH_ZIP%%%%DATADIR%%/resources.jar
%%WITHOUT_ZIP%%%%DATADIR%%/META-INF/services/javax.sound.midi.spi.MidiDeviceProvider
@@ -5607,7 +5607,8 @@ lib/security/classpath.security
@dirrm %%DATADIR%%
@dirrmtry lib/security
@dirrm lib/sablevm-classpath
-%%WITH_ZIP%%@dirrm lib/sablevm/lib
-%%WITH_ZIP%%@dirrm lib/sablevm/jre/lib
-%%WITH_ZIP%%@dirrm lib/sablevm/jre
-%%WITH_ZIP%%@dirrm lib/sablevm
+%%WITH_ZIP%%@dirrmtry lib/sablevm/lib
+%%WITH_ZIP%%@dirrmtry lib/sablevm/jre/lib
+%%WITH_ZIP%%@dirrmtry lib/sablevm/jre
+%%WITH_ZIP%%@dirrmtry lib/sablevm
+@dirrm include/sablevm-classpath
diff --git a/java/sablevm/Makefile b/java/sablevm/Makefile
index f5d85305a6b7..e8f853d3b580 100644
--- a/java/sablevm/Makefile
+++ b/java/sablevm/Makefile
@@ -1,54 +1,52 @@
-# New ports collection makefile for: sablevm
-# Date created: 9 July 2002
-# Whom: Archie Cobbs <archie@freebsd.org>
-#
+# Creaetd by: Archie Cobbs <archie@freebsd.org>
# $FreeBSD$
-#
PORTNAME= sablevm
PORTVERSION= 1.13
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= java devel
MASTER_SITES= SF
-MAINTAINER= bkoenig@alpha-tierchen.de
+MAINTAINER= java@FreeBSD.org
COMMENT= Java VM created by McGill University's Sable Research Group
+LICENSE= LGPL21
+
LIB_DEPENDS= popt:${PORTSDIR}/devel/popt \
ffi:${PORTSDIR}/devel/libffi
+RUN_DEPENDS= fastjar:${PORTSDIR}/archivers/fastjar
GNU_CONFIGURE= yes
USE_AUTOTOOLS= libltdl
-USE_GMAKE= yes
USE_GETTEXT= yes
+USE_GMAKE= yes
USE_ICONV= yes
USE_LDCONFIG= yes
+USE_PKGCONFIG= build
-USE_GNOME= pkgconfig
-PKG_CONFIG?= ${LOCALBASE}/bin/pkg-config
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS+= -I${LOCALBASE}/include `${PKG_CONFIG} libffi --cflags`
CONFIGURE_ARGS= --includedir=${PREFIX}/include/${PORTNAME}
-OPTIONS= SVMCP "Install SableVM classpath" ON \
- MAN "Build and install man pages" ON
-
-CONFLICTS= classpath-*
+OPTIONS_DEFINE= MAN SVMCP
+OPTIONS_DEFAULT=MAN SVMCP
+MAN_DESC= Build and install man pages
+SVMCP_DESC= Install SableVM classpath
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if !defined(WITHOUT_SVMCP)
-RUN_DEPENDS+= ${LOCALBASE}/lib/sablevm-classpath/libjavalang.so:${PORTSDIR}/java/sablevm-classpath
+.if ${PORT_OPTIONS:MMAN}
+MAN1= java-sablevm.1 sablevm.1
.endif
-.if !defined(WITHOUT_MAN)
-MAN1= java-sablevm.1 sablevm.1
+.if ${PORT_OPTIONS:MSVMCP}
+RUN_DEPENDS+= ${LOCALBASE}/lib/sablevm-classpath/libjavalang.so:${PORTSDIR}/java/sablevm-classpath
.endif
post-extract:
@${REINPLACE_CMD} -e 's,^subdirs=".*,,' ${WRKSRC}/configure
-.if defined(WITHOUT_MAN)
+.if empty(PORT_OPTIONS:MMAN)
@${REINPLACE_CMD} -e 's,^\(man_MANS = \).*,\1,' ${WRKSRC}/doc/Makefile.in
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/java/sablevm/pkg-plist b/java/sablevm/pkg-plist
index 38b400ffb0e3..0b18d22f5832 100644
--- a/java/sablevm/pkg-plist
+++ b/java/sablevm/pkg-plist
@@ -14,12 +14,12 @@ lib/sablevm/bin/jdb
lib/sablevm/include/jni.h
lib/sablevm/include/jni_system_specific.h
lib/sablevm/jre/bin
-share/sablevm/AUTHORS
-share/sablevm/LGPL-2.1
-share/sablevm/LICENSE
-@dirrm include/sablevm
-@dirrm share/sablevm
-@dirrm lib/sablevm/jre
+%%DATADIR%%/AUTHORS
+%%DATADIR%%/LGPL-2.1
+%%DATADIR%%/LICENSE
+@dirrm %%DATADIR%%
+@dirrmtry lib/sablevm/jre
@dirrm lib/sablevm/include
@dirrm lib/sablevm/bin
-@dirrm lib/sablevm
+@dirrmtry lib/sablevm
+@dirrm include/sablevm