summaryrefslogtreecommitdiff
path: root/dev-java/commons-logging
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-17 04:04:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-17 04:04:27 +0100
commit8796aaedb3257bbe4d80b0033408b2210b2259d6 (patch)
tree1ffee2ca4a87bd5dba43077259c000f9086fbfc8 /dev-java/commons-logging
parent61a1cada8ceb208845fa604b982216b0a7b099cb (diff)
gentoo auto-resync : 17:10:2024 - 04:04:26
Diffstat (limited to 'dev-java/commons-logging')
-rw-r--r--dev-java/commons-logging/Manifest3
-rw-r--r--dev-java/commons-logging/commons-logging-1.3.4.ebuild194
2 files changed, 197 insertions, 0 deletions
diff --git a/dev-java/commons-logging/Manifest b/dev-java/commons-logging/Manifest
index bfba2fbd0fc0..49ceeba1f77a 100644
--- a/dev-java/commons-logging/Manifest
+++ b/dev-java/commons-logging/Manifest
@@ -1,4 +1,7 @@
DIST commons-logging-1.3.1-src.tar.gz 189156 BLAKE2B 23308b2bff6ea67620b0f07f49a63ffdbd07833fc0d9a6654386f4c17c9125abef5ad2afb6d8c798dcb98bc3e99bd8d94d35b9deec569c3aec1dde20f69e1a1d SHA512 ffda970d086601df4b476caf8bd01d1bdc22dd7f8846a22287036f7f000ce6cf0a757d16621910f041f8d90aa6066819454b3977dd005ca66817bec59e91e91f
DIST commons-logging-1.3.1-src.tar.gz.asc 488 BLAKE2B 3225a62f6269224f1b52907631be03d97cde65d1c7a76c06b6a23b9e30b1cee08b048eb4fdaa41b0a6b5bcf090b54c9dc54307fb1629b039b786fd426572a4d1 SHA512 6f13f85a5aeab1099ebfca38a6173384050b1f1c2e7eac93d978587c92751ddd24d583e39bc5a949f0caec66ca141d265147e63e9e2afea2094bda4667936a86
+DIST commons-logging-1.3.4-src.tar.gz 195717 BLAKE2B ba691ea0033c14f54fcb525faeadd4b330e063f73175c5ee40a4f50f159f1b264efb9f40661c4af3902ddca7d43f8f9b84e7a77bf1eeb3b237b31f566fc98aab SHA512 a4049d8d7ea0d97f337e169fa5f572e32be1882e07102ab004d8b2de74170cb075a251ee9603590d6e10bee5933651e8e33e108a734fc100e8b2d5acd669cb44
+DIST commons-logging-1.3.4-src.tar.gz.asc 488 BLAKE2B a9cdc993891ff39bb8ebeaa3eefdecee1adb062ed77449dfa1dad75a43cf5aa5678f014d24765ebff7b761498abfc795d3bb68359a73f8de98cb4ac115cb68da SHA512 1c132b87f03ca54887172e45c36e1d8c66d4f12a2a6a2da84e0d6cf3ac2cd2366193829fac0393837371bc1cd34215cd6318c9e7ea6c406c11d9f0dce28b3143
EBUILD commons-logging-1.3.1.ebuild 5386 BLAKE2B dec24c358e19ac4ba1cad8a4a83527a6af3ad3db1a4006805ca7e529b8984d4f20bec13176dda17595b016e74eb5de0fe0bd3242c84904683ea99985761c5b69 SHA512 6cb7fae5214abd1a4ce0d7ea80a48cb24331ddc103a0a739119815cfe0cd000394a20283a977ff12f97937efcfd44c4e20602b32fc03e3aa7340db19678340d0
+EBUILD commons-logging-1.3.4.ebuild 6645 BLAKE2B 46c8fd7ad6823ea68224c90fecbf998da11e9c41b8393c948c6e2c1f4c736c7032065d8a99ced8c402924bfffd66a12425825e6444980ce2c90b1418a234ab45 SHA512 575816443dba5fc90eb444dbd5a3e7f4bf851c5a6d3b122d78c979acdde45c6eae9b7ff9304d324c85b98fee114509e9a4a25587cd170941e141653e695407b5
MISC metadata.xml 549 BLAKE2B b20c8451a73329dbdb8aa88120543b948014115d754a84e8a77a8f61b9134277a7849fc10e35323c028a32d69f6e45702200e06af4481bf5238f5d848b3ccc03 SHA512 105c2bdf3eed380f11be1b8987a08fbcf1b6e6cbbb00c0e38e4813875865abd65c9be85267d5b49486913fdb0635b7329b5c4e84a86d9f93f9dcdad74c336ff0
diff --git a/dev-java/commons-logging/commons-logging-1.3.4.ebuild b/dev-java/commons-logging/commons-logging-1.3.4.ebuild
new file mode 100644
index 000000000000..e440061c3289
--- /dev/null
+++ b/dev-java/commons-logging/commons-logging-1.3.4.ebuild
@@ -0,0 +1,194 @@
+# 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="commons-logging:commons-logging:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple verify-sig
+
+DESCRIPTION="Thin adapter allowing configurable bridging to other well known logging systems"
+HOMEPAGE="https://commons.apache.org/proper/commons-logging/"
+SRC_URI="mirror://apache/commons/logging/source/${P}-src.tar.gz
+ verify-sig? ( https://downloads.apache.org/commons/logging/source/${P}-src.tar.gz.asc )"
+S="${WORKDIR}/${P}-src"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="log4j"
+
+# src/test/java/org/apache/commons/logging/tccl/logfactory/AdaptersTcclTestCase.java:26:
+# error: cannot find symbol
+# import org.apache.commons.logging.impl.Log4jApiLogFactory;
+# ^
+# symbol: class Log4jApiLogFactory
+# location: package org.apache.commons.logging.impl
+REQUIRED_USE="test? ( log4j )"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc"
+
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )"
+
+COMMON_DEPEND="
+ dev-java/jakarta-servlet-api:4
+ dev-java/slf4j-api:0
+ log4j? (
+ dev-java/log4j-12-api:2
+ dev-java/log4j-api:2
+ )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ >=virtual/jdk-11:*
+ test? (
+ dev-java/commons-io:1
+ dev-java/junit:5
+ )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=virtual/jre-1.8:*
+"
+
+DOCS=( NOTICE.txt src/changes/changes.xml )
+HTML_DOCS=( PROPOSAL.html )
+
+JAVA_GENTOO_CLASSPATH="
+ jakarta-servlet-api-4
+ slf4j-api
+"
+
+JAVA_SRC_DIR="src/main/java"
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ # https://avalon.apache.org/closed.html Apache Avalon has closed.
+ rm src/main/java/org/apache/commons/logging/impl/{Avalon,LogKit}Logger.java || die
+ rm src/test/java/org/apache/commons/logging/{avalon/AvalonLogger,logkit/Standard}TestCase.java || die
+
+ if use !log4j; then
+ rm src/main/java/org/apache/commons/logging/impl/Log4JLogger.java || die
+ rm src/main/java/org/apache/commons/logging/impl/Log4jApiLogFactory.java || die
+ else
+ JAVA_GENTOO_CLASSPATH+="
+ log4j-12-api-2
+ log4j-api-2
+ "
+ fi
+}
+
+src_compile() {
+ # getting dependencies into the modulepath
+ DEPENDENCIES=(
+ jakarta-servlet-api-4
+ slf4j-api
+ $(use log4j && echo log4j-12-api-2)
+ $(use log4j && echo log4j-api-2)
+ )
+ local modulepath
+ for dependency in ${DEPENDENCIES[@]}; do
+ modulepath="${modulepath}:$(java-pkg_getjars --build-only ${dependency})"
+ done
+
+ local JAVA_MODULE_NAME="org.apache.${PN/-/.}"
+ JAVA_JAR_FILENAME="${JAVA_MODULE_NAME}.jar"
+ java-pkg-simple_src_compile # creates a legacy jar file without module-info
+
+ # generate module-info.java
+ jdeps \
+ --module-path "${modulepath}" \
+ --add-modules=ALL-MODULE-PATH \
+ --generate-module-info src/main \
+ --multi-release 9 \
+ "${JAVA_MODULE_NAME}.jar" || die
+
+ # compile module-info.java
+ ejavac \
+ -source 9 -target 9 \
+ --module-path "${modulepath}" \
+ --patch-module "${JAVA_MODULE_NAME}"="${JAVA_MODULE_NAME}.jar" \
+ -d target/versions/9 \
+ src/main/"${JAVA_MODULE_NAME}"/versions/9/module-info.java
+
+ # package
+ JAVA_JAR_FILENAME="${PN}.jar"
+ jar cvf "${JAVA_JAR_FILENAME}" \
+ -C target/classes . \
+ --release 9 -C target/versions/9 . || die
+ java-pkg-simple_src_compile
+
+ pushd target/classes > /dev/null || die
+
+ # pom.xml, lines 81-103
+ jar -cvf ../../commons-logging-api.jar \
+ $(find . -type f -name '*.class' \
+ ! -name 'Jdk13LumberjackLogger.class' \
+ ! -name 'ServletContextCleaner.class' \
+ ) || die
+
+ # pom.xml, lines 205-124
+ jar -cvf ../../commons-logging-adapters.jar \
+ $(find . -type f -path './org/apache/commons/logging/impl/**.class' \
+ ! -name 'WeakHashtable*.class' \
+ ! -name 'LogFactoryImpl*.class' \
+ ) || die
+
+ popd > /dev/null || die
+}
+
+src_test() {
+ # Do not run Log4j tests because these tests use an Appender to verify
+ # logging correctness. The log4j-12-api bridge no longer supports using an
+ # Appender for verifications since the methods for adding an Appender in
+ # the bridge "are largely no-ops". This means an Appender's state would
+ # never be changed by log4j-12-api after new messages are logged. The test
+ # cases, however, expect changes to the Appender's state in such an event,
+ # so they would fail with log4j-12-api.
+ # https://logging.apache.org/log4j/log4j-2.8/log4j-1.2-api/index.html
+ rm src/test/java/org/apache/commons/logging/pathable/ParentFirstTestCase.java || die # Log4JLogger
+ rm src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java || die # Log4JLogger
+ rm -r src/test/java/org/apache/commons/logging/log4j || die
+ rm src/test/java/org/apache/commons/logging/log4j2/CallerInformationTestCase.java || die
+ # error: package ch.qos.logback.classic does not exist
+ rm src/test/java/org/apache/commons/logging/slf4j/CallerInformationTestCase.java || die
+
+ JAVA_TEST_EXCLUDES=(
+ org.apache.commons.logging.jdk14.TestHandler # No runnable methods
+ # junit.framework.AssertionFailedError: Wrong factory retrieved through
+ # ServiceLoader: org.apache.commons.logging.impl.Slf4jLogFactory
+ org.apache.commons.logging.serviceloader.ServiceLoaderTestCase
+ # junit.framework.ComparisonFailure: Log class expected:<...ommons.logging.impl.[NoOp]Log>
+ # but was:<...ommons.logging.impl.[Slf4jLogFactory$Slf4j]Log>
+ org.apache.commons.logging.noop.NoOpLogTestCase
+ # org.junit.runners.model.InvalidTestClassyyError: Invalid test class
+ org.apache.commons.logging.LogSourceTest # No runnable methods
+ # junit.framework.AssertionFailedError: Logging config succeeded when context class loader was null!
+ org.apache.commons.logging.LoadTestCase
+ # junit.framework.AssertionFailedError:
+ # expected:<org.apache.commons.logging.PathableClassLoader@1edf1c96>
+ # but was:<org.apache.commons.logging.PathableClassLoader@15615099>
+ org.apache.commons.logging.tccl.logfactory.AdaptersTcclTestCase
+ )
+ JAVA_TEST_EXTRA_ARGS=(
+ -Dcommons-lang3="$(java-pkg_getjars commons-lang-3.6)"
+ -Dlog4j-api="commons-logging-api.jar"
+ -Dservlet-api="$(java-pkg_getjars jakarta-servlet-api-4)"
+ -Dcommons-logging="commons-logging.jar"
+ -Dcommons-logging-api="commons-logging-api.jar"
+ -Dcommons-logging-adapters="commons-logging-adapters.jar"
+ -Dtestclasses="target/test-classes"
+ )
+ if use log4j; then
+ JAVA_TEST_EXTRA_ARGS+=" -Dlog4j12=$(java-pkg_getjars log4j-12-api-2,log4j-core-2)"
+ fi
+ JAVA_TEST_GENTOO_CLASSPATH="commons-io-1 commons-lang-3.6 junit-4 junit-5"
+ JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+ JAVA_TEST_SRC_DIR="src/test/java"
+ java-pkg-simple_src_test
+}