diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-05-31 20:59:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-05-31 20:59:14 +0100 |
commit | e748ba9741f6540f4675c23e3e37b73e822c13a4 (patch) | |
tree | 23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /dev-java/stringtemplate | |
parent | 908778078736bd36f7a60a2d576d415cb8e000fa (diff) |
gentoo resync : 31.05.2021
Diffstat (limited to 'dev-java/stringtemplate')
-rw-r--r-- | dev-java/stringtemplate/Manifest | 8 | ||||
-rw-r--r-- | dev-java/stringtemplate/files/4.0.8-r1-test-fixes.patch | 73 | ||||
-rw-r--r-- | dev-java/stringtemplate/files/4.0.8-test-fixes.patch | 38 | ||||
-rw-r--r-- | dev-java/stringtemplate/files/stringtemplate-4.0.8-fix-tests.patch | 72 | ||||
-rw-r--r-- | dev-java/stringtemplate/stringtemplate-3.2.1-r2.ebuild | 59 | ||||
-rw-r--r-- | dev-java/stringtemplate/stringtemplate-4.0.8-r1.ebuild (renamed from dev-java/stringtemplate/stringtemplate-4.0.8.ebuild) | 40 |
6 files changed, 231 insertions, 59 deletions
diff --git a/dev-java/stringtemplate/Manifest b/dev-java/stringtemplate/Manifest index d19fe70405c8..fbff1f032f22 100644 --- a/dev-java/stringtemplate/Manifest +++ b/dev-java/stringtemplate/Manifest @@ -1,8 +1,10 @@ AUX 3.2.1-test-fixes.patch 1706 BLAKE2B e3bb6f698109d0290b67221807eb8648642e40aed936502ce4c86d57c2d44355bdaa70ce5147bb8f2a86fcb8123f5e5982e61acd2fb9fcd93f7f216916def4aa SHA512 c161e28851d40e6b9615f7880f746f0a2426a1f705609cfbb10f66c1c3fc3935bc5ee6f4f76991d57e6261bba05269e3ce1eb33fe72e50e7199dab629372cee7 -AUX 4.0.8-test-fixes.patch 1503 BLAKE2B 3d5e19d7084e0553b0d94fcfc3278bda557442719a907145a4d9a4fa26d206b0b2d1299cc122cf4ace014d97b2d93dd9588b3a929323822af3c472594fc03a4a SHA512 505bca326ae571974c6fdec1fc0d5e66066db5175960ff6dbec682f41244502e52cbd05f2e6119029954b546e52305addc14202223e4c3f2f04118c527606b4b +AUX 4.0.8-r1-test-fixes.patch 3059 BLAKE2B 8b278f4d13067c5abc4994aca7cf7a011712d59fbe4595eb86a07a095680bba4a14fb5f1ae4ccee2705b21e0ad857562725c4e773a361eb4d392d64e8031dd09 SHA512 d1ed78332950c1ee81846f51086acec62e19c84293cf45d01a07379e4e96d0dfcfc3af933e78eb986d087a1083eeeead0d5bd80c2ed040861ca931df112d795d +AUX stringtemplate-4.0.8-fix-tests.patch 2956 BLAKE2B 698727b248f9ebbeda46f099c3880b104a6713c600d820f7576757ba69f72d207ff4ecb7271afd8113a4250d51dd63d16f908a3f2aeff76f6112637934dce411 SHA512 29d33536a6abbbb3b0c99263b15a3ba4cc90b5beb03965884598c5d946c41a4727d582b5143d3e7356c9f22fc148ad899efa3281927bf3aca0c4d9dc758d1a8e DIST antlr-3.5.2-complete.jar 2456317 BLAKE2B d9afa08ad98dbff16d30425b97a0ddac7402055916e6a7dd290c3b9a2b26a4751c02f405d8d13c186333430c370c94bd73419b14c8e46df2971f68536cc484a0 SHA512 560f208e38759b5e626de56816e1fce9c191c526c04ca782513859d468ac444d1e8e62c03870a68f8f9d8daee0f45fca465150e2bbfc71b46e46b952519044b1 -DIST stringtemplate-3.2.1.tar.gz 1039803 BLAKE2B 6f6ab7e1d5bc1e2bb01960c0baaea0bd07267af26ff481c1e1586392e0a8938676cab3e54c22b2804bed2806befd938d4d09715de45cea12212e424e2e30fc4c SHA512 fe4c50584dd3695514034845ba7b8fa300cf582b6b302797afadce990f2665759323f6a29ece1bc07dfab244cc00455b4106fe3ad6851165edbb8736ad7ec714 +DIST stringtemplate-3.2.1.tar.gz 107877 BLAKE2B e099aaef047de12706ca4c771f28742dc48ec14a577b2384b32850e304b29284436b3c850846136cbd37481ff48cfb2fd5935d2de3aafa5c817ae24f62579435 SHA512 76203182302d42a0f79de7e8a22f44c59ddc5604761034e420b6973894e0ca1e6154cbcb322ec6f9a064ee89cc5f6478b775a716692c80c7f0c77566aa8a0e25 DIST stringtemplate-4.0.8.tar.gz 147305 BLAKE2B 0c09326f4eecfc86db8588a9b8db801bac8d8e128f8ef004a3691813d1dfcbd1e397acd5cad47e4c9d44d7ee8c17b8f6b66386fb897e4137df43dc46f46dc3f3 SHA512 21e4936356a6d374bf92645f09351a495a5900a408ead8dce1903ed81d7fc70eb4b44b206b587b05ed87edb2d4792c1cf72907a9cb527e18373ba2e5f31b5724 EBUILD stringtemplate-3.2.1-r1.ebuild 1476 BLAKE2B 24dbc49a93f0e63d886adbb12c06769b6015554eb1c74756a6f48642e92f3489b06e4524287503c2bdafa7bff4349c419afff66710ace2b425feeec593214fbe SHA512 fd1ff2ae25cbcaf37a1f193f8791415f8605e548a2e3f6fe5e310fad8b8720f19d279935c927589829b5957bceea686076f750d5f8d94d648ae9cd6158aece99 -EBUILD stringtemplate-4.0.8.ebuild 2179 BLAKE2B 4c75c9863cfef6fc6baf77ec421f4c9e4a484b1454f473c7b5e86c7cc9fa8518a7dea32c13d288d7180849cdd5a817da5a54c7eca85756f22a5a32666d72edf0 SHA512 e903e57beb2a5975715873b2f13a4c83f2cf65304f36d37c8028e5f7782ed214bcccd75aabe321d6bfb88f9ea5d81facbdf160bb7f092e4bd0385061656afb80 +EBUILD stringtemplate-3.2.1-r2.ebuild 1561 BLAKE2B 3e2674b791144f38cf05a6eb7d519e07022281522b11eb204cc7828532759f7d6d3ab88c46b9b3a5a0d578b27d33fbe2c9a346fe927a7fe499bdece9d0680003 SHA512 5ad8941f4c4669b1ffcb341ace024d0c7572f6bec3e9ee982843d837f7699b7b300b5a66a776c514d1e69e48402d8e35e2c45ed68ae567a55975d89dbb6f1c69 +EBUILD stringtemplate-4.0.8-r1.ebuild 2227 BLAKE2B 10d792caffab1e99e83eb551fc53603107f9be7f662fab164bc8b1573fbe577c777d509e8dbf1b1ea0e2cc899cf1c1b168f7314a5d98c817a74b019772ae785e SHA512 281ce1c2835412d72dd327dce4fb1df38a5e493ebb2f76ee59ce75945ecf4b4c4a45c6ea2e417e287ca1f422dd319bf693eafe19b4c52e84e04876454dab8b97 MISC metadata.xml 322 BLAKE2B a9d59ec72b635debef4618887bd9389b4db013017a0a952b28b5f07e7a2caef78976b51de098085b94cc16046fe5642a5b6da9e2a197aa51d39daac6b25f1c19 SHA512 76ac99f8c99d34b533c08ae008a9eb2ac2a3b64589df3d43460c93b78c3c53c45b944837cc7f5514e90afc2117554fb545306e74a2b2bcb5c8339c656998c449 diff --git a/dev-java/stringtemplate/files/4.0.8-r1-test-fixes.patch b/dev-java/stringtemplate/files/4.0.8-r1-test-fixes.patch new file mode 100644 index 000000000000..0834ccf9bcce --- /dev/null +++ b/dev-java/stringtemplate/files/4.0.8-r1-test-fixes.patch @@ -0,0 +1,73 @@ +--- a/test/org/stringtemplate/v4/test/TestGroups.java 2014-03-25 11:55:55.000000000 +0000 ++++ b/test/org/stringtemplate/v4/test/TestGroups.java 2015-09-13 11:01:07.999800299 +0100 +@@ -29,6 +29,7 @@ + + import org.junit.Assert; + import org.junit.Test; ++import org.junit.Ignore; + import org.stringtemplate.v4.ST; + import org.stringtemplate.v4.STErrorListener; + import org.stringtemplate.v4.STGroup; +@@ -527,6 +528,7 @@ + assertEquals(expected, result); + } + ++ @Ignore + @Test public void testUnknownNamedArg() throws Exception { + String dir = getRandomDir(); + String groupFile = +--- a/test/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java 2014-03-25 11:55:55.000000000 +0000 ++++ b/test/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java 2015-09-13 11:01:05.011850826 +0100 +@@ -28,6 +28,7 @@ + package org.stringtemplate.v4.test; + + import org.junit.Test; ++import org.junit.Ignore; + import org.stringtemplate.v4.STErrorListener; + import org.stringtemplate.v4.STGroup; + import org.stringtemplate.v4.STGroupFile; +@@ -36,6 +37,7 @@ + import static org.junit.Assert.assertEquals; + + public class TestGroupSyntaxErrors extends BaseTest { ++ @Ignore + @Test public void testMissingImportString() throws Exception { + String templates = + "import\n" + +--- a/test/org/stringtemplate/v4/test/TestRenderers.java ++++ b/test/org/stringtemplate/v4/test/TestRenderers.java +@@ -59,7 +59,7 @@ public class TestRenderers extends BaseTest { + group.registerRenderer(GregorianCalendar.class, new DateRenderer()); + ST st = group.getInstanceOf("dateThing"); + st.add("created", new GregorianCalendar(2005, 07-1, 05)); +- String expecting = "datetime: 7/5/05 12:00 AM"; ++ String expecting = "datetime: 7/5/05, 12:00 AM"; + String result = st.render(); + assertEquals(expecting, result); + } +@@ -85,7 +85,7 @@ public class TestRenderers extends BaseTest { + group.registerRenderer(GregorianCalendar.class, new DateRenderer()); + ST st = group.getInstanceOf("dateThing"); + st.add("created", new GregorianCalendar(2005, 07-1, 05)); +- String expecting = " datetime: 7/5/05 12:00 AM "; ++ String expecting = " datetime: 7/5/05, 12:00 AM "; + String result = st.render(); + assertEquals(expecting, result); + } +@@ -102,7 +102,7 @@ public class TestRenderers extends BaseTest { + // set Timezone to "PDT" + TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); + st.add("created", new GregorianCalendar(2005, 07-1, 05)); +- String expecting = " datetime: Tuesday, July 5, 2005 12:00:00 AM PDT "; ++ String expecting = " datetime: Tuesday, July 5, 2005 at 12:00:00 AM Pacific Daylight Time "; + String result = st.render(); + assertEquals(expecting, result); + } finally { +@@ -358,6 +358,6 @@ public class TestRenderers extends BaseTest { + cal.set(2012, Calendar.JUNE, 12); + st.add("date", cal); + +- assertEquals("12 de Junho de 2012", st.render(new Locale("pt"))); ++ assertEquals("12 de junho de 2012", st.render(new Locale("pt"))); + } + } diff --git a/dev-java/stringtemplate/files/4.0.8-test-fixes.patch b/dev-java/stringtemplate/files/4.0.8-test-fixes.patch deleted file mode 100644 index 9480abe3ed3f..000000000000 --- a/dev-java/stringtemplate/files/4.0.8-test-fixes.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur test.orig/org/stringtemplate/v4/test/TestGroups.java test/org/stringtemplate/v4/test/TestGroups.java ---- test.orig/org/stringtemplate/v4/test/TestGroups.java 2014-03-25 11:55:55.000000000 +0000 -+++ test/org/stringtemplate/v4/test/TestGroups.java 2015-09-13 11:01:07.999800299 +0100 -@@ -29,6 +29,7 @@ - - import org.junit.Assert; - import org.junit.Test; -+import org.junit.Ignore; - import org.stringtemplate.v4.ST; - import org.stringtemplate.v4.STErrorListener; - import org.stringtemplate.v4.STGroup; -@@ -527,6 +528,7 @@ - assertEquals(expected, result); - } - -+ @Ignore - @Test public void testUnknownNamedArg() throws Exception { - String dir = getRandomDir(); - String groupFile = -diff -Naur test.orig/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java test/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java ---- test.orig/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java 2014-03-25 11:55:55.000000000 +0000 -+++ test/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java 2015-09-13 11:01:05.011850826 +0100 -@@ -28,6 +28,7 @@ - package org.stringtemplate.v4.test; - - import org.junit.Test; -+import org.junit.Ignore; - import org.stringtemplate.v4.STErrorListener; - import org.stringtemplate.v4.STGroup; - import org.stringtemplate.v4.STGroupFile; -@@ -36,6 +37,7 @@ - import static org.junit.Assert.assertEquals; - - public class TestGroupSyntaxErrors extends BaseTest { -+ @Ignore - @Test public void testMissingImportString() throws Exception { - String templates = - "import\n" + diff --git a/dev-java/stringtemplate/files/stringtemplate-4.0.8-fix-tests.patch b/dev-java/stringtemplate/files/stringtemplate-4.0.8-fix-tests.patch new file mode 100644 index 000000000000..994fd42ad5e6 --- /dev/null +++ b/dev-java/stringtemplate/files/stringtemplate-4.0.8-fix-tests.patch @@ -0,0 +1,72 @@ +From 3ea94a870b6e139399abbf932da1dfa2f9bd37e3 Mon Sep 17 00:00:00 2001 +From: parrt <parrt@cs.usfca.edu> +Date: Thu, 8 Nov 2018 11:40:24 -0800 +Subject: [PATCH] make tests work with java 10 and 6, 7, 8 + +--- + .../stringtemplate/v4/test/TestRenderers.java | 24 +++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/test/org/stringtemplate/v4/test/TestRenderers.java b/test/org/stringtemplate/v4/test/TestRenderers.java +index bc5406f7..7b7536e0 100644 +--- a/test/org/stringtemplate/v4/test/TestRenderers.java ++++ b/test/org/stringtemplate/v4/test/TestRenderers.java +@@ -48,6 +48,8 @@ + + public class TestRenderers extends BaseTest { + ++ String javaVersion = System.getProperty("java.version"); ++ + // Make sure to use the US Locale during the tests + private Locale origLocale; + +@@ -73,6 +75,9 @@ public void tearDown() { + ST st = group.getInstanceOf("dateThing"); + st.add("created", new GregorianCalendar(2005, 7 - 1, 5)); + String expecting = "datetime: 7/5/05, 12:00 AM"; ++ if ( javaVersion.startsWith("1.6") || javaVersion.startsWith("1.7") || javaVersion.startsWith("1.8") ) { ++ expecting = "datetime: 7/5/05 12:00 AM"; ++ } + String result = st.render(); + assertEquals(expecting, result); + } +@@ -99,7 +104,10 @@ public void tearDown() { + ST st = group.getInstanceOf("dateThing"); + st.add("created", new GregorianCalendar(2005, 7 - 1, 5)); + String expecting = " datetime: 7/5/05, 12:00 AM "; +- String result = st.render(); ++ if ( javaVersion.startsWith("1.6") || javaVersion.startsWith("1.7") || javaVersion.startsWith("1.8") ) { ++ expecting = " datetime: 7/5/05 12:00 AM "; ++ } ++ String result = st.render(); + assertEquals(expecting, result); + } + +@@ -116,9 +124,13 @@ public void tearDown() { + TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); + st.add("created", new GregorianCalendar(2005, 7 - 1, 5)); + String expecting = " datetime: Tuesday, July 5, 2005 at 12:00:00 AM Pacific Daylight Time "; +- String result = st.render(); ++ if ( javaVersion.startsWith("1.6") || javaVersion.startsWith("1.7") || javaVersion.startsWith("1.8") ) { ++ expecting = " datetime: Tuesday, July 5, 2005 12:00:00 AM PDT "; ++ } ++ String result = st.render(); + assertEquals(expecting, result); +- } finally { ++ } ++ finally { + // Restore original Timezone + TimeZone.setDefault(origTimeZone); + } +@@ -371,6 +383,10 @@ public void tearDown() { + cal.set(2012, Calendar.JUNE, 12); + st.add("date", cal); + +- assertEquals("12 de junho de 2012", st.render(new Locale("pt"))); ++ String expected = "12 de junho de 2012"; ++ if ( javaVersion.startsWith("1.6") || javaVersion.startsWith("1.7") || javaVersion.startsWith("1.8") ) { ++ expected = "12 de Junho de 2012"; ++ } ++ assertEquals(expected, st.render(new Locale("pt"))); + } + } diff --git a/dev-java/stringtemplate/stringtemplate-3.2.1-r2.ebuild b/dev-java/stringtemplate/stringtemplate-3.2.1-r2.ebuild new file mode 100644 index 000000000000..5ad6b886170b --- /dev/null +++ b/dev-java/stringtemplate/stringtemplate-3.2.1-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Skeleton command: +# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/antlr/stringtemplate3/archive/68f2a42e8038f8e716e9666909ea485ee8aff45a.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild stringtemplate-3.2.1-r2.ebuild + +EAPI=7 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="org.antlr:stringtemplate:3.2.2" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +MY_COMMIT="68f2a42e8038f8e716e9666909ea485ee8aff45a" +DESCRIPTION="A Java template engine" +HOMEPAGE="https://www.stringtemplate.org/" +SRC_URI="https://github.com/antlr/stringtemplate3/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# Common dependencies +# POM: pom.xml +# antlr:antlr:2.7.7 -> >=dev-java/antlr-2.7.7:0 + +CDEPEND=" + dev-java/antlr:0 +" + +DEPEND=" + >=virtual/jdk-1.8:* + ${CDEPEND} +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CDEPEND} +" + +DOCS=( {CHANGES,README}.txt ) + +S="${WORKDIR}/${PN}3-${MY_COMMIT}" + +JAVA_GENTOO_CLASSPATH="antlr" +JAVA_SRC_DIR="src" + +JAVA_TEST_GENTOO_CLASSPATH="junit-4" +JAVA_TEST_SRC_DIR="test" +JAVA_TEST_RESOURCE_DIRS="test" + +src_compile() { + local G; for G in action template angle.bracket.template eval group interface; do # from build.xml + antlr -o src/org/antlr/stringtemplate/language/{,${G}.g} || die + done + + java-pkg-simple_src_compile +} diff --git a/dev-java/stringtemplate/stringtemplate-4.0.8.ebuild b/dev-java/stringtemplate/stringtemplate-4.0.8-r1.ebuild index 30f96503ef2e..72831a73fdbb 100644 --- a/dev-java/stringtemplate/stringtemplate-4.0.8.ebuild +++ b/dev-java/stringtemplate/stringtemplate-4.0.8-r1.ebuild @@ -1,27 +1,26 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 ANTLR3="3.5.2" -JAVA_PKG_IUSE="doc source" +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" -inherit epatch java-pkg-2 java-pkg-simple +inherit java-pkg-2 java-pkg-simple DESCRIPTION="A Java template engine" HOMEPAGE="https://www.stringtemplate.org/" SRC_URI="https://github.com/antlr/${PN}4/archive/${PV}.tar.gz -> ${P}.tar.gz - http://www.antlr3.org/download/antlr-${ANTLR3}-complete.jar" + https://www.antlr3.org/download/antlr-${ANTLR3}-complete.jar" + LICENSE="BSD" SLOT="4" KEYWORDS="amd64 ~arm ~arm64 ppc64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="test" RESTRICT="!test? ( test )" -RDEPEND=">=virtual/jre-1.6" - -DEPEND=">=virtual/jdk-1.6 - test? ( dev-java/junit:4 )" +DEPEND=">=virtual/jdk-1.8:*" +RDEPEND=">=virtual/jre-1.8:*" # StringTemplate has a cyclic dependency on ANTLR 3. The runtime classes # are needed at build time and runtime and the tool is also needed at @@ -35,13 +34,18 @@ S="${WORKDIR}/${PN}4-${PV}" JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/antlr-${ANTLR3}-complete.jar" JAVA_SRC_DIR="src" +PATCHES=( + # These tests are broken but are probably fixed in current master. + "${FILESDIR}/4.0.8-r1-test-fixes.patch" + "${FILESDIR}/${P}-fix-tests.patch" +) + src_unpack() { unpack ${P}.tar.gz } -java_prepare() { - # These tests are broken but are probably fixed in current master. - epatch "${FILESDIR}/${PV}-test-fixes.patch" +src_prepare() { + default # Some of these tests requires a graphical display. rm -v test/org/stringtemplate/v4/test/TestEarlyEvaluation.java || die @@ -52,12 +56,6 @@ src_compile() { java-pkg-simple_src_compile } -src_install() { - java-pkg-simple_src_install - java-pkg_register-dependency antlr-3.5 antlr-runtime.jar - dodoc {CHANGES,contributors,README}.txt -} - src_test() { cd test || die local CP=".:${S}/${PN}.jar:$(java-pkg_getjars junit-4):${JAVA_GENTOO_CLASSPATH_EXTRA}" @@ -69,3 +67,9 @@ src_test() { ejavac -classpath "${CP}" $(find -name "*.java") ejunit4 -classpath "${CP}" ${TESTS} } + +src_install() { + java-pkg-simple_src_install + java-pkg_register-dependency antlr-3.5 antlr-runtime.jar + dodoc {CHANGES,contributors,README}.txt +} |