summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuan Liao <liaoyuan@gmail.com>2022-01-20 12:50:39 -0800
committerMiroslav Šulc <fordfrog@gentoo.org>2022-01-25 10:30:03 +0100
commiteb9234c26f9dd6984276ee8c499835a4318152ec (patch)
tree198b816f8a394d7a4a8d897923bbb9d152464a00 /dev-java/antlr
parentdev-java/stringtemplate: Add 4.3.1, resolve antlr-3.5 circular dep (diff)
downloadgentoo-eb9234c26f9dd6984276ee8c499835a4318152ec.tar.gz
gentoo-eb9234c26f9dd6984276ee8c499835a4318152ec.tar.bz2
gentoo-eb9234c26f9dd6984276ee8c499835a4318152ec.zip
dev-java/antlr: Split antlr-runtime and antlr-tool for 3.5.2
Suggested-by: Miroslav Šulc <fordfrog@gentoo.org> Bug: https://bugs.gentoo.org/742554 Signed-off-by: Yuan Liao <liaoyuan@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/23904 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/antlr')
-rw-r--r--dev-java/antlr/antlr-3.5.2-r2.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-java/antlr/antlr-3.5.2-r2.ebuild b/dev-java/antlr/antlr-3.5.2-r2.ebuild
new file mode 100644
index 000000000000..c085043de3e4
--- /dev/null
+++ b/dev-java/antlr/antlr-3.5.2-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-2
+
+DESCRIPTION="A parser generator for many languages"
+HOMEPAGE="https://www.antlr3.org/"
+# Reuse tarball for DOCS files
+SRC_URI="https://github.com/${PN}/${PN}3/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="3.5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+CP_DEPEND="
+ ~dev-java/antlr-runtime-${PV}:${SLOT}
+ ~dev-java/antlr-tool-${PV}:${SLOT}
+"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ ${CP_DEPEND}
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CP_DEPEND}
+"
+
+S="${WORKDIR}/${PN}3-${PV}"
+
+DOCS=( contributors.txt README.txt )
+
+src_compile() {
+ :
+}
+
+src_install() {
+ java-pkg_regjar "$(java-pkg_getjar antlr-runtime-3.5 antlr-runtime.jar)"
+ java-pkg_regjar "$(java-pkg_getjar antlr-tool-3.5 antlr-tool.jar)"
+
+ java-pkg_dolauncher ${PN}${SLOT} --main org.antlr.Tool
+ einstalldocs # https://bugs.gentoo.org/789582
+}
+
+pkg_postinst() {
+ # If upgrading from a version of this slot that installs JARs,
+ # display a message about submodule split
+ local changed_ver="3.5.2-r2"
+ local should_show_msg
+ for replaced_ver in ${REPLACING_VERSIONS}; do
+ if ver_test "${replaced_ver}" -lt "${changed_ver}"; then
+ should_show_msg=1
+ break
+ fi
+ done
+ [[ "${should_show_msg}" ]] || return
+ elog "Since version ${changed_ver}, ${PN}-${SLOT} no longer installs JARs."
+ elog "Please find the JARs from files installed by submodule packages"
+ elog "antlr-runtime-${SLOT} and antlr-tool-${SLOT}."
+}