Use the proper platform include directory for jni (for FreeBSD and Linux at least).
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Thu, 7 Dec 2006 02:27:22 +0000 (02:27 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Thu, 7 Dec 2006 02:27:22 +0000 (02:27 +0000)
eclass/java-utils-2.eclass

index 0d8615f68a455a1e3bb650e2709307571d3f4a9a..6f22c923f209080495c76b72f27f2467a54d451c 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Licensed under the GNU General Public License, v2
 #
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.32 2006/12/07 02:14:46 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.33 2006/12/07 02:27:22 flameeyes Exp $
 
 
 # -----------------------------------------------------------------------------
@@ -26,6 +26,8 @@
 
 inherit eutils versionator multilib
 
+IUSE="elibc_FreeBSD"
+
 # -----------------------------------------------------------------------------
 # @section-begin variables
 # @section-title Variables
@@ -1272,9 +1274,11 @@ java-pkg_javac-args() {
 java-pkg_get-jni-cflags() {
        local flags="-I${JAVA_HOME}/include"
 
+       local platform="linux"
+       use elibc_FreeBSD && platform="freebsd"
+
        # 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"
+       flags="${flags} -I${JAVA_HOME}/include/${platform}"
 
        echo ${flags}
 }