Added support for JAVA_PKG_IUSE and the mandatory ECLASS and INHERITED variables.
authorPetteri Räty <betelgeuse@gentoo.org>
Tue, 16 Jan 2007 21:11:29 +0000 (21:11 +0000)
committerPetteri Räty <betelgeuse@gentoo.org>
Tue, 16 Jan 2007 21:11:29 +0000 (21:11 +0000)
eclass/java-pkg-2.eclass

index 742b62ea235d322f1e7809f323f85bf6601141d5..5aebb37a07cf81b89753b6f84b4b06ea6d5b0afb 100644 (file)
@@ -5,10 +5,13 @@
 #
 # Licensed under the GNU General Public License, v2
 #
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.12 2007/01/12 16:12:15 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.13 2007/01/16 21:11:29 betelgeuse Exp $
 
 inherit java-utils-2
 
+ECLASS="java-pkg-2"
+INHERITED="${INHERITED} ${ECLASS}"
+
 # -----------------------------------------------------------------------------
 # @eclass-begin
 # @eclass-summary Eclass for Java Packages
@@ -17,6 +20,15 @@ inherit java-utils-2
 # need to use Java.
 # -----------------------------------------------------------------------------
 
+# ------------------------------------------------------------------------------
+# @IUSE
+#
+# ebuilds using this eclass can set JAVA_PKG_IUSE and then this eclass
+# will automatically add deps for them.
+#
+# ------------------------------------------------------------------------------
+IUSE="${JAVA_PKG_IUSE}"
+
 # ------------------------------------------------------------------------------
 # @depend
 #
@@ -26,6 +38,8 @@ inherit java-utils-2
 # ------------------------------------------------------------------------------
 DEPEND="${JAVA_PKG_E_DEPEND}"
 
+hasq source ${JAVA_PKG_IUSE} && DEPEND="${DEPEND} source? ( app-arch/zip )"
+
 # ------------------------------------------------------------------------------
 # @rdepend
 #