aboutsummaryrefslogtreecommitdiffstats
path: root/java/jdk15/Makefile
diff options
context:
space:
mode:
authorphantom <phantom@FreeBSD.org>2004-01-28 22:00:27 +0800
committerphantom <phantom@FreeBSD.org>2004-01-28 22:00:27 +0800
commit40af2579c6c0b82c5636c57ff5da896b8e0ea2cd (patch)
tree5a25a30b8fa94f40b272dfb0b6d4d71595ff8287 /java/jdk15/Makefile
parent088267b0f6c5427a23ddca14372e55decb1ab186 (diff)
downloadfreebsd-ports-gnome-40af2579c6c0b82c5636c57ff5da896b8e0ea2cd.tar.gz
freebsd-ports-gnome-40af2579c6c0b82c5636c57ff5da896b8e0ea2cd.tar.zst
freebsd-ports-gnome-40af2579c6c0b82c5636c57ff5da896b8e0ea2cd.zip
1. Switch 5.x version of jdk14 back to libc_r as default threading library.
We switched FreeBSD-5.x port to libkse as default threading library before releasing of patchset 6, but users who has most of stuff linked against libc_r and attempted to use jdk linked against libkse got into local hell of threading libraries mix. So, rollback to libc_r by default and add PTHREAD_LIBS support for this port. IMPORTANT: In order to use libkse as threading library for jdk14 you have to use rtld's libmap feature or recompile your ports stuff (like mozilla) with libkse. NOTE: libkse still has issues with java debug support, so if you're going to use debuging (JVMDI) stuff - leave with libc_r for now. 2. Disable IPv6 support by default. Unfortunatelly due to security reasons IPv4-to-IPv6 addresses mapping is disabled by default in FreeBSD-5.x, so those who would like to use Java Networking stuff had to manually enable it. To make jdk14 port more user-friendly IPv6 is disabled now on compile time. Those who need this stuff enabled have to use WITH_IPV6 compile time option. 3. Add MINIMAL compile option. If this option is used to build jdk14 port then plugin, javaws and demos stuff will not be installed and/or packaged. Also (as noted in [5]) X11 runtime dependancy will not be registered into built package. 4. Strip runtime depends of jdk14 port. There's no need to require open-motif to be runtime depends since libXm is staticly linked into libawt.so. 5. Make X11 runtime dependancy conditional (via urwfonts) in !WITHOUT_PLUGIN case only. This should affect only prebuilt package users: there's no need to install X11 libraries if you're going to use non-GUI stuff only (i.e. tomcat or jboss) 6. Add ${LOCALBASE}/lib to the deafult search path for JNI libraries. 7. Bump PORTVERSION Reported by: many [1] Submitted by: glewis [6] Requested by: marcus [6]
Diffstat (limited to 'java/jdk15/Makefile')
-rw-r--r--java/jdk15/Makefile73
1 files changed, 60 insertions, 13 deletions
diff --git a/java/jdk15/Makefile b/java/jdk15/Makefile
index 3773b292b2c8..91d16ece76d4 100644
--- a/java/jdk15/Makefile
+++ b/java/jdk15/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${JDK_VERSION}p${JDK_PATCHSET_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
MASTER_SITES= # http://www.sun.com/software/java2/download.html
# http://www.eyesbeyond.com/freebsddom/java/jdk14.html
@@ -19,15 +19,15 @@ DISTFILES= ${SCSL_SRCFILE} ${SCSL_BINFILE} ${PATCHSETFILE}
MAINTAINER= phantom@FreeBSD.org
COMMENT= Java Development Kit 1.4.2
-# XXX: (native bootstrap, no plugin/javaws, x11)
EXTRACT_DEPENDS=zip:${PORTSDIR}/archivers/zip
BUILD_DEPENDS= gm4:${PORTSDIR}/devel/m4 \
zip:${PORTSDIR}/archivers/zip \
${X11BASE}/lib/libXm.so:${PORTSDIR}/x11-toolkits/open-motif \
${LOCALBASE}/include/nspr/prtypes.h:${PORTSDIR}/devel/nspr
-RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper \
- ${X11BASE}/lib/libXm.so:${PORTSDIR}/x11-toolkits/open-motif \
- ${X11BASE}/lib/X11/fonts/URW/fonts.dir:${PORTSDIR}/x11-fonts/urwfonts
+RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper
+.if !defined(MINIMAL)
+RUN_DEPENDS+= ${X11BASE}/lib/X11/fonts/URW/fonts.dir:${PORTSDIR}/x11-fonts/urwfonts
+.endif
WRKSRC= ${WRKDIR}/control/make
@@ -83,6 +83,7 @@ EXTRACT_ONLY= ${SCSL_SRCFILE} ${SCSL_BINFILE}
ONLY_FOR_ARCHS= i386
USE_GMAKE= YES
+USE_REINPLACE= YES
RESTRICTED= "Redistribution of pre-compiled binaries is not permitted"
NO_CDROM= "Redistribution of pre-compiled binaries is not permitted"
MAKE_ENV= ALT_BOOTDIR="${JDK14DIR}" \
@@ -93,6 +94,10 @@ MAKE_ENV= ALT_BOOTDIR="${JDK14DIR}" \
JAVA_HOME="" \
CLASSPATH="" \
LD_LIBRARY_PATH=""
+.if defined(MINIMAL)
+MAKE_ENV+= NO_PLUGIN="YES" \
+ NO_JAVAWS="YES"
+.endif
ALL_TARGET= all
PLIST_SUB+= JDK_VERSION=${JDK_VERSION}
PKGINSTALL= ${WRKDIR}/pkg-install
@@ -100,13 +105,35 @@ PKGINSTALL= ${WRKDIR}/pkg-install
JDKIMAGEDIR= ${WRKSRC}/../build/bsd-i586/j2sdk-image
JDKIMAGEDIR_G= ${WRKSRC}/../build/bsd-i586/j2sdk-debug-image
+.if !defined(WITH_IPV6)
+EXTRA_PATCHES+= ${PATCHDIR}/disable-ipv6.patch
+.endif
+
+.if defined(MINIMAL)
+PLIST_SUB+= MINIMAL:="@comment "
+PKGNAMESUFFIX= -minimal
+.else
+PLIST_SUB+= MINIMAL:=""
+.endif
+
.if defined(WITH_DEBUG)
PLIST_SUB+= DEBUG:=""
-PKGNAMESUFFIX= -debug
.else
PLIST_SUB+= DEBUG:="@comment "
.endif
+PTHREAD_FILES= ../../hotspot/build/bsd/makefiles/vm.make \
+ ../../j2se/make/common/Defs.gmk \
+ ../../j2se/make/common/Program.gmk \
+ ../../j2se/make/common/Defs-bsd.gmk \
+ ../../j2se/make/java/hpi/hpi_common.gmk \
+ ../../j2se/make/java/hpi/native/Makefile \
+ ../../j2se/make/java/net/Makefile \
+ ../../deploy/make/common/Defs-bsd.gmk \
+ ../../deploy/make/plugin/common/config.gmk
+
+LD_LIBRARY_PATH_FILES= ../../hotspot/src/os/bsd/vm/os_bsd.cpp
+
# Check for JDK sources
.if !exists(${DISTDIR}/${SCSL_SRCFILE}) && !defined(PACKAGE_BUILDING)
ECHO_MSG=/usr/bin/printf
@@ -174,19 +201,24 @@ use JDK 1.4.2.\n\n" ; \
pre-fetch: check-os
@${ECHO_MSG}
- @${ECHO_MSG} "NOTICES:"
- @${ECHO_MSG}
- @${ECHO_MSG} "To build JDK 1.4.2 port, you should have at least"
+ @${ECHO_MSG} "IMPORTANT: To build JDK 1.4.2 port, you should have at least"
@${ECHO_MSG} "1.7Gb of free disk space in build area!"
@${ECHO_MSG}
.if defined(WITH_LINUX_BOOTSTRAP)
- @${ECHO_MSG} "To build JDK 1.4.2 port, you should have linux emulation"
+ @${ECHO_MSG} "IMPORTANT: To build JDK 1.4.2 port, you should have linux emulation"
@${ECHO_MSG} "enabled in the kernel and linux procfs (linprocfs) filesystem"
@${ECHO_MSG} "mounted."
@${ECHO_MSG}
.endif
- @${ECHO_MSG} "NOTE: Please use \`make -DWITH_DEBUG' if you want to"
- @${ECHO_MSG} "install libraries and binaries with debugging support."
+ @${ECHO_MSG} "Following port compile time options are available:"
+ @${ECHO_MSG}
+ @${ECHO_MSG} " WITH_DEBUG - install JDK binaries and libraries"
+ @${ECHO_MSG} " with debuging support"
+ @${ECHO_MSG}
+ @${ECHO_MSG} " MINIMAL - don't build/install mozilla java"
+ @${ECHO_MSG} " plugin, javaws and JDK demos"
+ @${ECHO_MSG}
+ @${ECHO_MSG} " WITH_IPV6 - enable JDK IPv6 support"
@${ECHO_MSG}
pre-patch:
@@ -195,6 +227,16 @@ pre-patch:
${CHMOD} -R u+w * && \
${PATCH} -p0 < ${WRKDIR}/jdk14.patches
+post-patch:
+ @for file in ${LD_LIBRARY_PATH_FILES}; do \
+ ${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" \
+ ${WRKSRC}/$${file}; \
+ done
+ @for file in ${PTHREAD_FILES}; do \
+ ${REINPLACE_CMD} -e "s:-lkse:${PTHREAD_LIBS}:g" \
+ ${WRKSRC}/$${file}; \
+ done
+
.if defined(WITH_LINUX_BOOTSTRAP)
pre-build:
@if [ "$${WRKDIRPREFIX}" -a \
@@ -244,13 +286,16 @@ post-build:
@${RM} -rf ${JDKIMAGEDIR}/man/ja
@${RM} -rf ${JDKIMAGEDIR}/man/ja_JP.eucJP
-.if !defined(WITH_DEBUG)
pre-install:
+.if !defined(WITH_DEBUG)
@${ECHO_MSG}
@${ECHO_MSG} "Please use \`make -DWITH_DEBUG' if you want to install libraries and binaries"
@${ECHO_MSG} "with debugging support."
@${ECHO_MSG}
.endif
+.if defined(MINIMAL)
+ @${RM} -rf ${JDKIMAGEDIR}/demo
+.endif
do-install:
${MKDIR} ${PREFIX}/jdk${JDK_VERSION}
@@ -262,8 +307,10 @@ do-install:
.endif
${INSTALL_DATA} ${FILESDIR}/cacerts \
${PREFIX}/jdk${JDK_VERSION}/jre/lib/security/cacerts
+.if !defined(MINIMAL)
${INSTALL_DATA} ${FILESDIR}/cacerts \
${PREFIX}/jdk${JDK_VERSION}/jre/javaws/cacerts
+.endif
post-install:
@${LOCALBASE}/bin/registervm "${PREFIX}/jdk${JDK_VERSION}/bin/java # FREEBSD-JDK${JDK_VERSION}"