From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 287471384B4 for ; Wed, 18 Nov 2015 22:59:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C5647E07FC; Wed, 18 Nov 2015 22:59:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 68A4AE07FC for ; Wed, 18 Nov 2015 22:59:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 20ABA340909 for ; Wed, 18 Nov 2015 22:59:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A23AA1A8 for ; Wed, 18 Nov 2015 22:59:36 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1447887542.c76ef146365eb63ca023d047e22c1a3dfd60b5f5.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/javacup/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/javacup/javacup-0.11b_p20151001.ebuild X-VCS-Directories: dev-java/javacup/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: c76ef146365eb63ca023d047e22c1a3dfd60b5f5 X-VCS-Branch: master Date: Wed, 18 Nov 2015 22:59:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 11ae2c60-6bb8-4b96-8fc2-926b9c70085a X-Archives-Hash: b874c0d8e75e5ccb91e63f36a55cc0ae commit: c76ef146365eb63ca023d047e22c1a3dfd60b5f5 Author: James Le Cuirot gentoo org> AuthorDate: Wed Nov 18 22:54:08 2015 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Wed Nov 18 22:59:02 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c76ef146 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 dev-java/javacup/javacup-0.11b_p20151001.ebuild | 19 +++++++++++++++++-- 1 file 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 ad8742f..b44a0da 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