diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2009-04-10 12:18:19 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2009-04-10 12:18:19 +0000 |
commit | 0e6330103b3b66ef1dd0daed44cc97be51eea14b (patch) | |
tree | a0fffa91776dafeda888433ed656ae6fa2fbae29 /dev-java | |
parent | Change device-mapper dep to split since it's now integrated in latest lvm2. ... (diff) | |
download | historical-0e6330103b3b66ef1dd0daed44cc97be51eea14b.tar.gz historical-0e6330103b3b66ef1dd0daed44cc97be51eea14b.tar.bz2 historical-0e6330103b3b66ef1dd0daed44cc97be51eea14b.zip |
Add support for gunit.
Package-Manager: portage-2.2_rc28/cvs/Linux i686
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/antlr/ChangeLog | 8 | ||||
-rw-r--r-- | dev-java/antlr/Manifest | 13 | ||||
-rw-r--r-- | dev-java/antlr/antlr-3.1.3-r1.ebuild | 110 | ||||
-rw-r--r-- | dev-java/antlr/metadata.xml | 5 |
4 files changed, 128 insertions, 8 deletions
diff --git a/dev-java/antlr/ChangeLog b/dev-java/antlr/ChangeLog index 7c3869ff6d3b..227321e7456c 100644 --- a/dev-java/antlr/ChangeLog +++ b/dev-java/antlr/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-java/antlr # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/ChangeLog,v 1.70 2009/03/29 23:29:15 serkan Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/ChangeLog,v 1.71 2009/04/10 12:18:19 betelgeuse Exp $ + +*antlr-3.1.3-r1 (10 Apr 2009) + + 10 Apr 2009; Petteri Räty <betelgeuse@gentoo.org> metadata.xml, + +antlr-3.1.3-r1.ebuild: + Add support for gunit. 29 Mar 2009; Serkan Kaba <serkan@gentoo.org> +files/2.7.7-makefixes.patch, antlr-2.7.7: diff --git a/dev-java/antlr/Manifest b/dev-java/antlr/Manifest index 7df7f7c31ae1..a91e6a399aba 100644 --- a/dev-java/antlr/Manifest +++ b/dev-java/antlr/Manifest @@ -9,13 +9,14 @@ DIST antlr-2.7.7.tar.gz 1816180 RMD160 0b7951a28b748e912721fe0f6de4095d9f8da57d DIST antlr-3.1.3-generated.tar.bz2 47167 RMD160 9ea64a67aba65bf27e8abbdfbd1a28a0ea2b7698 SHA1 21addec96267b43742e2b2bbd6c7e245db644c38 SHA256 ed326de0f1f92dd72e8d9644e8eaf59d02b9725b4b5218f5c54e12100f8d05f4 DIST antlr-3.1.3.tar.gz 10743515 RMD160 e772197a8a89783ec7cb3e0005913e0396a0ca4c SHA1 2558d373c1d94d8fdd9d26a5be390316aa6b5350 SHA256 1fca0fc7304140807e64ec263a58d93ef1b380cfb6407084e6909f8220bc1039 EBUILD antlr-2.7.7.ebuild 2711 RMD160 b7df22d5bfe750a472bd9701a23f796530105e8d SHA1 39d835d846d2dacd5743229ae23c12947d59cd7f SHA256 93088d371829497991c530104ca4ff2d6236b6a37c85e79c299612f3f86baf9a +EBUILD antlr-3.1.3-r1.ebuild 3047 RMD160 ad5536e88e9d73ec04e928aef6efc3aaa365d9c8 SHA1 f9d3df57ef14aaa8200bc6009d115e4c16aabed5 SHA256 3ea9efbfcaba6d4d34bd7992be3dc94642bcc4a282b624bbdd14fcef57df6a99 EBUILD antlr-3.1.3.ebuild 2624 RMD160 c5644afc28b9045480c8f033afe6f99c6a5d72a7 SHA1 186e3a6f8eb12ded0f1514a07a02354738d3820a SHA256 5db7dd54ce52413a5e3699264eaea8a493f62849bd42c1acaef292f88637f7ac -MISC ChangeLog 9838 RMD160 7eea1e92b3eeaa866c0ed937e568b4763de69a3f SHA1 8bbdb2b6c5817bdbd1ccb94ffca945e65eb2db27 SHA256 98b1a0ae9e621177f4d9721878e0881c4279af5512f74cf187082909abafea92 -MISC metadata.xml 237 RMD160 3f4bc2addb977798173b802ed139eddc82935279 SHA1 19099efa23f7059bcd4a2b0c792e67c9dd90413b SHA256 f200b3d23c03ca390b7fa6f7d3ef4d67af8c3ea2584ba063bb47fefa06a0870e +MISC ChangeLog 9992 RMD160 9edddf648ce20bd50bf26a3a82ba5cea3b26161d SHA1 23b00285aa814f1401f8358814d9609cf14ce7c0 SHA256 5064f2239d035b05189d0b26f7fd05671f43d4773f1cded1ca6c537c928f969c +MISC metadata.xml 363 RMD160 72102b036fe76e530f4519a0aa081778aae7262a SHA1 b8f61d984af7ca03255f57bf4126799e58863f2d SHA256 6aa7ec680dc08ab936d6f59f1444bba56902fec42eaf16d5c9919350a5c355cc -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.10 (GNU/Linux) +Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAknQBFYACgkQRh6X64ivZaKGogCeIVYdYsGtm2iCpypO3qAePIi2 -PSgAnikPaekGak6uhDD0jzRqSyfQNmc3 -=OHx7 +iEYEARECAAYFAknfOUMACgkQcxLzpIGCsLTNEwCfWcxx15AMR+OBU0R/IbPIFrRo +j8gAn3Bgf0WDtzSiGcjABFvWbsfA+fRh +=aY6n -----END PGP SIGNATURE----- diff --git a/dev-java/antlr/antlr-3.1.3-r1.ebuild b/dev-java/antlr/antlr-3.1.3-r1.ebuild new file mode 100644 index 000000000000..d0ff06d6eb4b --- /dev/null +++ b/dev-java/antlr/antlr-3.1.3-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/antlr-3.1.3-r1.ebuild,v 1.1 2009/04/10 12:18:19 betelgeuse Exp $ + +EAPI="2" +JAVA_PKG_IUSE="source" + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="A parser generator for C++, C#, Java, and Python" +HOMEPAGE="http://www.antlr.org/" +# You need to generate v3 grammars so that boostrapping works +SRC_URI="http://www.antlr.org/download/${P}.tar.gz + mirror://gentoo/${P}-generated.tar.bz2" +LICENSE="BSD" +SLOT="3" +KEYWORDS="~x86" +IUSE="gunit" + +COMMON_DEPEND=">=dev-java/stringtemplate-3.2 + >=dev-java/antlr-2.7.7:0[java] + gunit? ( dev-java/junit:4 )" + +RDEPEND=">=virtual/jre-1.5 + ${COMMON_DEPEND}" + +DEPEND="${RDEPEND} + >=virtual/jdk-1.5" + +java_prepare() { + rm -v lib/*.jar lib/.*.jar || die + rm -v runtime/ActionScript/project/lib/*.jar || die + # We must bundle this as we can't depend on ourselves + cp -v "${WORKDIR}"/*.java tool/src/main/antlr/org/antlr/grammar/v3 || die +} + +antlr2() { + java -cp $(java-pkg_getjars antlr) antlr.Tool "${@}" || die "antlr2 failed" +} + +antlr3() { + local cp="${S}/bootstrap:${S}/tool/src/main/resources/" + java -cp "${cp}":$(java-pkg_getjars antlr,stringtemplate) \ + org.antlr.Tool "${@}" || die "building v3 grammars failed" +} + +build_antlr() { + cd "${S}" + local dest="${1}" + # runtime + find runtime -name "*.java" > "${T}/sources" || die + # tool + find tool/src/main -name "*.java" >> "${T}/sources" || die + ejavac -d "${dest}" -cp $(java-pkg_getjars antlr,stringtemplate) "@${T}/sources" +} + +# Uses maven so let's just do things manully for now +# when bumping use jardiff and apicheck to make sure +# produced jars are good +src_compile() { + einfo "Bootstrapping antlr3 with bundled sources" + cd tool/src/main/antlr2/org/antlr/grammar/v2/ || die + # the command line only takes one at a time + for grammar in *.g; do + antlr2 ${grammar} || die + done + + cd "${S}" || die + mkdir bootstrap || die + build_antlr bootstrap + + einfo "Building v3 grammars with boostrapped antlr" + local v3dir=tool/src/main/antlr/org/antlr/grammar/v3/ + rm -v "${v3dir}"/*.java || die + antlr3 "${v3dir}"/*.g + + mkdir build || die + cp -r "${S}"/tool/src/main/resources/* build || die + build_antlr build + + if use gunit; then + einfo "building gunit" + antlr3 gunit/src/main/antlr3/org/antlr/gunit/*.g + + find gunit -name "*.java" > "${T}/gunit" || die + ejavac -d build -cp $(java-pkg_getjars stringtemplate,junit-4):build \ + "@${T}/gunit" + + cp -vr gunit/src/main/resources/org build || die + fi + + # jar things up + cd build + find -type f >> "${T}/classes" || die + jar cf ${PN}3.jar "@${T}/classes" || die "jar failed" +} + +src_install() { + # Single jar like upstream + java-pkg_dojar build/antlr3.jar + java-pkg_dolauncher antlr3 --main org.antlr.Tool + use gunit && java-pkg_dolauncher gunit --main org.antlr.gunit.Interp + + use source && java-pkg_dosrc tool/src/main/org \ + runtime/Java/src/main/java/org/ +} + +pkg_postinst() { + elog "Currently the ebuild only has support for the Java backend." +} diff --git a/dev-java/antlr/metadata.xml b/dev-java/antlr/metadata.xml index 558b1a5e9ff3..a741ce4939d6 100644 --- a/dev-java/antlr/metadata.xml +++ b/dev-java/antlr/metadata.xml @@ -3,6 +3,9 @@ <pkgmetadata> <herd>java</herd> <use> - <flag name="script">Install a script to run antlr</flag> + <flag name="script">Install a script to run antlr</flag> + <flag name="gunit" restrict=">=dev-java/antlr-3.1.3-r1"> + gUnit is a "Unit Test" framework for ANTLR grammars + </flag> </use> </pkgmetadata> |