summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2015-11-18 22:54:08 +0000
committerJames Le Cuirot <chewi@gentoo.org>2015-11-18 22:59:02 +0000
commitc76ef146365eb63ca023d047e22c1a3dfd60b5f5 (patch)
tree8a66554babb60cbcb0449d39f8b189f78c268ba4 /dev-java/javacup/javacup-0.11b_p20151001.ebuild
parentapp-doc/zeal: Bump version to 0.2.0 (diff)
downloadgentoo-c76ef146365eb63ca023d047e22c1a3dfd60b5f5.tar.gz
gentoo-c76ef146365eb63ca023d047e22c1a3dfd60b5f5.tar.bz2
gentoo-c76ef146365eb63ca023d047e22c1a3dfd60b5f5.zip
dev-java/javacup: Use installed javacup over bundled where possible
Fixes bug #565338. Annoyingly javacup bundles an older version of itself that will break jflex if that has already been built against this newer version beforehand. Even more annoyingly, the binary download is built with Java 8, which isn't much use to us. We therefore use any installed javacup that is newer than the bundled version where possible. If this approach turns out to be unworkable then we may just have to use the bundled jflex for bootstrapping. Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-java/javacup/javacup-0.11b_p20151001.ebuild')
-rw-r--r--dev-java/javacup/javacup-0.11b_p20151001.ebuild19
1 files changed, 17 insertions, 2 deletions
diff --git a/dev-java/javacup/javacup-0.11b_p20151001.ebuild b/dev-java/javacup/javacup-0.11b_p20151001.ebuild
index ad8742f2b4c4..b44a0da26d9e 100644
--- a/dev-java/javacup/javacup-0.11b_p20151001.ebuild
+++ b/dev-java/javacup/javacup-0.11b_p20151001.ebuild
@@ -48,8 +48,23 @@ src_configure() {
}
src_compile() {
- einfo "Bootstrapping with bundled javacup ..."
- EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/bin/${MY_P:0:-1}.jar" eant
+ # Annoyingly javacup bundles an older version of itself that will
+ # break jflex if that has already been built against this newer
+ # version beforehand. Even more annoyingly, the binary download is
+ # built with Java 8, which isn't much use to us. We therefore use
+ # any installed javacup that is newer than the bundled version where
+ # possible. If this approach turns out to be unworkable then we may
+ # just have to use the bundled jflex for bootstrapping.
+ if has_version \>=${CATEGORY}/${PN}-0.11b:${SLOT}; then
+ # Use PORTAGE_QUIET to suppress a QA warning that is spurious
+ # thanks to has_version above. This is Portage-specific but
+ # showing the warning elsewhere isn't the end of the world.
+ einfo "Bootstrapping with installed javacup ..."
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(PORTAGE_QUIET=1 java-pkg_getjars --build-only javacup)" eant
+ else
+ einfo "Bootstrapping with bundled javacup ..."
+ EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/bin/${MY_P:0:-1}.jar" eant
+ fi
# Clean everything except the new jar.
rm -rv java/ classes/ || die