diff --git a/devel/jdk/1.4/Makefile b/devel/jdk/1.4/Makefile index 36568403e54..382bc6d50fe 100644 --- a/devel/jdk/1.4/Makefile +++ b/devel/jdk/1.4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2004/12/21 04:01:05 kurt Exp $ +# $OpenBSD: Makefile,v 1.2 2005/02/04 17:06:45 kurt Exp $ # $FreeBSD: /repoman/r/pcvs/ports/java/jdk14/Makefile,v 1.79 2004/08/18 07:06:03 glewis Exp $ ONLY_FOR_ARCHS= i386 @@ -7,8 +7,8 @@ COMMENT= "Java2(TM) Standard Edition Dev Kit v${V}" COMMENT-jre= "Java2(TM) Standard Edition Runtime Environment v${V}" V= 1.4.2 DISTNAME= j2sdk-1_4_2 -PKGNAME= jdk-${V} -PKGNAME-jre= jre-${V} +PKGNAME= jdk-${V}p0 +PKGNAME-jre= jre-${V}p0 CATEGORIES= devel/jdk java @@ -24,7 +24,7 @@ DISTFILES= ${DISTNAME}-src-scsl.zip \ bsd-jdk14-patches-7.tar.gz # Sun Community Source License -# http://www.sun.com/981208/scsl/principles.html +# http://www.sun.com/software/communitysource/j2se/java2/license.html PERMIT_PACKAGE_CDROM= "SCSL" PERMIT_PACKAGE_FTP= "SCSL" PERMIT_DISTFILES_CDROM= "SCSL" @@ -53,7 +53,8 @@ MAKE_ENV= ALT_MOTIF_DIR="${LOCALBASE}" \ DEV_ONLY="YES" \ LANG="C" \ CC="${CC}" \ - CXX="${CXX}" + CXX="${CXX}" \ + DEFAULT_LD_LIBRARY_PATH="/usr/lib:/usr/X11R6/lib:${LOCALBASE}/lib" # Error message for distfile. FETCH_MANUALLY= "You must manually fetch the distibution files, place" diff --git a/devel/jdk/1.4/patches/patch-deploy_make_common_Defs_gmk b/devel/jdk/1.4/patches/patch-deploy_make_common_Defs_gmk new file mode 100644 index 00000000000..71b8aafbe6e --- /dev/null +++ b/devel/jdk/1.4/patches/patch-deploy_make_common_Defs_gmk @@ -0,0 +1,12 @@ +$OpenBSD: patch-deploy_make_common_Defs_gmk,v 1.1 2005/02/04 17:06:45 kurt Exp $ +--- deploy/make/common/Defs.gmk.orig Tue Jan 4 10:06:48 2005 ++++ deploy/make/common/Defs.gmk Tue Jan 4 10:09:44 2005 +@@ -100,6 +100,8 @@ I18N_JAR_ABS = javaws-l10n.jar + I18N_JAR = $(PROTO_DIR)/$(I18N_JAR_ABS) + ZIP = $(ZIPEXE) + TMPDIR = $(OUTPUTDIR)/tmp/javaws ++BINDIR = $(OUTPUTDIR)/bin ++LIBDIR = $(OUTPUTDIR)/lib + + SUFFIX = $($(VARIANT)_SUFFIX) + OPT_SUFFIX = diff --git a/devel/jdk/1.4/patches/patch-hotspot_build_bsd_makefiles_vm_make b/devel/jdk/1.4/patches/patch-hotspot_build_bsd_makefiles_vm_make new file mode 100644 index 00000000000..dfc8e341fdb --- /dev/null +++ b/devel/jdk/1.4/patches/patch-hotspot_build_bsd_makefiles_vm_make @@ -0,0 +1,14 @@ +$OpenBSD: patch-hotspot_build_bsd_makefiles_vm_make,v 1.1 2005/02/04 17:06:45 kurt Exp $ +--- hotspot/build/bsd/makefiles/vm.make.orig Tue Jan 4 16:41:18 2005 ++++ hotspot/build/bsd/makefiles/vm.make Tue Jan 4 17:03:26 2005 +@@ -73,6 +73,10 @@ BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = + + CPPFLAGS = ${SYSDEFS} ${INCLUDES} ${BUILD_VERSION} + ++ifdef DEFAULT_LD_LIBRARY_PATH ++CPPFLAGS += -DDEFAULT_LD_LIBRARY_PATH="\"$(DEFAULT_LD_LIBRARY_PATH)\"" ++endif ++ + # Suppress warnings (for now) + CFLAGS += -w + diff --git a/devel/jdk/1.4/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp b/devel/jdk/1.4/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp new file mode 100644 index 00000000000..290f6620234 --- /dev/null +++ b/devel/jdk/1.4/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp @@ -0,0 +1,13 @@ +$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.1 2005/02/04 17:06:45 kurt Exp $ +--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig Tue Jan 4 16:41:21 2005 ++++ hotspot/src/os/bsd/vm/os_bsd.cpp Tue Jan 4 16:42:20 2005 +@@ -344,7 +344,9 @@ props_md_t* os::get_system_properties() + #define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n)) + #define getenv(n) ::getenv(n) + ++#ifndef DEFAULT_LD_LIBRARY_PATH + #define DEFAULT_LD_LIBRARY_PATH "/usr/lib" /* See ld.so.1(1) */ ++#endif + #define EXTENSIONS_DIR "/lib/ext" + #define ENDORSED_DIR "/lib/endorsed" + diff --git a/devel/jdk/1.4/patches/patch-j2se_src_share_classes_java_lang_ClassLoader_java b/devel/jdk/1.4/patches/patch-j2se_src_share_classes_java_lang_ClassLoader_java new file mode 100644 index 00000000000..5e83941294b --- /dev/null +++ b/devel/jdk/1.4/patches/patch-j2se_src_share_classes_java_lang_ClassLoader_java @@ -0,0 +1,67 @@ +$OpenBSD: patch-j2se_src_share_classes_java_lang_ClassLoader_java,v 1.1 2005/02/04 17:06:45 kurt Exp $ +--- j2se/src/share/classes/java/lang/ClassLoader.java.orig Wed Sep 10 21:48:40 2003 ++++ j2se/src/share/classes/java/lang/ClassLoader.java Mon Jan 3 15:41:35 2005 +@@ -9,6 +9,7 @@ package java.lang; + import java.io.InputStream; + import java.io.IOException; + import java.io.File; ++import java.io.FilenameFilter; + import java.lang.reflect.Constructor; + import java.lang.reflect.InvocationTargetException; + import java.net.MalformedURLException; +@@ -29,6 +30,7 @@ import java.util.Set; + import java.util.Stack; + import java.util.Map; + import java.util.Vector; ++import java.util.Arrays; + import sun.misc.ClassFileTransformer; + import sun.misc.CompoundEnumeration; + import sun.misc.Resource; +@@ -1492,18 +1494,43 @@ public abstract class ClassLoader { + } + + private static boolean loadLibrary0(Class fromClass, final File file) { +- Boolean exists = (Boolean) ++ File libfile = (File) + AccessController.doPrivileged(new PrivilegedAction() { ++ class LibraryFileFilter implements FilenameFilter { ++ String lib_name; ++ LibraryFileFilter(String lib_name) { this.lib_name = lib_name; } ++ public boolean accept(File dir, String name) { ++ if (name.startsWith(lib_name)) { ++ return name.substring(lib_name.length()).matches("\056[0-9]+\056[0-9]+$"); ++ } ++ return false; ++ } ++ } ++ + public Object run() { +- return new Boolean(file.exists()); ++ if (file.exists()) ++ return file; ++ // if file is unversioned, check for a versioned one in same dir ++ if (file.getName().endsWith(".so")) { ++ File dir = file.getParentFile(); ++ if (dir != null) { ++ String liblist[] = dir.list(new LibraryFileFilter(file.getName())); ++ if (liblist != null && liblist.length > 0) { ++ // return the highest versioned lib ++ Arrays.sort(liblist); ++ return new File(dir, liblist[liblist.length - 1]); ++ } ++ } ++ } ++ return null; + } + }); +- if (!exists.booleanValue()) { ++ if (libfile == null) { + return false; + } + String name; + try { +- name = file.getCanonicalPath(); ++ name = libfile.getCanonicalPath(); + } catch (IOException e) { + return false; + } diff --git a/devel/jdk/1.4/patches/patch-j2se_src_solaris_native_java_util_TimeZone_md_c b/devel/jdk/1.4/patches/patch-j2se_src_solaris_native_java_util_TimeZone_md_c new file mode 100644 index 00000000000..32e384129c4 --- /dev/null +++ b/devel/jdk/1.4/patches/patch-j2se_src_solaris_native_java_util_TimeZone_md_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-j2se_src_solaris_native_java_util_TimeZone_md_c,v 1.1 2005/02/04 17:06:45 kurt Exp $ +--- j2se/src/solaris/native/java/util/TimeZone_md.c.orig Thu Feb 3 20:05:26 2005 ++++ j2se/src/solaris/native/java/util/TimeZone_md.c Thu Feb 3 20:06:08 2005 +@@ -236,7 +236,7 @@ getPlatformTimeZoneID() + return NULL; + } + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__OpenBSD__) + /* + * If it's a symlink, get the link name and its zone ID part. (The + * older versions of timeconfig created a symlink as described in +@@ -260,7 +260,7 @@ getPlatformTimeZoneID() + } + return tz; + } +-#endif /* __linux__ */ ++#endif /* __linux__ || __OpenBSD__ */ + + /* + * If it's a regular file, we need to find out the same zoneinfo file