Added java-pkg_ensure-gcj function, which dies if gcc wasn't built with gcj
authorJoshua Nichols <nichoj@gentoo.org>
Sat, 5 Aug 2006 17:44:09 +0000 (17:44 +0000)
committerJoshua Nichols <nichoj@gentoo.org>
Sat, 5 Aug 2006 17:44:09 +0000 (17:44 +0000)
eclass/java-utils-2.eclass

index 4b0646fed412ba1be90e500f2b3fec8446820682..36e126d538332f8c7d6b7954d34e7715c90d0a64 100644 (file)
@@ -231,7 +231,7 @@ java-pkg_dojar() {
 #
 # @param $@ - jars to record
 # ------------------------------------------------------------------------------
-# TODO fix me!
+# TODO should we be making sure the jar is present on ${D} or wherever?
 java-pkg_regjar() {
        debug-print-function ${FUNCNAME} $*
 
@@ -1165,12 +1165,23 @@ java-pkg_javac-args() {
 java-pkg_get-jni-cflags() {
        local flags="-I${JAVA_HOME}/include"
 
+       # TODO do a check that the directories are valid
        # TODO figure out how to cope with other things than linux...
        flags="${flags} -I${JAVA_HOME}/include/linux"
 
        echo ${flags}
 }
 
+java-pkg_ensure-gcj() {
+       if ! built_with_use sys-devel/gcc gcj ; then
+               ewarn
+               ewarn "You must build gcc with the gcj support to build with gcj"
+               ewarn
+               ebeep 5
+               die "No GCJ support found!"
+       fi
+}
+
 # ------------------------------------------------------------------------------
 # @section-end helper
 # ------------------------------------------------------------------------------