* [gentoo-commits] repo/gentoo:master commit in: dev-java/qdox/, dev-java/qdox/files/
@ 2015-11-02 23:56 James Le Cuirot
0 siblings, 0 replies; only message in thread
From: James Le Cuirot @ 2015-11-02 23:56 UTC (permalink / raw
To: gentoo-commits
commit: 83144fb54096e03da9caf9158bae3d99ac4f6c4b
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 2 23:45:35 2015 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 2 23:56:17 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83144fb5
dev-java/qdox: Make build work against jflex 1.6.1
This allows the ~arm keyword to be added. The ~ppc64 keyword has had
to be temporarily dropped due to javacup needing Java 7.
Package-Manager: portage-2.2.20.1
dev-java/qdox/files/jflex-1.6.1.patch | 27 +++++++++++
dev-java/qdox/qdox-1.12.1-r1.ebuild | 84 +++++++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+)
diff --git a/dev-java/qdox/files/jflex-1.6.1.patch b/dev-java/qdox/files/jflex-1.6.1.patch
new file mode 100644
index 0000000..4e50624
--- /dev/null
+++ b/dev-java/qdox/files/jflex-1.6.1.patch
@@ -0,0 +1,27 @@
+https://github.com/jflex-de/jflex/commit/f312d563777d907bbb12d1e2ac79835ba83ca53c
+
+--- a/src/grammar/skeleton.inner 2012-11-04 16:16:30.000000000 +0000
++++ b/src/grammar/skeleton.inner 2015-11-02 20:57:37.566057363 +0000
+@@ -407,15 +407,15 @@
+ zzMarkedPos = zzMarkedPosL;
+ --- char count update
+
+---- actions
+- default:
+- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+- zzAtEOF = true;
++ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
++ zzAtEOF = true;
+ --- eofvalue
+- }
+- else {
++ }
++ else {
++--- actions
++ default:
+ --- no match
+- }
++ }
+ }
+ }
+ }
diff --git a/dev-java/qdox/qdox-1.12.1-r1.ebuild b/dev-java/qdox/qdox-1.12.1-r1.ebuild
new file mode 100644
index 0000000..9082187
--- /dev/null
+++ b/dev-java/qdox/qdox-1.12.1-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Parser for extracting class/interface/method definitions"
+HOMEPAGE="https://github.com/codehaus/qdox"
+SRC_URI="https://github.com/codehaus/qdox/archive/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="1.12"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+
+S="${WORKDIR}/${PN}-${PN}-${PV}"
+
+CDEPEND="dev-java/ant-core:0"
+
+DEPEND=">=virtual/jdk-1.4
+ app-arch/unzip:0
+ dev-java/byaccj:0
+ >=dev-java/jflex-1.6.1:0
+ dev-java/jmock:1.0
+ test? ( dev-java/junit:0 )
+ ${CDEPEND}"
+
+RDEPEND=">=virtual/jre-1.4
+ ${CDEPEND}"
+
+java_prepare() {
+ epatch "${FILESDIR}"/jflex-1.6.1.patch
+
+ if ! use test ; then
+ rm src/java/com/thoughtworks/qdox/tools/QDoxTester.java
+ rm -rf src/java/com/thoughtworks/qdox/junit
+ rm -rf src/test
+ fi
+}
+
+src_compile() {
+ jflex src/grammar/lexer.flex --skel src/grammar/skeleton.inner -d src/java/com/thoughtworks/qdox/parser/impl/ || die
+ byaccj -v -Jnorun -Jnoconstruct -Jclass=Parser -Jsemantic=Value -Jpackage=com.thoughtworks.qdox.parser.impl src/grammar/parser.y || die
+ mv Parser.java src/java/com/thoughtworks/qdox/parser/impl/ || die
+
+ # create jar
+ mkdir -p build/classes || die
+
+ local cp="$(java-pkg_getjars --build-only ant-core,jmock-1.0)"
+
+ if use test ; then
+ cp="${cp}:$(java-pkg_getjars --build-only junit)"
+ fi
+
+ ejavac -sourcepath . -d build/classes -classpath "${cp}" \
+ $(find . -name "*.java") || die "Cannot compile sources"
+
+ mkdir dist || die
+ cd build/classes || die
+ jar -cvf "${S}"/dist/${PN}.jar com || die "Cannot create JAR"
+
+ # generate javadoc
+ if use doc ; then
+ cd "${S}"
+ mkdir javadoc || die
+ javadoc -d javadoc -sourcepath src/java -subpackages com -classpath "${cp}"
+ fi
+}
+
+src_test() {
+ java -cp "${S}"/dist/${PN}.jar:$(java-pkg_getjars --build-only ant-core,junit,jmock-1.0) \
+ com.thoughtworks.qdox.tools.QDoxTester src || die "Tests failed!"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_register-ant-task
+
+ use source && java-pkg_dosrc src/java/com
+ use doc && java-pkg_dojavadoc javadoc
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-02 23:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02 23:56 [gentoo-commits] repo/gentoo:master commit in: dev-java/qdox/, dev-java/qdox/files/ James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox