diff options
author | Serkan Kaba <serkan@gentoo.org> | 2009-02-19 05:10:37 +0000 |
---|---|---|
committer | Serkan Kaba <serkan@gentoo.org> | 2009-02-19 05:10:37 +0000 |
commit | 0a5cece92a2c78dd33279cc092c17a50cfd525f2 (patch) | |
tree | 75c37b5da19d296fa75f6303d6d394dc778e2a84 | |
parent | version bump - ebuild submitted by Victor Ostorga via bug #259549 (diff) | |
download | gentoo-2-0a5cece92a2c78dd33279cc092c17a50cfd525f2.tar.gz gentoo-2-0a5cece92a2c78dd33279cc092c17a50cfd525f2.tar.bz2 gentoo-2-0a5cece92a2c78dd33279cc092c17a50cfd525f2.zip |
Move pkg_preinst to java-utils-2 and add it to java-pkg-opt-2.
-rw-r--r-- | eclass/java-pkg-2.eclass | 26 | ||||
-rw-r--r-- | eclass/java-pkg-opt-2.eclass | 11 | ||||
-rw-r--r-- | eclass/java-utils-2.eclass | 29 |
3 files changed, 45 insertions, 21 deletions
diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass index 8a49519a3ef5..45bbeedf21f0 100644 --- a/eclass/java-pkg-2.eclass +++ b/eclass/java-pkg-2.eclass @@ -5,7 +5,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.32 2009/01/28 19:59:53 serkan Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.33 2009/02/19 05:10:37 serkan Exp $ inherit java-utils-2 @@ -103,25 +103,13 @@ java-pkg-2_src_compile() { fi } - +# ------------------------------------------------------------------------------ +# @eclass-pkg_preinst +# +# wrapper for java-utils-2_pkg_preinst +# ------------------------------------------------------------------------------ java-pkg-2_pkg_preinst() { - if is-java-strict; then - if has_version dev-java/java-dep-check; then - [[ -e "${JAVA_PKG_ENV}" ]] || return - local output=$(GENTOO_VM= java-dep-check --image "${D}" "${JAVA_PKG_ENV}") - if [[ ${output} && has_version <=dev-java/java-dep-check-0.2 ]]; then - ewarn "Possibly unneeded dependencies found in package.env:" - for dep in ${output}; do - ewarn "\t${dep}" - done - fi - if [[ ${output} && has_version >dev-java/java-dep-check-0.2 ]]; then - ewarn "${output}" - fi - else - eerror "Install dev-java/java-dep-check for dependency checking" - fi - fi + java-utils-2_pkg_preinst } # ------------------------------------------------------------------------------ diff --git a/eclass/java-pkg-opt-2.eclass b/eclass/java-pkg-opt-2.eclass index b27f30543c28..d41f5875452a 100644 --- a/eclass/java-pkg-opt-2.eclass +++ b/eclass/java-pkg-opt-2.eclass @@ -10,7 +10,7 @@ # Removed phase hooks because Portage does proper env saving now. # <betelgeuse@gentoo.org> # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.10 2008/10/11 21:07:13 caster Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-opt-2.eclass,v 1.11 2009/02/19 05:10:37 serkan Exp $ inherit java-utils-2 @@ -53,3 +53,12 @@ java-pkg-opt-2_pkg_setup() { java-pkg-opt-2_src_prepare() { use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare } + +# ------------------------------------------------------------------------------ +# @eclass-pkg_preinst +# +# wrapper for java-utils-2_pkg_preinst +# ------------------------------------------------------------------------------ +java-pkg-2_pkg_preinst() { + use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst +} diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 10a0deb5c33a..225fa5f64854 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -6,7 +6,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.121 2009/02/11 16:13:38 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.122 2009/02/19 05:10:37 serkan Exp $ # ----------------------------------------------------------------------------- # @eclass-begin @@ -1822,6 +1822,33 @@ java-utils-2_src_prepare() { } # ------------------------------------------------------------------------------ +# @eclass-pkg_preinst +# +# pkg_preinst Searches for missing and unneeded dependencies +# Don't call directly, but via java-pkg-2_pkg_preinst! +# ------------------------------------------------------------------------------ + +java-utils-2_pkg_preinst() { + if is-java-strict; then + if has_version dev-java/java-dep-check; then + [[ -e "${JAVA_PKG_ENV}" ]] || return + local output=$(GENTOO_VM= java-dep-check --image "${D}" "${JAVA_PKG_ENV}") + if [[ ${output} && has_version <=dev-java/java-dep-check-0.2 ]]; then + ewarn "Possibly unneeded dependencies found in package.env:" + for dep in ${output}; do + ewarn "\t${dep}" + done + fi + if [[ ${output} && has_version >dev-java/java-dep-check-0.2 ]]; then + ewarn "${output}" + fi + else + eerror "Install dev-java/java-dep-check for dependency checking" + fi + fi +} + +# ------------------------------------------------------------------------------ # @section-begin build # @section-summary Build functions # |