[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: jdk-1.3 workaround



Hi!

I don't know what the problem with jdk-1.3 and redhat 8.0 libraries is,
but as a matter of fact, jdk-1.3 only works with the old libs. Therefore
I created a redhat6 port, containing everything that was in the old
redhat_base-6.2p6 port. Extract the attached tar ball into
PORTSDIR/emulators.

Furthermore the attached diff brings jdk-1.3 to patchlevel 8 and makes
it use redhat6 instead of redhat_base.

This is just a quick hack. It is neither optimised nor cleaned up, but
works with the java examples I tried.

Comments welcome!

bye,

Nikolay

-- 
OpenPGP: 0x5C0878D2 - BB55 EDCF A1F6 8057 B953  4C66 EFBD BA73 5C08 78D2

redhat6.tar.gz

diff -uNr --exclude=CVS /usr/ports/devel/jdk/1.3-linux/Makefile ./Makefile
--- /usr/ports/devel/jdk/1.3-linux/Makefile	Mon Feb  3 10:31:19 2003
+++ ./Makefile	Mon May  5 19:33:34 2003
@@ -3,7 +3,7 @@
 ONLY_FOR_ARCHS=	i386
 
 COMMENT=	"Java Development Kit for Java 2 Standard Edition 1.3"
-VERSION=	1.3.1_07
+VERSION=	1.3.1_08
 
 DISTNAME=	jdk${VERSION}
 PKGNAME=	jdk-linux-${VERSION}
@@ -12,7 +12,7 @@
 HOMEPAGE=	http://java.sun.com/j2se/
 MAINTAINER=	Christian Edward Gruber <cgruber@israfil.net>
 
-BUILD_DEPENDS=	:redhat_base->=6.2:emulators/redhat/base
+BUILD_DEPENDS=	::emulators/redhat6
 RUN_DEPENDS=	${BUILD_DEPENDS}
 DISTFILES=	j2sdk-${VERSION:S/./_/g}-linux-i586.bin
 EXTRACT_CASES+=	*.bin) \
@@ -43,6 +43,9 @@
 	fi
 
 JDK_HOME=	${PREFIX}/jdk1.3.1-linux
+
+post-patch:
+	@perl -pi -e "s,%%LOCALBASE%%,${LOCALBASE},g" ${WRKDIST}/bin/.java_wrapper
 
 pre-install:
 	@${INSTALL_DATA_DIR} ${JDK_HOME}
diff -uNr --exclude=CVS /usr/ports/devel/jdk/1.3-linux/distinfo ./distinfo
--- /usr/ports/devel/jdk/1.3-linux/distinfo	Mon Feb  3 10:31:20 2003
+++ ./distinfo	Thu May  1 09:29:50 2003
@@ -1,3 +1,3 @@
-MD5 (j2sdk-1_3_1_07-linux-i586.bin) = b389e16c8edbb1b68d7eca45db35c496
-RMD160 (j2sdk-1_3_1_07-linux-i586.bin) = 5a9b9ae04f3f1bcb126ce26c78c70393f560d1b0
-SHA1 (j2sdk-1_3_1_07-linux-i586.bin) = 51fc6536420d79218c11aebc72d71099d253a9a9
+MD5 (j2sdk-1_3_1_08-linux-i586.bin) = c64debbb65368206e19981d6e37a891a
+RMD160 (j2sdk-1_3_1_08-linux-i586.bin) = 0d9eb2de3027570a7e4d9125888e91f81c5c34b1
+SHA1 (j2sdk-1_3_1_08-linux-i586.bin) = 60b0f18a01855a82518c46206c8c96cadc040e01
diff -uNr --exclude=CVS /usr/ports/devel/jdk/1.3-linux/patches/patch-bin__java_wrapper ./patches/patch-bin__java_wrapper
--- /usr/ports/devel/jdk/1.3-linux/patches/patch-bin__java_wrapper	Thu Jan  1 01:00:00 1970
+++ ./patches/patch-bin__java_wrapper	Mon May  5 19:41:20 2003
@@ -0,0 +1,23 @@
+$OpenBSD$
+--- bin/.java_wrapper.orig	Mon May  5 19:19:37 2003
++++ bin/.java_wrapper	Mon May  5 19:24:24 2003
+@@ -9,6 +9,8 @@ PRG=$0
+ SVPATH="$PATH"
+ PATH=/bin:/usr/bin
+ 
++DEBUG_PROG=%%LOCALBASE%%/emul/redhat6/usr/bin/ld-2.1.3-olf.so
++
+ progname=`basename $0`
+ case "`uname -m`" in
+     i[3-6]86  | ia32 | ia64 | i?86)
+@@ -86,7 +88,9 @@ JAVA_LIBRARY_PATH="${jre}/lib/${proc}/${
+ # Set LD_LIBRARY_PATH to find libawt.so etc.
+ JAVA_LIBRARY_PATH="${jre}/lib/${proc}:${jre}/lib/${proc}/${ttype}/:${JAVA_LIBRARY_PATH}"
+ 
+-LD_LIBRARY_PATH="${JAVA_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
++REDHAT6_LIBRARY_PATH="%%LOCALBASE%%/emul/redhat6/lib:%%LOCALBASE%%/emul/redhat6/usr/lib:%%LOCALBASE%%/emul/redhat6/usr/X11R6/lib:%%LOCALBASE%%/emul/redhat6/usr/i486-linux-libc5/lib"
++
++LD_LIBRARY_PATH="${JAVA_LIBRARY_PATH}:${REDHAT6_LIBRARY_PATH}:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH
+ 
+ # bug #4344135 workaround