FreeBSD Bugzilla – Attachment 179542 Details for
Bug 192305
java/jamvm: 1.5.4 -> 2.0.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
jamvm 2.0.0 patch with openjdk support
jamvm-2.0.0.patch (text/plain), 15.48 KB, created by
Val Packett
on 2017-02-02 19:45:22 UTC
(
hide
)
Description:
jamvm 2.0.0 patch with openjdk support
Filename:
MIME Type:
Creator:
Val Packett
Created:
2017-02-02 19:45:22 UTC
Size:
15.48 KB
patch
obsolete
>diff --git c/java/jamvm/Makefile i/java/jamvm/Makefile >index 411944394f4..c7a6976e19f 100644 >--- c/java/jamvm/Makefile >+++ i/java/jamvm/Makefile >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= jamvm >-PORTVERSION= 1.5.4 >-PORTREVISION= 2 >+PORTVERSION= 2.0.0 > CATEGORIES= java devel > MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/JamVM%20${PORTVERSION} > >@@ -12,17 +11,22 @@ COMMENT= Compact Java virtual machine > > LICENSE= GPLv2 > >-RUN_DEPENDS= ${LOCALBASE}/share/classpath/glibj.zip:java/classpath > >-CONFIGURE_ARGS= --with-classpath-install-dir=${LOCALBASE} > GNU_CONFIGURE= yes > OPTIONS_SUB= yes >+PLIST_SUB= ARCH=${ARCH} > USES= compiler gmake libtool pkgconfig > > OPTIONS_DEFINE= FFI ZIP >-OPTIONS_DEFAULT=FFI ZIP >+OPTIONS_SINGLE= CLASSLIB >+OPTIONS_SINGLE_CLASSLIB= CLASSPATH OPENJDK6 OPENJDK7 # OPENJDK8 >+OPTIONS_DEFAULT=FFI ZIP CLASSPATH > FFI_DESC= use libffi to call native methods > ZIP_DESC= turn-on zip support in the bootstrap loader >+CLASSPATH_DESC= build standalone JamVM with GNU Classpath as the class library >+OPENJDK6_DESC= build JamVM as a VM for OpenJDK 6 (using its class library) >+OPENJDK7_DESC= build JamVM as a VM for OpenJDK 7 (using its class library) >+# OPENJDK8_DESC= build JamVM as a VM for OpenJDK 8 (using its class library) > > FFI_CONFIGURE_ENABLE= ffi > FFI_LIB_DEPENDS= libffi.so:devel/libffi >@@ -31,6 +35,40 @@ ZIP_CONFIGURE_ENABLE= zip > > .include <bsd.port.options.mk> > >+.if ${PORT_OPTIONS:MCLASSPATH} >+ >+RUN_DEPENDS+= ${LOCALBASE}/share/classpath/glibj.zip:java/classpath >+CONFIGURE_ARGS+= --with-classpath-install-dir=${LOCALBASE} >+ >+.elif ${PORT_OPTIONS:MOPENJDK6} >+ >+RUN_DEPENDS+= ${LOCALBASE}/openjdk6/jre/lib/rt.jar:${PORTSDIR}/java/openjdk6 >+CONFIGURE_ARGS+= --with-java-runtime-library=openjdk6 >+post-install: >+ @${MKDIR} -p ${STAGEDIR}${PREFIX}/openjdk6/jre/lib/${ARCH}/jamvm >+ @${MV} ${STAGEDIR}${PREFIX}/lib/libjvm.so ${STAGEDIR}${PREFIX}/openjdk6/jre/lib/${ARCH}/jamvm/libjvm.so >+ @${RM} ${STAGEDIR}${PREFIX}/bin/jamvm >+ >+.elif ${PORT_OPTIONS:MOPENJDK7} >+ >+RUN_DEPENDS+= ${LOCALBASE}/openjdk7/jre/lib/rt.jar:${PORTSDIR}/java/openjdk7 >+CONFIGURE_ARGS+= --with-java-runtime-library=openjdk7 >+post-install: >+ @${MKDIR} -p ${STAGEDIR}${PREFIX}/openjdk7/jre/lib/${ARCH}/jamvm >+ @${MV} ${STAGEDIR}${PREFIX}/lib/libjvm.so ${STAGEDIR}${PREFIX}/openjdk7/jre/lib/${ARCH}/jamvm/libjvm.so >+ @${RM} ${STAGEDIR}${PREFIX}/bin/jamvm >+ >+# .elif ${PORT_OPTIONS:MOPENJDK8} >+ >+# RUN_DEPENDS+= ${LOCALBASE}/openjdk8/jre/lib/rt.jar:${PORTSDIR}/java/openjdk8 >+# CONFIGURE_ARGS+= --with-java-runtime-library=openjdk8 >+# post-install: >+# @${MKDIR} -p ${STAGEDIR}${PREFIX}/openjdk8/jre/lib/${ARCH}/jamvm >+# @${MV} ${STAGEDIR}${PREFIX}/lib/libjvm.so ${STAGEDIR}${PREFIX}/openjdk8/jre/lib/${ARCH}/jamvm/libjvm.so >+# @${RM} ${STAGEDIR}${PREFIX}/bin/jamvm >+ >+.endif >+ > .if empty(PORT_OPTIONS:MFFI) && ${ARCH} == "sparc64" > IGNORE= for ${ARCH} requires libffi > .endif >@@ -41,7 +79,11 @@ IGNORE= for ${ARCH} requires libffi > CONFIGURE_ARGS+= --disable-int-inlining > .endif > >+LDFLAGS+= -Wl,--version-script=${WRKSRC}/mapfile >+ > post-extract: > @${REINPLACE_CMD} -e "s,\(^include_HEADERS = .*\)jni.h\(.*\),\1\2," ${WRKSRC}/src/Makefile.in >+ @${LN} -s bsd ${WRKSRC}/src/os/freebsd >+ @${ECHO} "SUNWprivate_1.1 { *; };" > ${WRKSRC}/mapfile > > .include <bsd.port.post.mk> >diff --git c/java/jamvm/distinfo i/java/jamvm/distinfo >index 410facf62f8..d2c093a6091 100644 >--- c/java/jamvm/distinfo >+++ i/java/jamvm/distinfo >@@ -1,2 +1,3 @@ >-SHA256 (jamvm-1.5.4.tar.gz) = 7865693698bc4322cabe1014a4b7ebdec1bc1daf45f1a4457b6e908a4446b124 >-SIZE (jamvm-1.5.4.tar.gz) = 656283 >+TIMESTAMP = 1486058384 >+SHA256 (jamvm-2.0.0.tar.gz) = 76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da >+SIZE (jamvm-2.0.0.tar.gz) = 741459 >diff --git c/java/jamvm/files/patch-configure i/java/jamvm/files/patch-configure >index 45e93f07d3c..70128a8b942 100644 >--- c/java/jamvm/files/patch-configure >+++ i/java/jamvm/files/patch-configure >@@ -1,75 +1,67 @@ >---- configure.orig 2009-12-31 13:41:44.000000000 -0500 >-+++ configure 2012-09-17 12:29:34.000000000 -0400 >-@@ -2683,28 +2683,27 @@ >+--- configure.orig 2014-06-10 20:39:57 UTC >++++ configure >+@@ -2923,22 +2923,22 @@ i[3456]86-*-kfreebsd*) host_cpu=i386 hos > i[3456]86-*-darwin*) host_cpu=i386 host_os=darwin ;; > arm*-*-darwin*) host_cpu=arm host_os=darwin libdl_needed=no ;; > i386-*-openbsd*) host_os=bsd libdl_needed=no ;; > -i386-*-freebsd*) host_os=bsd libdl_needed=no ;; >-+i386-*-freebsd*) os=bsd libdl_needed=no ;; >++i386-*-freebsd*) host_os=freebsd libdl_needed=no ;; > i386-*-solaris*) host_cpu=x86 host_os=solaris ;; > x86_64-*-linux*) host_os=linux ;; > hppa*-*-linux*) host_cpu=parisc host_os=linux ;; >- mipsel-*-linux*) host_cpu=mips host_os=linux ;; >+ mips*-*-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*) os=bsd host_cpu=x86_64 libdl_needed=no ;; >- arm*-*-linux*) host_cpu=arm host_os=linux ;; >++amd64-*-freebsd*) host_os=freebsd host_cpu=x86_64 libdl_needed=no ;; >+ arm*-*-linux*) host_cpu=arm host_os=linux interp_cflags=-marm ;; > arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;; > -arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;; >-+arm*-*-freebsd*) host_cpu=arm os=bsd libdl_needed=no ;; >++arm*-*-freebsd*) host_cpu=arm host_os=freebsd libdl_needed=no ;; > powerpc*-*-linux*) host_cpu=powerpc host_os=linux ;; > powerpc*-*-openbsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;; > -powerpc*-*-freebsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;; >-+powerpc*-*-freebsd*) host_cpu=powerpc os=bsd libdl_needed=no ;; >++powerpc*-*-freebsd*) host_cpu=powerpc host_os=freebsd libdl_needed=no ;; > powerpc-*-darwin*) host_os=darwin ;; >+ sparc*-*-openbsd*) host_cpu=sparc host_os=bsd libdl_needed=no ;; > -sparc*-*-freebsd*) host_cpu=sparc host_os=bsd libdl_needed=no ;; >-+sparc*-*-freebsd*) host_cpu=sparc os=bsd libdl_needed=no ;; >- *) { { $as_echo "$as_me:$LINENO: error: $host not supported" >&5 >- $as_echo "$as_me: error: $host not supported" >&2;} >- { (exit 1); exit 1; }; } ;; >++sparc*-*-freebsd*) host_cpu=sparc host_os=freebsd libdl_needed=no ;; >+ *) as_fn_error $? "$host not supported" "$LINENO" 5 ;; > esac >- >- arch=$host_cpu >--os=$host_os >- >- >- >-@@ -21662,8 +21661,15 @@ >- if test "${ac_cv_lib_ffi_ffi_call+set}" = set; then >+ >+@@ -12882,8 +12882,16 @@ $as_echo_n "checking for ffi_call in -lf >+ if ${ac_cv_lib_ffi_ffi_call+:} false; then : > $as_echo_n "(cached) " >&6 > else > + ac_check_lib_save_CFLAGS=$CFLAGS > + ac_check_lib_save_LDFLAGS=$LDFLAGS > ac_check_lib_save_LIBS=$LIBS >--LIBS="-lffi $LIBS" >+ LIBS="-lffi $LIBS" > + LIBFFI_CFLAGS="$($PKG_CONFIG libffi --cflags)" > + LIBFFI_LDFLAGS="$($PKG_CONFIG libffi --libs-only-L)" > + LIBFFI_LIBS="$($PKG_CONFIG libffi --libs-only-l)" > +CFLAGS="$LIBFFI_CFLAGS $CFLAGS" > +LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS" > +LIBS="$LIBFFI_LIBS $LIBS" >- cat >conftest.$ac_ext <<_ACEOF >- /* confdefs.h. */ >- _ACEOF >-@@ -21718,6 +21724,8 @@ >- rm -rf conftest.dSYM >- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ >- conftest$ac_exeext conftest.$ac_ext >+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext >+ /* end confdefs.h. */ >+ >+@@ -12909,6 +12917,8 @@ else >+ fi >+ rm -f core conftest.err conftest.$ac_objext \ >+ conftest$ac_exeext conftest.$ac_ext > +CFLAGS=$ac_check_lib_save_CFLAGS > +LDFLAGS=$ac_check_lib_save_LDFLAGS > LIBS=$ac_check_lib_save_LIBS > fi >- { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ffi_ffi_call" >&5 >-@@ -21726,9 +21734,9 @@ >- cat >>confdefs.h <<_ACEOF >+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5 >+@@ -12918,7 +12928,9 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xye > #define HAVE_LIBFFI 1 > _ACEOF >-- >+ > - LIBS="-lffi $LIBS" >-- > + CFLAGS="$LIBFFI_CFLAGS $CFLAGS" > + LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS" > + LIBS="$LIBFFI_LIBS $LIBS" >+ > else >- { { $as_echo "$as_me:$LINENO: error: libffi is missing" >&5 >- $as_echo "$as_me: error: libffi is missing" >&2;} >+ as_fn_error $? "libffi is missing" "$LINENO" 5 >diff --git c/java/jamvm/files/patch-src_classlib_openjdk_class.c i/java/jamvm/files/patch-src_classlib_openjdk_class.c >new file mode 100644 >index 00000000000..cb268d23bd5 >--- /dev/null >+++ i/java/jamvm/files/patch-src_classlib_openjdk_class.c >@@ -0,0 +1,35 @@ >+--- src/classlib/openjdk/class.c.orig 2014-07-12 21:27:51 UTC >++++ src/classlib/openjdk/class.c >+@@ -23,6 +23,7 @@ >+ #include "jam.h" >+ #include "hash.h" >+ #include "class.h" >++#include "excep.h" >+ #include "symbol.h" >+ >+ /* Cached offset of classes field in java.lang.ClassLoader objects */ >+@@ -179,3 +180,24 @@ char *classlibExternalClassName(Class *c >+ >+ return dot_name; >+ } >++ >++Class *findClassFromLoader(char *name, int init, Object *loader, >++ int throw_error) { >++ >++ Class *class = findClassFromClassLoader(name, loader); >++ >++ if(class == NULL) { >++ if(!throw_error) { >++ Object *excep = exceptionOccurred(); >++ char *dot_name = slash2DotsDup(name); >++ >++ clearException(); >++ signalChainedException(java_lang_ClassNotFoundException, >++ dot_name, excep); >++ sysFree(dot_name); >++ } >++ } else if(init) >++ initClass(class); >++ >++ return class; >++} >diff --git c/java/jamvm/files/patch-src_classlib_openjdk_jvm.c i/java/jamvm/files/patch-src_classlib_openjdk_jvm.c >new file mode 100644 >index 00000000000..26c4a1171f0 >--- /dev/null >+++ i/java/jamvm/files/patch-src_classlib_openjdk_jvm.c >@@ -0,0 +1,39 @@ >+--- src/classlib/openjdk/jvm.c.orig 2014-07-24 00:23:42 UTC >++++ src/classlib/openjdk/jvm.c >+@@ -522,27 +522,22 @@ jclass JVM_FindClassFromBootLoader(JNIEn >+ jclass JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, >+ jboolean init, jobject loader, >+ jboolean throw_error) { >+- Class *class; >+ >+ TRACE("JVM_FindClassFromClassLoader(env=%p, name=%s, init=%d, loader=%p," >+ " throw_error=%d)", env, name, init, loader, throw_error); >+ >+- class = findClassFromClassLoader((char *)name, loader); >++ return findClassFromLoader((char *)name, init, loader, throw_error); >++} >+ >+- if(class == NULL) { >+- if(!throw_error) { >+- Object *excep = exceptionOccurred(); >+- char *dot_name = slash2DotsDup((char*)name); >++/* JVM_FindClassFromCaller */ >+ >+- clearException(); >+- signalChainedException(java_lang_ClassNotFoundException, >+- dot_name, excep); >+- sysFree(dot_name); >+- } >+- } else if(init) >+- initClass(class); >++jclass JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init, >++ jobject loader, jclass caller) { >+ >+- return class; >++ TRACE("JVM_FindClassFromCaller(env=%p, name=%s, init=%d, loader=%p," >++ " caller=%p)", env, name, init, loader, caller); >++ >++ return findClassFromLoader((char *)name, init, loader, FALSE); >+ } >+ >+ >diff --git c/java/jamvm/files/patch-src_classlib_openjdk_openjdk.h i/java/jamvm/files/patch-src_classlib_openjdk_openjdk.h >new file mode 100644 >index 00000000000..c19d09eaf37 >--- /dev/null >+++ i/java/jamvm/files/patch-src_classlib_openjdk_openjdk.h >@@ -0,0 +1,16 @@ >+--- src/classlib/openjdk/openjdk.h.orig 2013-08-28 00:53:35 UTC >++++ src/classlib/openjdk/openjdk.h >+@@ -1,5 +1,5 @@ >+ /* >+- * Copyright (C) 2010, 2011, 2013 Robert Lougher <rob@jamvm.org.uk>. >++ * Copyright (C) 2010, 2011, 2013, 2014 Robert Lougher <rob@jamvm.org.uk>. >+ * >+ * This file is part of JamVM. >+ * >+@@ -53,3 +53,6 @@ extern int getMembers(Class *clazz, Obje >+ extern Object *resolveMemberName(Class *mh_class, Object *mname); >+ >+ extern Object *getMethodParameters(Object *method); >++ >++extern Class *findClassFromLoader(char *name, int init, Object *loader, >++ int throw_error); >diff --git c/java/jamvm/files/patch-src_os_bsd_os.c i/java/jamvm/files/patch-src_os_bsd_os.c >new file mode 100644 >index 00000000000..8c0206bdd9f >--- /dev/null >+++ i/java/jamvm/files/patch-src_os_bsd_os.c >@@ -0,0 +1,21 @@ >+--- src/os/bsd/os.c.orig 2014-02-03 20:12:59 UTC >++++ src/os/bsd/os.c >+@@ -97,3 +97,18 @@ char *nativeLibMapName(char *name) { >+ long long nativePhysicalMemory() { >+ return 0; /* TBD */ >+ } >++ >++char *nativeJVMPath() { >++ Dl_info info; >++ char *path; >++ >++ if(dladdr(nativeJVMPath, &info) == 0) { >++ printf("Error: dladdr failed. Aborting VM\n"); >++ exitVM(1); >++ } >++ >++ path = sysMalloc(strlen(info.dli_fname) + 1); >++ strcpy(path, info.dli_fname); >++ >++ return path; >++} >diff --git c/java/jamvm/pkg-plist i/java/jamvm/pkg-plist >index 9a14e5aced4..b43d005b32a 100644 >--- c/java/jamvm/pkg-plist >+++ i/java/jamvm/pkg-plist >@@ -1,24 +1,24 @@ >-bin/jamvm >-lib/libjvm.so >-lib/libjvm.so.0 >-lib/libjvm.so.0.0.0 >-%%ZIP%%lib/rt.jar >-%%ZIP%%%%DATADIR%%/classes.zip >-%%NO_ZIP%%%%DATADIR%%/classes/gnu/classpath/VMStackWalker.class >-%%NO_ZIP%%%%DATADIR%%/classes/gnu/classpath/VMSystemProperties.class >-%%NO_ZIP%%%%DATADIR%%/classes/jamvm/ThreadInfoHelper.class >-%%NO_ZIP%%%%DATADIR%%/classes/jamvm/java/lang/JarLauncher.class >-%%NO_ZIP%%%%DATADIR%%/classes/jamvm/java/lang/VMClassLoaderData$Unloader.class >-%%NO_ZIP%%%%DATADIR%%/classes/jamvm/java/lang/VMClassLoaderData.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMClass.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMClassLoader$PackageInfo.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMClassLoader.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMRuntime.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMString.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMThread.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMThrowable.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/reflect/VMConstructor.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/reflect/VMField.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/lang/reflect/VMMethod.class >-%%NO_ZIP%%%%DATADIR%%/classes/java/security/VMAccessController.class >-%%NO_ZIP%%%%DATADIR%%/classes/sun/reflect/annotation/AnnotationInvocationHandler.class >+%%OPENJDK6%%openjdk6/jre/lib/%%ARCH%%/jamvm/libjvm.so >+%%OPENJDK7%%openjdk7/jre/lib/%%ARCH%%/jamvm/libjvm.so >+%%CLASSPATH%%bin/jamvm >+%%CLASSPATH%%lib/libjvm.so >+%%CLASSPATH%%%%ZIP%%lib/rt.jar >+%%CLASSPATH%%%%ZIP%%%%DATADIR%%/classes.zip >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/gnu/classpath/VMStackWalker.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/gnu/classpath/VMSystemProperties.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/jamvm/ThreadInfoHelper.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/jamvm/java/lang/JarLauncher.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/jamvm/java/lang/VMClassLoaderData$Unloader.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/jamvm/java/lang/VMClassLoaderData.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMClass.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMClassLoader$PackageInfo.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMClassLoader.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMRuntime.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMString.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMThread.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/VMThrowable.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/reflect/VMConstructor.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/reflect/VMField.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/lang/reflect/VMMethod.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/java/security/VMAccessController.class >+%%CLASSPATH%%%%NO_ZIP%%%%DATADIR%%/classes/sun/reflect/annotation/AnnotationInvocationHandler.class
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192305
:
145209
| 179542