summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-java/jflex
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-java/jflex')
-rw-r--r--dev-java/jflex/Manifest4
-rw-r--r--dev-java/jflex/files/jflex-1.4.1-build.xml.patch30
-rw-r--r--dev-java/jflex/files/jflex-1.5.0-build.xml149
-rw-r--r--dev-java/jflex/jflex-1.4.3-r1.ebuild72
-rw-r--r--dev-java/jflex/jflex-1.4.3-r2.ebuild72
-rw-r--r--dev-java/jflex/jflex-1.5.0.ebuild78
-rw-r--r--dev-java/jflex/jflex-1.5.1.ebuild88
-rw-r--r--dev-java/jflex/jflex-1.6.0.ebuild90
-rw-r--r--dev-java/jflex/metadata.xml9
9 files changed, 592 insertions, 0 deletions
diff --git a/dev-java/jflex/Manifest b/dev-java/jflex/Manifest
new file mode 100644
index 000000000000..439770adbc5c
--- /dev/null
+++ b/dev-java/jflex/Manifest
@@ -0,0 +1,4 @@
+DIST jflex-1.4.3.tar.gz 1214420 SHA256 6ccdcf15fe9f1d863d538e8b1cfd428b8628a645d247adc40071d1ae70ede2f2 SHA512 901106ea5a9108ba6016da55093801fbaee50f8f8fb45f290cae3bb989663838e83a4d8484bc633b9acf2c085c83304a47d9348255d106117dace3d5f44ea835 WHIRLPOOL 709c130037be6491ea1a9d6301dcc4acc643c9d1127d11a0dccb9d7339fda7fe06ba159100c3f4ad34d7b34c6b5336f2328f6bdf7ee8cdf87e752e371120ff8d
+DIST jflex-1.5.0.tar.gz 2827866 SHA256 76b11d00fe94f79331a74045c7aaea292a80cb311a6840d0dd53209e81d4cb64 SHA512 5d46d3339a8e435228e8dab55ac52bbb40b4b39ea9c28963c5d02298f0ed8a7e8a66573003f165badb4c3939d6bd88852343d886d3b6c2bd78d17320201c3137 WHIRLPOOL 22d44cc90bf09666f0139c83cde2f9330ed12e2dd3313573d948527d2a0d420b71512a764c5579a94d4d30f4a573180bec2c08c37c3e3c81f079a018bee1a3b1
+DIST jflex-1.5.1.tar.gz 2764584 SHA256 3b24ed6ace401e70d71f82a65179a4eb958756f43ed4c647ce75f340f644becd SHA512 e0bb95fd70add73b662c34ff5821f9822bf1e982bd669bc4497bf210555ccd455b1d216391864e9983a4f90d430e0f8b57667c0f0623a8dfb0ff1ef97b2f5572 WHIRLPOOL 123668156410891a9a4c755cd7fbb4464c88b57c00d01ed4d4679c6b5b66e3d355b7006356937c54cc7a14a4b9bd7619912bd0186fc5b8a19294406fa432008b
+DIST jflex-1.6.0.tar.gz 3035885 SHA256 0774da0ee2d01fc9274179de4243e0d229c01b5cf0fbb78952fb7fdc4672190c SHA512 16ce4a89f75ce5f3da02433ff66d39ed4db567b4cf7469997dd2617b82e52d589bb17ec3a2f36b4d00a62233e48820bc2e043dcc9ae3c01f1eeca323c0166eba WHIRLPOOL 4d9e7e8c3a0da66d860b895699d5b50e29f781f1cf18cab436f545b1fb007297ca9433694ce3808452c5d9340eddc978c2b32019b5a8d5d8c6cb0558543ea18e
diff --git a/dev-java/jflex/files/jflex-1.4.1-build.xml.patch b/dev-java/jflex/files/jflex-1.4.1-build.xml.patch
new file mode 100644
index 000000000000..8353cbe52a76
--- /dev/null
+++ b/dev-java/jflex/files/jflex-1.4.1-build.xml.patch
@@ -0,0 +1,30 @@
+--- build.xml 2009-01-31 16:14:57.000000000 +0200
++++ build.xml.fixed 2009-01-31 16:17:14.000000000 +0200
+@@ -35,7 +35,7 @@
+
+ <target name="declare" description="define tasks for jflex and cup">
+ <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" classpath="${jflex.jar}"/>
+- <taskdef classname="java_cup.AntTask" name="cup" classpath="${cup.jar}"/>
++ <taskdef classname="java_cup.anttask.CUPTask" name="cup" classpath="${cup.jar}"/>
+ </target>
+
+ <target name="gettools" description="download development tools">
+@@ -69,7 +69,7 @@
+ </target>
+
+ <target name="cup" depends="declare" description="generate parser">
+- <cup file="JFlex/LexParse.cup" dir="JFlex" interface="true" parser="LexParse" />
++ <cup srcfile="JFlex/LexParse.cup" interface="true" parser="LexParse" />
+ </target>
+
+ <target name="copy" description="copy resources to build dir">
+@@ -79,7 +79,8 @@
+
+ <target name="jar" depends="compile,copy" description="make JFlex.jar">
+ <jar basedir="../lib"
+- includes="JFlex/**,java_cup/**,skeleton"
++ includes="JFlex/**,java_cup/**,skeleton"
++ excludes="JFlex/tests/*"
+ jarfile="../lib/JFlex.jar"
+ manifest="manifest"/>
+ </target>
diff --git a/dev-java/jflex/files/jflex-1.5.0-build.xml b/dev-java/jflex/files/jflex-1.5.0-build.xml
new file mode 100644
index 000000000000..9ac1be49a7d6
--- /dev/null
+++ b/dev-java/jflex/files/jflex-1.5.0-build.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<project name="JFlex" default="help">
+
+ <property name="version" value="1.5.0" />
+ <property name="bootstrap.version" value="1.5.0" />
+ <property name="junit.version" value="4.11" />
+ <property name="cup.version" value="11a" />
+ <property name="java.source.version" value="1.5" />
+
+ <!-- use any of these files to override properties -->
+ <property file="build.properties" />
+ <property file="${user.home}/.jflex.properties" />
+
+ <!-- location of development tools necessary for the build -->
+ <property name="lib.dir" value="lib"/>
+
+ <!-- override these if you want to use your own versions -->
+ <property name="bootstrap.jflex.jar" value="${lib.dir}/jflex-${bootstrap.version}.jar" />
+ <property name="cup.jar" value="${lib.dir}/java-cup-${cup.version}.jar" />
+ <property name="junit.jar" value="${lib.dir}/junit-${junit.version}.jar" />
+
+ <!-- where to get tool jars from -->
+ <property name="maven.central.url" value="http://central.maven.org/maven2" />
+ <property name="bootstrap.jflex.jar.url"
+ value="${maven.central.url}/de/jflex/jflex/${bootstrap.version}/jflex-${bootstrap.version}.jar" />
+ <property name="junit.jar.url"
+ value="${maven.central.url}/junit/junit/${junit.version}/junit-${junit.version}.jar" />
+
+ <!-- where build output goes, including the jflex jar -->
+ <property name="build.dir" value="build"/>
+ <property name="generated.sources.dir" value="${build.dir}/generated-sources"/>
+ <property name="compile.output.dir" value="${build.dir}/classes"/>
+ <property name="test.compile.output.dir" value="${build.dir}/test-classes"/>
+ <property name="tests.dir" value="${build.dir}/tests"/>
+
+ <!-- where the output jar goes -->
+ <property name="output.jar.name" value="${build.dir}/jflex-${version}.jar" />
+
+ <target name="help" description="show help message">
+ <echo message="Ant build file for JFlex. Useful targets:"/>
+ <echo message=""/>
+ <echo message="gettools: download development tools for the build"/>
+ <echo message="clean: remove all generated and compiled files"/>
+ <echo message="compile: generates sources and compiles non-test classes"/>
+ <echo message="jar: make ${output.jar.name}"/>
+ <echo message="build: complete build from scratch (clean jar)"/>
+ <echo message="test: run the unit tests"/>
+ <echo message=""/>
+ <echo message="Use the gettool target or override the *.jar properties"/>
+ <echo message="before you do the first build."/>
+ </target>
+
+ <target name="gettools" description="download development tools">
+ <get src="${bootstrap.jflex.jar.url}" dest="${bootstrap.jflex.jar}"/>
+ <get src="${junit.jar.url}" dest="${junit.jar}"/>
+ </target>
+
+ <target name="build" depends="clean,jar"
+ description="complete build from scratch (clean jar)"/>
+
+ <target name="clean" description="remove all generated and compiled files">
+ <delete includeemptydirs="true">
+ <fileset dir="${build.dir}" includes="**/*"/>
+ </delete>
+ </target>
+
+ <target name="jar" depends="compile,-copy-resources"
+ description="make ${output.jar.name}">
+ <jar basedir="${compile.output.dir}" jarfile="${output.jar.name}">
+ <manifest>
+ <attribute name="Main-Class" value="jflex.Main"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="compile" depends="-generate-scanner,-generate-parser"
+ description="generate sources and compile all non-test classes">
+ <mkdir dir="${compile.output.dir}" />
+ <javac destdir="${compile.output.dir}"
+ target="${java.source.version}"
+ source="${java.source.version}"
+ debug="on"
+ includeantruntime="true">
+ <src path="src/main/java"/>
+ <src path="${generated.sources.dir}"/>
+ </javac>
+ </target>
+
+ <target name="test" depends="compile,-copy-resources,-compile-test">
+ <mkdir dir="${tests.dir}"/>
+ <junit dir="." printsummary="true" errorproperty="junit.failed">
+ <classpath>
+ <file file="${junit.jar}"/>
+ <pathelement location="${compile.output.dir}"/>
+ <pathelement location="${test.compile.output.dir}"/>
+ </classpath>
+ <assertions>
+ <enable/>
+ </assertions>
+ <batchtest fork="yes" todir="${tests.dir}">
+ <formatter type="plain"/>
+ <fileset dir="src/test/java">
+ <include name="**/*Test*.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <fail if="junit.failed"/>
+ </target>
+
+ <target name="-copy-resources">
+ <copy todir="${compile.output.dir}">
+ <fileset dir="src/main/resources"/>
+ </copy>
+ </target>
+
+ <target name="-generate-scanner">
+ <taskdef classname="jflex.anttask.JFlexTask"
+ name="jflex" classpath="${bootstrap.jflex.jar}"/>
+ <mkdir dir="${generated.sources.dir}/jflex"/>
+ <jflex file="src/main/jflex/LexScan.flex"
+ outdir="${generated.sources.dir}/jflex"
+ skeleton="src/main/jflex/skeleton.nested"
+ nobak="on"/>
+ </target>
+
+ <target name="-generate-parser">
+ <taskdef classname="java_cup.anttask.CUPTask"
+ name="cup" classpath="${cup.jar}"/>
+ <mkdir dir="${generated.sources.dir}"/>
+ <cup srcfile="src/main/cup/LexParse.cup"
+ destdir="${generated.sources.dir}"
+ interface="true"
+ parser="LexParse"/>
+ </target>
+
+ <target name="-compile-test" depends="compile">
+ <mkdir dir="${test.compile.output.dir}"/>
+ <javac srcdir="src/test/java"
+ destdir="${test.compile.output.dir}"
+ target="${java.source.version}"
+ source="${java.source.version}"
+ classpath="${compile.output.dir}:${junit.jar}"
+ includeantruntime="true"/>
+ </target>
+
+ <target depends="compile" name="javadoc">
+ <javadoc packagenames="jflex" sourcepath="src/main/java:build/generated-sources" destdir="javadoc" version="true" />
+ </target>
+</project>
diff --git a/dev-java/jflex/jflex-1.4.3-r1.ebuild b/dev-java/jflex/jflex-1.4.3-r1.ebuild
new file mode 100644
index 000000000000..ef42be61a7b6
--- /dev/null
+++ b/dev-java/jflex/jflex-1.4.3-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Currently, this package uses an included JFlex.jar file to bootstrap.
+# Upstream was contacted and this bootstrap is really needed. The only way to avoid it would be to use a supplied pre-compiled .scanner file.
+
+EAPI="5"
+
+JAVA_PKG_IUSE="source"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="JFlex is a lexical analyzer generator for Java"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://www.jflex.de/"
+LICENSE="GPL-2"
+SLOT="1.4"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+RDEPEND=">=virtual/jre-1.4
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ >=dev-java/ant-core-1.7.0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+DEPEND=">=virtual/jdk-1.4
+ dev-java/junit:0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+IUSE="doc source vim-syntax"
+
+src_unpack() {
+ unpack "${P}.tar.gz"
+ cd "${S}/src"
+
+ mkdir "${S}/tools"
+ cp "${S}/lib/JFlex.jar" "${S}/tools/JFlex.jar"
+ rm -rf java_cup "${S}/lib/JFlex.jar"
+
+ java-ant_rewrite-classpath
+}
+
+src_compile() {
+ ANT_TASKS="javacup"
+ jflex_cp="$(java-pkg_getjars --build-only junit):$(java-pkg_getjars ant-core,javacup)"
+ cd "${S}/src"
+ eant realclean
+ eant -Dgentoo.classpath="${jflex_cp}" jar
+
+ rm "${S}/tools/JFlex.jar"
+ cp "${S}/lib/JFlex.jar" "${S}/tools/"
+ rm "${S}/lib/JFlex.jar"
+
+ eant realclean
+ einfo "Recompiling using the newly generated JFlex library"
+ eant -Dgentoo.classpath="${jflex_cp}" jar
+}
+
+src_install() {
+ java-pkg_dojar lib/JFlex.jar
+ java-pkg_dolauncher "${PF}" --main JFlex.Main
+ java-pkg_register-ant-task
+
+ dodoc doc/manual.pdf doc/manual.ps.gz src/changelog
+ dohtml -r doc/*
+
+ use source && java-pkg_dosrc src/JFlex
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins "${S}/lib/jflex.vim"
+ fi
+}
diff --git a/dev-java/jflex/jflex-1.4.3-r2.ebuild b/dev-java/jflex/jflex-1.4.3-r2.ebuild
new file mode 100644
index 000000000000..027d1625482e
--- /dev/null
+++ b/dev-java/jflex/jflex-1.4.3-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Currently, this package uses an included JFlex.jar file to bootstrap.
+# Upstream was contacted and this bootstrap is really needed. The only way to avoid it would be to use a supplied pre-compiled .scanner file.
+
+EAPI="3"
+
+JAVA_PKG_IUSE="source"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="JFlex is a lexical analyzer generator for Java"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://www.jflex.de/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+RDEPEND=">=virtual/jre-1.4
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ >=dev-java/ant-core-1.7.0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+DEPEND=">=virtual/jdk-1.4
+ dev-java/junit:0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+IUSE="doc source vim-syntax"
+
+src_unpack() {
+ unpack "${P}.tar.gz"
+ cd "${S}/src"
+
+ mkdir "${S}/tools"
+ cp "${S}/lib/JFlex.jar" "${S}/tools/JFlex.jar"
+ rm -rf java_cup "${S}/lib/JFlex.jar"
+
+ java-ant_rewrite-classpath
+}
+
+src_compile() {
+ ANT_TASKS="javacup"
+ jflex_cp="$(java-pkg_getjars --build-only junit):$(java-pkg_getjars ant-core,javacup)"
+ cd "${S}/src"
+ eant realclean
+ eant -Dgentoo.classpath="${jflex_cp}" jar
+
+ rm "${S}/tools/JFlex.jar"
+ cp "${S}/lib/JFlex.jar" "${S}/tools/"
+ rm "${S}/lib/JFlex.jar"
+
+ eant realclean
+ einfo "Recompiling using the newly generated JFlex library"
+ eant -Dgentoo.classpath="${jflex_cp}" jar
+}
+
+src_install() {
+ java-pkg_dojar lib/JFlex.jar
+ java-pkg_dolauncher "${PN}" --main JFlex.Main
+ java-pkg_register-ant-task
+
+ dodoc doc/manual.pdf doc/manual.ps.gz src/changelog
+ dohtml -r doc/*
+
+ use source && java-pkg_dosrc src/JFlex
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins "${S}/lib/jflex.vim"
+ fi
+}
diff --git a/dev-java/jflex/jflex-1.5.0.ebuild b/dev-java/jflex/jflex-1.5.0.ebuild
new file mode 100644
index 000000000000..73016544dafa
--- /dev/null
+++ b/dev-java/jflex/jflex-1.5.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source examples"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="JFlex is a lexical analyzer generator for Java"
+HOMEPAGE="http://www.jflex.de/"
+SRC_URI="http://${PN}.de/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="1.5"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+
+RDEPEND=">=virtual/jre-1.5
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ >=dev-java/ant-core-1.7.0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+DEPEND=">=virtual/jdk-1.5
+ dev-java/junit:0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+IUSE="${JAVA_PKG_IUSE} source vim-syntax"
+
+java_prepare() {
+ cp "${FILESDIR}"/"${P}"-build.xml "${S}"/build.xml
+}
+
+# TODO: Try to avoid using bundled jar (See bug #498874)
+#
+# Currently, this package uses an included JFlex.jar file to bootstrap.
+# Upstream was contacted and this bootstrap is really needed. The only way to
+# avoid it would be to use a supplied pre-compiled .scanner file.
+
+EANT_GENTOO_CLASSPATH="ant-core"
+EANT_GENTOO_CLASSPATH_EXTRA="lib/${P}.jar"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+WANT_ANT_TASKS="javacup"
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ # Compile another time, using our generated jar; for sanity.
+ cp build/${P}.jar ${EANT_GENTOO_CLASSPATH_EXTRA}
+ java-pkg-2_src_compile
+}
+
+# EANT_TEST_GENTOO_CLASSPATH doesn't support EANT_GENTOO_CLASSPATH_EXTRA yet.
+RESTRICT="test"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar build/${P}.jar ${PN}.jar
+ java-pkg_dolauncher "${P}" --main jflex.Main
+ java-pkg_register-ant-task
+
+ if use doc ; then
+ dodoc doc/manual.pdf changelog.md
+ dohtml -r doc/*
+ java-pkg_dojavadoc javadoc
+ fi
+
+ use examples && java-pkg_doexamples examples
+ use source && java-pkg_dosrc src/main
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins "${S}/lib/jflex.vim"
+ fi
+}
diff --git a/dev-java/jflex/jflex-1.5.1.ebuild b/dev-java/jflex/jflex-1.5.1.ebuild
new file mode 100644
index 000000000000..ea44f064676f
--- /dev/null
+++ b/dev-java/jflex/jflex-1.5.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source examples"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="JFlex is a lexical analyzer generator for Java"
+HOMEPAGE="http://www.jflex.de/"
+SRC_URI="http://${PN}.de/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="1.5"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+
+RDEPEND=">=virtual/jre-1.5
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ >=dev-java/ant-core-1.7.0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+DEPEND=">=virtual/jdk-1.5
+ dev-java/junit:0
+ >=dev-java/javacup-0.11a_beta20060608:0"
+
+IUSE="${JAVA_PKG_IUSE} source vim-syntax"
+
+java_prepare() {
+ # use a more convenient version number
+ sed -i s:"\(name=\"version\" value=\"\)[^\"]*\"":"\1${PV}\"":g build.xml
+ # fix bootstrapping
+ sed -i s:"\(name=\"bootstrap.version\" value=\"\)[^\"]*\"":"\1${PV}\"":g \
+ build.xml
+ # add javadoc capability to build.xml
+ sed -i s,"\(</project>\)",\
+"\n <target depends=\"compile\" name=\"javadoc\">\n <javadoc \
+packagenames=\"jflex\" sourcepath=\"src/main/java:build/generated-\
+sources\" destdir=\"javadoc\" version=\"true\" />\n </target>\n\1",g \
+ build.xml
+}
+
+# TODO: Try to avoid using bundled jar (See bug #498874)
+#
+# Currently, this package uses an included JFlex.jar file to bootstrap.
+# Upstream was contacted and this bootstrap is really needed. The only way to
+# avoid it would be to use a supplied pre-compiled .scanner file.
+
+EANT_GENTOO_CLASSPATH="ant-core"
+EANT_GENTOO_CLASSPATH_EXTRA="lib/${P}.jar"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+WANT_ANT_TASKS="javacup"
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ # Compile another time, using our generated jar; for sanity.
+ cp build/${P}.jar ${EANT_GENTOO_CLASSPATH_EXTRA}
+ java-pkg-2_src_compile
+}
+
+# EANT_TEST_GENTOO_CLASSPATH doesn't support EANT_GENTOO_CLASSPATH_EXTRA yet.
+RESTRICT="test"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar build/${P}.jar ${PN}.jar
+ java-pkg_dolauncher "${P}" --main jflex.Main
+ java-pkg_register-ant-task
+
+ if use doc ; then
+ dodoc doc/manual.pdf changelog.md
+ dohtml -r doc/*
+ java-pkg_dojavadoc javadoc
+ fi
+
+ use examples && java-pkg_doexamples examples
+ use source && java-pkg_dosrc src/main
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins "${S}/lib/jflex.vim"
+ fi
+}
diff --git a/dev-java/jflex/jflex-1.6.0.ebuild b/dev-java/jflex/jflex-1.6.0.ebuild
new file mode 100644
index 000000000000..d23a6cee6dee
--- /dev/null
+++ b/dev-java/jflex/jflex-1.6.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source examples"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="JFlex is a lexical analyzer generator for Java"
+HOMEPAGE="http://www.jflex.de/"
+SRC_URI="http://${PN}.de/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="1.6"
+KEYWORDS="amd64 ~ppc ppc64 x86 ~amd64-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+
+CDEPEND="dev-java/ant-core:0
+ >=dev-java/javacup-0.11a_beta20060608:0
+ dev-java/junit:0"
+
+RDEPEND=">=virtual/jre-1.5
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
+ ${CDEPEND}"
+
+DEPEND=">=virtual/jdk-1.5
+ ${CDEPEND}"
+
+IUSE="${JAVA_PKG_IUSE} source vim-syntax"
+
+java_prepare() {
+ # use a more convenient version number
+ sed -i s:"\(name=\"version\" value=\"\)[^\"]*\"":"\1${PV}\"":g build.xml
+ # fix bootstrapping
+ sed -i s:"\(name=\"bootstrap.version\" value=\"\)[^\"]*\"":"\1${PV}\"":g \
+ build.xml
+ # add javadoc capability to build.xml
+ sed -i s,"\(</project>\)",\
+"\n <target depends=\"compile\" name=\"javadoc\">\n <javadoc \
+packagenames=\"jflex\" sourcepath=\"src/main/java:build/generated-\
+sources\" destdir=\"javadoc\" version=\"true\" />\n </target>\n\1",g \
+ build.xml
+}
+
+# TODO: Try to avoid using bundled jar (See bug #498874)
+#
+# Currently, this package uses an included JFlex.jar file to bootstrap.
+# Upstream was contacted and this bootstrap is really needed. The only way to
+# avoid it would be to use a supplied pre-compiled .scanner file.
+
+EANT_GENTOO_CLASSPATH="ant-core"
+EANT_GENTOO_CLASSPATH_EXTRA="lib/${P}.jar"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+WANT_ANT_TASKS="javacup"
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ # Compile another time, using our generated jar; for sanity.
+ cp build/${P}.jar ${EANT_GENTOO_CLASSPATH_EXTRA}
+ java-pkg-2_src_compile
+}
+
+# EANT_TEST_GENTOO_CLASSPATH doesn't support EANT_GENTOO_CLASSPATH_EXTRA yet.
+RESTRICT="test"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar build/${P}.jar ${PN}.jar
+ java-pkg_dolauncher "${PN}-${SLOT}" --main jflex.Main
+ java-pkg_register-ant-task
+
+ if use doc ; then
+ dodoc doc/manual.pdf changelog.md
+ dohtml -r doc/*
+ java-pkg_dojavadoc javadoc
+ fi
+
+ use examples && java-pkg_doexamples examples
+ use source && java-pkg_dosrc src/main
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins "${S}/lib/jflex.vim"
+ fi
+}
diff --git a/dev-java/jflex/metadata.xml b/dev-java/jflex/metadata.xml
new file mode 100644
index 000000000000..7b350e8431cd
--- /dev/null
+++ b/dev-java/jflex/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+<longdescription lang="en">
+JFlex is a lexical analyzer generator (also known as scanner generator) for
+Java(tm).
+</longdescription>
+</pkgmetadata>