diff options
author | Todd Berman <tberman@gentoo.org> | 2003-05-24 15:59:46 +0000 |
---|---|---|
committer | Todd Berman <tberman@gentoo.org> | 2003-05-24 15:59:46 +0000 |
commit | 5afc3221877409a21239efcdb7e4f58e7f8dc07f (patch) | |
tree | e4d7e99042a49904c4bd3055075d1a2d53ea8679 /dev-java | |
parent | GCC3.3 support (diff) | |
download | gentoo-2-5afc3221877409a21239efcdb7e4f58e7f8dc07f.tar.gz gentoo-2-5afc3221877409a21239efcdb7e4f58e7f8dc07f.tar.bz2 gentoo-2-5afc3221877409a21239efcdb7e4f58e7f8dc07f.zip |
GCC3.3 support
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/sun-j2sdk/Manifest | 2 | ||||
-rw-r--r-- | dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-gcc3.3-fixes.patch | 127 | ||||
-rw-r--r-- | dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.1-r1 | 0 | ||||
-rw-r--r-- | dev-java/sun-j2sdk/sun-j2sdk-1.4.1-r1.ebuild | 174 |
4 files changed, 302 insertions, 1 deletions
diff --git a/dev-java/sun-j2sdk/Manifest b/dev-java/sun-j2sdk/Manifest index b3340235e89c..080c9c954a80 100644 --- a/dev-java/sun-j2sdk/Manifest +++ b/dev-java/sun-j2sdk/Manifest @@ -2,7 +2,7 @@ MD5 0238aaee2d61f04c01a7d11642daa171 ChangeLog 2525 MD5 b5a80b51792abdd679a53d5ed57fe178 sun-j2sdk-1.4.0-r2.ebuild 5764 MD5 2a48530851735c5eca20b432602b5ddd sun-j2sdk-1.4.0-r3.ebuild 5179 MD5 f489a1c2897541c6023483fb03bbac98 sun-j2sdk-1.4.1.ebuild 4513 -MD5 0f109b57a1798a34c082aec1f7a20e90 sun-j2sdk-1.4.1-r1.ebuild 4531 +MD5 a7fa1c71cf58b90b349cc8027cd55ee7 sun-j2sdk-1.4.1-r1.ebuild 4535 MD5 dd55b8f72a824c16a4d544b624c9eda1 files/digest-sun-j2sdk-1.4.0-r2 63 MD5 dd55b8f72a824c16a4d544b624c9eda1 files/digest-sun-j2sdk-1.4.0-r3 63 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-sun-j2sdk-1.4.1 0 diff --git a/dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-gcc3.3-fixes.patch b/dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-gcc3.3-fixes.patch new file mode 100644 index 000000000000..09c8a8d85e90 --- /dev/null +++ b/dev-java/sun-j2sdk/files/1.4.1/j2sdk-1.4.1-gcc3.3-fixes.patch @@ -0,0 +1,127 @@ +diff -ur /prims/jni.cpp j2sdk/hotspot/src/share/vm/prims/jni.cpp +--- /prims/jni.cpp 2003-05-21 11:40:17.000000000 +0200 ++++ j2sdk/hotspot/src/share/vm/prims/jni.cpp 2003-05-21 12:55:26.000000000 +0200 +@@ -902,7 +902,7 @@ + JNI_ArgumentPusherVaArg ap(methodID, args); \ + jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0); \ + va_end(args); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END \ + \ + \ +@@ -912,7 +912,7 @@ + JavaValue jvalue(Tag); \ + JNI_ArgumentPusherVaArg ap(methodID, args); \ + jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END \ + \ + \ +@@ -922,7 +922,7 @@ + JavaValue jvalue(Tag); \ + JNI_ArgumentPusherArray ap(methodID, args); \ + jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END + + // the runtime type of subword integral basic types is integer +@@ -976,7 +976,7 @@ + JNI_ArgumentPusherVaArg ap(methodID, args); \ + jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0); \ + va_end(args); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END \ + \ + \ +@@ -986,7 +986,7 @@ + JavaValue jvalue(Tag); \ + JNI_ArgumentPusherVaArg ap(methodID, args); \ + jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END \ + \ + \ +@@ -996,7 +996,7 @@ + JavaValue jvalue(Tag); \ + JNI_ArgumentPusherArray ap(methodID, args); \ + jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END + + // the runtime type of subword integral basic types is integer +@@ -1051,7 +1051,7 @@ + JNI_ArgumentPusherVaArg ap(methodID, args); \ + jni_invoke_static(env, &jvalue, NULL, JNI_STATIC, methodID, &ap, CHECK_0); \ + va_end(args); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END \ + \ + \ +@@ -1061,7 +1061,7 @@ + JavaValue jvalue(Tag); \ + JNI_ArgumentPusherVaArg ap(methodID, args); \ + jni_invoke_static(env, &jvalue, NULL, JNI_STATIC, methodID, &ap, CHECK_0); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END \ + \ + \ +@@ -1071,7 +1071,7 @@ + JavaValue jvalue(Tag); \ + JNI_ArgumentPusherArray ap(methodID, args); \ + jni_invoke_static(env, &jvalue, NULL, JNI_STATIC, methodID, &ap, CHECK_0); \ +- return (ResultType)(jvalue._value.##unionType); \ ++ return (ResultType)(jvalue._value.unionType); \ + JNI_END + + // the runtime type of subword integral basic types is integer +@@ -1204,7 +1204,7 @@ + /* and creates a ResetNoHandleMark. */ \ + if (jvmdi::enabled()) { \ + jvalue field_value; \ +- field_value.##unionType = value; \ ++ field_value.unionType = value; \ + o = jvmdi::jni_SetField_probe_nh(thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value); \ + } \ + o->Fieldname##_field_put(offset, value); \ +@@ -1333,7 +1333,7 @@ + /* jni_SetField_probe() assumes that is okay to create handles. */ \ + if (jvmdi::enabled()) { \ + jvalue field_value; \ +- field_value.##unionType = value; \ ++ field_value.unionType = value; \ + jvmdi::jni_SetField_probe(thread, NULL, NULL, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); \ + } \ + id->holder()-> Fieldname##_field_put (id->offset(), value); \ + +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 diff --git a/dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.1-r1 b/dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.1-r1 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/dev-java/sun-j2sdk/files/digest-sun-j2sdk-1.4.1-r1 diff --git a/dev-java/sun-j2sdk/sun-j2sdk-1.4.1-r1.ebuild b/dev-java/sun-j2sdk/sun-j2sdk-1.4.1-r1.ebuild new file mode 100644 index 000000000000..1a61d3b7308e --- /dev/null +++ b/dev-java/sun-j2sdk/sun-j2sdk-1.4.1-r1.ebuild @@ -0,0 +1,174 @@ +# 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.1-r1.ebuild,v 1.1 2003/05/24 15:59:41 tberman 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="disable-sanity-check + fix-intl-files + gcc3-syntax + glibc-2.3.1-fixes + link-jpda-2-libjvm + remove-fixed-paths + force-motif + gcc3.3-fixes" + +S=${WORKDIR}/j2sdk + +SRC_JAVA="j2sdk-1_4_1-src-scsl.zip" +SRC_MOZHEADERS="j2sdk-1_4_1-mozilla_headers-unix.zip" + +SRC_URI="" + +DESCRIPTION="Sun's J2SE Development Kit, version 1.4.0" +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} + sys-apps/cpio + app-arch/zip + app-arch/unzip + >=virtual/jdk-1.4" + +PROVIDE="virtual/jre-1.4.1 + virtual/jdk-1.4.1 + 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 2097152 ] ; then + eerror "You need about 2G of disk space to compile this at ${PORTAGE_TMPDIR}/portage," + eerror "it seems you don't have that much, quiting, 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 + + [ ! -z ${die_flag} ] && die "Some source files were not found" + + mkdir ${S} + cd ${S} + unpack ${SRC_JAVA} + + 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}" + cat ${FILESDIR}/${PV}/j2sdk-${PV}-${patch}.patch | patch -p1 || die "Failed to apply ${patch}" + done +} + +src_compile () { + cd ${S} + unset CLASSPATH JAVA_HOME JAVAC + + # Otherwise the command: + # (cd /var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/control/build/linux-i386/j2re-image; tar cf - .) | \ + # (cd /var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/control/build/linux-i386/j2sdk-image/jre; tar xf -) + # Will fail, you have been warned!!!! There are NO sandbox violations anyway + LD_PRELOAD_SAVE=$LD_PRELOAD + unset LD_PRELOAD + + # 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 HOTSPOT_BUILD_JOBS=${JOBS} || die + + export LD_PRELOAD=$LD_PRELOAD_SAVE +} + +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 +} |