ports/164941: [UPDATE/NEW PORTS] jamvm/classpath w/o jdk

Per Ola Ingvarsson skrabban at gmail.com
Thu Feb 9 20:30:13 UTC 2012


>Number:         164941
>Category:       ports
>Synopsis:       [UPDATE/NEW PORTS] jamvm/classpath w/o jdk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 09 20:30:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Per Ola Ingvarsson
>Release:        FreeBSD 8.1-RELEASE/9.0-RELEASE
>Organization:
N/A
>Environment:
FreeBSD funk.my.domain 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 06:53:42 UTC 2010     root at araz.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  sparc64
>Description:
Version 1.5.4, jamvm has support for sparc64, but also depends on a version of classpath that cannot be compiled without some kind of java, which is not available on sparc64.

The patches attached contain:
1. Update jamvm to 1.5.4
2. Update classpath to 0.98
3. Use ecj + antlr + jamvm-initial instead of jdk when building classpath-0.98
4. New package jamvm-initial-1.5.1 patched for sparc64 which is the jvm used when running ecj above
5. New package classpath-initial-0.93 which is the java library used by jamvm-initial

jamvm-initial and classpath-initial are not useful once jamvm and classpath are built.

The packages have been successfully built/installed on sparc64/amd64/i386. Chances are that it also works on powerpc/arm.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/java/classpath-initial/Makefile b/java/classpath-initial/Makefile
new file mode 100644
index 0000000..da11ac1
--- /dev/null
+++ b/java/classpath-initial/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for:    classpath-initial
+# Date created:                         2012-02-08
+# Whom:                                 Per Ola Ingvarsson
+#
+# $FreeBSD: ports/java/classpath/Makefile,v 1.40 2011/09/23 22:23:40 amdmi3 Exp $
+#
+
+PORTNAME=	classpath
+PORTVERSION=	0.93
+CATEGORIES=	java devel
+MASTER_SITES=	${MASTER_SITE_GNU} \
+		${MASTER_SITE_SAVANNAH}
+MASTER_SITE_SUBDIR=	classpath
+PKGNAMESUFFIX=	-initial
+
+MAINTAINER=	skrabban at gmail.com
+COMMENT=	Java libraries to be used with jamvm-initial to build newer classpath
+
+BUILD_DEPENDS=	zip:${PORTSDIR}/archivers/zip \
+		jikes:${PORTSDIR}/java/jikes
+
+USE_LDCONFIG=	yes
+GNU_CONFIGURE=	yes
+CXXFLAGS+=	-I${LOCALBASE}/include
+
+CONFIGURE_ARGS=	--enable-jni --disable-alsa --disable-dssi \
+		--disable-plugin --disable-gtk-peer --with-jikes \
+		--disable-examples --disable-gconf-peer
+
+USE_GMAKE=	yes
+
+.include <bsd.port.mk>
diff --git a/java/classpath-initial/distinfo b/java/classpath-initial/distinfo
new file mode 100644
index 0000000..c06896d
--- /dev/null
+++ b/java/classpath-initial/distinfo
@@ -0,0 +1,2 @@
+SHA256 (classpath-0.93.tar.gz) = df2d093612abd23fe67e9409d89bb2a8e79b1664fe2b2da40e1c8ed693e32945
+SIZE (classpath-0.93.tar.gz) = 9534222
diff --git a/java/classpath-initial/files/patch-configure b/java/classpath-initial/files/patch-configure
new file mode 100644
index 0000000..89cb7b9
--- /dev/null
+++ b/java/classpath-initial/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig	2012-01-17 20:50:46.000000000 +0100
++++ configure	2012-01-17 20:50:31.000000000 +0100
+@@ -1998,7 +1998,7 @@ fi
+ 
+ 
+ # Define the identity of the package.
+- PACKAGE='classpath'
++ PACKAGE='classpath-initial'
+  VERSION='0.93'
+ 
+ 
diff --git a/java/classpath-initial/files/patch-doc_Makefile.in b/java/classpath-initial/files/patch-doc_Makefile.in
new file mode 100644
index 0000000..8cb4e30
--- /dev/null
+++ b/java/classpath-initial/files/patch-doc_Makefile.in
@@ -0,0 +1,16 @@
+--- doc/Makefile.in.orig	2012-01-25 20:21:40.000000000 +0100
++++ doc/Makefile.in	2012-01-25 20:22:20.000000000 +0100
+@@ -707,11 +707,11 @@ info: info-recursive
+ 
+ info-am: $(INFO_DEPS)
+ 
+-install-data-am: install-info-am
++install-data-am: 
+ 
+ install-exec-am:
+ 
+-install-info: install-info-recursive
++install-info: 
+ 
+ install-info-am: $(INFO_DEPS)
+ 	@$(NORMAL_INSTALL)
diff --git a/java/classpath-initial/files/patch-include_Makefile.in b/java/classpath-initial/files/patch-include_Makefile.in
new file mode 100644
index 0000000..f3cd2ed
--- /dev/null
+++ b/java/classpath-initial/files/patch-include_Makefile.in
@@ -0,0 +1,11 @@
+--- include/Makefile.in.orig	2012-01-25 20:13:18.000000000 +0100
++++ include/Makefile.in	2012-01-25 20:13:37.000000000 +0100
+@@ -655,7 +655,7 @@ info: info-am
+ 
+ info-am:
+ 
+-install-data-am: install-includeHEADERS
++install-data-am:
+ 
+ install-exec-am:
+ 
diff --git a/java/classpath-initial/files/patch-native_jni_native-lib_cpnet.h b/java/classpath-initial/files/patch-native_jni_native-lib_cpnet.h
new file mode 100644
index 0000000..7b18afc
--- /dev/null
+++ b/java/classpath-initial/files/patch-native_jni_native-lib_cpnet.h
@@ -0,0 +1,10 @@
+--- native/jni/native-lib/cpnet.h.orig	2012-01-16 22:34:30.000000000 +0100
++++ native/jni/native-lib/cpnet.h	2012-01-16 22:35:05.000000000 +0100
+@@ -42,6 +42,7 @@ exception statement from your version. *
+ #include <jcl.h>
+ #include <string.h>
+ 
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
diff --git a/java/classpath-initial/files/patch-resource_Makefile.in b/java/classpath-initial/files/patch-resource_Makefile.in
new file mode 100644
index 0000000..3571af2
--- /dev/null
+++ b/java/classpath-initial/files/patch-resource_Makefile.in
@@ -0,0 +1,11 @@
+--- resource/Makefile.in.orig	2012-01-25 20:23:52.000000000 +0100
++++ resource/Makefile.in	2012-01-25 20:24:18.000000000 +0100
+@@ -461,7 +461,7 @@ info: info-am
+ 
+ info-am:
+ 
+-install-data-am: install-loggingDATA install-securityDATA
++install-data-am:
+ 
+ install-exec-am:
+ 
diff --git a/java/classpath-initial/files/patch-tools_Makefile.in b/java/classpath-initial/files/patch-tools_Makefile.in
new file mode 100644
index 0000000..556c0e2
--- /dev/null
+++ b/java/classpath-initial/files/patch-tools_Makefile.in
@@ -0,0 +1,11 @@
+--- tools/Makefile.in.orig	2012-01-25 11:06:03.000000000 +0100
++++ tools/Makefile.in	2012-01-25 11:06:39.000000000 +0100
+@@ -1043,7 +1043,7 @@ info-am:
+ 
+ install-data-am: install-TOOLSDATA
+ 
+-install-exec-am: install-binPROGRAMS install-binSCRIPTS
++install-exec-am:
+ 
+ install-info: install-info-am
+ 
diff --git a/java/classpath-initial/pkg-descr b/java/classpath-initial/pkg-descr
new file mode 100644
index 0000000..c0dcfc6
--- /dev/null
+++ b/java/classpath-initial/pkg-descr
@@ -0,0 +1,8 @@
+The purpose of this package is to provide a java library for jamvm-initial which 
+is used when building classpath with generics.
+
+GNU Classpath, Essential Libraries for Java, is a GNU project to create free
+core class libraries for use with virtual machines and compilers for the Java
+programming language.
+
+WWW: http://www.classpath.org/
diff --git a/java/classpath-initial/pkg-plist b/java/classpath-initial/pkg-plist
new file mode 100644
index 0000000..80d18b3
--- /dev/null
+++ b/java/classpath-initial/pkg-plist
@@ -0,0 +1,22 @@
+lib/classpath-initial/libjavaio.la
+lib/classpath-initial/libjavaio.so
+lib/classpath-initial/libjavaio.so.0
+lib/classpath-initial/libjavalang.la
+lib/classpath-initial/libjavalang.so
+lib/classpath-initial/libjavalang.so.0
+lib/classpath-initial/libjavalangreflect.la
+lib/classpath-initial/libjavalangreflect.so
+lib/classpath-initial/libjavalangreflect.so.0
+lib/classpath-initial/libjavanet.la
+lib/classpath-initial/libjavanet.so
+lib/classpath-initial/libjavanet.so.0
+lib/classpath-initial/libjavanio.la
+lib/classpath-initial/libjavanio.so
+lib/classpath-initial/libjavanio.so.0
+lib/classpath-initial/libjavautil.la
+lib/classpath-initial/libjavautil.so
+lib/classpath-initial/libjavautil.so.0
+ at dirrm lib/classpath-initial
+share/classpath-initial/glibj.zip
+share/classpath-initial/tools.zip
+ at dirrm share/classpath-initial
diff --git a/java/classpath/Makefile b/java/classpath/Makefile
index 11384ae..e960d51 100644
--- a/java/classpath/Makefile
+++ b/java/classpath/Makefile
@@ -7,27 +7,38 @@
 #
 
 PORTNAME=	classpath
-PORTVERSION=	0.97.2
-PORTREVISION=	4
+PORTVERSION=	0.98
+PORTREVISION=	5
 CATEGORIES=	java devel
-MASTER_SITES=	${MASTER_SITE_GNU} \
-		${MASTER_SITE_SAVANNAH}
-MASTER_SITE_SUBDIR=	${PORTNAME}
+MASTER_SITES=	${MASTER_SITE_GNU}:s0 \
+		${MASTER_SITE_SAVANNAH}:s0 \
+		http://archive.eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/:s1 \
+		http://www.antlr2.org/download/:s2
+MASTER_SITE_SUBDIR=	${PORTNAME}/:s0
+DISTFILES=	${DISTNAME}.tar.gz:s0 \
+		ecj.jar:s1 \
+		antlr-2.7.5.jar:s2
+DIST_SUBDIR=	${PORTNAME}
+EXTRACT_ONLY=	${DISTNAME}.tar.gz
 
 MAINTAINER=	bkoenig at alpha-tierchen.de
 COMMENT=	A GNU project to create a free Java class library
 
-BUILD_DEPENDS=	zip:${PORTSDIR}/archivers/zip
+BUILD_DEPENDS=	zip:${PORTSDIR}/archivers/zip \
+		jamvm-initial:${PORTSDIR}/java/jamvm-initial \
+		fastjar:${PORTSDIR}/archivers/fastjar
 
-USE_JAVA=	yes
-JAVA_VERSION=	1.5+
 USE_XORG=	x11 ice xtst xaw xproto xext
 WANT_GNOME=	yes
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 CXXFLAGS+=	-I${LOCALBASE}/include
-CONFIGURE_ARGS=	--enable-jni --disable-alsa --disable-dssi --disable-plugin
+CONFIGURE_ENV=	JAVA=jamvm-initial PATH=${PATH}:${WRKDIR}/bin
+CONFIGURE_ARGS=	--enable-jni --disable-alsa --disable-dssi --disable-plugin \
+		--with-antlr-jar=${DISTDIR}/${DIST_SUBDIR}/antlr-2.7.5.jar
+
 USE_GMAKE=	yes
+MAKE_ENV+=	PATH=${PATH}:${WRKDIR}/bin
 
 MAN1=		gappletviewer.1 \
 		gjar.1 \
@@ -44,13 +55,20 @@ MAN1=		gappletviewer.1 \
 
 INFO=		cp-hacking cp-tools cp-vmintegration
 
-CONFLICTS=	sablevm-classpath-*
+CONFLICTS=	sablevm-classpath-[0-9]*
 
 OPTIONS=	GCONF "Use GConf based preferences backend" OFF \
 		GTK2 "Enable Gtk+ AWT peer" ON \
 		CAIRO "Use Gtk+ Cairo based Graphics2D" OFF \
 		QT4 "Enable Qt AWT peer" OFF
 
+pre-patch:
+	@${MKDIR} ${WRKDIR}/bin
+	@${SED} -e 's,%%DISTDIR%%,${DISTDIR}/${DIST_SUBDIR},' \
+		< ${FILESDIR}/ecj.in \
+		> ${WRKDIR}/bin/ecj
+	@${CHMOD} +x ${WRKDIR}/bin/ecj
+
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_GCONF)
diff --git a/java/classpath/distinfo b/java/classpath/distinfo
index 60d7eba..dff43c6 100644
--- a/java/classpath/distinfo
+++ b/java/classpath/distinfo
@@ -1,2 +1,6 @@
-SHA256 (classpath-0.97.2.tar.gz) = 001fee5ad3ddd043783d59593153510f09064b0d9b5aea82f535266f62f02db4
-SIZE (classpath-0.97.2.tar.gz) = 10318014
+SHA256 (classpath/classpath-0.98.tar.gz) = 501b5acd4dff79b6100da22cef15080f31071821ce3cea6f1b739bc1b56fac3f
+SIZE (classpath/classpath-0.98.tar.gz) = 11021342
+SHA256 (classpath/ecj.jar) = 3b26627f4c998c67f147392dc3355f38b05769e400925a7c4f9ff68819f1c303
+SIZE (classpath/ecj.jar) = 1323277
+SHA256 (classpath/antlr-2.7.5.jar) = 2433e7e36ebbebe72390036ec555f4c6771eaed33d507b3d5d65497804093a0d
+SIZE (classpath/antlr-2.7.5.jar) = 435563
diff --git a/java/classpath/files/ecj.in b/java/classpath/files/ecj.in
new file mode 100644
index 0000000..165ee36
--- /dev/null
+++ b/java/classpath/files/ecj.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+CLASSPATH=%%DISTDIR%%/ecj.jar${CLASSPATH:+:}$CLASSPATH \
+exec jamvm-initial -Xmx768m org.eclipse.jdt.internal.compiler.batch.Main -nowarn "$@"
diff --git a/java/jamvm-initial/Makefile b/java/jamvm-initial/Makefile
new file mode 100644
index 0000000..b9bf3be
--- /dev/null
+++ b/java/jamvm-initial/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for:	jamvm-initial
+# Date created:				2012-02-08
+# Whom:					Per Ola Ingvarsson
+#
+# $FreeBSD: ports/java/jamvm/Makefile,v 1.8 2011/09/23 22:23:40 amdmi3 Exp $
+
+PORTNAME=	jamvm
+PORTVERSION=	1.5.1
+CATEGORIES=	java devel
+MASTER_SITES=	SF/jamvm/jamvm/JamVM%20${PORTVERSION}
+PKGNAMESUFFIX=	-initial
+
+MAINTAINER=	skrabban at gmail.com
+COMMENT=	Bootstrap jamvm to compile classpath with ecj
+
+RUN_DEPENDS=	${LOCALBASE}/share/classpath-initial/glibj.zip:${PORTSDIR}/java/classpath-initial
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-classpath-install-dir=${LOCALBASE}
+USE_GMAKE=	yes
+
+.include <bsd.port.pre.mk>
+
+LIB_DEPENDS+=		ffi:${PORTSDIR}/devel/libffi
+CONFIGURE_ARGS+=	--enable-ffi
+LDFLAGS+=	-L${LOCALBASE}/lib
+CFLAGS+=	`pkg-config libffi --cflags`
+
+BUILD_DEPENDS+=		zip:${PORTSDIR}/archivers/zip
+PLIST_SUB+=		WITH_ZIP="" WITHOUT_ZIP="@comment "
+
+do-install:
+	${INSTALL_PROGRAM} -s ${WRKSRC}/src/jamvm-initial ${PREFIX}/bin
+	${MKDIR} ${PREFIX}/share/jamvm-initial
+	${INSTALL_DATA} ${WRKSRC}/lib/classes.zip \
+		${PREFIX}/share/jamvm-initial
+
+.include <bsd.port.post.mk>
diff --git a/java/jamvm-initial/distinfo b/java/jamvm-initial/distinfo
new file mode 100644
index 0000000..2b59b45
--- /dev/null
+++ b/java/jamvm-initial/distinfo
@@ -0,0 +1,2 @@
+SHA256 (jamvm-1.5.1.tar.gz) = 663895bd69caf3a1fda6af5eea8263d90a5fd35ca8f4c32e2210ac410788901a
+SIZE (jamvm-1.5.1.tar.gz) = 599084
diff --git a/java/jamvm-initial/files/patch-configure b/java/jamvm-initial/files/patch-configure
new file mode 100644
index 0000000..62ff08d
--- /dev/null
+++ b/java/jamvm-initial/files/patch-configure
@@ -0,0 +1,32 @@
+--- configure.orig	2008-03-02 05:16:07.000000000 +0100
++++ configure	2012-01-27 15:03:21.000000000 +0100
+@@ -2552,8 +2552,10 @@ i386-*-freebsd*) host_os=bsd libdl_neede
+ x86_64-*-linux*) host_os=linux ;;
+ hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
+ mipsel-*-linux*) host_cpu=mips host_os=linux ;;
+-amd64-*-openbsd*) host_os=bsd libdl_needed=no ;;
+-amd64-*-freebsd*) host_os=bsd libdl_needed=no ;;
++amd64-*-openbsd*) host_os=bsd host_cpu=x86_64 libdl_needed=no ;;
++amd64-*-freebsd*) host_os=bsd host_cpu=x86_64 libdl_needed=no ;;
++sparc64*-*-openbsd*) host_cpu=sparc64 host_os=bsd libdl_needed=no ;;
++sparc64*-*-freebsd*) host_cpu=sparc64 host_os=bsd libdl_needed=no ;;
+ arm*-*-linux*) host_cpu=arm host_os=linux ;;
+ arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
+ arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
+@@ -22839,7 +22841,7 @@ fi
+ ac_config_links="$ac_config_links src/arch.h:src/arch/$arch.h"
+ 
+ 
+-ac_config_files="$ac_config_files Makefile src/Makefile src/interp/Makefile src/interp/engine/Makefile src/arch/Makefile src/os/Makefile src/os/linux/Makefile src/os/darwin/Makefile src/os/bsd/Makefile src/os/linux/powerpc/Makefile src/os/linux/arm/Makefile src/os/linux/i386/Makefile src/os/linux/x86_64/Makefile src/os/linux/parisc/Makefile src/os/linux/mips/Makefile src/os/darwin/i386/Makefile src/os/darwin/arm/Makefile src/os/darwin/powerpc/Makefile src/os/bsd/powerpc/Makefile src/os/bsd/arm/Makefile src/os/bsd/i386/Makefile src/os/bsd/x86_64/Makefile lib/Makefile lib/java/Makefile lib/java/lang/Makefile lib/jamvm/Makefile lib/jamvm/java/Makefile lib/jamvm/java/lang/Makefile lib/java/lang/reflect/Makefile lib/java/security/Makefile lib/gnu/Makefile lib/sun/reflect/annotation/Makefile lib/sun/reflect/Makefile lib/sun/Makefile lib/gnu/classpath/Makefile"
++ac_config_files="$ac_config_files Makefile src/Makefile src/interp/Makefile src/interp/engine/Makefile src/arch/Makefile src/os/Makefile src/os/linux/Makefile src/os/darwin/Makefile src/os/bsd/Makefile src/os/linux/powerpc/Makefile src/os/linux/arm/Makefile src/os/linux/i386/Makefile src/os/linux/x86_64/Makefile src/os/linux/parisc/Makefile src/os/linux/mips/Makefile src/os/darwin/i386/Makefile src/os/darwin/arm/Makefile src/os/darwin/powerpc/Makefile src/os/bsd/powerpc/Makefile src/os/bsd/arm/Makefile src/os/bsd/i386/Makefile src/os/bsd/x86_64/Makefile src/os/bsd/sparc64/Makefile lib/Makefile lib/java/Makefile lib/java/lang/Makefile lib/jamvm/Makefile lib/jamvm/java/Makefile lib/jamvm/java/lang/Makefile lib/java/lang/reflect/Makefile lib/java/security/Makefile lib/gnu/Makefile lib/sun/reflect/annotation/Makefile lib/sun/reflect/Makefile lib/sun/Makefile lib/gnu/classpath/Makefile"
+ 
+ 
+ cat >confcache <<\_ACEOF
+@@ -23483,6 +23485,7 @@ do
+     "src/os/bsd/arm/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/bsd/arm/Makefile" ;;
+     "src/os/bsd/i386/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/bsd/i386/Makefile" ;;
+     "src/os/bsd/x86_64/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/bsd/x86_64/Makefile" ;;
++    "src/os/bsd/sparc64/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/bsd/x86_64/Makefile" ;;
+     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+     "lib/java/Makefile") CONFIG_FILES="$CONFIG_FILES lib/java/Makefile" ;;
+     "lib/java/lang/Makefile") CONFIG_FILES="$CONFIG_FILES lib/java/lang/Makefile" ;;
diff --git a/java/jamvm-initial/files/patch-lib_Makefile.in b/java/jamvm-initial/files/patch-lib_Makefile.in
new file mode 100644
index 0000000..3fafe0a
--- /dev/null
+++ b/java/jamvm-initial/files/patch-lib_Makefile.in
@@ -0,0 +1,11 @@
+--- lib/Makefile.in.orig	2012-01-17 21:05:26.000000000 +0100
++++ lib/Makefile.in	2012-01-17 21:06:18.000000000 +0100
+@@ -176,7 +176,7 @@ top_srcdir = @top_srcdir@
+ use_zip_no = @use_zip_no@
+ use_zip_yes = @use_zip_yes@
+ with_classpath_install_dir = @with_classpath_install_dir@
+-CP_LIB_DIR = ${with_classpath_install_dir}/share/classpath
++CP_LIB_DIR = ${with_classpath_install_dir}/share/classpath-initial
+ GLIBJ_ZIP = ${CP_LIB_DIR}/glibj.zip
+ SUBDIRS = jamvm java gnu sun
+ EXTRA_DIST = classes.zip README
diff --git a/java/jamvm-initial/files/patch-src_Makefile.in b/java/jamvm-initial/files/patch-src_Makefile.in
new file mode 100644
index 0000000..d159703
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_Makefile.in
@@ -0,0 +1,21 @@
+--- src/Makefile.in.orig	2012-01-17 21:53:44.000000000 +0100
++++ src/Makefile.in	2012-01-17 21:50:39.000000000 +0100
+@@ -34,7 +34,7 @@ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-bin_PROGRAMS = jamvm$(EXEEXT)
++bin_PROGRAMS = jamvm$(EXEEXT) jamvm-initial$(EXEEXT)
+ subdir = src
+ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
+ 	$(srcdir)/Makefile.in $(srcdir)/config.h.in
+@@ -360,6 +360,9 @@ jamvm$(EXEEXT): $(jamvm_OBJECTS) $(jamvm
+ 	@rm -f jamvm$(EXEEXT)
+ 	$(LINK) $(jamvm_OBJECTS) $(jamvm_LDADD) $(LIBS)
+ 
++jamvm-initial$(EXEEXT): jamvm$(EXEEXT)
++	@cp jamvm$(EXEEXT) jamvm-initial$(EXEEXT)
++
+ mostlyclean-compile:
+ 	-rm -f *.$(OBJEXT)
+ 
diff --git a/java/jamvm-initial/files/patch-src_alloc.c b/java/jamvm-initial/files/patch-src_alloc.c
new file mode 100644
index 0000000..a14b720
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_alloc.c
@@ -0,0 +1,46 @@
+--- src/alloc.c.orig	2008-02-22 02:57:42.000000000 +0100
++++ src/alloc.c	2012-01-26 19:32:40.000000000 +0100
+@@ -2134,8 +2134,8 @@ unsigned long maxHeapMem() {
+     suspended while holding the malloc lock */
+ 
+ void *gcMemMalloc(int n) {
+-    int size = n + sizeof(int);
+-    int *mem = mmap(0, size, PROT_READ|PROT_WRITE,
++    uintptr_t size = n + sizeof(uintptr_t);
++    uintptr_t *mem = mmap(0, size, PROT_READ|PROT_WRITE,
+                              MAP_PRIVATE|MAP_ANON, -1, 0);
+ 
+     if(mem == MAP_FAILED) {
+@@ -2151,9 +2151,9 @@ void *gcMemRealloc(void *addr, int size)
+     if(addr == NULL)
+         return gcMemMalloc(size);
+     else {
+-        int *mem = addr;
+-        int old_size = *--mem;
+-        int new_size = size + sizeof(int);
++        uintptr_t *mem = addr;
++        uintptr_t old_size = *--mem;
++        uintptr_t new_size = size + sizeof(uintptr_t);
+ 
+         if(old_size/sys_page_size == new_size/sys_page_size) {
+             *mem = new_size;
+@@ -2162,7 +2162,7 @@ void *gcMemRealloc(void *addr, int size)
+             int copy_size = new_size > old_size ? old_size : new_size;
+             void *new_mem = gcMemMalloc(size);
+ 
+-            memcpy(new_mem, addr, copy_size - sizeof(int));
++            memcpy(new_mem, addr, copy_size - sizeof(uintptr_t));
+             munmap(mem, old_size);
+ 
+             return new_mem;
+@@ -2172,8 +2172,8 @@ void *gcMemRealloc(void *addr, int size)
+ 
+ void gcMemFree(void *addr) {
+     if(addr != NULL) {
+-        int *mem = addr;
+-        int size = *--mem;
++        uintptr_t *mem = addr;
++        uintptr_t size = *--mem;
+         munmap(mem, size);
+     }
+ }
diff --git a/java/jamvm-initial/files/patch-src_arch_sparc64.h b/java/jamvm-initial/files/patch-src_arch_sparc64.h
new file mode 100644
index 0000000..c4af4c1
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_arch_sparc64.h
@@ -0,0 +1,137 @@
+--- src/arch/sparc64.h.orig	2012-01-26 19:32:40.000000000 +0100
++++ src/arch/sparc64.h	2012-01-26 19:32:40.000000000 +0100
+@@ -0,0 +1,134 @@
++/*
++ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
++ * Robert Lougher <rob at lougher.org.uk>.
++ *
++ * This file is part of JamVM.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#define OS_ARCH "sparc64"
++
++#define HANDLER_TABLE_T static const void
++#define DOUBLE_1_BITS 0x3ff0000000000000LL
++
++#define READ_DBL(v,p,l)	v = ((u8)p[0]<<56)|((u8)p[1]<<48)|((u8)p[2]<<40)  \
++                            |((u8)p[3]<<32)|((u8)p[4]<<24)|((u8)p[5]<<16) \
++                            |((u8)p[6]<<8)|(u8)p[7]; p+=8
++
++#define FPU_HACK
++
++static inline uint32_t
++compare_and_swap_32(volatile uint32_t *addr, uint32_t oldval, uint32_t newval)
++{
++   uint32_t result;
++   __asm__ __volatile__ ("cas [%4], %2, %0"
++   			: "=r" (result), "=m" (*addr)
++			: "r" (oldval), "m" (*addr), "r" (addr),
++			"0" (newval));
++  return result == oldval;
++}
++
++#define COMPARE_AND_SWAP32 compare_and_swap_32
++
++static inline uint64_t
++compare_and_swap_64( volatile uint64_t *addr, 
++                     volatile uint64_t oldval, 
++                     volatile uint64_t newval )
++{
++#if 1
++   uint64_t result;
++   __asm__ __volatile__ ("casx [%4], %2, %0"
++   			: "=r" (result), "=m" (*addr)
++			: "r" (oldval), "m" (*addr), "r" (addr),
++			"0" (newval));
++  return result == oldval;
++#else
++  if(*addr == oldval) {                       
++        *addr = newval;                        
++        return 1;
++    } else {
++        return 0;
++    }
++  
++#endif
++}
++
++#define COMPARE_AND_SWAP64 compare_and_swap_64    
++#ifdef __arch64__
++#  define COMPARE_AND_SWAP COMPARE_AND_SWAP64
++#else
++#  define COMPARE_AND_SWAP COMPARE_AND_SWAP32
++#endif
++
++#define STORE_LOAD __asm__ __volatile__ ("membar #StoreLoad" : : : "memory")
++
++
++#define LOCKWORD_READ(addr) ({ STORE_LOAD; *addr; })
++#define LOCKWORD_WRITE(addr, value) ({ STORE_LOAD; *addr = value; })
++#define LOCKWORD_COMPARE_AND_SWAP COMPARE_AND_SWAP
++
++#define __GEN_REL_JMP(target_addr, patch_addr, opcode,       \
++                      type, patch_size)                      \
++({                                                           \
++    int patched = FALSE;                                     \
++                                                             \
++    if(patch_size >= 1 + sizeof(type)) {                     \
++        char *nxt_ins_ptr = (patch_addr) + 1 + sizeof(type); \
++        uintptr_t limit = 1ULL<<((sizeof(type) * 8) - 1);    \
++                                                             \
++        /* The check is done in two parts to ensure the      \
++           result is always positive, to guard against       \
++           the pointer difference being larger than the      \
++           signed range */                                   \
++        if(target_addr > nxt_ins_ptr) {                      \
++            uintptr_t disp = (target_addr) - (nxt_ins_ptr);  \
++                                                             \
++            if(disp < limit) {                               \
++                *(patch_addr) = opcode;                      \
++                *(type*)&(patch_addr)[1] = disp;             \
++                patched = TRUE;                              \
++            }                                                \
++        } else {                                             \
++            uintptr_t disp = (nxt_ins_ptr) - (target_addr);  \
++                                                             \
++            if(disp <= limit) {                              \
++                *(patch_addr) = opcode;                      \
++                *(type*)&(patch_addr)[1] = -disp;            \
++                patched = TRUE;                              \
++            }                                                \
++        }                                                    \
++    }                                                        \
++    patched;                                                 \
++})
++
++#define GEN_REL_JMP(target_addr, patch_addr, patch_size) \
++({                                                       \
++    __GEN_REL_JMP(target_addr, patch_addr, 0xeb,         \
++                  signed char, patch_size) ||            \
++    __GEN_REL_JMP(target_addr, patch_addr, 0xe9,         \
++                  signed int, patch_size);               \
++})
++
++#ifdef INLINING
++#error "I don't know how to flush"
++#define FLUSH_CACHE(addr, length)
++#endif
++#define MBARRIER() __asm__ __volatile__ ("membar #LoadLoad | #LoadStore"\
++                        " | #StoreLoad | #StoreStore" : : : "memory")
++#define UNLOCK_MBARRIER() MBARRIER()
++#define JMM_LOCK_MBARRIER() MBARRIER()
++#define JMM_UNLOCK_MBARRIER() MBARRIER()
++
diff --git a/java/jamvm-initial/files/patch-src_class.h b/java/jamvm-initial/files/patch-src_class.h
new file mode 100644
index 0000000..47cab95
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_class.h
@@ -0,0 +1,18 @@
+--- src/class.h.orig	2012-01-17 22:03:07.000000000 +0100
++++ src/class.h	2012-01-17 22:04:12.000000000 +0100
+@@ -39,11 +39,11 @@
+    separate class files in a directory structure */
+ 
+ #ifdef USE_ZIP
+-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
+-#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
++#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm-initial/classes.zip"
++#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial/glibj.zip"
+ #else
+-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
+-#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
++#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm-initial/classes"
++#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial"
+ #endif
+ 
+ #define DFLT_BCP JAMVM_CLASSES":"CLASSPATH_CLASSES
diff --git a/java/jamvm-initial/files/patch-src_dll.c b/java/jamvm-initial/files/patch-src_dll.c
new file mode 100644
index 0000000..3311a6d
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_dll.c
@@ -0,0 +1,11 @@
+--- src/dll.c.orig	2012-01-17 22:28:27.000000000 +0100
++++ src/dll.c	2012-01-17 22:28:40.000000000 +0100
+@@ -306,7 +306,7 @@ char *getDllPath() {
+ }
+ 
+ char *getBootDllPath() {
+-    return CLASSPATH_INSTALL_DIR"/lib/classpath";
++    return CLASSPATH_INSTALL_DIR"/lib/classpath-initial";
+ }
+ 
+ char *getDllName(char *name) {
diff --git a/java/jamvm-initial/files/patch-src_dll_ffi.c b/java/jamvm-initial/files/patch-src_dll_ffi.c
new file mode 100644
index 0000000..bcab484
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_dll_ffi.c
@@ -0,0 +1,13 @@
+--- src/dll_ffi.c.orig	2007-11-12 05:04:37.000000000 +0100
++++ src/dll_ffi.c	2012-01-26 19:32:40.000000000 +0100
+@@ -72,8 +72,8 @@ int nativeExtraArg(MethodBlock *mb) {
+ uintptr_t *callJNIMethod(void *env, Class *class, char *sig, int num_args, uintptr_t *ostack,
+                          unsigned char *func) {
+     ffi_cif cif;
+-    void *values[num_args];
+-    ffi_type *types[num_args];
++    void *values[num_args + 1];
++    ffi_type *types[num_args + 1];
+     uintptr_t *opntr = ostack;
+     void **values_pntr = &values[2];
+     ffi_type **types_pntr = &types[2];
diff --git a/java/jamvm-initial/files/patch-src_frame.h b/java/jamvm-initial/files/patch-src_frame.h
new file mode 100644
index 0000000..014e8c0
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_frame.h
@@ -0,0 +1,22 @@
+--- src/frame.h.orig	2008-01-26 02:15:41.000000000 +0100
++++ src/frame.h	2012-01-26 19:32:40.000000000 +0100
+@@ -19,6 +19,10 @@
+  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+  */
+ 
++/* Ensure operand stack is double-word aligned.  This leads to
++   better double floating-point performance */
++#define ALIGN_OSTACK(pntr) (uintptr_t*)(((uintptr_t)(pntr) + 7) & ~7)
++
+ #define CREATE_TOP_FRAME(ee, class, mb, sp, ret)                \
+ {                                                               \
+     Frame *last = ee->last_frame;                               \
+@@ -28,7 +32,7 @@
+                                                                 \
+     ret = (void*) (sp = (uintptr_t*)(dummy+1));                 \
+     new_frame = (Frame *)(sp + mb->max_locals);                 \
+-    new_ostack = (uintptr_t *)(new_frame + 1);                  \
++    new_ostack = ALIGN_OSTACK(new_frame + 1);                  \
+                                                                 \
+     if((char*)(new_ostack + mb->max_stack) > ee->stack_end) {   \
+         if(ee->overflow++) {                                    \
diff --git a/java/jamvm-initial/files/patch-src_os_bsd_os.c b/java/jamvm-initial/files/patch-src_os_bsd_os.c
new file mode 100644
index 0000000..8c06335
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_os_bsd_os.c
@@ -0,0 +1,11 @@
+--- src/os/bsd/os.c.orig	2007-02-24 17:13:12.000000000 +0100
++++ src/os/bsd/os.c	2012-01-26 19:32:40.000000000 +0100
+@@ -48,7 +48,7 @@ void *nativeStackBase() {
+ void *nativeStackBase() {
+     pthread_attr_t attr;
+     void *addr;
+-    int size;
++    size_t size;
+ 
+     pthread_attr_init(&attr);
+     pthread_attr_get_np(pthread_self(), &attr);
diff --git a/java/jamvm-initial/files/patch-src_os_bsd_sparc64_Makefile.in b/java/jamvm-initial/files/patch-src_os_bsd_sparc64_Makefile.in
new file mode 100644
index 0000000..eec7006
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_os_bsd_sparc64_Makefile.in
@@ -0,0 +1,449 @@
+--- src/os/bsd/sparc64/Makefile.in.orig	2012-01-27 21:36:14.000000000 +0100
++++ src/os/bsd/sparc64/Makefile.in	2012-01-27 21:39:14.000000000 +0100
+@@ -0,0 +1,446 @@
++# Makefile.in generated by automake 1.10.1 from Makefile.am.
++# @configure_input@
++
++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
++# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
++# This Makefile.in is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++ at SET_MAKE@
++
++VPATH = @srcdir@
++pkgdatadir = $(datadir)/@PACKAGE@
++pkglibdir = $(libdir)/@PACKAGE@
++pkgincludedir = $(includedir)/@PACKAGE@
++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
++install_sh_DATA = $(install_sh) -c -m 644
++install_sh_PROGRAM = $(install_sh) -c
++install_sh_SCRIPT = $(install_sh) -c
++INSTALL_HEADER = $(INSTALL_DATA)
++transform = $(program_transform_name)
++NORMAL_INSTALL = :
++PRE_INSTALL = :
++POST_INSTALL = :
++NORMAL_UNINSTALL = :
++PRE_UNINSTALL = :
++POST_UNINSTALL = :
++build_triplet = @build@
++host_triplet = @host@
++subdir = src/os/bsd/sparc64
++DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
++	$(top_srcdir)/configure.ac
++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
++	$(ACLOCAL_M4)
++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
++CONFIG_HEADER = $(top_builddir)/src/config.h
++CONFIG_CLEAN_FILES =
++LTLIBRARIES = $(noinst_LTLIBRARIES)
++libnative_la_LIBADD =
++am_libnative_la_OBJECTS = init.lo
++libnative_la_OBJECTS = $(am_libnative_la_OBJECTS)
++DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src
++depcomp = $(SHELL) $(top_srcdir)/depcomp
++am__depfiles_maybe = depfiles
++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
++	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
++CCLD = $(CC)
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++	$(LDFLAGS) -o $@
++SOURCES = $(libnative_la_SOURCES)
++DIST_SOURCES = $(libnative_la_SOURCES)
++ETAGS = etags
++CTAGS = ctags
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
++ACLOCAL = @ACLOCAL@
++ALLOCA = @ALLOCA@
++AMTAR = @AMTAR@
++AR = @AR@
++AUTOCONF = @AUTOCONF@
++AUTOHEADER = @AUTOHEADER@
++AUTOMAKE = @AUTOMAKE@
++AWK = @AWK@
++CC = @CC@
++CCAS = @CCAS@
++CCASDEPMODE = @CCASDEPMODE@
++CCASFLAGS = @CCASFLAGS@
++CCDEPMODE = @CCDEPMODE@
++CFLAGS = @CFLAGS@
++CPP = @CPP@
++CPPFLAGS = @CPPFLAGS@
++CXX = @CXX@
++CXXCPP = @CXXCPP@
++CXXDEPMODE = @CXXDEPMODE@
++CXXFLAGS = @CXXFLAGS@
++CYGPATH_W = @CYGPATH_W@
++DEFS = @DEFS@
++DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
++ECHO = @ECHO@
++ECHO_C = @ECHO_C@
++ECHO_N = @ECHO_N@
++ECHO_T = @ECHO_T@
++EGREP = @EGREP@
++EXEEXT = @EXEEXT@
++F77 = @F77@
++FFLAGS = @FFLAGS@
++GREP = @GREP@
++INSTALL = @INSTALL@
++INSTALL_DATA = @INSTALL_DATA@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++JAVAC = @JAVAC@
++LDFLAGS = @LDFLAGS@
++LIBOBJS = @LIBOBJS@
++LIBS = @LIBS@
++LIBTOOL = @LIBTOOL@
++LN_S = @LN_S@
++LTLIBOBJS = @LTLIBOBJS@
++MAINT = @MAINT@
++MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
++OBJEXT = @OBJEXT@
++PACKAGE = @PACKAGE@
++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_STRING = @PACKAGE_STRING@
++PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_VERSION = @PACKAGE_VERSION@
++PATH_SEPARATOR = @PATH_SEPARATOR@
++RANLIB = @RANLIB@
++SED = @SED@
++SET_MAKE = @SET_MAKE@
++SHELL = @SHELL@
++STRIP = @STRIP@
++VERSION = @VERSION@
++abs_builddir = @abs_builddir@
++abs_srcdir = @abs_srcdir@
++abs_top_builddir = @abs_top_builddir@
++abs_top_srcdir = @abs_top_srcdir@
++ac_ct_CC = @ac_ct_CC@
++ac_ct_CXX = @ac_ct_CXX@
++ac_ct_F77 = @ac_ct_F77@
++am__include = @am__include@
++am__leading_dot = @am__leading_dot@
++am__quote = @am__quote@
++am__tar = @am__tar@
++am__untar = @am__untar@
++arch = @arch@
++bindir = @bindir@
++build = @build@
++build_alias = @build_alias@
++build_cpu = @build_cpu@
++build_os = @build_os@
++build_vendor = @build_vendor@
++builddir = @builddir@
++datadir = @datadir@
++datarootdir = @datarootdir@
++docdir = @docdir@
++dvidir = @dvidir@
++exec_prefix = @exec_prefix@
++host = @host@
++host_alias = @host_alias@
++host_cpu = @host_cpu@
++host_os = @host_os@
++host_vendor = @host_vendor@
++htmldir = @htmldir@
++includedir = @includedir@
++infodir = @infodir@
++install_sh = @install_sh@
++interp_cflags = @interp_cflags@
++libdir = @libdir@
++libexecdir = @libexecdir@
++localedir = @localedir@
++localstatedir = @localstatedir@
++mandir = @mandir@
++mkdir_p = @mkdir_p@
++oldincludedir = @oldincludedir@
++os = @os@
++pdfdir = @pdfdir@
++prefix = @prefix@
++program_transform_name = @program_transform_name@
++psdir = @psdir@
++sbindir = @sbindir@
++sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
++sysconfdir = @sysconfdir@
++target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
++use_zip_no = @use_zip_no@
++use_zip_yes = @use_zip_yes@
++with_classpath_install_dir = @with_classpath_install_dir@
++noinst_LTLIBRARIES = libnative.la
++libnative_la_SOURCES = init.c
++AM_CPPFLAGS = -I$(top_builddir)/src
++all: all-am
++
++.SUFFIXES:
++.SUFFIXES: .c .lo .o .obj
++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
++	@for dep in $?; do \
++	  case '$(am__configure_deps)' in \
++	    *$$dep*) \
++	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
++		&& exit 0; \
++	      exit 1;; \
++	  esac; \
++	done; \
++	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/os/bsd/spar64/Makefile'; \
++	cd $(top_srcdir) && \
++	  $(AUTOMAKE) --gnu  src/os/bsd/sparc64/Makefile
++.PRECIOUS: Makefile
++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
++	@case '$?' in \
++	  *config.status*) \
++	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
++	  *) \
++	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
++	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
++	esac;
++
++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
++
++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
++	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
++	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
++
++clean-noinstLTLIBRARIES:
++	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
++	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
++	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
++	  test "$$dir" != "$$p" || dir=.; \
++	  echo "rm -f \"$${dir}/so_locations\""; \
++	  rm -f "$${dir}/so_locations"; \
++	done
++libnative.la: $(libnative_la_OBJECTS) $(libnative_la_DEPENDENCIES) 
++	$(LINK)  $(libnative_la_OBJECTS) $(libnative_la_LIBADD) $(LIBS)
++
++mostlyclean-compile:
++	-rm -f *.$(OBJEXT)
++
++distclean-compile:
++	-rm -f *.tab.c
++
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/init.Plo at am__quote@
++
++.c.o:
++ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
++
++.c.obj:
++ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
++
++.c.lo:
++ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
++ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
++ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
++
++mostlyclean-libtool:
++	-rm -f *.lo
++
++clean-libtool:
++	-rm -rf .libs _libs
++
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
++	      END { if (nonempty) { for (i in files) print i; }; }'`; \
++	mkid -fID $$unique
++tags: TAGS
++
++TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	tags=; \
++	here=`pwd`; \
++	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++	      END { if (nonempty) { for (i in files) print i; }; }'`; \
++	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
++	  test -n "$$unique" || unique=$$empty_fix; \
++	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++	    $$tags $$unique; \
++	fi
++ctags: CTAGS
++CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	tags=; \
++	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++	      END { if (nonempty) { for (i in files) print i; }; }'`; \
++	test -z "$(CTAGS_ARGS)$$tags$$unique" \
++	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
++	     $$tags $$unique
++
++GTAGS:
++	here=`$(am__cd) $(top_builddir) && pwd` \
++	  && cd $(top_srcdir) \
++	  && gtags -i $(GTAGS_ARGS) $$here
++
++distclean-tags:
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
++
++distdir: $(DISTFILES)
++	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++	list='$(DISTFILES)'; \
++	  dist_files=`for file in $$list; do echo $$file; done | \
++	  sed -e "s|^$$srcdirstrip/||;t" \
++	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
++	case $$dist_files in \
++	  */*) $(MKDIR_P) `echo "$$dist_files" | \
++			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
++			   sort -u` ;; \
++	esac; \
++	for file in $$dist_files; do \
++	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
++	  if test -d $$d/$$file; then \
++	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
++	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
++	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
++	    fi; \
++	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
++	  else \
++	    test -f $(distdir)/$$file \
++	    || cp -p $$d/$$file $(distdir)/$$file \
++	    || exit 1; \
++	  fi; \
++	done
++check-am: all-am
++check: check-am
++all-am: Makefile $(LTLIBRARIES)
++installdirs:
++install: install-am
++install-exec: install-exec-am
++install-data: install-data-am
++uninstall: uninstall-am
++
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++
++installcheck: installcheck-am
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
++	  `test -z '$(STRIP)' || \
++	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
++mostlyclean-generic:
++
++clean-generic:
++
++distclean-generic:
++	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
++
++maintainer-clean-generic:
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
++clean: clean-am
++
++clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
++	mostlyclean-am
++
++distclean: distclean-am
++	-rm -rf ./$(DEPDIR)
++	-rm -f Makefile
++distclean-am: clean-am distclean-compile distclean-generic \
++	distclean-tags
++
++dvi: dvi-am
++
++dvi-am:
++
++html: html-am
++
++info: info-am
++
++info-am:
++
++install-data-am:
++
++install-dvi: install-dvi-am
++
++install-exec-am:
++
++install-html: install-html-am
++
++install-info: install-info-am
++
++install-man:
++
++install-pdf: install-pdf-am
++
++install-ps: install-ps-am
++
++installcheck-am:
++
++maintainer-clean: maintainer-clean-am
++	-rm -rf ./$(DEPDIR)
++	-rm -f Makefile
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-am
++
++mostlyclean-am: mostlyclean-compile mostlyclean-generic \
++	mostlyclean-libtool
++
++pdf: pdf-am
++
++pdf-am:
++
++ps: ps-am
++
++ps-am:
++
++uninstall-am:
++
++.MAKE: install-am install-strip
++
++.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
++	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
++	distclean-compile distclean-generic distclean-libtool \
++	distclean-tags distdir dvi dvi-am html html-am info info-am \
++	install install-am install-data install-data-am install-dvi \
++	install-dvi-am install-exec install-exec-am install-html \
++	install-html-am install-info install-info-am install-man \
++	install-pdf install-pdf-am install-ps install-ps-am \
++	install-strip installcheck installcheck-am installdirs \
++	maintainer-clean maintainer-clean-generic mostlyclean \
++	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
++	pdf pdf-am ps ps-am tags uninstall uninstall-am
++
++# Tell versions [3.59,3.63) of GNU make to not export all variables.
++# Otherwise a system limit (for SysV at least) may be exceeded.
++.NOEXPORT:
diff --git a/java/jamvm-initial/files/patch-src_os_bsd_sparc64_init.c b/java/jamvm-initial/files/patch-src_os_bsd_sparc64_init.c
new file mode 100644
index 0000000..0769194
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_os_bsd_sparc64_init.c
@@ -0,0 +1,29 @@
+--- src/os/bsd/sparc64/init.c.orig	2012-01-26 19:32:40.000000000 +0100
++++ src/os/bsd/sparc64/init.c	2012-01-26 19:32:40.000000000 +0100
+@@ -0,0 +1,26 @@
++/*
++ * Copyright (C) 2003, 2004, 2006, 2007
++ * Robert Lougher <rob at lougher.org.uk>.
++ *
++ * This file is part of JamVM.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++void setDoublePrecision() {
++}
++
++void initialisePlatform() {
++}
diff --git a/java/jamvm-initial/files/patch-src_thread.c b/java/jamvm-initial/files/patch-src_thread.c
new file mode 100644
index 0000000..516e0f9
--- /dev/null
+++ b/java/jamvm-initial/files/patch-src_thread.c
@@ -0,0 +1,11 @@
+--- src/thread.c.orig	2008-02-22 02:58:43.000000000 +0100
++++ src/thread.c	2012-01-26 19:32:40.000000000 +0100
+@@ -283,7 +283,7 @@ void resetPeakThreadsCount() {
+ void initialiseJavaStack(ExecEnv *ee) {
+    int stack_size = ee->stack_size ?
+            (ee->stack_size > MIN_STACK ? ee->stack_size : MIN_STACK) : dflt_stack_size;
+-   char *stack = sysMalloc(stack_size);
++   void *stack = sysMalloc(stack_size);
+    MethodBlock *mb = (MethodBlock *) stack;
+    Frame *top = (Frame *) (mb+1);
+ 
diff --git a/java/jamvm-initial/pkg-descr b/java/jamvm-initial/pkg-descr
new file mode 100644
index 0000000..0ffe412
--- /dev/null
+++ b/java/jamvm-initial/pkg-descr
@@ -0,0 +1,11 @@
+This package is for bootstrapping classpath > 0.93 which cannot be
+compiled with jikes.
+
+JamVM is an extremely small Java Virtual Machine which conforms to the
+JVM specification version 2 (blue book).
+
+It is designed to support the full specification, and includes support
+for object finalisation, Soft/Weak/Phantom References, class-unloading,
+the Java Native Interface (JNI) and the Reflection API.
+
+WWW: http://jamvm.sourceforge.net/
diff --git a/java/jamvm-initial/pkg-plist b/java/jamvm-initial/pkg-plist
new file mode 100644
index 0000000..41a0860
--- /dev/null
+++ b/java/jamvm-initial/pkg-plist
@@ -0,0 +1,3 @@
+bin/jamvm-initial
+share/jamvm-initial/classes.zip
+ at dirrm share/jamvm-initial
diff --git a/java/jamvm/Makefile b/java/jamvm/Makefile
index 1a7f376..e41d8da 100644
--- a/java/jamvm/Makefile
+++ b/java/jamvm/Makefile
@@ -5,7 +5,7 @@
 # $FreeBSD: ports/java/jamvm/Makefile,v 1.8 2011/09/23 22:23:40 amdmi3 Exp $
 
 PORTNAME=	jamvm
-PORTVERSION=	1.5.1
+PORTVERSION=	1.5.4
 PORTREVISION=	4
 CATEGORIES=	java devel
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/JamVM%20${PORTVERSION}
@@ -19,8 +19,16 @@ GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-classpath-install-dir=${LOCALBASE}
 USE_GMAKE=	yes
 
-OPTIONS=	FFI "use libffi to call native methods" ON \
-		ZIP "turn-on zip support in the bootstrap loader" ON
+OPTIONS=	ZIP "turn-on zip support in the bootstrap loader" ON
+
+.include <bsd.port.options.mk>
+
+# sparc64 always needs libffi
+.if (${ARCH} == sparc64)
+WITH_FFI=	1
+.else
+OPTIONS+=	FFI "use libffi to call native methods" ON
+.endif
 
 .include <bsd.port.pre.mk>
 
@@ -39,15 +47,7 @@ CONFIGURE_ARGS+=	--disable-zip
 PLIST_SUB+=		WITH_ZIP="@comment " WITHOUT_ZIP=""
 .endif
 
-.if ${ARCH} == "sparc64"
-BROKEN=		Does not configure on sparc64
-.endif
-
 post-extract:
-	@${MV} ${WRKSRC}/src/arch/x86_64.h ${WRKSRC}/src/arch/amd64.h
 	@${REINPLACE_CMD} -e "s,\(^include_HEADERS = .*\)jni.h\(.*\),\1\2," ${WRKSRC}/src/Makefile.in
 
-post-configure:
-	@${MV} ${WRKSRC}/src/os/bsd/x86_64 ${WRKSRC}/src/os/bsd/amd64
-
 .include <bsd.port.post.mk>
diff --git a/java/jamvm/distinfo b/java/jamvm/distinfo
index 2b59b45..410facf 100644
--- a/java/jamvm/distinfo
+++ b/java/jamvm/distinfo
@@ -1,2 +1,2 @@
-SHA256 (jamvm-1.5.1.tar.gz) = 663895bd69caf3a1fda6af5eea8263d90a5fd35ca8f4c32e2210ac410788901a
-SIZE (jamvm-1.5.1.tar.gz) = 599084
+SHA256 (jamvm-1.5.4.tar.gz) = 7865693698bc4322cabe1014a4b7ebdec1bc1daf45f1a4457b6e908a4446b124
+SIZE (jamvm-1.5.4.tar.gz) = 656283
diff --git a/java/jamvm/files/patch-configure b/java/jamvm/files/patch-configure
new file mode 100644
index 0000000..4b39713
--- /dev/null
+++ b/java/jamvm/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig	2012-01-27 13:55:49.000000000 +0100
++++ configure	2012-01-27 13:56:43.000000000 +0100
+@@ -2689,7 +2689,7 @@ x86_64-*-linux*) host_os=linux ;;
+ hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
+ mipsel-*-linux*) host_cpu=mips host_os=linux ;;
+ x86_64-*-openbsd*) host_os=bsd libdl_needed=no ;;
+-x86_64-*-freebsd*) host_os=bsd libdl_needed=no ;;
++amd64-*-freebsd*) host_os=bsd host_cpu=x86_64 libdl_needed=no ;;
+ arm*-*-linux*) host_cpu=arm host_os=linux ;;
+ arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
+ arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list