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/velocity/
Date: Tue,  9 Apr 2024 07:05:21 +0000 (UTC)	[thread overview]
Message-ID: <1712646121.ebab671d34ce7045dde5447438a3f5353e1590da.fordfrog@gentoo> (raw)

commit:     ebab671d34ce7045dde5447438a3f5353e1590da
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Mon Apr  8 10:14:29 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue Apr  9 07:02:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebab671d

dev-java/velocity: add 2.3_p20240314

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/36150/commits/bd4321f9c3a02c77ee49b80a8a703e7b761168f5
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/velocity/Manifest                      |   1 +
 dev-java/velocity/velocity-2.3_p20240314.ebuild | 108 ++++++++++++++++++++++++
 2 files changed, 109 insertions(+)

diff --git a/dev-java/velocity/Manifest b/dev-java/velocity/Manifest
index 7b243dc27a93..bafc24692cd9 100644
--- a/dev-java/velocity/Manifest
+++ b/dev-java/velocity/Manifest
@@ -1 +1,2 @@
 DIST velocity-2.3.tar.gz 443754 BLAKE2B 16b7aaa87eb6be899f40d09ee8aa50b2ac24dd59c33f29b944d46ea84a77de07cd69f344632b4b829b92a92fe6ccd75cf79e021787b2ca59a79040aa08a53eed SHA512 987f2991a96fa8fae43ff2f72d6a57b25b1cb7d98b7def7a1a6e9a308c8b5b86e394444c47ee0eca8b70d41b341759c7309404dc4b952dbc65fc3a5b92d46cdb
+DIST velocity-2.3_p20240314.tar.gz 440967 BLAKE2B c5fcea7af49d6c46d5c0943efe82f3c04d921afc2c53201b97842ae71714e7035d075c147b3bea71e959db12dd970b7879ade73bbc23bab09a1fd262e21f2fc6 SHA512 9055e780d2a3c798bfe30e5c7859a7311c4984b551d7b2ffa68c57c076549326d0ddae31eabff8009ea021c749331d34c71eee8cab55599dea5f3c8dba841a02

diff --git a/dev-java/velocity/velocity-2.3_p20240314.ebuild b/dev-java/velocity/velocity-2.3_p20240314.ebuild
new file mode 100644
index 000000000000..9fc3d0f5f420
--- /dev/null
+++ b/dev-java/velocity/velocity-2.3_p20240314.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.velocity:velocity-engine-core:2.3"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Apache Velocity is a general purpose template engine"
+HOMEPAGE="https://velocity.apache.org"
+MY_COMMIT="86cfcf41105f8a25db11ca6483e33c20fc0804d9"
+SRC_URI="https://github.com/apache/${PN}-engine/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-engine-${MY_COMMIT}/${PN}-engine-core"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+
+CP_DEPEND="
+	>=dev-java/commons-io-2.8.0:1
+	>=dev-java/commons-lang-3.11:3.6
+	>=dev-java/slf4j-api-1.7.30:0
+"
+DEPEND="
+	>=virtual/jdk-1.8:*
+	${CP_DEPEND}
+	test? (
+		dev-db/hsqldb:0
+		>=dev-java/slf4j-simple-1.7.30:0
+	)
+"
+RDEPEND="
+	>=virtual/jre-1.8:*
+	${CP_DEPEND}
+"
+JAVACC_SLOT="7.0.13"
+BDEPEND="dev-java/javacc:${JAVACC_SLOT}"
+
+JAVA_RESOURCE_DIRS="src/main/resources"
+JAVA_SRC_DIR="src/main/java"
+JAVA_TEST_EXTRA_ARGS="-Dtest.compare.dir=target/test-classes -Dtest.result.dir=results"
+JAVA_TEST_GENTOO_CLASSPATH="junit-4,hsqldb,slf4j-simple"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+src_prepare() {
+	java-pkg-2_src_prepare
+
+	sed -e "s/\${project.version}/${PV}/" \
+		src/main/java-templates/org/apache/velocity/runtime/VelocityEngineVersion.java > \
+		src/main/java/org/apache/velocity/runtime/VelocityEngineVersion.java || die
+
+	sed -i \
+		-e 's/\${parser.basename}/Standard/g' \
+		-e 's/\${parser.package}/org.apache.velocity.runtime.parser/g' \
+		-e 's/\${parser.char.asterisk}/\*/g' \
+		-e 's/\${parser.char.at}/\@/g' \
+		-e 's/\${parser.char.dollar}/\$/g' \
+		-e 's/\${parser.char.hash}/\#/g' \
+		"${S}/src/main/parser/Parser.jjt" || die
+
+	# File "StandardParserTreeConstants.java" does not exist.  Will create one.
+	# File "StandardParserVisitor.java" does not exist.  Will create one.
+	# File "JJTStandardParserState.java" does not exist.  Will create one.
+	"jjtree-${JAVACC_SLOT}" -GRAMMAR_ENCODING=UTF-8 \
+		-JDK_VERSION=1.8 \
+		-BUILD_NODE_FILES=false \
+		-MULTI=true \
+		-NODE_PACKAGE=org.apache.velocity.runtime.parser.node \
+		-NODE_USES_PARSER=true \
+		-STATIC=false \
+		-OUTPUT_DIRECTORY="${JAVA_SRC_DIR}/org/apache/velocity/runtime/parser/node" \
+		"${S}/src/main/parser/Parser.jjt" \
+		|| die "Code generation via jjtree failed"
+
+	"javacc-${JAVACC_SLOT}" -GRAMMAR_ENCODING=UTF-8 \
+		-JDK_VERSION=1.8 \
+		-STATIC=false \
+		-DEBUG_PARSER=false \
+		-DEBUG_LOOKAHEAD=false \
+		-DEBUG_TOKEN_MANAGER=false \
+		-BUILD_PARSER=true \
+		-TOKEN_MANAGER_USES_PARSER=true \
+		-OUTPUT_DIRECTORY="${JAVA_SRC_DIR}" \
+		"${JAVA_SRC_DIR}/org/apache/velocity/runtime/parser/node/Parser.jj" \
+		|| die "Parser.java code generation via javacc failed"
+
+	# Avoid "error: duplicate class: org.apache.velocity.runtime.parser...."
+	rm -v "${JAVA_SRC_DIR}/CharStream.java" || die "cannot remove 'CharStream.java'"
+	rm -v "${JAVA_SRC_DIR}/ParseException.java" || die "cannot remove 'ParseException.java'"
+}
+
+src_test() {
+	pushd src/test/java || die
+		# DataSourceResourceLoaderTestCase.java requires configured jdbc
+		local JAVA_TEST_RUN_ONLY=$(find * \
+			-name "*TestCase.java" \
+			! -name "BaseTestCase.java" \
+			! -name "DataSourceResourceLoaderTestCase.java" \
+			)
+		JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+		JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+	popd
+	java-pkg-simple_src_test
+}


             reply	other threads:[~2024-04-09  7:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  7:05 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-20 11:15 [gentoo-commits] repo/gentoo:master commit in: dev-java/velocity/ Miroslav Šulc
2024-12-05 21:54 Sam James
2024-11-05 10:47 Florian Schmaus
2024-11-05 10:47 Florian Schmaus
2024-10-20 10:23 Miroslav Šulc
2024-10-20 10:23 Miroslav Šulc
2024-10-12 17:12 Arthur Zamarin
2024-06-13 13:21 Miroslav Šulc
2024-06-12 14:30 Sam James
2024-06-10  2:46 Ionen Wolkens
2024-05-08 11:34 Sam James
2024-05-08 11:34 Sam James
2024-05-08 11:34 Sam James
2024-05-01  5:28 Joonas Niilola
2024-03-31  8:35 Miroslav Šulc
2021-12-17 10:57 Arthur Zamarin
2021-11-24 23:31 Sam James
2021-11-10 16:47 Sam James
2021-10-19  0:15 Sam James
2021-07-24 15:22 Sam James
2021-05-18 18:04 Miroslav Šulc
2021-05-18 17:24 Sam James
2021-05-18 17:24 Sam James
2021-04-25 15:23 Miroslav Šulc
2021-04-03 10:49 Miroslav Šulc
2016-07-16 13:51 Patrice Clement
2016-02-21 15:45 Patrice Clement
2015-09-29 21:20 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=1712646121.ebab671d34ce7045dde5447438a3f5353e1590da.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