diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-08-30 17:43:26 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-08-30 17:43:26 +0000 |
| commit | 108be03cfcc73f031774fd25bcb470c508a0caa2 (patch) | |
| tree | b6bb441e2df7f3deaeab2977a6f30f6a257f6afe /dev-java | |
| parent | 590dee0d9ae41a98434efb5ca89db1e5f3dbbdbd (diff) | |
| download | baldeagleos-repo-108be03cfcc73f031774fd25bcb470c508a0caa2.tar.gz baldeagleos-repo-108be03cfcc73f031774fd25bcb470c508a0caa2.tar.xz baldeagleos-repo-108be03cfcc73f031774fd25bcb470c508a0caa2.zip | |
Adding metadata
Diffstat (limited to 'dev-java')
| -rw-r--r-- | dev-java/asm/Manifest | 1 | ||||
| -rw-r--r-- | dev-java/asm/asm-9.7.ebuild | 97 | ||||
| -rw-r--r-- | dev-java/javacup/javacup-11b_p20160615.ebuild | 2 | ||||
| -rw-r--r-- | dev-java/jflex/jflex-1.6.1-r3.ebuild | 2 | ||||
| -rw-r--r-- | dev-java/junit/Manifest | 1 | ||||
| -rw-r--r-- | dev-java/junit/files/junit5-java18-compatibility.patch | 14 | ||||
| -rw-r--r-- | dev-java/junit/junit-5.10.3.ebuild | 349 | ||||
| -rw-r--r-- | dev-java/qdox/Manifest | 1 | ||||
| -rw-r--r-- | dev-java/qdox/qdox-1.12.1-r6.ebuild | 114 | ||||
| -rw-r--r-- | dev-java/qdox/qdox-2.0.1.ebuild | 7 | ||||
| -rw-r--r-- | dev-java/xalan/Manifest | 1 | ||||
| -rw-r--r-- | dev-java/xalan/xalan-2.7.3-r2.ebuild | 78 |
12 files changed, 661 insertions, 6 deletions
diff --git a/dev-java/asm/Manifest b/dev-java/asm/Manifest index 2ec40365fab3..18b5f35167c0 100644 --- a/dev-java/asm/Manifest +++ b/dev-java/asm/Manifest @@ -1 +1,2 @@ DIST asm-ASM_9_6.tar.bz2 1374579 BLAKE2B 621b19f1818ffdd451037af210ec7c3286e3dabdb1d6192157c2e6e8c101f599691cd4de57adf500f5413b4aaf4f808d6ac791e84626223a7be5672a17137670 SHA512 86b2db3e81c29c465d4128736f88ae3b73af8f312915921549d0acdb50a8d2c2c2beed5162af164b6e75278702af0c6f0a8d84b4133516eb4ac419520b7c764d +DIST asm-ASM_9_7.tar.bz2 1376322 BLAKE2B 397a884b257edfd61f67909390c8fe07880d5a295b51dd3982ebbe9b6f8fbac200c46913e6c18e4efdcc80f0e1f0b8463ca9d912484b466ca174b55919a1c259 SHA512 9b7f2d4895f105f75e2c42d8882b176dba32defb17d8da4bdedb2bfe4e5413b03c05a9694114d171aa9623e86a65a677a24ab16a47aef774342d56224400274f diff --git a/dev-java/asm/asm-9.7.ebuild b/dev-java/asm/asm-9.7.ebuild new file mode 100644 index 000000000000..eb1994183f55 --- /dev/null +++ b/dev-java/asm/asm-9.7.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# tests not enabled because of missing eclass support of junit-jupiter +JAVA_PKG_IUSE="doc source" +MAVEN_PROVIDES=" + org.ow2.asm:asm-bom:${PV} + org.ow2.asm:asm:${PV} + org.ow2.asm:asm-analysis:${PV} + org.ow2.asm:asm-commons:${PV} + org.ow2.asm:asm-tree:${PV} + org.ow2.asm:asm-util:${PV} +" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Bytecode manipulation framework for Java" +HOMEPAGE="https://asm.ow2.io" +MY_P="ASM_${PV//./_}" +SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.bz2" +S="${WORKDIR}/asm-${MY_P}" + +LICENSE="BSD" +SLOT="9" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x64-macos" + +DEPEND=">=virtual/jdk-11:*" +RDEPEND=">=virtual/jre-1.8:*" + +ASM_MODULES=( "asm" "asm-tree" "asm-analysis" "asm-commons" "asm-util" ) +JAVADOC_SRC_DIRS=( + asm/src/main/java + asm-tree/src/main/java + asm-analysis/src/main/java + asm-commons/src/main/java + asm-util/src/main/java +) + +src_prepare() { + default + local module + touch asm.module || die + for module in "${ASM_MODULES[@]}"; do + module=${module/-/.} + cat > ${module/./-}/src/main/java/module-info.java <<-EOF || die + open module org.objectweb.${module/analysis/tree.analysis} { + $(cat asm.module) + requires java.base; + exports org.objectweb.${module/analysis/tree.analysis}; + } + EOF + echo "requires transitive org.objectweb.${module/analysis/tree.analysis};" \ + >> asm.module || die + done + sed -e '/^$/d' \ + -e '/asm;/p;s:\(asm\)\(;\):\1.signature\2:' \ + -i asm/src/main/java/module-info.java || die + sed -e '/analysis/d' \ + -i asm-commons/src/main/java/module-info.java || die + sed -e '/commons/d' \ + -i asm-util/src/main/java/module-info.java || die +} + +src_compile() { + local module + for module in "${ASM_MODULES[@]}"; do + einfo "Compiling ${module}" + JAVA_JAR_FILENAME="${module}.jar" + JAVA_SRC_DIR="${module}/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":${module}.jar" + rm -r target || die + done + + if use doc; then + einfo "Compiling javadocs" + for module in "${ASM_MODULES[@]}"; do + rm "${module}/src/main/java/module-info.java" || die + JAVA_SRC_DIR+=("${module}/src/main/java") + done + ejavadoc + fi +} + +src_install() { + JAVA_JAR_FILENAME="asm.jar" + java-pkg-simple_src_install + local module + for module in asm-{analysis,commons,tree,util}; do + java-pkg_dojar ${module}.jar + if use source; then + java-pkg_dosrc "${module}/src/main/java/*" + fi + done +} diff --git a/dev-java/javacup/javacup-11b_p20160615.ebuild b/dev-java/javacup/javacup-11b_p20160615.ebuild index cc3c6e0d7637..e2ce20b6b312 100644 --- a/dev-java/javacup/javacup-11b_p20160615.ebuild +++ b/dev-java/javacup/javacup-11b_p20160615.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${PV/_p/-}.t LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="amd64 ~arm arm64 ppc64 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" IUSE="ant-task" DEPEND="${CP_DEPEND} diff --git a/dev-java/jflex/jflex-1.6.1-r3.ebuild b/dev-java/jflex/jflex-1.6.1-r3.ebuild index c0083bb42fce..79f141edeb94 100644 --- a/dev-java/jflex/jflex-1.6.1-r3.ebuild +++ b/dev-java/jflex/jflex-1.6.1-r3.ebuild @@ -14,7 +14,7 @@ S="${WORKDIR}/${P}" LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 ~x86 ~ppc-macos ~x64-macos" +KEYWORDS="amd64 ~arm arm64 ppc64 ~ppc-macos ~x64-macos" IUSE="ant-task examples test vim-syntax" RESTRICT="!test? ( test )" REQUIRED_USE="test? ( ant-task )" diff --git a/dev-java/junit/Manifest b/dev-java/junit/Manifest index 7c157778f793..014914194795 100644 --- a/dev-java/junit/Manifest +++ b/dev-java/junit/Manifest @@ -1,4 +1,5 @@ DIST junit-4.13.2_p20240222.tar.gz 1007781 BLAKE2B 4eeab59aa7ff3cc65c73318acb562523e6ba781da6a0baf28f8fa82042f1affddb583d188c550207a7e267b3475f4a546e8e25eba61d5ba36d13bd7e277ad156 SHA512 89506413b7aca7c2d0b41c8297dde48c1b90a44133bfb3ebf300247c7837839a3aff2d785d891ddb8762427d718eacf016a1d67e2e24edda05f4eae36ca311f1 DIST junit-5.10.2.tar.gz 2942035 BLAKE2B 4880df74b7cbf23acd34c716f9fce26edd28b31c14d720e129e9e1f06aa35b70c447a0d87904e083a54663fba17e0b2b470678dc32480e0a11c5ebf46d5fe38e SHA512 c36ff7c2bd21f9a64c93b836fc1017a8a96ebcc0079cf1d95b09f5b764435178c2dc2336f2493e7e4df561013693dce4f08dfe0cf3bd76cc9b820313f64d064f +DIST junit-5.10.3.tar.gz 2944861 BLAKE2B 38ca01363ecd1a2bb1b66d93bbc8a6e34c94ee574fd44857239223f6253051c355572ac8ecece21610ea8afeabdc62df30caab1994ae9bbfa9fa9c71097ac956 SHA512 8d3621b6da6e70017957e280fd2848fdc77136497bf4399a1690f2db0f53b1b079f85ec19b6d3115cc01fe24454e118548944d45e1c23f2a404b640e587b0771 DIST junit3.8.2.zip 461426 BLAKE2B 8fbef1ccdf7f71c611976d63f45838f4cb2564da5f5064e7abc39931a3c99039a40660093aba2cc3c70af761171125f434c16c52021226f2e92fdf23597dbf25 SHA512 f203332ccc2bdc38c683a95bdbe448f38cbfbeea81ecc431bf9ebf0a3292f0150fcfe5cd5dd6da481be034366820f95775a33581931aed9e4cc12a6ff27e3930 DIST junit5-java18-compatibility.patch 742 BLAKE2B 89bfa36330278cdee2f7f66ed5527895e650a7b490d3f3695772a27541be1d8383c1742bab4e8494f3a84c29f93f553880a3bd5cd4d84792cf662fbc33a6e594 SHA512 5a9a562eb61a875764da369ff40da6ff95c6de8b3b3ecb612634112076741d75d6eab385743843b4fe7ca8a1827960e06550f6e90c8b7ef75b55006b41c416cd diff --git a/dev-java/junit/files/junit5-java18-compatibility.patch b/dev-java/junit/files/junit5-java18-compatibility.patch new file mode 100644 index 000000000000..8015d4658b7b --- /dev/null +++ b/dev-java/junit/files/junit5-java18-compatibility.patch @@ -0,0 +1,14 @@ +Description: Fixes the compatibility with the latest version of Java +Author: Emmanuel Bourg <ebourg@apache.org> +Forwarded: no +--- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java ++++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java +@@ -316,7 +316,7 @@ + } + + @SuppressWarnings("unchecked") +- private SerializedForm(ObjectInputStream.GetField fields) throws IOException { ++ private SerializedForm(ObjectInputStream.GetField fields) throws ClassNotFoundException, IOException { + this.uniqueId = (String) fields.get("uniqueId", null); + this.parentId = (String) fields.get("parentId", null); + this.displayName = (String) fields.get("displayName", null); diff --git a/dev-java/junit/junit-5.10.3.ebuild b/dev-java/junit/junit-5.10.3.ebuild new file mode 100644 index 000000000000..ed6b7657fa56 --- /dev/null +++ b/dev-java/junit/junit-5.10.3.ebuild @@ -0,0 +1,349 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Declare the 'doc' USE flag in IUSE -- not JAVA_PKG_IUSE -- to +# prevent java-pkg-simple.eclass from handling Javadoc; instead, +# let this ebuild handle Javadoc generation and installation itself. +# This ebuild invokes java-pkg-simple.eclass's phase functions +# multiple times to build multiple modules, but the eclass always +# installs each module's Javadoc to the same directory, which would +# trigger an error when the second module's Javadoc is installed. +JAVA_PKG_IUSE="source test" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Simple framework to write repeatable tests" +HOMEPAGE="https://junit.org/junit5/" +DEB="5.10.1-1" +SRC_URI="https://github.com/junit-team/junit5/archive/r${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/junit5-r${PV}" + +LICENSE="EPL-2.0" +SLOT="5" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="doc migration-support suite vintage" + +CP_DEPEND=" + dev-java/apiguardian-api:0 + dev-java/opentest4j:0 + dev-java/open-test-reporting-events:0 + dev-java/picocli:0 + dev-java/univocity-parsers:0 +" + +# java-utils-2.eclass does not support +# USE-conditional dependencies in CP_DEPEND +COND_DEPEND=" + migration-support? ( dev-java/junit:4 ) + vintage? ( dev-java/junit:4 ) +" + +# Limiting JDK version to >=11 for module-info.java in this package +# https://bugs.gentoo.org/796875#c3 +DEPEND=" + >=virtual/jdk-11:* + ${CP_DEPEND} + ${COND_DEPEND} + test? ( dev-java/jimfs:0 ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CP_DEPEND} + ${COND_DEPEND} +" + +PATCHES=( + "${FILESDIR}/junit5-java18-compatibility.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare +} + +src_configure() { + # Please make sure to declare a module's dependencies before the module itself. + # Useful upstream documentation regarding modules and dependencies: + # https://junit.org/junit5/docs/current/user-guide/index.html#dependency-metadata + # https://junit.org/junit5/docs/current/user-guide/index.html#dependency-diagram + JUNIT5_MODULES=( + junit-platform-commons + junit-platform-engine + junit-platform-launcher + junit-platform-reporting + junit-platform-console # For launching tests from CLI; + # an eclass would need it to support running tests using JUnit 5 + + $(use suite && echo \ + junit-platform-suite-api \ + junit-platform-suite-commons \ + junit-platform-suite-engine \ + ) + + junit-jupiter-api + junit-jupiter-engine # For JUnit Jupiter tests -- the so-called + # "JUnit 5 tests", which cannot run on earlier JUnit versions + junit-jupiter-params # For parameterized tests; the junit-jupiter + # aggregator module includes it, so building it unconditionally + $(usev migration-support junit-jupiter-migrationsupport) + + $(usev vintage junit-vintage-engine) + + # Modules not included: + # - junit-bom: Has no sources; solely for helping Maven and Gradle + # projects that use JUnit 5 manage dependencies easier + # - junit-jupiter: Aggregator; does not have 'src/main/java' + # - junit-platform-console-standalone: Has no sources; solely used + # by the upstream to build a fat JAR that bundles everything, so + # users can use just this single JAR to run JUnit 5 + # - junit-platform-jfr: For an experimental feature + # - junit-platform-runner: Deprecated + # - junit-platform-suite: Aggregator; does not have 'src/main/java' + # - junit-platform-testkit: Requires >=dev-java/assertj-core-3.14.0 + ) + local cp_packages=() + (use migration-support || use vintage) && cp_packages+=( junit-4 ) + local save_IFS="${IFS}" + IFS=',' JAVA_GENTOO_CLASSPATH="${cp_packages[*]}" + IFS="${save_IFS}" + + JUNIT5_VM_VERSION="$(java-config --get-env PROVIDES_VERSION)" +} + +junit5_foreach_module() { + local module + for module in "${JUNIT5_MODULES[@]}"; do + junit5_module_do "${module}" "${@}" + done +} + +junit5_module_do() { + local module="${1}" + # Invocation of the passed function will not be guarded by '|| die'. + # Like the case for multibuild_foreach_variant(), it is recommended + # that the passed function itself calls 'die'. + local func=( "${@:2}" ) + + einfo "Running '${func[@]}' for ${module} ..." + pushd "${module}" > /dev/null || die "Failed to enter directory '${module}'" + + # Set up Java eclass variables that are + # supposed to be set in the ebuild global scope + + local JAVA_JAR_FILENAME="${module}.jar" + + local JAVA_SRC_DIR=( + src/main/java + src/module + ) + + local JAVA_RESOURCE_DIRS=() + local default_resource_dir="src/main/resources" + [[ -d "${default_resource_dir}" ]] && + JAVA_RESOURCE_DIRS+=( "${default_resource_dir}" ) + + if [[ "${module}" == junit-platform-console ]]; then + local JAVA_MAIN_CLASS="org.junit.platform.console.ConsoleLauncher" + local JAVA_LAUNCHER_FILENAME="${module}" + fi + + # Invoke the passed function + "${func[@]}" + local ret="${?}" + + popd > /dev/null || die "Failed to leave directory '${module}'" + return "${ret}" +} + +junit5_gen_cp() { + echo "$(java-pkg_getjars --build-only --with-dependencies \ + "${JAVA_GENTOO_CLASSPATH}"):${JAVA_GENTOO_CLASSPATH_EXTRA}" +} + +junit5_module_compile() { + if [[ "${module}" == junit-platform-console ]]; then + # Unlike other modules that have a src/main/java9 directory, for this + # module, the upstream puts the class files built from src/main/java9 + # in their JAR's top-level directory instead of META-INF/versions/9 + cp -rv src/main/java9/* src/main/java/ || + die "Failed to merge ${module}'s sources for Java 9+" + # Remove for the [[ -d src/main/java9 ]] test + # during versioned directory handling + rm -rv src/main/java9 || + die "Failed to remove ${module}'s Java 9+ source directory" + fi + + java-pkg-simple_src_compile + local sources="sources.lst" + local classes="target/classes" + + # Collect a list of all compiler input files for building Javadoc + local source + while read source; do + echo "${module}/${source}" >> "${all_sources}" + done < "${sources}" || + die "Failed to add ${module}'s sources to Javadoc input list" + + # Handle classes that will go into versioned directories. This will be + # no longer needed after https://bugs.gentoo.org/900433 is implemented. + local vm_ver + for vm_ver in 9 17; do + local versioned_src="src/main/java${vm_ver}" + if [[ -d "${versioned_src}" ]]; then + if ver_test "${JUNIT5_VM_VERSION}" -ge "${vm_ver}"; then + local versioned_classes="target/${vm_ver}/classes" + mkdir -p "${versioned_classes}" || + die "Failed to create directory for ${module}'s Java ${vm_ver}+ classes" + ejavac -d "${versioned_classes}" -encoding "${JAVA_ENCODING}" \ + -classpath "${classes}:$(junit5_gen_cp)" ${JAVAC_ARGS} \ + $(find "${versioned_src}" -type f -name '*.java') + "$(java-config --jar)" -uvf "${JAVA_JAR_FILENAME}" \ + --release "${vm_ver}" -C "${versioned_classes}" . || + die "Failed to add ${module}'s Java ${vm_ver}+ classes to JAR" + else + # Modules that may hit this branch as of 5.9.2: + # - junit-platform-console: + # src/main/java17/.../ConsoleUtils.java tries to use + # java.io.Console.charset() (available since Java 17) to get + # the default output charset. It is fine to not use this + # file, even if the built artifacts will be used on JRE 17+, + # as src/main/java/.../ConsoleUtils.java still gets the + # default from java.nio.charset.Charset.defaultCharset(). + elog "JDK ${JUNIT5_VM_VERSION} used; skipping Java ${vm_ver}-dependent parts in ${module}" + fi + fi + done + + # Add the current module's JAR to classpath + # for the module's reverse dependencies in this package + JAVA_GENTOO_CLASSPATH_EXTRA+=":${S}/${module}/${JAVA_JAR_FILENAME}" +} + +src_compile() { + local all_sources="${S}/all-sources.lst" + junit5_foreach_module junit5_module_compile + + if use doc; then + einfo "Generating Javadoc for all modules ..." + local apidoc="target/api" + mkdir -p "${apidoc}" || die "Failed to create Javadoc directory" + ejavadoc -d "${apidoc}" \ + -encoding "${JAVA_ENCODING}" -docencoding UTF-8 -charset UTF-8 \ + -classpath "$(junit5_gen_cp)" ${JAVADOC_ARGS:- -quiet} \ + -windowtitle "JUnit ${PV} API" \ + "@${all_sources}" + fi +} + +src_test() { + # Running the JUnit 5 modules' tests (located in each module's + # 'src/test/java') has a few obstacles: + # - Some test sources use text blocks -- a feature introduced in Java 15. + # A JDK at a lower version, e.g. 11, cannot compile them. + # - Some test classes depend on JUnit 5 modules that this ebuild does not + # include, like junit-platform-runner and junit-platform-testkit. + # + # Therefore, this ebuild uses a simpler approach to test the artifacts just + # built: it uses the artifacts to run tests in examples under the + # 'documentation/src' directory. The test coverage will not be impressive, + # but at least this approach verifies that the copy of JUnit 5 just built + # is capable of running some simple tests launched from CLI. + + local JUNIT5_TEST_SRC_DIR="documentation/src/test/java" + local JUNIT5_TEST_RESOURCE_DIR="documentation/src/test/resources" + local JUNIT5_TEST_RM=( + $(usev !migration-support example/IgnoredTestsDemo.java) + $(use !suite && echo \ + example/DocumentationTestSuite.java \ + example/SuiteDemo.java \ + ) + $(usev !vintage example/JUnit4Tests.java) + + # Need excluded module junit-platform-runner + example/JUnitPlatformClassDemo.java + example/JUnitPlatformSuiteDemo.java + + # Need excluded module junit-platform-testkit + example/testkit/ + + # Not necessary for the tests; some files even require extra dependency + org/junit/api/tools/ + + # Needs dev-java/hamcrest; no need to pull in extra dependency + # as the examples already provide ample tests to run + example/HamcrestAssertionsDemo.java + + # Makes an HTTP request and expects a certain response + example/session/HttpTests.java + ) + + pushd "${JUNIT5_TEST_SRC_DIR}" > /dev/null || + die "Failed to enter test source directory" + rm -rv "${JUNIT5_TEST_RM[@]}" || + die "Failed to remove unneeded test sources" + # Test sources expect the working directory to be 'documentation' + sed -i -e "s|src/test/resources|${JUNIT5_TEST_RESOURCE_DIR}|g" \ + example/ParameterizedTestDemo.java || + die "Failed to update file paths in test sources" + popd > /dev/null || die "Failed to leave test source directory" + + local test_dir="${T}/junit5_src_test" + local example_classes="${test_dir}/classes" + local test_classes="${test_dir}/test-classes" + mkdir -p "${example_classes}" "${test_classes}" || + die "Failed to create test directories" + + local example_sources="${test_dir}/sources.lst" + local test_sources="${test_dir}/test-sources.lst" + find documentation/src/main/java -type f -name '*.java' > "${example_sources}" || + die "Failed to get a list of example sources" + find documentation/src/test/java -type f -name '*.java' > "${test_sources}" || + die "Failed to get a list of test sources" + + ejavac -d "${example_classes}" -encoding "${JAVA_ENCODING}" \ + -classpath "$(junit5_gen_cp)" ${JAVAC_ARGS} \ + "@${example_sources}" + + local test_cp="${example_classes}:${JUNIT5_TEST_RESOURCE_DIR}:$(junit5_gen_cp)" + test_cp="${test_cp}:$(java-pkg_getjars --build-only --with-dependencies jimfs)" + ejavac -d "${test_classes}" -encoding "${JAVA_ENCODING}" \ + -classpath "${test_cp}" ${JAVAC_ARGS} \ + "@${test_sources}" + + set -- "$(java-config --java)" -classpath "${test_classes}:${test_cp}" \ + org.junit.platform.console.ConsoleLauncher \ + --disable-ansi-colors --fail-if-no-tests --scan-classpath \ + --include-classname='^(Test.*|.+[.$]Test.*|.*Tests?|.*Demo)$' \ + --exclude-tag="exclude" + echo "${@}" >&2 + "${@}" + local status="${?}" + [[ "${status}" -eq 2 ]] && die "JUnit did not discover any tests" + [[ "${status}" -eq 0 ]] || die "ConsoleLauncher failed" +} + +junit5_module_install() { + # It is OK to let java-pkg-simple_src_install call einstalldocs for + # each module as long as each documentation file being installed + # has a unique filename among _all_ modules; otherwise, some files + # would overwrite other ones. + if [[ -f README.md ]]; then + mv -v README.md "README-${module}.md" || + die "Failed to rename ${module}'s README.md" + fi + java-pkg-simple_src_install +} + +src_install() { + junit5_foreach_module junit5_module_install + einstalldocs # For project-global documentation + + if use doc; then + einfo "Installing Javadoc for all modules ..." + local apidoc="target/api" + java-pkg_dojavadoc "${apidoc}" + fi +} diff --git a/dev-java/qdox/Manifest b/dev-java/qdox/Manifest index 85413229dd93..b9d0d34f0f66 100644 --- a/dev-java/qdox/Manifest +++ b/dev-java/qdox/Manifest @@ -1,2 +1,3 @@ +DIST jflex-1.6.1.jar 1050749 BLAKE2B 71c68bf368a239217cbf928a7c6fbf7325cc069beddfaf92fbad3f0542bf83aa5606b2e15cfb4bdbd62a54c53d8439773ba3a7f60370ef5e2501ffe2561f9945 SHA512 882e73231b6e4f12e746282bac894e79dd3ee6fcfd0317a988709f3a3b472634415031209aa96c200c65ce382c90b5dff3f6d31d5e39c2feaff90dcf30a142f4 DIST qdox-1.12.1.tar.gz 519833 BLAKE2B 83a732f1582b714cf943ede61bacc5216804c00cfbb642a479afb74739564f4fdbcd923dd7cb84a9626a97c5ad0a0f04895e0ae68252891cb25299e1fe1c9c72 SHA512 17ac933854ebd0560921805ea4339c151a7fd095bf8d50d5d71e656afda77ba30efac7926cfcc7543e4a8420b12d1eb75cdd305c50d1c28ad8cd6b0f4d95f5c5 DIST qdox-2.0.1.tar.gz 528305 BLAKE2B ff2f4b59d650b93a466eae6cc69239b059f7786ea609c18c56414e7e849d711d5316664a376b2c2c6e0021a21e7577cc21c9f5cfd215c4af612100a4c81da758 SHA512 db9d9ed8e8cf38c74e35be493aebcca54ba9d2c43a92c066d1964777293ad3af8e3212fcb8c20e9453b93e9bbe868c988dab69f936e7df41450183ce385137fa diff --git a/dev-java/qdox/qdox-1.12.1-r6.ebuild b/dev-java/qdox/qdox-1.12.1-r6.ebuild new file mode 100644 index 000000000000..a06037118b89 --- /dev/null +++ b/dev-java/qdox/qdox-1.12.1-r6.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2024 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 + x86? ( https://repo1.maven.org/maven2/de/jflex/jflex/1.6.1/jflex-1.6.1.jar )" +S="${WORKDIR}/${PN}-${PN}-${PV}" + +LICENSE="Apache-2.0" +SLOT="1.12" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~ppc-macos ~x64-macos" +IUSE="ant-task" +REQUIRED_USE="test? ( ant-task )" + +DEPEND=" + >=virtual/jdk-1.8:* + dev-java/byaccj:0 + dev-java/jmock:1.0 + !x86? ( dev-java/jflex:0 ) + ant-task? ( >=dev-java/ant-1.10.14-r3:0 ) + test? ( dev-java/junit:0 ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ant-task? ( >=dev-java/ant-1.10.14-r3:0 ) +" + +PATCHES=( + "${FILESDIR}/jflex-1.6.1.patch" +) + +src_unpack() { + unpack "${P}.tar.gz" + use x86 && cp "${DISTDIR}/jflex-1.6.1.jar" "${WORKDIR}" +} + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + + 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() { + # https://bugs.gentoo.org/778416 - for x86 we provide the precompiled jflex + if use x86; then + "$(java-config -J)" -cp "${WORKDIR}/jflex-1.6.1.jar" jflex.Main \ + src/grammar/lexer.flex --skel src/grammar/skeleton.inner -d src/java/com/thoughtworks/qdox/parser/impl/ || die + else + jflex \ + src/grammar/lexer.flex --skel src/grammar/skeleton.inner -d src/java/com/thoughtworks/qdox/parser/impl/ || die + fi + 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 jmock-1.0)" + + if use test ; then + cp="${cp}:$(java-pkg_getjars --build-only junit)" + fi + + if use ant-task ; then + cp="${cp}:$(java-pkg_getjars --build-only ant)" + else + rm src/java/com/thoughtworks/qdox/ant/AbstractQdoxTask.java || die + 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,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 +} diff --git a/dev-java/qdox/qdox-2.0.1.ebuild b/dev-java/qdox/qdox-2.0.1.ebuild index 0588a2ec7649..f046b3330bd9 100644 --- a/dev-java/qdox/qdox-2.0.1.ebuild +++ b/dev-java/qdox/qdox-2.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,10 +12,11 @@ inherit java-pkg-2 java-pkg-simple DESCRIPTION="Parser for extracting class/interface/method definitions" HOMEPAGE="https://github.com/paul-hammant/qdox" SRC_URI="https://github.com/paul-hammant/qdox/archive/qdox-${PV}.tar.gz" +S="${WORKDIR}/qdox-${P}" LICENSE="Apache-2.0" SLOT="2" -KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~ppc-macos ~x64-macos" +KEYWORDS="amd64 ~arm arm64 ppc64 ~ppc-macos ~x64-macos" DEPEND=" dev-java/jflex:0 @@ -28,8 +29,6 @@ DEPEND=" RDEPEND=">=virtual/jre-1.8:*" BDEPEND="dev-java/byaccj:0" -S="${WORKDIR}/qdox-${P}" - JAVA_AUTOMATIC_MODULE_NAME="com.thoughtworks.qdox" JAVA_SRC_DIR="src/main/java" JAVA_CLASSPATH_EXTRA="jflex" diff --git a/dev-java/xalan/Manifest b/dev-java/xalan/Manifest index 47e6dc2239af..e3c52c83c178 100644 --- a/dev-java/xalan/Manifest +++ b/dev-java/xalan/Manifest @@ -1,2 +1,3 @@ +DIST java-cup-bin-11b-20160615.tar.gz 144985 BLAKE2B fba4109a4999d6f5a678265d2374bc305fc9fe8b724a0af5fb60402d612904447ebe9285e8672652c492cd2e630752eb9ffeb8017be1dea081ddcb30f815a687 SHA512 edba197bfe0638838ad2e9cb7342ffcbbec4f2a71436fc4bf82ff0e1987fe9f490849c644945cf7e7deade9f12f458e019410a2d9c1f22c0182137fe5ad2349f DIST xalan-j_2_7_3-src.tar.gz 13686458 BLAKE2B e19373aa22dad13945917d8f041f56e6ff9cc434a70e88b96764e0547a0a122a9197eeb23bb7757a5483beead334f4af62e7e1b70531b23c31199ec4733756ef SHA512 fe4b2b9471f95a2cd3607550a6c97b46b7d2576d1e814305f4564df88aaf4fdc9f88ba43dad4a5741521b2c2f5137e3e70d2d4e31b232d403a66dc1e889c8b6b DIST xalan-j_2_7_3-src.tar.gz.asc 849 BLAKE2B 623fefefa3ab88bfdef5376101f26a9c6602c30a34c0db369159bdb7af34ccb2602011071dd3e79304e6dd4e8b8a198729347f5dbee9a06ae12af12d351de82a SHA512 5c7ed7e71f8a0c2739a64f9ba34edb28d749924d1a581b9963bed3376151a090c2c1af2b1111612822cf20d27a814e22917660f034912e8e5fa913b434e66bf2 diff --git a/dev-java/xalan/xalan-2.7.3-r2.ebuild b/dev-java/xalan/xalan-2.7.3-r2.ebuild new file mode 100644 index 000000000000..a46680273ed9 --- /dev/null +++ b/dev-java/xalan/xalan-2.7.3-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" +MAVEN_ID="xalan:xalan:2.7.3" + +inherit java-pkg-2 java-pkg-simple verify-sig + +DESCRIPTION="Transforming XML documents into HTML, text, or other XML document types" +HOMEPAGE="https://xalan.apache.org/" +SRC_URI="mirror://apache/xalan/xalan-j/source/xalan-j_${PV//./_}-src.tar.gz + verify-sig? ( https://downloads.apache.org/xalan/xalan-j/source/xalan-j_${PV//./_}-src.tar.gz.asc ) + x86? ( https://www2.cs.tum.edu/projects/cup/releases/java-cup-bin-11b-20160615.tar.gz )" + +S="${WORKDIR}/xalan-j_${PV//./_}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" + +# https://bugs.gentoo.org/936274 - for x86 we provide the precompiled java-cup +COMMON_DEPEND=" + !x86? ( dev-java/javacup:0 ) +" + +CP_DEPEND=" + dev-java/bcel:0 + ~dev-java/xalan-serializer-${PV}:${SLOT} + dev-java/xerces:2 +" + +DEPEND=" + ${COMMON_DEPEND} + ${CP_DEPEND} + >=virtual/jdk-1.8:* +" + +RDEPEND=" + ${COMMON_DEPEND} + ${CP_DEPEND} + >=virtual/jre-1.8:* +" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xalan-j )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/xalan-j.apache.org.asc" + +JAVA_MAIN_CLASS="org.apache.xalan.xslt.Process" +JAVA_SRC_DIR="src" + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached \ + "${DISTDIR}/xalan-j_${PV//./_}-src.tar.gz" \ + "${DISTDIR}/xalan-j_${PV//./_}-src.tar.gz.asc" + fi + unpack "xalan-j_${PV//./_}-src.tar.gz" + use x86 && unpack java-cup-bin-11b-20160615.tar.gz +} + +src_prepare() { + java-pkg-2_src_prepare + # serializer is packaged separately + rm -r src/org/apache/xml/serializer || die "cannot remove serializer" + use !x86 && JAVA_GENTOO_CLASSPATH="javacup" + use x86 && JAVA_GENTOO_CLASSPATH_EXTRA="${WORKDIR}/java-cup-11b-runtime.jar:${WORKDIR}/java-cup-11b.jar" +} + +src_install() { + java-pkg-simple_src_install + if use x86; then + java-pkg_newjar "${WORKDIR}/java-cup-11b-runtime.jar" java-cup-runtime.jar + java-pkg_newjar "${WORKDIR}/java-cup-11b.jar" java-cup.jar + java-pkg_regjar "${ED}/usr/share/${PN}/lib/java-cup-runtime.jar" + java-pkg_regjar "${ED}/usr/share/${PN}/lib/java-cup.jar" + fi +} |
