jamvm now integrates to our setup

Petteri Räty <[email protected]> Mon, 03 Mar 2008 19:58:32 +0200
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
With jamvm-1.5.0 and a couple of eclass patches it's now possible to 
emerge things with jamvm as a JDK. You do get a warning about tools.jar 
missing so we have to think about what to do with that.

pena commons-net # devebuild commons-net-1.4.1-r1.ebuild clean compile
  * commons-net-1.4.1-src.tar.gz RMD160 SHA1 SHA256 size ;-) ... 
 
                                                          [ ok ]
  * Using: jamvm

BUILD SUCCESSFUL
Total time: 3 seconds
 >>> Source compiled.

Regards,
Petteri
jdk-compiler.patch (text/plain, 1.8 KB)
Index: java-utils-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
retrieving revision 1.103
diff -u -r1.103 java-utils-2.eclass
--- java-utils-2.eclass	12 Jan 2008 15:08:47 -0000	1.103
+++ java-utils-2.eclass	3 Mar 2008 17:53:21 -0000
@@ -293,7 +295,6 @@
 	java-pkg_do_write_
 }
 
-
 # ------------------------------------------------------------------------------
 # @internal-function depend-java-query
 #
@@ -649,13 +650,7 @@
 
 	if ! [[ ${DEPEND} = *app-arch/zip* ]]; then
 		local msg="${FUNCNAME} called without app-arch/zip in DEPEND"
-		if is-java-strict; then
-			eerror "${msg}"
-			die "${msg}"
-		else
-			echo "${msg}"
-			echo "Please report this to http://bugs.gentoo.org."
-		fi
+		java-pkg_announce-qa-violation ${msg}
 	fi
 
 	java-pkg_init_paths_
@@ -2178,12 +2206,16 @@
 	# If it hasn't been defined already, default to javac
 	if [[ -z ${GENTOO_COMPILER} ]]; then
 		if [[ -n ${compilers} ]]; then
-			einfo "No suitable compiler found: defaulting javac for compilation"
+			einfo "No suitable compiler found: defaulting to JDK default for compilation"
 		else
 			# probably don't need to notify users about the default.
 			:;#einfo "Defaulting to javac for compilation"
 		fi
-		export GENTOO_COMPILER=javac
+		if java-config -g GENTOO_COMPILER 2> /dev/null; then
+			export GENTOO_COMPILER=$(java-config -g GENTOO_COMPILER)
+		else
+			export GENTOO_COMPILER=javac
+		fi
 	else
 		einfo "Using ${GENTOO_COMPILER} for compilation"
 	fi
@@ -2244,6 +2276,7 @@
 		(
 			echo "DESCRIPTION=\"${DESCRIPTION}\""
 			echo "GENERATION=\"2\""
+			echo "SLOT=\"${SLOT}\""
 
 			[[ -n "${JAVA_PKG_CLASSPATH}" ]] && echo "CLASSPATH=\"${JAVA_PKG_CLASSPATH}\""
 			[[ -n "${JAVA_PKG_LIBRARY}" ]] && echo "LIBRARY_PATH=\"${JAVA_PKG_LIBRARY}\""
signature.asc (application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHzDxIcxLzpIGCsLQRAlp3AJ9/qFm7S4bnMSLwt+LUTbEXu5N90QCdEQpk
eXfVk/8ZKN/yXInz82910rA=
=YmiX
-----END PGP SIGNATURE-----