From 994fe442814c4d169bb0f1ee9745604928006b39 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 26 May 2024 00:07:28 +0100 Subject: gentoo auto-resync : 26:05:2024 - 00:07:27 --- dev-java/javacup/Manifest | 4 +- dev-java/javacup/javacup-11b_p20160615.ebuild | 92 +++++++++++++++++++++++++++ dev-java/javacup/metadata.xml | 3 + 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 dev-java/javacup/javacup-11b_p20160615.ebuild (limited to 'dev-java/javacup') diff --git a/dev-java/javacup/Manifest b/dev-java/javacup/Manifest index e84c7ad44802..f57b70b3e6ef 100644 --- a/dev-java/javacup/Manifest +++ b/dev-java/javacup/Manifest @@ -1,4 +1,6 @@ AUX javacup-0.11b_beta20150326-build-xml-svn.patch 1385 BLAKE2B 43ed5b0c75aa308f2301d8e7d633ca69689a1772a7d8f0f7dbd6f914f1bbf571dcef0ac9fb9cacbe07aaa8c50fca69f0fa95f661314dfab2c16ac96ad50f11f7 SHA512 211157370c61995a05ce45e70941d99da9031174fae2b6e4bbacfdd0c402c451009eb5952a8c3cf8a586402aa138e70733dfd46ce9cf6b5fb680edf65657506c DIST java-cup-src-11b-20151001.tar.gz 313405 BLAKE2B 126944916d120dd2150e4a665fea6d216f3d55e002a72b581621df726e4bf0e0664f9ff925189c97162582277c08a4f121e056299ea5a3f5c10cc31d7c0feb9c SHA512 70bb6a0e13fe52694980040205fcf5b3e904c4a07e50c7740c55cc3bb481496c5c071377757b94f59807b936b8c4fdde5423d78cc2d12a7ada1870f71cd9f47e +DIST java-cup-src-11b-20160615.tar.gz 313847 BLAKE2B 0031cdb73471512162f69fff6ed47e91d78769c5162f37d4fdcef1c4b4be17ec9e950eda973a8842ae95423840be6c43a335180584b81c4618ea43cbfa926972 SHA512 532a8169f8e1ed2c637c66e7e21cc90eea363732870fbf4e3d66acbff03de3ba0583cefb7b4e7b8f8cb0c9bf1ca92dd5a59111860612bc7544e8beab87f5fbda EBUILD javacup-0.11b_p20151001-r1.ebuild 2741 BLAKE2B 5fe46493b06faa38180c636131d1a1180fdfb567f94377389c609870127285ac7d61b93f3c61c4708af3aa668aa14d541e0d17b9c08e3bd57d301c7bbfdcd202 SHA512 7d7f646c6b832a83225d940aa11068fe984b3879dd2ecbdc63d3e0c32e8eab2185c8a32442b7bb92ce5096dd0377884630eb44a268dc541bc1a7a278411b6163 -MISC metadata.xml 321 BLAKE2B d9a5fac031ad1be31fc5b1dfb3a3fb5521eaa1a9e9e51f287f2a2e60e325db14bee084dd4248b30f93e0bde6ac0bba523241f74876279dc0f51583edc7582933 SHA512 ea28765d57fac822ed3aeb649b16e685d95ae0ed500401702f37042f82ee111ca5d516b3f8e03f9c2fd2847c5df4928db53c2b1b53657067bda15ac78452ad0d +EBUILD javacup-11b_p20160615.ebuild 2595 BLAKE2B 57e2c158a541f5b229b042f4c7537f5e547aba805434a6fe9f751be316e421c82e38a5fdc52fd0dc6a800cb1c27742c38c3b6f4a39cd5c38e054d36956b8f0c6 SHA512 ecc7007d84b896dfd8fc7b3d301918a0b8d1f7b23cd09299f933932d9335fb364aca2cd0bf3c99f793cddacacba4a2575113655877a0944cffe522fe54a4a0b1 +MISC metadata.xml 399 BLAKE2B 735ada4795cee491980197e589097e933cd2f18ef453f1d793e10be22b44618b75f519e88f7b76f715a7d07ffb56ee7e9ac71951f1829c1b4eeff5430b06b8c6 SHA512 100cea816b78fbbad49ef4499cba083e3492d9928bd055dc5b289e80537e0bb50275115b3a9cedffce32a4e755f6552e12c84582be724437fb27b1f4cd7f5b50 diff --git a/dev-java/javacup/javacup-11b_p20160615.ebuild b/dev-java/javacup/javacup-11b_p20160615.ebuild new file mode 100644 index 000000000000..a66896a46441 --- /dev/null +++ b/dev-java/javacup/javacup-11b_p20160615.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="CUP Parser Generator for Java" +HOMEPAGE="https://www2.cs.tum.edu/projects/cup/" +SRC_URI="https://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${PV/_p/-}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="ant-task" + +DEPEND="${CP_DEPEND} + >=dev-java/jflex-1.6.1-r3:0 + >=virtual/jdk-1.8:* + ant-task? ( >=dev-java/ant-1.10.14-r3:0 )" +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.8:* + ant-task? ( >=dev-java/ant-1.10.14-r3:0 )" + +DOCS=( changelog.txt ) +HTML_DOCS=( manual.html ) + +JAVA_MAIN_CLASS="java_cup/Main" +JAVA_SRC_DIR=( "src" "java" ) + +src_prepare() { + java-pkg-2_src_prepare + if use ant-task; then + JAVA_GENTOO_CLASSPATH+="ant" + else + rm src/java_cup/anttask/CUPTask.java || die + fi +} + +src_compile() { + if has_version \>=${CATEGORY}/${PN}-11b:${SLOT}; then + einfo "Get path of installed JAVACUP" + CP_CUP="$(java-pkg_getjar --build-only javacup javacup.jar)" + else + einfo "Get path of bundled JAVACUP" + CP_CUP="$(echo bin/java-cup-*.jar)" + fi + einfo "Path to JAVACUP is ${CP_CUP}" + + einfo "Get path to jflex" + CP_FLEX="$(java-pkg_getjars --build-only jflex)" + einfo "Path to jflex is ${CP_FLEX}" + + einfo "Generate parser with: ${CP_CUP}" + "$(java-config -J)" -jar "${CP_CUP}" \ + -interface -destdir "java" -parser "parser" -symbols "sym" \ + cup/parser.cup || die + + einfo "Generate lexer" + # https://jflex.de/manual.html#running-jflex + $(java-config -J) -cp "${CP_CUP}:${CP_FLEX}" jflex.Main \ + flex/Lexer.jflex -d java/javacup || die + + einfo "Build intermediate jar" + JAVA_JAR_FILENAME="seco.jar" + java-pkg-simple_src_compile + + einfo "Remove classes and generated code" + rm -rv java/* target/classes/ || die + + einfo "Regenerate parser with intermediate jar file" + "$(java-config -J)" -jar ./seco.jar \ + -interface -destdir "java" -parser "parser" -symbols "sym" \ + cup/parser.cup || die + + einfo "Regenerate lexer with intermediate jar file" + $(java-config -J) -cp "$(echo ./seco.jar):${CP_FLEX}" jflex.Main \ + flex/Lexer.jflex -d java/javacup || die + + einfo "Build final jar with regenerated parser and lexer" + JAVA_JAR_FILENAME="${PN}.jar" + java-pkg-simple_src_compile + "$(java-config --jar)" cvf "${PN}-runtime.jar" -C target/classes java_cup/runtime || die +} + +src_install() { + java-pkg-simple_src_install + java-pkg_dojar "${PN}.jar" "${PN}-runtime.jar" + use ant-task && java-pkg_register-ant-task +} diff --git a/dev-java/javacup/metadata.xml b/dev-java/javacup/metadata.xml index afa5d3dcd5d1..565315fe27ec 100644 --- a/dev-java/javacup/metadata.xml +++ b/dev-java/javacup/metadata.xml @@ -8,4 +8,7 @@ ultimate-pa/javacup + + Build and register the ant-task + -- cgit v1.2.3