summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Jones <cretin@gentoo.org>2003-12-20 14:02:13 +0000
committerStefan Jones <cretin@gentoo.org>2003-12-20 14:02:13 +0000
commit89415bd96fda206526dc20f21d2af12728b89311 (patch)
tree0f31048fbfe9283b42942f02a7e4b9f0f8805d91 /dev-java
parentx86 stable (diff)
downloadhistorical-89415bd96fda206526dc20f21d2af12728b89311.tar.gz
historical-89415bd96fda206526dc20f21d2af12728b89311.tar.bz2
historical-89415bd96fda206526dc20f21d2af12728b89311.zip
*sun-j2sdk-1.4.2 (20 Dec 2003)
20 Dec 2003; Stefan Jones <cretin@gentoo.org> sun-j2sdk-1.4.2.ebuild : New version, cleaned out the patches. Tested with sys-devel/gcc-3.3.2-r4, sys-apps/portage-2.0.49-r18 and sys-libs/glibc-2.3.3_pre20031212 with "nptl" in USE
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/sun-j2sdk/ChangeLog11
-rw-r--r--dev-java/sun-j2sdk/Manifest10
-rw-r--r--dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-force-motif.patch85
-rw-r--r--dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-gcc3.3-fixes.patch68
-rw-r--r--dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-pthread.patch35
-rw-r--r--dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-remove-fixed-paths.patch141
-rw-r--r--dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-static_cxx.patch11
-rw-r--r--dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.20
-rw-r--r--dev-java/sun-j2sdk/files/sun-j2sdk-1.4.215
-rw-r--r--dev-java/sun-j2sdk/sun-j2sdk-1.4.2.ebuild171
10 files changed, 544 insertions, 3 deletions
diff --git a/dev-java/sun-j2sdk/ChangeLog b/dev-java/sun-j2sdk/ChangeLog
index e8617aea7eae..f9e18dc55cd5 100644
--- a/dev-java/sun-j2sdk/ChangeLog
+++ b/dev-java/sun-j2sdk/ChangeLog
@@ -1,8 +1,15 @@
# ChangeLog for dev-java/sun-j2sdk
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/ChangeLog,v 1.20 2003/12/06 17:50:04 strider Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/ChangeLog,v 1.21 2003/12/20 14:02:13 cretin Exp $
- 06 Dec 2003; Adrian Almenar <strider@gentoo.org> sun-j2sdk-1.4.1-r1.ebuild,
+*sun-j2sdk-1.4.2 (20 Dec 2003)
+
+ 20 Dec 2003; Stefan Jones <cretin@gentoo.org> sun-j2sdk-1.4.2.ebuild :
+ New version, cleaned out the patches. Tested with
+ sys-devel/gcc-3.3.2-r4, sys-apps/portage-2.0.49-r18
+ and sys-libs/glibc-2.3.3_pre20031212 with "nptl" in USE
+
+06 Dec 2003; Adrian Almenar <strider@gentoo.org> sun-j2sdk-1.4.1-r1.ebuild,
sun-j2sdk-1.4.1.ebuild:
Fixes bug #35127
diff --git a/dev-java/sun-j2sdk/Manifest b/dev-java/sun-j2sdk/Manifest
index 0407853ebccc..d730d52611a8 100644
--- a/dev-java/sun-j2sdk/Manifest
+++ b/dev-java/sun-j2sdk/Manifest
@@ -1,11 +1,14 @@
+MD5 478ef5127105dcd6761642d931a9cfaa sun-j2sdk-1.4.2.ebuild 4219
MD5 10bd0d93531b3ec8d1aa020a7d1f8d13 sun-j2sdk-1.4.0-r3.ebuild 5002
MD5 85da0492e62bc78f7733cb36e46a806c sun-j2sdk-1.4.1.ebuild 4440
-MD5 b7f83b3ec86d033077cd595a9399b721 ChangeLog 3097
+MD5 61cb0601d7f634c2b326795ead1b4bb0 ChangeLog 3365
MD5 b806517769e2de3f78817d9e8d779ffb sun-j2sdk-1.4.1-r1.ebuild 4459
MD5 a6ec7d7724fbd068ffb39b5be56134ed metadata.xml 157
MD5 c147a3bf17e43d34055a763a266c2fe1 files/sun-j2sdk-1.4.0 603
MD5 d689a6b6d3c969dfd49a1d39e47ff769 files/sun-j2sdk-1.4.1 603
+MD5 d689a6b6d3c969dfd49a1d39e47ff769 files/sun-j2sdk-1.4.2 603
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-sun-j2sdk-1.4.1 0
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-sun-j2sdk-1.4.2 0
MD5 dd55b8f72a824c16a4d544b624c9eda1 files/digest-sun-j2sdk-1.4.0-r3 63
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-sun-j2sdk-1.4.1-r1 0
MD5 1592f54543a5a9c5b9ddd873bc1d5449 files/1.4.1/j2sdk-1.4.1-pthread.patch 1724
@@ -17,6 +20,11 @@ MD5 9f4c7a21ea50890a893b9850bbfc3b67 files/1.4.1/j2sdk-1.4.1-glibc-2.3.1-fixes.p
MD5 9e80bf2ca2a4cbbd2570d00d1fc28143 files/1.4.1/j2sdk-1.4.1-gcc3-syntax.patch 2248
MD5 95b8d1c6d35af8fd31117163ce56bfe7 files/1.4.1/j2sdk-1.4.1-link-jpda-2-libjvm.patch 486
MD5 822826bf40a3f7f475946637acc61ec2 files/1.4.1/j2sdk-1.4.1-fix-intl-files.patch 2056
+MD5 ea3048b7ef26c763bb331b1430061d4c files/1.4.2/j2sdk-1.4.2-static_cxx.patch 434
+MD5 0bb65304895dd012bebfc692fbd48af1 files/1.4.2/j2sdk-1.4.2-pthread.patch 1624
+MD5 276f4ce091acd44428e36c15de66f7d1 files/1.4.2/j2sdk-1.4.2-gcc3.3-fixes.patch 4176
+MD5 df6db4b858ad836d290f1862857622d9 files/1.4.2/j2sdk-1.4.2-remove-fixed-paths.patch 4525
+MD5 7c7b6039ae92a59953775ddb8d8b93c8 files/1.4.2/j2sdk-1.4.2-force-motif.patch 3137
MD5 cfe7807401a123893c6bc78aa3ffd170 files/patches/j2sdk-1.4.0-fix-intl-files.patch.bz2 826
MD5 553a29526471461a8dd0b889ec0ee7d1 files/patches/j2sdk-1.4.0-remove-fixed-paths.patch.bz2 1455
MD5 70c3f7f9a5a49d7d52283541da221e1f files/patches/j2sdk-1.4.0-gcc3-syntax.patch.bz2 1582
diff --git a/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-force-motif.patch b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-force-motif.patch
new file mode 100644
index 000000000000..2b5c99d59f4c
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-force-motif.patch
@@ -0,0 +1,85 @@
+diff -ur j2sdk/control/make/motif-rules.gmk j2sdk.new/control/make/motif-rules.gmk
+--- j2sdk/control/make/motif-rules.gmk 2002-09-06 08:00:16.000000000 +0100
++++ j2sdk.new/control/make/motif-rules.gmk 2003-04-16 15:35:39.000000000 +0100
+@@ -25,7 +25,10 @@
+ ABS_MOTIF_DIR := $(shell $(CD) $(MOTIF_DIR); $(PWD))
+ endif
+
+-MOTIF = $(MOTIF_DIR)/lib/libXm.a
++# Use a non-stadard name for motif lib to avoid using the system installed incompatible lib
++# Similar changes made below.
++# Changed by Tushar Teredesai <tush@yahoo.com>
++MOTIF = $(MOTIF_DIR)/lib/libXm-j2sdk.a
+
+ motif: motif-build motif-install
+
+@@ -34,8 +37,8 @@
+ motif-build:
+ ifdef BUILD_MOTIF
+ $(CD) $(MOTIF_TOPDIR)/lib/Xm ; \
+- $(MAKE) MAKEFLAGS= ARCH_DATA_MODEL=$(ARCH_DATA_MODEL); \
+- $(MAKE) includes MAKEFLAGS= ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
++ $(MAKE) -k MAKEFLAGS= ARCH_DATA_MODEL=$(ARCH_DATA_MODEL); \
++ $(MAKE) -k includes MAKEFLAGS= ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
+ endif
+
+ motif-install: motif-install-lib motif-install-include
+@@ -43,15 +46,14 @@
+ motif-install-lib: $(MOTIF_DIR)/lib
+ ifdef BUILD_MOTIF
+ $(CD) $(MOTIF_DIR)/lib; \
+- $(RM) libXm.a ; \
+- $(LN) -s $(ABS_MOTIF_TOPDIR)/lib/libXm.a .
++ $(MV) libXm.a libXm-j2sdk.a
+ endif
+
+ motif-install-include: $(MOTIF_DIR)/include
+ ifdef BUILD_MOTIF
+- $(CD) $(MOTIF_DIR)/include; \
+- $(RM) Xm ; \
+- $(LN) -s $(ABS_MOTIF_TOPDIR)/lib/Xm/exports/include/Xm .
++# $(CD) $(MOTIF_DIR)/include; \
++# $(RM) Xm ; \
++# $(LN) -s $(ABS_MOTIF_TOPDIR)/lib/Xm/exports/include/Xm .
+ endif
+ #
+ # clobber the workspace, but note that the motif code misses some
+@@ -62,7 +64,7 @@
+ ifdef BUILD_MOTIF
+ ( $(CD) $(MOTIF_TOPDIR)/lib/Xm ; \
+ $(MAKE) clean MAKEFLAGS= ARCH_DATA_MODEL=$(ARCH_DATA_MODEL); ); \
+- $(RM) $(MOTIF_TOPDIR)/lib/libXm.a \
++ $(RM) $(MOTIF_TOPDIR)/lib/libXm-j2sdk.a \
+ $(MOTIF_TOPDIR)/lib/Xm/Xm.msg
+ $(RM) -r $(MOTIF_TOPDIR)/lib/Xm/exports
+ $(RM) -r $(MOTIF_DIR)/lib $(MOTIF_DIR)/include $(MOTIF_DIR)
+diff -ur j2sdk/j2se/make/sun/awt/Makefile j2sdk.new/j2se/make/sun/awt/Makefile
+--- j2sdk/j2se/make/sun/awt/Makefile 2002-09-06 08:08:23.000000000 +0100
++++ j2sdk.new/j2se/make/sun/awt/Makefile 2003-04-16 15:34:13.000000000 +0100
+@@ -237,8 +237,10 @@
+ ifneq ($(PLATFORM), windows)
+ # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX
+
++# If using static motif, use the non-standard name for the lib
++# Changed by Tushar Teredesai <tush@yahoo.com>
+ ifeq ($(STATIC_MOTIF),true)
+- LIBXM = $(MOTIF_LIB)/libXm.a -lXp
++ LIBXM = $(MOTIF_LIB)/libXm-j2sdk.a -lXp
+ else # STATIC_MOTIF
+ LIBXM = -lXm
+ endif # STATIC_MOTIF
+diff -ur j2sdk/j2se/make/sun/awt/mawt.gmk j2sdk.new/j2se/make/sun/awt/mawt.gmk
+--- j2sdk/j2se/make/sun/awt/mawt.gmk 2002-09-06 08:08:24.000000000 +0100
++++ j2sdk.new/j2se/make/sun/awt/mawt.gmk 2003-04-16 15:34:13.000000000 +0100
+@@ -125,8 +125,10 @@
+ else
+ CFLAGS += -DMOTIF_VERSION=$(MOTIF_VERSION)
+
++# If using static motif, use non-standard lib name
++# Changed by Tushar Teredesai <tush@yahoo.com>
+ ifeq ($(STATIC_MOTIF),true)
+-LIBXM = $(MOTIF_LIB)/libXm.a -lXp
++LIBXM = $(MOTIF_LIB)/libXm-j2sdk.a -lXp
+ else
+ LIBXM = -lXm
+ endif
diff --git a/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-gcc3.3-fixes.patch b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-gcc3.3-fixes.patch
new file mode 100644
index 000000000000..4371c7dbb1d4
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-gcc3.3-fixes.patch
@@ -0,0 +1,68 @@
+--- j2sdk/hotspot/src/cpu/i486/vm/i486.ad.jj 2003-12-19 11:22:00.071710616 +0000
++++ j2sdk/hotspot/src/cpu/i486/vm/i486.ad 2003-12-19 11:22:30.697054856 +0000
+@@ -230,18 +230,18 @@
+ // These masks are used to provide 128-bit aligned bitmasks to the XMM
+ // instructions, to allow sign-masking or sign-bit flipping. They allow
+ // fast versions of NegF/NegD and AbsF/AbsD.
+-static jlong float_signmask_pool[3] = {0x7FFFFFFF7FFFFFFF,
+- 0x7FFFFFFF7FFFFFFF,
+- 0x7FFFFFFF7FFFFFFF};
+-static jlong double_signmask_pool[3] = {0x7FFFFFFFFFFFFFFF,
+- 0x7FFFFFFFFFFFFFFF,
+- 0x7FFFFFFFFFFFFFFF};
+-static jlong float_signflip_pool[3] = {0x8000000080000000,
+- 0x8000000080000000,
+- 0x8000000080000000};
+-static jlong double_signflip_pool[3] = {0x8000000000000000,
+- 0x8000000000000000,
+- 0x8000000000000000};
++static jlong float_signmask_pool[3] = {0x7FFFFFFF7FFFFFFFULL,
++ 0x7FFFFFFF7FFFFFFFULL,
++ 0x7FFFFFFF7FFFFFFFULL};
++static jlong double_signmask_pool[3] = {0x7FFFFFFFFFFFFFFFULL,
++ 0x7FFFFFFFFFFFFFFFULL,
++ 0x7FFFFFFFFFFFFFFFULL};
++static jlong float_signflip_pool[3] = {0x8000000080000000ULL,
++ 0x8000000080000000ULL,
++ 0x8000000080000000ULL};
++static jlong double_signflip_pool[3] = {0x8000000000000000ULL,
++ 0x8000000000000000ULL,
++ 0x8000000000000000ULL};
+
+ // !!!!! Special hack to get all type of calls to specify the byte offset
+ // from the start of the call to the point where the return address
+diff -ur /runtime/jvmdiInterfaceSupport.hpp j2sdk/hotspot/src/share/vm/runtime/jvmdiInterfaceSupport.hpp
+--- /runtime/jvmdiInterfaceSupport.hpp 2003-05-21 12:46:32.000000000 +0200
++++ j2sdk/hotspot/src/share/vm/runtime/jvmdiInterfaceSupport.hpp 2003-05-21 12:48:18.000000000 +0200
+@@ -24,7 +24,7 @@
+ result_type JNICALL methodName signature { \
+ JavaThread* thread = (JavaThread*) ThreadLocalStorage::thread(); \
+ TransitionClass __tiv(thread); \
+- __ENTRY(result_type, methodName##signature, thread) \
++ __ENTRY(result_type, methodName#signature, thread) \
+ debug_only(VMNativeEntryWrapper __vew;) \
+ debug_only(const char* const _jvmdi_methodName_ = #methodName;) \
+ debug_only(bool _trace_ = trace; ); \
+diff -ur /runtime/mutexLocker.cpp j2sdk/hotspot/src/share/vm/runtime/mutexLocker.cpp
+--- /runtime/mutexLocker.cpp 2003-05-21 12:46:32.000000000 +0200
++++ j2sdk/hotspot/src/share/vm/runtime/mutexLocker.cpp 2003-05-21 12:54:18.000000000 +0200
+@@ -95,7 +95,7 @@
+ #endif
+
+ #define def(var, type, pri, vm_block) \
+- var = new type(Mutex::##pri, #var, vm_block)
++ var = new type(Mutex::pri, #var, vm_block)
+
+ void mutex_init() {
+ def(Event_lock , Mutex , event, true ); // allow to lock in VM
+--- j2sdk/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp.jj 2003-12-19 12:45:16.646115848 +0000
++++ j2sdk/hotspot/src/os_cpu/linux_i486/vm/atomic_linux_i486.inline.hpp 2003-12-19 12:45:20.005605128 +0000
+@@ -49,7 +49,7 @@
+ jlong old_value;
+ __asm__ volatile ( "pushl %%ebx;mov 4+%1,%%ecx;mov %1,%%ebx;lock;cmpxchg8b (%3);popl %%ebx"
+ : "=A" (old_value)
+- : "o" (exchange_value), "A" (compare_value), "r" (dest)
++ : "m" (exchange_value), "A" (compare_value), "r" (dest)
+ : "%ebx", "%ecx", "memory");
+ return old_value;
+ }
diff --git a/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-pthread.patch b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-pthread.patch
new file mode 100644
index 000000000000..edb05c759211
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-pthread.patch
@@ -0,0 +1,35 @@
+--- j2sdk/hotspot/src/os/linux/vm/os_linux.cpp.jj 2003-12-19 13:43:08.184361816 +0000
++++ j2sdk/hotspot/src/os/linux/vm/os_linux.cpp 2003-12-19 13:44:17.071889320 +0000
+@@ -584,7 +584,7 @@
+ ostream_exit();
+ // 4450681 : kill all other threads before abort to make sure the
+ // calling thread is the one that gets dumped in core file.
+- pthread_kill_other_threads_np();
++ //pthread_kill_other_threads_np();
+ ::abort(); // dump core
+ }
+ ostream_exit();
+@@ -1338,12 +1338,7 @@
+ act.sa_flags = SA_RESTART|SA_SIGINFO;
+ act.sa_handler = (void (*)(int)) SR_handler;
+ // SR_signum is blocked by default.
+- // 4528190 - We also need to block pthread restart signal (32 on all
+- // supported Linux platforms). Note that LinuxThreads need to block
+- // this signal for all threads to work properly. So we don't have
+- // to use hard-coded signal number when setting up the mask.
+ pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask);
+- assert(sigismember(&act.sa_mask, 32), "incompatible pthread library");
+ if (sigaction(SR_signum, &act, 0) == -1) {
+ return -1;
+ }
+--- j2sdk/j2se/src/solaris/native/sun/nio/ch/NativeThread.c.jj 2003-12-19 13:43:25.506728416 +0000
++++ j2sdk/j2se/src/solaris/native/sun/nio/ch/NativeThread.c 2003-12-19 13:43:30.560960056 +0000
+@@ -66,7 +66,7 @@
+ Java_sun_nio_ch_NativeThread_signal(JNIEnv *env, jclass cl, jlong thread)
+ {
+ #ifdef __linux__
+- if (pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL))
++ if (pthread_kill((pthread_t)(unsigned long int)thread, INTERRUPT_SIGNAL))
+ JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed");
+ #endif
+ }
diff --git a/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-remove-fixed-paths.patch b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-remove-fixed-paths.patch
new file mode 100644
index 000000000000..cc4e725080ba
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-remove-fixed-paths.patch
@@ -0,0 +1,141 @@
+--- j2sdk/control/make/common/Defs-linux.gmk.jj 2003-12-20 11:46:03.840900800 +0000
++++ j2sdk/control/make/common/Defs-linux.gmk 2003-12-20 12:10:24.915783656 +0000
+@@ -50,51 +50,51 @@
+ # non-standard locations
+ #
+
+-AR = $(USRBIN_PATH)ar
+-BASENAME = $(UNIXCOMMAND_PATH)basename
+-CAT = $(UNIXCOMMAND_PATH)cat
++AR = ar
++BASENAME = basename
++CAT = cat
+ CD = cd # intrinsic unix command
+-CHMOD = $(UNIXCOMMAND_PATH)chmod
+-CMP = $(USRBIN_PATH)cmp
+-COMM = $(USRBIN_PATH)comm
+-COMPRESS = $(USRBIN_PATH)compress
+-CP = $(UNIXCOMMAND_PATH)cp
+-CPIO = $(UNIXCOMMAND_PATH)cpio
+-CUT = $(USRBIN_PATH)cut
+-DATE = $(UNIXCOMMAND_PATH)date
+-DF = $(UNIXCOMMAND_PATH)df
+-DIFF = $(USRBIN_PATH)diff
+-DIRNAME = $(USRBIN_PATH)dirname
++CHMOD = chmod
++CMP = cmp
++COMM = comm
++COMPRESS = compress
++CP = cp
++CPIO = cpio
++CUT = cut
++DATE = date
++DF = df
++DIFF = diff
++DIRNAME = dirname
+ ECHO = echo -e # intrinsic unix command, with backslash-escaped character interpretation
+-EGREP = $(UNIXCOMMAND_PATH)egrep
+-EXPR = $(USRBIN_PATH)expr
+-FIND = $(USRBIN_PATH)find
+-GREP = $(UNIXCOMMAND_PATH)grep
+-LEX = $(USRBIN_PATH)lex
+-LN = $(UNIXCOMMAND_PATH)ln
+-LS = $(UNIXCOMMAND_PATH)ls
+-M4 = $(USRBIN_PATH)m4
+-MKDIR = $(UNIXCOMMAND_PATH)mkdir
+-MV = $(UNIXCOMMAND_PATH)mv
+-NAWK = $(USRBIN_PATH)gawk
+-PWD = $(UNIXCOMMAND_PATH)pwd
++EGREP = egrep
++EXPR = expr
++FIND = find
++GREP = grep
++LEX = lex
++LN = ln
++LS = ls
++M4 = m4
++MKDIR = mkdir
++MV = mv
++NAWK = gawk
++PWD = pwd
+ #RM is defined by GNU Make as 'rm -f'
+-RMDIR = $(UNIXCOMMAND_PATH)rmdir
+-RPM = $(UNIXCOMMAND_PATH)rpm
+-SED = $(UNIXCOMMAND_PATH)sed
+-SH = $(UNIXCOMMAND_PATH)sh
+-SORT = $(UNIXCOMMAND_PATH)sort
+-STRIP = $(USRBIN_PATH)strip
+-TAR = $(UNIXCOMMAND_PATH)tar
+-TOUCH = $(UNIXCOMMAND_PATH)touch
+-TR = $(USRBIN_PATH)tr
+-TRUE = $(UNIXCOMMAND_PATH)true
+-UNAME = $(UNIXCOMMAND_PATH)uname
+-UNIQ = $(USRBIN_PATH)uniq
+-UNZIPSFX = $(USRBIN_PATH)unzipsfx
+-WC = $(USRBIN_PATH)wc
+-YACC = $(USRBIN_PATH)yacc
+-ZIPEXE = $(USRBIN_PATH)zip
++RMDIR = rmdir
++RPM = rpm
++SED = sed
++SH = sh
++SORT = sort
++STRIP = strip
++TAR = tar
++TOUCH = touch
++TR = tr
++TRUE = true
++UNAME = uname
++UNIQ = uniq
++UNZIPSFX = unzipsfx
++WC = wc
++YACC = yacc
++ZIPEXE = zip
+
+
+ archExpr = case "`$(UNAME) -m`" in \
+--- j2sdk/j2se/make/common/Defs-linux.gmk.jj 2003-12-20 11:45:57.788820856 +0000
++++ j2sdk/j2se/make/common/Defs-linux.gmk 2003-12-20 11:46:11.051804576 +0000
+@@ -131,30 +131,30 @@
+
+ # UNIXCOMMAND_PATH is the path to where the most common Unix
+ # commands are installed.
+-UNIXCOMMAND_PATH = /bin/
++UNIXCOMMAND_PATH =
+ # Allow the user to override the default value...
+-ifdef ALT_UNIXCOMMAND_PATH
++#ifdef ALT_UNIXCOMMAND_PATH
+ # make sure that there is a "/" on the end...
+-UNIXCOMMAND_PATH = $(subst //,/,$(ALT_UNIXCOMMAND_PATH)/)
+-endif
++#UNIXCOMMAND_PATH = $(subst //,/,$(ALT_UNIXCOMMAND_PATH)/)
++#endif
+
+ # USRBIN_PATH is the path to where the most common Unix
+ # commands are installed.
+-USRBIN_PATH = /usr/bin/
++USRBIN_PATH =
+ # Allow the user to override the default value...
+-ifdef ALT_USRBIN_PATH
++#ifdef ALT_USRBIN_PATH
+ # make sure that there is a "/" on the end...
+-USRBIN_PATH = $(subst //,/,$(ALT_USRBIN_PATH)/)
+-endif
++#USRBIN_PATH = $(subst //,/,$(ALT_USRBIN_PATH)/)
++#endif
+
+ # COMPILER_PATH is the path to where the compiler and tools
+ # are installed.
+-COMPILER_PATH = /usr/bin/
++COMPILER_PATH =
+ #
+ # Allow the user to override the default value...
+-ifdef ALT_COMPILER_PATH
+-COMPILER_PATH = $(subst //,/,$(subst \,/,$(ALT_COMPILER_PATH))/)
+-endif
++#ifdef ALT_COMPILER_PATH
++#COMPILER_PATH = $(subst //,/,$(subst \,/,$(ALT_COMPILER_PATH))/)
++#endif
+
+ # DEVTOOLS_PATH is for other tools required for building (such as
+ # zip, etc.)
diff --git a/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-static_cxx.patch b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-static_cxx.patch
new file mode 100644
index 000000000000..78e8ecf21eab
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/1.4.2/j2sdk-1.4.2-static_cxx.patch
@@ -0,0 +1,11 @@
+--- j2sdk/j2se/make/common/Defs-linux.gmk.jj 2003-12-20 10:42:01.745988008 +0000
++++ j2sdk/j2se/make/common/Defs-linux.gmk 2003-12-20 10:42:21.892925208 +0000
+@@ -23,7 +23,7 @@
+ # LINTFLAGS (set $(OTHER_LINTFLAGS) instead)
+
+ # statically link libstdc++ before C++ ABI is stablized on Linux
+-STATIC_CXX = true
++STATIC_CXX = false
+
+ # define these to avoid picking up ones from aliases or from
+ # non-standard locations
diff --git a/dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.2 b/dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.2
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.2
diff --git a/dev-java/sun-j2sdk/files/sun-j2sdk-1.4.2 b/dev-java/sun-j2sdk/files/sun-j2sdk-1.4.2
new file mode 100644
index 000000000000..a98dcd7ba871
--- /dev/null
+++ b/dev-java/sun-j2sdk/files/sun-j2sdk-1.4.2
@@ -0,0 +1,15 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author: Karl Trygve Kalleberg
+# Maintainer: Tools Team <tools@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/files/sun-j2sdk-1.4.2,v 1.1 2003/12/20 14:02:13 cretin Exp $
+
+VERSION="Sun JDK @PV@"
+JAVA_HOME=/opt/@P@
+CLASSPATH=.:/opt/@P@/jre/lib:/opt/@P@/lib/tools.jar
+JDK_HOME=/opt/@P@
+JAVAC=${JAVA_HOME}/bin/javac
+ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
+ADDLDPATH="/opt/@P@/jre/lib/"
+
+ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH"
diff --git a/dev-java/sun-j2sdk/sun-j2sdk-1.4.2.ebuild b/dev-java/sun-j2sdk/sun-j2sdk-1.4.2.ebuild
new file mode 100644
index 000000000000..bc2cf043cd73
--- /dev/null
+++ b/dev-java/sun-j2sdk/sun-j2sdk-1.4.2.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-j2sdk/sun-j2sdk-1.4.2.ebuild,v 1.1 2003/12/20 14:02:13 cretin Exp $
+
+# Maintainer: Stefan Jones <cretin@gentoo.org>
+# Author: Stefan Jones <cretin@gentoo.org>
+
+# Based on http://www.linuxfromscratch.org/~tushar/hints/javafromscratch.txt (LFS)
+# By Tushar Teredesai <Tush@Yahoo.Com>
+
+IUSE="nptl"
+
+inherit java nsplugins
+
+JAVA_PATCHES="
+ remove-fixed-paths
+ static_cxx
+ force-motif
+ gcc3.3-fixes"
+
+S=${WORKDIR}/j2sdk
+
+SRC_JAVA="j2sdk-1_4_2-src-scsl.zip"
+SRC_MOZHEADERS="j2sdk-1_4_2-mozilla_headers-unix.zip"
+SRC_BINJAVA="j2sdk-1_4_2-bin-scsl.zip"
+
+SRC_URI=""
+
+DESCRIPTION="Sun's J2SE Development Kit, version 1.4.2 (From sources)"
+HOMEPAGE="http://wwws.sun.com/software/java2/download.html"
+
+SLOT="0"
+KEYWORDS="~x86 -ppc -alpha -sparc"
+LICENSE="sun-csl"
+
+RDEPEND="virtual/glibc
+ virtual/x11
+ >=dev-java/java-config-0.1.3"
+DEPEND="${RDEPEND}
+ app-arch/cpio
+ app-arch/zip
+ app-arch/unzip
+ >=virtual/jdk-1.4
+ >=media-sound/alsa-driver-0.9.0_rc5"
+
+PROVIDE="virtual/jre-1.4.2
+ virtual/jdk-1.4.2
+ virtual/java-scheme-2"
+
+pkg_setup() {
+ #Check if we have enough space
+ if [ `df -P ${PORTAGE_TMPDIR}/portage/ | tail -n 1 | awk '{ print $4 }'` -le 2597152 ] ; then
+ eerror "You need about 2.5G of disk space to compile this at ${PORTAGE_TMPDIR}/portage,"
+ eerror "it seems you don't have that much, quitting, sorry!"
+ die "Not enough disk space"
+ fi
+
+ #Check the Current java-version ~ 1.4 and is jdk
+ JAVAC=`java-config --javac`
+ if [ -z $JAVAC ] ; then
+ eerror "Set java-config to use a jdk not a jre"
+ die "The version of java set by java-config doesn't contain javac"
+ fi
+
+ if [ `java-config --java-version 2>&1 | grep "1\.4\." | wc -l` -lt 1 ] ; then
+ eerror "JDK is too old, >= 1.4 is required"
+ die "The version of jdk pointed to by java-config is not >=1.4"
+ fi
+}
+
+src_unpack() {
+ die_flag=""
+ if [ ! -f ${DISTDIR}/${SRC_MOZHEADERS} ] ; then
+ eerror "Please download ${SRC_MOZHEADERS} from ${HOMEPAGE} to ${DISTDIR}"
+ die_flag=1
+ fi
+
+ if [ ! -f ${DISTDIR}/${SRC_JAVA} ] ; then
+ eerror "Please download ${SRC_JAVA} from ${HOMEPAGE} to ${DISTDIR}"
+ die_flag=1
+ fi
+
+ if [ ! -f ${DISTDIR}/${SRC_BINJAVA} ] ; then
+ eerror "Please download ${SRC_BINJAVA} from ${HOMEPAGE} to ${DISTDIR}"
+ die_flag=1
+ fi
+
+ [ ! -z ${die_flag} ] && die "Some source files were not found"
+
+ mkdir ${S}
+ cd ${S}
+ unpack ${SRC_JAVA}
+ unpack ${SRC_BINJAVA}
+
+ mkdir mozilla
+ cd mozilla
+ unpack ${SRC_MOZHEADERS}
+
+ use nptl && JAVA_PATCHES="$JAVA_PATCHES pthread"
+
+ cd ${S}
+ for patch in $JAVA_PATCHES ; do
+ einfo "Applying patch ${patch}"
+ patch -p1 < ${FILESDIR}/${PV}/j2sdk-${PV}-${patch}.patch \
+ || die "Failed to apply ${patch}"
+ done
+}
+
+src_compile () {
+ cd ${S}
+ unset CLASSPATH JAVA_HOME JAVAC
+
+ # Any CFLAGS will cause the build to fail!
+ # If you don't believe me ...
+ export OTHER_CFLAGS=${CFLAGS}
+ export OTHER_CXXFLAGS=${CXXFLAGS}
+ unset CFLAGS CXXFLAGS LDFLAGS
+
+ export ALT_MOZILLA_PATH="${S}/mozilla"
+ export ALT_BOOTDIR=`java-config --jdk-home`
+ export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts
+ export ALT_MOTIF_DIR="${S}/motif"
+ export ALT_DEVTOOLS_PATH="/usr/bin"
+ export MILESTONE="gentoo"
+ export BUILD_NUMBER=`date +%s`
+ export LIBS="-lstdc++"
+ export OTHER_LDFLAGS="-lpthread"
+ export INSANE=true
+ export MAKE_VERBOSE=true
+ export DEV_ONLY=true
+ export USRBIN_PATH=""
+
+ cd ${S}/control/make
+ # MUST use make, we DONT want any -j options!
+ JOBS=`echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/"`
+ if [ -z "$JOBS" ]; then
+ JOBS=1
+ fi
+ make scsl HOTSPOT_BUILD_JOBS=${JOBS} || die
+}
+
+src_install () {
+
+ dodir /opt/${P}
+
+ cd ${S}/control/build/linux-*/j2sdk-image
+ local dirs="bin include jre lib"
+ dodir /opt/${P}
+
+ for i in $dirs ; do
+ cp -a $i ${D}/opt/${P}/
+ done
+
+ dodoc COPYRIGHT README LICENSE
+ dohtml README.html
+
+ doman man/man1/*.1
+
+ dodir /opt/${P}/share/
+ cp -a demo src.zip ${D}/opt/${P}/share/
+
+ chown -R root:root ${D}/opt/${P}
+
+ inst_plugin /opt/${P}/jre/plugin/i386/ns610/libjavaplugin_oji.so
+ set_java_env ${FILESDIR}/${VMHANDLE}
+}
+
+pkg_postinst () {
+ # Set as default VM if none exists
+ java_pkg_postinst
+}