diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-java/stringtemplate |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-java/stringtemplate')
-rw-r--r-- | dev-java/stringtemplate/Manifest | 10 | ||||
-rw-r--r-- | dev-java/stringtemplate/files/3.2.1-test-fixes.patch | 53 | ||||
-rw-r--r-- | dev-java/stringtemplate/files/4.0.8-test-fixes.patch | 38 | ||||
-rw-r--r-- | dev-java/stringtemplate/metadata.xml | 11 | ||||
-rw-r--r-- | dev-java/stringtemplate/stringtemplate-3.2.1-r1.ebuild | 61 | ||||
-rw-r--r-- | dev-java/stringtemplate/stringtemplate-4.0.8.ebuild | 70 |
6 files changed, 243 insertions, 0 deletions
diff --git a/dev-java/stringtemplate/Manifest b/dev-java/stringtemplate/Manifest new file mode 100644 index 000000000000..cd0252813b15 --- /dev/null +++ b/dev-java/stringtemplate/Manifest @@ -0,0 +1,10 @@ +AUX 3.2.1-test-fixes.patch 1706 SHA256 4107af29dd7f8f4dff90ef681bfdc222cf9676a1464e924045f23a38ee877cd9 SHA512 c161e28851d40e6b9615f7880f746f0a2426a1f705609cfbb10f66c1c3fc3935bc5ee6f4f76991d57e6261bba05269e3ce1eb33fe72e50e7199dab629372cee7 WHIRLPOOL 84d4357de01ba35b91786c9bcfca30f04edec253ce56d141a6afa9c5a1593aa6120ca0cc94aed082d6c817fa0973221b9b8ab35fadfa5c61e5f5959e55b93a56 +AUX 4.0.8-test-fixes.patch 1503 SHA256 de10bed98450daa0b807e49bb3ea67a0e0a054b3d36ea3ae4ca33f5fe9831168 SHA512 505bca326ae571974c6fdec1fc0d5e66066db5175960ff6dbec682f41244502e52cbd05f2e6119029954b546e52305addc14202223e4c3f2f04118c527606b4b WHIRLPOOL cb15ea4e0b8d2a3e78a2abe130422706c22e06c8e9e41d0e82afecee8c7e72d5b8d7a139bf895f579667c0553be0b4e829716f6c2ef1bc86ef6626c17f0008f5 +DIST antlr-3.5.2-complete.jar 2456317 SHA256 26ca659f47d77384f518cf2b6463892fcd4f0b0d4d8c0de2addf697e63e7326b SHA512 560f208e38759b5e626de56816e1fce9c191c526c04ca782513859d468ac444d1e8e62c03870a68f8f9d8daee0f45fca465150e2bbfc71b46e46b952519044b1 WHIRLPOOL bdbbb081bf0aab83fa26a4a75f7f42487da688a5e3c765ea4cbd7b8c1bcb80b66e8b98bf95ee8bcd2acd60b4eacb6745f879cb899b672ea7fc4489d651a6f2e0 +DIST stringtemplate-3.2.1.tar.gz 1039803 SHA256 3a0adbb7510c2822ca515c635e1ff1469b3ac78f6d2072e48478876b9191de20 SHA512 fe4c50584dd3695514034845ba7b8fa300cf582b6b302797afadce990f2665759323f6a29ece1bc07dfab244cc00455b4106fe3ad6851165edbb8736ad7ec714 WHIRLPOOL be77636384fdc680d856e8840abf0f629d5115c67f2085db044767847a480b3e2be70bae1d3984172561d14661ae325c677017b55183ff7d2e10ae4c9f83b40e +DIST stringtemplate-4.0.8.tar.gz 147305 SHA256 07013e36d16968b514092b1e33cbe53f811a70a12c96e2e56c2e97a4304431df SHA512 21e4936356a6d374bf92645f09351a495a5900a408ead8dce1903ed81d7fc70eb4b44b206b587b05ed87edb2d4792c1cf72907a9cb527e18373ba2e5f31b5724 WHIRLPOOL 61562310995301cd005eb6a553f973304e166bca0b10d59a7d0877d73599a3bd26a2abf4cc7cb0ff98b61a1ef869c08f2d6933833217cac67f92d992a9a6d53d +EBUILD stringtemplate-3.2.1-r1.ebuild 1451 SHA256 7ec6b23decbae82e7c3689999bc39a8c91fe140612671cdab3cbcfcab8d9006f SHA512 0057643878f937518d0505511b92a8342688e3dc4f910370f07e9b856041265b482abcb249ff8ed5e44e4a5e4da3e07b5727bfe5a11e36a4d3a41768c6017498 WHIRLPOOL 53a33032d92104ca85bc349c307d75c4e341dcfa04085c2b87bd5743b050f5e32bef94554ac140462213d2281259cec6683fb99d175e6692dc54dd20952d73b0 +EBUILD stringtemplate-4.0.8.ebuild 2147 SHA256 0960d73ed576becab82d8c8bd0f2f85e82b6cfc1abd3dc572a38090ce097c6d7 SHA512 5c25aa9130785faff5d1c8454401527077b403d7522128ced29c344acddff4ddab20ce5469de0aa58c4d8db18400a2511e255fe2530ab565fe1a0ce884ff0788 WHIRLPOOL ed04f105e926cd61d6f1bb623fd7c5f80cc66b7e2e347db81858a43db66b8d2bebd53a3821ae5280920640eef15bd71e86506894bbbbcd51d0317b9b8a161459 +MISC ChangeLog 4434 SHA256 38585847092715bc7377c3a9cf0113edd6ba0ae9461526293767a450a47509da SHA512 e019d10a2a55f2a172f1feaf8d05b6d18a1664e7943692efac01918d26119fa513b180fff708515a32119b42cd1b8c7ffd63cccf2c7d42f23bbf7b0acc9ca69b WHIRLPOOL a4c166831af202cadf654004aea474fbfea9246bbb6888990d50c36ae12111ec5dcafb8f5ecf6308afd3ec54093c968491a3ae41f35076ec407f3d3778bb8cef +MISC ChangeLog-2015 2134 SHA256 61bf0c3730bb32af668f74575e164d7fca6bdf98137fc00ccdce0f5d5af21d93 SHA512 8cf2b2d3bbe24341b90982f84bcb239b0400abb1f17bcb99f3c99eb65dde19c662648a89fc2aa397ac4ec20c99d28d67a95264183eee54e50605a9b9f618ce61 WHIRLPOOL b2306f5f602408da15505698d8a9fc84c41b9ab52a4b79dc2585d983df6a46d02d621929fa014eb99a0c4b1cb1b275f714c3b7e36cad5ff04238b675119a81d5 +MISC metadata.xml 322 SHA256 d2f1553c203cf0b889d411f67de018152ca45e9b7252a310788de2a4659a66e5 SHA512 76ac99f8c99d34b533c08ae008a9eb2ac2a3b64589df3d43460c93b78c3c53c45b944837cc7f5514e90afc2117554fb545306e74a2b2bcb5c8339c656998c449 WHIRLPOOL 293fbf2f1886359ddd2dcf4a4ec3c3b0bbd53b7a9cf1cb8de5091e9298298e19e907df4d680e8d722091678ea7395c1fdb3e5e92abafaf674e36b8ffcbaa3a2f diff --git a/dev-java/stringtemplate/files/3.2.1-test-fixes.patch b/dev-java/stringtemplate/files/3.2.1-test-fixes.patch new file mode 100644 index 000000000000..fd625abd0668 --- /dev/null +++ b/dev-java/stringtemplate/files/3.2.1-test-fixes.patch @@ -0,0 +1,53 @@ +https://github.com/antlr/stringtemplate3/pull/3 + +--- test/org/antlr/stringtemplate/test/TestStringTemplate.java.orig 2015-09-18 22:04:18.131902875 +0100 ++++ test/org/antlr/stringtemplate/test/TestStringTemplate.java 2015-09-18 22:04:21.651848456 +0100 +@@ -36,6 +36,10 @@ + import java.text.SimpleDateFormat; + import java.util.*; + ++import org.junit.FixMethodOrder; ++import org.junit.runners.MethodSorters; ++ ++@FixMethodOrder(MethodSorters.NAME_ASCENDING) + public class TestStringTemplate extends TestCase { + static final String newline = System.getProperty("line.separator"); + +@@ -87,7 +91,7 @@ + assertEquals(expecting,I.toString()); + } + +- public void testNoGroupLoader() throws Exception { ++ public void testAaaNoGroupLoader() throws Exception { + // this also tests the group loader + StringTemplateErrorListener errors = new ErrorBuffer(); + String tmpdir = System.getProperty("java.io.tmpdir"); +@@ -2214,8 +2218,12 @@ + s.add("2"); + s.add("3"); + st.setAttribute("items", s); +- expecting = "<li>3</li><li>2</li><li>1</li>"; +- assertEquals(expecting, st.toString()); ++ String[] split = st.toString().split("(</?li>){1,2}"); ++ Arrays.sort(split); ++ assertEquals("", split[0]); ++ assertEquals("1", split[1]); ++ assertEquals("2", split[2]); ++ assertEquals("3", split[3]); + } + + public void testDumpMapAndSet() throws Exception { +@@ -2235,8 +2243,11 @@ + s.add("2"); + s.add("3"); + st.setAttribute("items", s); +- expecting = "3,2,1"; +- assertEquals(expecting, st.toString()); ++ String[] split = st.toString().split(","); ++ Arrays.sort(split); ++ assertEquals("1", split[0]); ++ assertEquals("2", split[1]); ++ assertEquals("3", split[2]); + } + + public class Connector3 { diff --git a/dev-java/stringtemplate/files/4.0.8-test-fixes.patch b/dev-java/stringtemplate/files/4.0.8-test-fixes.patch new file mode 100644 index 000000000000..9480abe3ed3f --- /dev/null +++ b/dev-java/stringtemplate/files/4.0.8-test-fixes.patch @@ -0,0 +1,38 @@ +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/metadata.xml b/dev-java/stringtemplate/metadata.xml new file mode 100644 index 000000000000..5757a6a3f8e7 --- /dev/null +++ b/dev-java/stringtemplate/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <upstream> + <remote-id type="github">antlr/stringtemplate4</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-java/stringtemplate/stringtemplate-3.2.1-r1.ebuild b/dev-java/stringtemplate/stringtemplate-3.2.1-r1.ebuild new file mode 100644 index 000000000000..22164ff6a6e3 --- /dev/null +++ b/dev-java/stringtemplate/stringtemplate-3.2.1-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-pkg-simple + +DESCRIPTION="A Java template engine" +HOMEPAGE="http://www.stringtemplate.org/" +SRC_URI="https://github.com/antlr/${PN}3/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ppc64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="test" + +CDEPEND=">=dev-java/antlr-2.7.7-r7:0" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.6" + +DEPEND="${CDEPEND} + >=virtual/jdk-1.6 + test? ( >=dev-java/junit-4.11:4 )" + +S="${WORKDIR}/${P}" +JAVA_GENTOO_CLASSPATH="antlr" +JAVA_SRC_DIR="src" + +java_prepare() { + # https://github.com/antlr/stringtemplate3/pull/3 + epatch "${FILESDIR}/${PV}-test-fixes.patch" + + java-pkg_clean +} + +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 +} + +src_install() { + java-pkg-simple_src_install + dodoc {CHANGES,README}.txt +} + +src_test() { + cd test || die + local CP=".:${S}/${PN}.jar:$(java-pkg_getjars junit-4,${JAVA_GENTOO_CLASSPATH})" + + local TESTS=$(find * -name "Test*.java") + TESTS="${TESTS//.java}" + TESTS="${TESTS//\//.}" + + ejavac -classpath "${CP}" $(find -name "*.java") + ejunit4 -classpath "${CP}" ${TESTS} +} diff --git a/dev-java/stringtemplate/stringtemplate-4.0.8.ebuild b/dev-java/stringtemplate/stringtemplate-4.0.8.ebuild new file mode 100644 index 000000000000..7b0d10d82352 --- /dev/null +++ b/dev-java/stringtemplate/stringtemplate-4.0.8.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +ANTLR3="3.5.2" +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-pkg-simple + +DESCRIPTION="A Java template engine" +HOMEPAGE="http://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" +LICENSE="BSD" +SLOT="4" +KEYWORDS="amd64 ~arm ppc64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="test" + +RDEPEND=">=virtual/jre-1.6" + +DEPEND=">=virtual/jdk-1.6 + test? ( dev-java/junit:4 )" + +# 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 +# build time. To break out of this, we use a prebuilt copy of ANTLR 3 at +# build time and manually register a dependency on the package, which +# will be present at runtime thanks to this PDEPEND. No prebuilt +# software is actually installed onto the system. +PDEPEND=">=dev-java/antlr-${ANTLR3}:3.5" + +S="${WORKDIR}/${PN}4-${PV}" +JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/antlr-${ANTLR3}-complete.jar" +JAVA_SRC_DIR="src" + +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" + + # Some of these tests requires a graphical display. + rm -v test/org/stringtemplate/v4/test/TestEarlyEvaluation.java || die +} + +src_compile() { + java -jar "${JAVA_GENTOO_CLASSPATH_EXTRA}" -lib ${JAVA_SRC_DIR}/org/stringtemplate/v4/compiler $(find ${JAVA_SRC_DIR} -name "*.g") || die + 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}" + + local TESTS=$(find * -name "Test*.java") + TESTS="${TESTS//.java}" + TESTS="${TESTS//\//.}" + + ejavac -classpath "${CP}" $(find -name "*.java") + ejunit4 -classpath "${CP}" ${TESTS} +} |