diff options
author | James Le Cuirot <chewi@gentoo.org> | 2015-11-02 23:35:10 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2015-11-02 23:40:59 +0000 |
commit | 09eb9ee16433338f91f98f0fa00b70df7912bbef (patch) | |
tree | f101edc035e68232c61d1cbc887d4a4d8d378727 /dev-java/javacup/javacup-0.11b_p20151001.ebuild | |
parent | dev-java/jflex: Rewrite for version bump to 1.6.1 (diff) | |
download | gentoo-09eb9ee16433338f91f98f0fa00b70df7912bbef.tar.gz gentoo-09eb9ee16433338f91f98f0fa00b70df7912bbef.tar.bz2 gentoo-09eb9ee16433338f91f98f0fa00b70df7912bbef.zip |
dev-java/javacup: Rewrite for version bump to 0.11b_p20151001
Dropped the beta label as the previous version was not really a beta.
No longer has a system-jflex USE flag now that jflex has javacup as a
PDEPEND. This is better as users were unlikely to ever set this flag
and a system version of javacup will be used automatically when it
becomes available.
~arm keyword restored and ~ppc64 keyword temporarily dropped as Java 7
is required now.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-java/javacup/javacup-0.11b_p20151001.ebuild')
-rw-r--r-- | dev-java/javacup/javacup-0.11b_p20151001.ebuild | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/dev-java/javacup/javacup-0.11b_p20151001.ebuild b/dev-java/javacup/javacup-0.11b_p20151001.ebuild new file mode 100644 index 000000000000..ad8742f2b4c4 --- /dev/null +++ b/dev-java/javacup/javacup-0.11b_p20151001.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-ant-2 + +MY_PV=${PV/_beta/-} +MY_PV=${MY_PV/_p/-} +MY_PV=${MY_PV#0.} +MY_P=java-cup-${MY_PV%-*} + +DESCRIPTION="CUP Parser Generator for Java" +HOMEPAGE="http://www2.cs.tum.edu/projects/cup/" +SRC_URI="http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${MY_PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +DEPEND=">=virtual/jdk-1.7 + >=dev-java/ant-core-1.7.0:0 + >=dev-java/jflex-1.6.1:0" + +RDEPEND=">=virtual/jre-1.7" + +JAVA_ANT_REWRITE_CLASSPATH="yes" +JAVA_ANT_CLASSPATH_TAGS+=" taskdef" + +S="${WORKDIR}" + +java_prepare() { + # Bizarrely, you can't build from the tarball without this patch. + epatch "${FILESDIR}"/${PN}-0.11b_beta20150326-build-xml-svn.patch + + # The JFlex package name has changed to lower case. + sed -i "s/JFlex\./jflex./g" build.xml || die + + # Remove the bundled JFlex. + rm -v bin/JFlex.jar || die +} + +src_configure() { + EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only ant-core,jflex) + java-ant-2_src_configure +} + +src_compile() { + einfo "Bootstrapping with bundled javacup ..." + EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/bin/${MY_P:0:-1}.jar" eant + + # Clean everything except the new jar. + rm -rv java/ classes/ || die + + einfo "Recompiling with newly built javacup ..." + EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/dist/${MY_P}.jar" eant + + use doc && ejavadoc -sourcepath src/ -d javadoc java_cup +} + +src_install() { + java-pkg_newjar dist/${MY_P}.jar + java-pkg_newjar dist/${MY_P}-runtime.jar ${PN}-runtime.jar + java-pkg_dolauncher ${PN} --jar ${PN}.jar + java-pkg_register-ant-task + + dodoc changelog.txt + docinto html + dodoc manual.html + + use source && java-pkg_dosrc java/* + use doc && java-pkg_dojavadoc javadoc +} |