From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 058BF15808B for ; Sun, 3 Apr 2022 06:56:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95E11E0844; Sun, 3 Apr 2022 06:56:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C0874E0844 for ; Sun, 3 Apr 2022 06:56:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BA80D340F03 for ; Sun, 3 Apr 2022 06:56:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EAE4335A for ; Sun, 3 Apr 2022 06:56:30 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1648968989.7c95644efcd9fcb727bdaf35808bd5085c4f9464.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/qdox/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/qdox/qdox-1.12.1-r3.ebuild X-VCS-Directories: dev-java/qdox/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 7c95644efcd9fcb727bdaf35808bd5085c4f9464 X-VCS-Branch: master Date: Sun, 3 Apr 2022 06:56:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0b7c35e4-2b26-4410-b1b3-0262feac19ce X-Archives-Hash: 48e5aacaf92d12c0de14aa8821fdd418 commit: 7c95644efcd9fcb727bdaf35808bd5085c4f9464 Author: Volkmar W. Pogatzki pogatzki net> AuthorDate: Sat Apr 2 08:21:14 2022 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Sun Apr 3 06:56:29 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c95644e dev-java/qdox: EAPI 8, drop unused java-ant-2 eclass Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Volkmar W. Pogatzki pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/24860 Signed-off-by: Miroslav Šulc gentoo.org> dev-java/qdox/qdox-1.12.1-r3.ebuild | 86 +++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/dev-java/qdox/qdox-1.12.1-r3.ebuild b/dev-java/qdox/qdox-1.12.1-r3.ebuild new file mode 100644 index 000000000000..b4f4cd178563 --- /dev/null +++ b/dev-java/qdox/qdox-1.12.1-r3.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="com.thoughtworks.qdox:qdox:1.12.1" + +inherit java-pkg-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 ~arm64 ~ppc64 ~x86 ~ppc-macos ~x64-macos" + +S="${WORKDIR}/${PN}-${PN}-${PV}" + +CDEPEND="dev-java/ant-core:0" + +DEPEND=">=virtual/jdk-1.8:* + 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.8:* + ${CDEPEND}" + +PATCHES=( + "${FILESDIR}/jflex-1.6.1.patch" +) + +src_prepare() { + default + + 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 + + use source && java-pkg_dosrc src/java/com + use doc && java-pkg_dojavadoc javadoc +}