diff options
author | Vlastimil Babka <caster@gentoo.org> | 2007-05-28 19:25:57 +0000 |
---|---|---|
committer | Vlastimil Babka <caster@gentoo.org> | 2007-05-28 19:25:57 +0000 |
commit | edab441ad3d4f6d9715c250c96d7217970c2f669 (patch) | |
tree | bda8d0dfdaa025f954aeb3499a101f8d4c9df0d2 /dev-java/java-config | |
parent | Mangle the patch to stop a cvs Id from corrupting it. (diff) | |
download | gentoo-2-edab441ad3d4f6d9715c250c96d7217970c2f669.tar.gz gentoo-2-edab441ad3d4f6d9715c250c96d7217970c2f669.tar.bz2 gentoo-2-edab441ad3d4f6d9715c250c96d7217970c2f669.zip |
Revbump for support for OPTIONAL_DEPEND in package.env, bug #176182. Also fixes bug #157380. Via patch from trunk.
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-java/java-config')
-rw-r--r-- | dev-java/java-config/ChangeLog | 9 | ||||
-rw-r--r-- | dev-java/java-config/files/digest-java-config-2.0.33-r1 | 3 | ||||
-rw-r--r-- | dev-java/java-config/files/java-config-2.0.33-r1.patch | 126 | ||||
-rw-r--r-- | dev-java/java-config/java-config-2.0.33-r1.ebuild | 51 |
4 files changed, 188 insertions, 1 deletions
diff --git a/dev-java/java-config/ChangeLog b/dev-java/java-config/ChangeLog index daad4545556a..d192acffb1ea 100644 --- a/dev-java/java-config/ChangeLog +++ b/dev-java/java-config/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/java-config # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/ChangeLog,v 1.161 2007/05/28 11:49:15 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/ChangeLog,v 1.162 2007/05/28 19:25:57 caster Exp $ + +*java-config-2.0.33-r1 (28 May 2007) + + 28 May 2007; Vlastimil Babka <caster@gentoo.org> + +files/java-config-2.0.33-r1.patch, +java-config-2.0.33-r1.ebuild: + Revbump for support for OPTIONAL_DEPEND in package.env, bug #176182. Also + fixes bug #157380. Via patch from trunk. 28 May 2007; nixnut <nixnut@gentoo.org> java-config-2.0.32.ebuild: Stable on ppc wrt bug 179810 diff --git a/dev-java/java-config/files/digest-java-config-2.0.33-r1 b/dev-java/java-config/files/digest-java-config-2.0.33-r1 new file mode 100644 index 000000000000..fe3854bb83bf --- /dev/null +++ b/dev-java/java-config/files/digest-java-config-2.0.33-r1 @@ -0,0 +1,3 @@ +MD5 fb714ebd37a8186fa31a87aed99fa2fe java-config-2.0.33.tar.bz2 25491 +RMD160 f8ac8a9c8707ccc62e6258935b4578260f60eaf2 java-config-2.0.33.tar.bz2 25491 +SHA256 3576c22ffd474b02080f257f6ddedd92c453c786f29d893f2d4f7bafc98194da java-config-2.0.33.tar.bz2 25491 diff --git a/dev-java/java-config/files/java-config-2.0.33-r1.patch b/dev-java/java-config/files/java-config-2.0.33-r1.patch new file mode 100644 index 000000000000..9b49cd53f55e --- /dev/null +++ b/dev-java/java-config/files/java-config-2.0.33-r1.patch @@ -0,0 +1,126 @@ +diff -ru --exclude .svn tags/2.0.33/src/gjl trunk/src/gjl +--- tags/2.0.33/src/gjl 2007-05-26 11:10:15.000000000 +0200 ++++ trunk/src/gjl 2007-05-28 13:59:52.000000000 +0200 +@@ -34,7 +34,7 @@ + pkg = unresolved.pop() + resolved.add(pkg) + # dep is in the form of (jar, pkg) +- for dep in pkg.deps(): ++ for dep in manager.get_pkg_deps(pkg): + dep_pkg = dep[-1] + p = manager.get_package(dep_pkg) + if p is None: +diff -ru --exclude .svn tags/2.0.33/src/java_config/EnvironmentManager.py trunk/src/java_config/EnvironmentManager.py +--- tags/2.0.33/src/java_config/EnvironmentManager.py 2007-05-26 11:10:15.000000000 +0200 ++++ trunk/src/java_config/EnvironmentManager.py 2007-05-28 11:40:03.000000000 +0200 +@@ -263,6 +263,19 @@ + def build_classpath(self, pkgs): + return self.build_path(pkgs, "CLASSPATH") + ++ def get_pkg_deps(self, pkg): ++ """ ++ Returns list of package's deps and optional deps. ++ Filters out optional deps that are not present. ++ """ ++ deps = pkg.deps(); ++ for opt_dep in pkg.opt_deps(): ++ p = self.get_package(opt_dep[-1]) ++ if p: ++ deps.append(opt_dep) ++ ++ return deps ++ + def add_dep_classpath(self, pkg, dep, classpath): + pkg_cp = pkg.classpath() + if pkg_cp: +@@ -295,7 +308,7 @@ + lpath = pkg.query(query) + self.add_path_elements(lpath, path) + +- for dep in pkg.deps(): ++ for dep in self.get_pkg_deps(pkg): + p = self.get_package(dep[-1]) + + if p: +@@ -344,7 +357,7 @@ + + self.add_pkg_env_vars(pkg, env) + +- for dep in pkg.deps(): ++ for dep in self.get_pkg_deps(pkg): + p = self.get_package(dep[-1]) + + if p: +diff -ru --exclude .svn tags/2.0.33/src/java_config/Package.py trunk/src/java_config/Package.py +--- tags/2.0.33/src/java_config/Package.py 2007-05-26 11:10:15.000000000 +0200 ++++ trunk/src/java_config/Package.py 2007-05-28 11:36:50.000000000 +0200 +@@ -55,11 +55,13 @@ + """ + Return all packages this package depends on + """ +- depstr = self.query("DEPEND") +- if depstr: +- return [dep.split("@") for dep in depstr.split(":")] +- else: +- return [] ++ return self.__get_deps("DEPEND") ++ ++ def opt_deps(self): ++ """ ++ Return all packages this package optionally depends on ++ """ ++ return self.__get_deps("OPTIONAL_DEPEND") + + def provides(self): + """ +@@ -69,5 +71,18 @@ + if pv: + return pv.split(" ") + return [] ++ ++ def __get_deps(self, query): ++ """ ++ Internal function to get package's (optional) dependencies; ++ @param query: variable to read from package.env ++ """ ++ depstr = self.query(query) ++ if depstr: ++ return [dep.split("@") for dep in depstr.split(":")] ++ else: ++ return [] ++ ++ + + # vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: +diff -ru --exclude .svn tags/2.0.33/src/java_config/VersionManager.py trunk/src/java_config/VersionManager.py +--- tags/2.0.33/src/java_config/VersionManager.py 2007-05-26 11:10:15.000000000 +0200 ++++ trunk/src/java_config/VersionManager.py 2007-05-27 17:43:01.000000000 +0200 +@@ -127,6 +127,7 @@ + + prefs = self.get_prefs() + ++ # first try to find vm based on preferences + low = self.get_lowest(atoms) # Lowest vm version we can use + for atom in matched_atoms: + for pref in prefs: +@@ -143,12 +144,14 @@ + else: + return gvm # use it! + +- low = self.get_lowest_atom(matched_atoms) +- vm = self.find_vm("", low) +- if vm: +- return vm +- else: +- raise Exception("Couldn't find suitable VM. Possible invalid dependency string.") ++ # no match in preferences, find anything we have ++ for atom in matched_atoms: ++ vm = self.find_vm("", atom) ++ if vm: ++ return vm ++ ++ # nothing found ++ raise Exception("Couldn't find suitable VM. Possible invalid dependency string.") + + def find_vm(self, vm, atom): + vm_list = EnvironmentManager().find_vm(vm) diff --git a/dev-java/java-config/java-config-2.0.33-r1.ebuild b/dev-java/java-config/java-config-2.0.33-r1.ebuild new file mode 100644 index 000000000000..c70dddeab30b --- /dev/null +++ b/dev-java/java-config/java-config-2.0.33-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/java-config-2.0.33-r1.ebuild,v 1.1 2007/05/28 19:25:57 caster Exp $ + +inherit distutils eutils + +DESCRIPTION="Java environment configuration tool" +HOMEPAGE="http://www.gentoo.org/proj/en/java/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd" +IUSE="" + +DEPEND="dev-lang/python" +RDEPEND="${DEPEND} + dev-java/java-config-wrapper" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PF}.patch" +} + +src_install() { + distutils_src_install + + insinto /usr/share/java-config-2/config/ + newins config/jdk-defaults-${ARCH}.conf jdk-defaults.conf || die "arch config not found" +} + +pkg_postrm() { + python_mod_cleanup /usr/share/java-config-2/pym/java_config +} + +pkg_postinst() { + python_mod_optimize /usr/share/java-config-2/pym/java_config + + elog "The way Java is handled on Gentoo has been recently updated." + elog "If you have not done so already, you should follow the" + elog "instructions available at:" + elog "\thttp://www.gentoo.org/proj/en/java/java-upgrade.xml" + elog + elog "While we are moving towards the new Java system, we only allow" + elog "1.3 or 1.4 JDKs to be used with java-config-1 to ensure" + elog "backwards compatibility with the old system." + elog "For more details about this, please see:" + elog "\thttp://www.gentoo.org/proj/en/java/why-we-need-java-14.xml" +} |