mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-31 23:08:09 -07:00
dev-java/jflex: drop 1.6.1-r4
Closes: https://bugs.gentoo.org/937098 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Part-of: https://github.com/gentoo/gentoo/pull/44628 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
committed by
Arthur Zamarin
parent
7d813edd83
commit
398b9e4cdf
@@ -1,2 +1 @@
|
||||
DIST jflex-1.6.1.tar.gz 3027791 BLAKE2B 4262f75c16a847314db8cb175901658ff6b424469e66523b41564179fa30f0e64bcf2d7ad0e06ad918336e5a41e166a74d55f19f7451662d19fbcaa29f716dce SHA512 436840c90d906042205d27e1d3c56dec724bf62cc3d8c8d3445f217af0a50c9ca2bb56ed91f0cd3c37a930f7ca22f4cc50e8c28dbe905f02adf695c8e96fb07b
|
||||
DIST jflex-1.9.1.tar.gz 4944916 BLAKE2B 7976e17c0a75f84fc09a431ae100ea5061694edeffb5a8bc14b8afbb93a07296b7826b4540634ea0cb4db761a600603925a4489e49ea9b8a1d948d4cad9919be SHA512 2f7dc057741fb76309cd83042301cfcd73ff1e9e2e5330cdd88d96b8aa45d66cbb73a2a3e1020613d717ccd8aece21afe98b92c6d718d73337baa28c142a031f
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2678
|
||||
|
||||
diff -Naur jflex-1.6.1.orig/src/main/java/jflex/Emitter.java jflex-1.6.1/src/main/java/jflex/Emitter.java
|
||||
--- jflex-1.6.1.orig/src/main/java/jflex/Emitter.java 2015-03-16 17:27:31.000000000 +0000
|
||||
+++ jflex-1.6.1/src/main/java/jflex/Emitter.java 2015-10-25 23:33:35.784487747 +0000
|
||||
@@ -1304,8 +1304,10 @@
|
||||
|
||||
for (int i = 0; i < dfa.numStates; i++) {
|
||||
char j = 0;
|
||||
- while ( !isTransition[i] && j < dfa.numInput )
|
||||
- isTransition[i] = dfa.table[i][j++] != DFA.NO_TARGET;
|
||||
+ while ( !isTransition[i] && j < dfa.numInput ) {
|
||||
+ isTransition[i] = dfa.table[i][j] != DFA.NO_TARGET;
|
||||
+ j++;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="JFlex is a lexical analyzer generator for Java"
|
||||
HOMEPAGE="https://www.jflex.de/"
|
||||
SRC_URI="https://${PN}.de/${P}.tar.gz"
|
||||
S="${WORKDIR}/${P}"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm64 ppc64 ~ppc-macos ~x64-macos"
|
||||
IUSE="ant-task examples test vim-syntax"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="test? ( ant-task )"
|
||||
|
||||
RDEPEND="
|
||||
>=virtual/jre-1.8:*
|
||||
ant-task? ( >=dev-java/ant-1.10.14-r3:0 )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
>=virtual/jdk-1.8:*
|
||||
ant-task? ( >=dev-java/ant-1.10.14-r3:0 )
|
||||
test? ( dev-java/junit:4 )
|
||||
"
|
||||
|
||||
# Restricted to max javacup-11b_p20160615-r1 in order to allow switching
|
||||
# the emerge order. The next revision, javacup-11b_p20160615-r2, will not
|
||||
# depend on jflex.
|
||||
PDEPEND="<=dev-java/javacup-11b_p20160615-r1:0"
|
||||
|
||||
JAVA_SRC_DIR="src/main/java"
|
||||
|
||||
src_prepare() {
|
||||
eapply_user
|
||||
java-pkg-2_src_prepare
|
||||
|
||||
# See below for details.
|
||||
eapply "${FILESDIR}/icedtea-arm.patch"
|
||||
|
||||
# We need the bundled jflex.jar.
|
||||
rm -rv ${JAVA_SRC_DIR}/java_cup examples/pom.xml || die
|
||||
|
||||
# Remove the bundled java-cup.jar if unneeded.
|
||||
if has_version ${PDEPEND}; then
|
||||
rm -v lib/java-cup-*.jar || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# javacup is a cyclic dependency. Use the package if we have it,
|
||||
# otherwise use the bundled version and install the package later.
|
||||
if has_version ${PDEPEND}; then
|
||||
# Use PORTAGE_QUIET to suppress a QA warning that is spurious
|
||||
# thanks to has_version above. This is Portage-specific but
|
||||
# showing the warning elsewhere isn't the end of the world.
|
||||
JAVACUP=$(PORTAGE_QUIET=1 java-pkg_getjar --build-only javacup javacup.jar)
|
||||
else
|
||||
JAVACUP=$(echo lib/java-cup-*.jar)
|
||||
fi
|
||||
|
||||
JAVA_GENTOO_CLASSPATH_EXTRA="${JAVACUP}"
|
||||
if use ant-task; then
|
||||
JAVA_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant ant.jar)"
|
||||
else
|
||||
rm src/main/java/jflex/anttask/JFlexTask.java || die
|
||||
fi
|
||||
}
|
||||
|
||||
jflex_compile() {
|
||||
java "${@}" jflex.Main -d ${JAVA_SRC_DIR}/${PN} \
|
||||
--skel src/main/${PN}/skeleton.nested src/main/${PN}/LexScan.flex || die
|
||||
java-pkg-simple_src_compile
|
||||
java-pkg_addres ${PN}.jar src/main/resources
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
java -jar "${JAVACUP}" -destdir ${JAVA_SRC_DIR}/${PN} -package ${PN} \
|
||||
-parser LexParse -interface src/main/cup/LexParse.cup || die
|
||||
|
||||
# The IcedTea ARM HotSpot port (as of 2.6.1) hangs when running
|
||||
# jflex. We have patched jflex to fix it but we have to run the
|
||||
# bundled version first. -Xint works around the problem. See
|
||||
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2678.
|
||||
use arm && local JFLEX_ARGS="-Xint"
|
||||
|
||||
# First compile using the bundled jflex.
|
||||
jflex_compile -cp "lib/${P}.jar:${JAVACUP}" ${JFLEX_ARGS}
|
||||
|
||||
# Then recompile using the fresh jflex.
|
||||
jflex_compile -cp "${PN}.jar:${JAVACUP}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg-simple_src_install
|
||||
java-pkg_dolauncher ${PN} --main ${PN}.Main
|
||||
|
||||
java-pkg_register-dependency javacup javacup-runtime.jar
|
||||
use ant-task && java-pkg_register-ant-task
|
||||
|
||||
use examples && java-pkg_doexamples examples
|
||||
dodoc {changelog,README}.md
|
||||
|
||||
if use doc; then
|
||||
dodoc doc/*.pdf
|
||||
docinto html
|
||||
dodoc doc/*.{css,html,png} doc/COPYRIGHT
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins lib/${PN}.vim
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if use arm && java-pkg_current-vm-matches oracle-jdk-bin-1.8; then
|
||||
# This results in a StackOverflowError as of 1.8.0.65 but works
|
||||
# fine on icedtea:7. Don't know about icedtea:8 yet.
|
||||
rm -v src/test/java/jflex/EmitterTest.java || die
|
||||
fi
|
||||
|
||||
local CP="src/test/java:${PN}.jar:${JAVA_GENTOO_CLASSPATH_EXTRA}:$(java-pkg_getjars junit-4)"
|
||||
|
||||
local TESTS=$(find src/test/java -name "*Test*.java" -printf "%P\n")
|
||||
TESTS="${TESTS//.java}"
|
||||
TESTS="${TESTS//\//.}"
|
||||
|
||||
ejavac -classpath "${CP}" $(find src/test/java -name "*.java")
|
||||
ejunit4 -classpath "${CP}" ${TESTS}
|
||||
}
|
||||
Reference in New Issue
Block a user