diff options
author | glewis <glewis@FreeBSD.org> | 2003-03-01 01:54:40 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2003-03-01 01:54:40 +0800 |
commit | eb9e0ac419ca9bc881768b2dd1c6229ab00c7b98 (patch) | |
tree | d16dd8a70b0003cd044c9a289d91ed0c16e3e2ce /java/jdk15 | |
parent | 9e1be89292a59cef10364bdf84cccba74c4b7aeb (diff) | |
download | freebsd-ports-gnome-eb9e0ac419ca9bc881768b2dd1c6229ab00c7b98.tar.gz freebsd-ports-gnome-eb9e0ac419ca9bc881768b2dd1c6229ab00c7b98.tar.zst freebsd-ports-gnome-eb9e0ac419ca9bc881768b2dd1c6229ab00c7b98.zip |
1. Bump PORTREVISION for this and previous changes.
2. Enable compiling the HotSpot JVM. This is experimental and there are a
number of caveats with its use that are reported by the port. The flag
to enable this is WITH_HOTSPOT.
3. Try to pick some OSVERSION settings appropriate for the current native
threads implementation.
PR: 47397 (2)
Submitted by: Munehiro Matsuda <haro@h4.dion.ne.jp> (2)
Diffstat (limited to 'java/jdk15')
-rw-r--r-- | java/jdk15/Makefile | 83 | ||||
-rw-r--r-- | java/jdk15/pkg-plist | 9 |
2 files changed, 91 insertions, 1 deletions
diff --git a/java/jdk15/Makefile b/java/jdk15/Makefile index c3f617fbe24b..ccb3da3469dc 100644 --- a/java/jdk15/Makefile +++ b/java/jdk15/Makefile @@ -7,6 +7,7 @@ PORTNAME= jdk PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION} +PORTREVISION= 1 CATEGORIES= java devel MASTER_SITES= # http://www.sun.com/software/java2/download.html # http://www.eyesbeyond.com/freebsddom/java/jdk13.html @@ -89,7 +90,7 @@ PKGNAMESUFFIX= -nodebug PLIST_SUB+= DEBUG:="" .endif -.if defined(WITH_NATIVE_THREADS) +.if defined(WITH_NATIVE_THREADS) || defined(WITH_HOTSPOT) PLIST_SUB+= NATIVE:="" MAKE_ARGS+= HPIS="green native" .else @@ -102,8 +103,29 @@ PLIST_SUB+= PLUGIN:="@comment " PLIST_SUB+= PLUGIN:="" .endif +.if defined(WITH_HOTSPOT) +PLIST_SUB+= HOTSPOT:="" +USE_REINPLACE= yes +.if defined(NODEBUG) +HOTSPOT_TARGETS=product1 product +.else +HOTSPOT_TARGETS=compiler1 compiler2 +.endif +.else +PLIST_SUB+= HOTSPOT:="@comment " +.endif + .include <bsd.port.pre.mk> +.if defined(WITH_HOTSPOT) && ${OSVERSION} < 500039 +USE_GCC= 3.2 +BUILD_DEPENDS+= gcc32:${PORTSDIR}/lang/gcc32 +MAKE_ENV+= ALT_COMPILER_PATH=${LOCALBASE}/bin +HOTSPOT_BUILD= ../ext/plugin/build/solaris/GNUmakefile \ + ../../hotspot1.3.1/build/linux/makefiles/adlc.make \ + ../../hotspot1.3.1/build/linux/platform_i486 +.endif + .if ${OSVERSION} < 460101 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500038 ) BUILD_DEPENDS+= gtar:${PORTSDIR}/archivers/gtar TAR= gtar # Necessary for proper extraction of sources @@ -134,6 +156,29 @@ http://www.eyesbeyond.com/freebsddom/java/jdk13.html.\n\ Please place the patchset in ${DISTDIR}.\n .endif +# HotSpot and/or native threads require a recent version of FreeBSD +.if ( defined(WITH_NATIVE_THREADS) || defined(WITH_HOTSPOT) ) && ( ${OSVERSION} < 470101 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500043 ) ) +ECHO_MSG=/usr/bin/printf +IGNORE= :\n\ +You must have a version of FreeBSD later than 4.7-STABLE February 2003\n\ +or 5-CURRENT February 2003 to use either native threads or HotSpot.\n +.endif + +# Warn user about HotSpot build +.if defined(WITH_HOTSPOT) +pre-everything: + @${ECHO_MSG} "" + @${ECHO_MSG} "You have set WITH_HOTSPOT to enable the build of the HotSpot VM." + @${ECHO_MSG} "Please note that HotSpot development is still experimental and is" + @${ECHO_MSG} "not suitable for use in a production environment." + @${ECHO_MSG} "To use the browser plugin with HotSpot you will need to set the" + @${ECHO_MSG} "THREADS_FLAG environment variable when running the browser, e.g." + @${ECHO_MSG} " setenv THREADS_FLAG native" + @${ECHO_MSG} "Compiling HotSpot into the JDK will also currently make the" + @${ECHO_MSG} "Classic VM unusable." + @${ECHO_MSG} "" +.endif + pre-patch: @cd ${WRKDIR} && \ ${CHMOD} -R u+w * && \ @@ -148,6 +193,16 @@ pre-patch: ${MKDIR} hotspot1.3.1/src/os_cpu/bsd_i486/vm && \ ${PATCH} < ${WRKDIR}/jdk131.patches +post-patch: +.if defined(WITH_HOTSPOT) +.if defined(USE_GCC) && ${USE_GCC} == 3.2 + @for file in ${HOTSPOT_BUILD}; do \ + ${REINPLACE_CMD} -e "s:gcc:gcc32:g ; s:g\+\+:g\+\+32:g" ${WRKSRC}/$${file}; \ + done + @${REINPLACE_CMD} -e "s:PATH[)]gcc:PATH)gcc32:g ; s:PATH[)]g\+\+:PATH)g\+\+32:g" ${WRKSRC}/common/Defs-bsd.gmk +.endif +.endif + .if !defined(NATIVE_BOOTSTRAP) pre-build: @if [ "$${WRKDIRPREFIX}" -a \ @@ -170,7 +225,33 @@ pre-build: fi .endif +do-build: + # Start of jdk build + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) +.if defined(WITH_HOTSPOT) + # Start of HotSpot build + @(cd ${WRKDIR}/hotspot1.3.1/build/linux ; \ + ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${HOTSPOT_TARGETS}) +.endif + post-build: +.if defined(WITH_HOTSPOT) + # Copy HotSpot VM to image dir + ${MKDIR} ${JDKIMAGEDIR}/jre/lib/i386/client + ${INSTALL_PROGRAM} ${WRKDIR}/hotspot1.3.1/build/linux/linux_i486_compiler1/product/libjvm.so ${JDKIMAGEDIR}/jre/lib/i386/client/ + ${INSTALL_DATA} ${WRKDIR}/hotspot1.3.1/src/share/vm/Xusage.txt ${JDKIMAGEDIR}/jre/lib/i386/client/ + ${MKDIR} ${JDKIMAGEDIR}/jre/lib/i386/server + ${INSTALL_PROGRAM} ${WRKDIR}/hotspot1.3.1/build/linux/linux_i486_compiler2/product/libjvm.so ${JDKIMAGEDIR}/jre/lib/i386/server/ + ${INSTALL_DATA} ${WRKDIR}/hotspot1.3.1/src/share/vm/Xusage.txt ${JDKIMAGEDIR}/jre/lib/i386/server/ + @(cd ${JDKIMAGEDIR}/jre/lib/i386; ${LN} -sf client hotspot) +.if !defined(NODEBUG) + # Copy debug version of HotSpot VM to image dir + ${MKDIR} ${JDKIMAGEDIR_G}/jre/lib/i386/client + ${INSTALL_PROGRAM} ${WRKDIR}/hotspot1.3.1/build/linux/linux_i486_compiler1/jvmg/libjvm_g.so ${JDKIMAGEDIR_G}/jre/lib/i386/client/ + ${MKDIR} ${JDKIMAGEDIR_G}/jre/lib/i386/server + ${INSTALL_PROGRAM} ${WRKDIR}/hotspot1.3.1/build/linux/linux_i486_compiler2/jvmg/libjvm_g.so ${JDKIMAGEDIR_G}/jre/lib/i386/server/ +.endif +.endif # Prune empty dirs ${FIND} ${JDKIMAGEDIR} -type d | ${SORT} -r | \ ${XARGS} ${RMDIR} 2> /dev/null || ${TRUE} diff --git a/java/jdk15/pkg-plist b/java/jdk15/pkg-plist index a20423a407c1..1563ab802105 100644 --- a/java/jdk15/pkg-plist +++ b/java/jdk15/pkg-plist @@ -813,8 +813,12 @@ jdk%%JDK_VERSION%%/jre/lib/i18n.jar jdk%%JDK_VERSION%%/jre/lib/i386/classic/Xusage.txt jdk%%JDK_VERSION%%/jre/lib/i386/classic/libjvm.so %%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/classic/libjvm_g.so +%%HOTSPOT:%%jdk%%JDK_VERSION%%/jre/lib/i386/client/Xusage.txt +%%HOTSPOT:%%jdk%%JDK_VERSION%%/jre/lib/i386/client/libjvm.so +%%HOTSPOT:%%%%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/client/libjvm_g.so jdk%%JDK_VERSION%%/jre/lib/i386/green_threads/libhpi.so %%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/green_threads/libhpi_g.so +%%HOTSPOT:%%jdk%%JDK_VERSION%%/jre/lib/i386/hotspot jdk%%JDK_VERSION%%/jre/lib/i386/libJdbcOdbc.so %%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/libJdbcOdbc_g.so jdk%%JDK_VERSION%%/jre/lib/i386/libagent.so @@ -855,6 +859,9 @@ jdk%%JDK_VERSION%%/jre/lib/i386/libzip.so %%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/libzip_g.so %%NATIVE:%%jdk%%JDK_VERSION%%/jre/lib/i386/native_threads/libhpi.so %%NATIVE:%%%%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/native_threads/libhpi_g.so +%%HOTSPOT:%%jdk%%JDK_VERSION%%/jre/lib/i386/server/Xusage.txt +%%HOTSPOT:%%jdk%%JDK_VERSION%%/jre/lib/i386/server/libjvm.so +%%HOTSPOT:%%%%DEBUG:%%jdk%%JDK_VERSION%%/jre/lib/i386/server/libjvm_g.so jdk%%JDK_VERSION%%/jre/lib/images/cursors/cursors.properties jdk%%JDK_VERSION%%/jre/lib/images/cursors/invalid32x32.gif jdk%%JDK_VERSION%%/jre/lib/images/cursors/motif_CopyDrop32x32.gif @@ -956,8 +963,10 @@ jdk%%JDK_VERSION%%/src.jar @dirrm jdk%%JDK_VERSION%%/jre/lib/locale @dirrm jdk%%JDK_VERSION%%/jre/lib/images/cursors @dirrm jdk%%JDK_VERSION%%/jre/lib/images +%%HOTSPOT:%%@dirrm jdk%%JDK_VERSION%%/jre/lib/i386/server %%NATIVE:%%@dirrm jdk%%JDK_VERSION%%/jre/lib/i386/native_threads @dirrm jdk%%JDK_VERSION%%/jre/lib/i386/green_threads +%%HOTSPOT:%%@dirrm jdk%%JDK_VERSION%%/jre/lib/i386/client @dirrm jdk%%JDK_VERSION%%/jre/lib/i386/classic @dirrm jdk%%JDK_VERSION%%/jre/lib/i386 @dirrm jdk%%JDK_VERSION%%/jre/lib/fonts |