public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/javacup/
Date: Tue, 16 Mar 2021 10:26:16 +0000 (UTC)	[thread overview]
Message-ID: <1615890251.3393aacd46a94b3ccea6e7960c7c6a674d4ff995.fordfrog@gentoo> (raw)

commit:     3393aacd46a94b3ccea6e7960c7c6a674d4ff995
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Mar 16 00:08:00 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue Mar 16 10:24:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3393aacd

dev-java/javacup: EAPI 7

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/19947
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild | 91 ++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild b/dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild
new file mode 100644
index 00000000000..587cf479708
--- /dev/null
+++ b/dev-java/javacup/javacup-0.11b_p20151001-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PV=${PV/_beta/-}
+MY_PV=${MY_PV/_p/-}
+MY_PV=${MY_PV#0.}
+MY_P=java-cup-${MY_PV%-*}
+
+DESCRIPTION="CUP Parser Generator for Java"
+HOMEPAGE="http://www2.cs.tum.edu/projects/cup/"
+SRC_URI="http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+DEPEND="dev-java/ant-core:0
+	dev-java/jflex:0
+	>=virtual/jdk-1.8:*"
+
+RDEPEND=">=virtual/jre-1.8:*"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS+=" taskdef"
+
+S="${WORKDIR}"
+
+src_prepare() {
+	default
+	# Bizarrely, you can't build from the tarball without this patch.
+	eapply "${FILESDIR}"/${PN}-0.11b_beta20150326-build-xml-svn.patch
+
+	# The JFlex package name has changed to lower case.
+	sed -i "s/JFlex\./jflex./g" build.xml || die
+
+	# Remove the bundled JFlex.
+	rm -v bin/JFlex.jar || die
+}
+
+src_configure() {
+	EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only ant-core,jflex)
+	java-ant-2_src_configure
+}
+
+src_compile() {
+	# 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
+
+	einfo "Recompiling with newly built javacup ..."
+	EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/dist/${MY_P}.jar" eant
+
+	use doc && ejavadoc -sourcepath src/ -d javadoc java_cup
+}
+
+src_install() {
+	java-pkg_newjar dist/${MY_P}.jar
+	java-pkg_newjar dist/${MY_P}-runtime.jar ${PN}-runtime.jar
+	java-pkg_dolauncher ${PN} --jar ${PN}.jar
+	java-pkg_register-ant-task
+
+	dodoc changelog.txt
+	docinto html
+	dodoc manual.html
+
+	use source && java-pkg_dosrc java/*
+	use doc && java-pkg_dojavadoc javadoc
+}


             reply	other threads:[~2021-03-16 10:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 10:26 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-30 11:06 [gentoo-commits] repo/gentoo:master commit in: dev-java/javacup/ Arthur Zamarin
2024-06-24  4:46 Sam James
2024-06-24  4:46 Sam James
2024-06-24  4:46 Sam James
2024-05-25  9:21 Miroslav Šulc
2024-05-23  8:45 Miroslav Šulc
2021-03-27  7:46 Miroslav Šulc
2021-03-26 18:45 Sam James
2021-03-26  7:50 Agostino Sarubbo
2021-03-26  7:45 Agostino Sarubbo
2019-05-18  1:14 Aaron Bauman
2017-07-13  7:48 Alexis Ballier
2016-04-24 20:17 James Le Cuirot
2016-04-24 20:17 James Le Cuirot
2016-02-10 19:41 Mike Frysinger
2015-12-21 14:22 Patrick Lauer
2015-11-22 21:37 James Le Cuirot
2015-11-18 22:59 James Le Cuirot
2015-11-02 23:56 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1615890251.3393aacd46a94b3ccea6e7960c7c6a674d4ff995.fordfrog@gentoo \
    --to=fordfrog@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox