summaryrefslogtreecommitdiff
path: root/dev-java/avalon-logkit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/avalon-logkit')
-rw-r--r--dev-java/avalon-logkit/Manifest2
-rw-r--r--dev-java/avalon-logkit/avalon-logkit-2.1-r10.ebuild63
-rw-r--r--dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild93
3 files changed, 94 insertions, 64 deletions
diff --git a/dev-java/avalon-logkit/Manifest b/dev-java/avalon-logkit/Manifest
index 9d55d7cbf0cb..05999de5bcd1 100644
--- a/dev-java/avalon-logkit/Manifest
+++ b/dev-java/avalon-logkit/Manifest
@@ -1,5 +1,5 @@
AUX avalon-logkit-2.1-java7.patch 1155 BLAKE2B 8e5a7756fed565d23cb7d9265171ad7c42c7c1a1f1f81284461aaad1d85718d77a7767f51d8e5cc7a3724c2a0b15dabc541d1c6c8fbfad670fe56765ac3beda4 SHA512 155bd7d65a2eb59528067605f1c40b1f176228af2fbc11f6560ad929cf5344d74ba79bbd58c7cb35b6065c74ec4e579cea590c0cc23082979d79cd70ce8414e7
DIST avalon-logkit-2.1-src.tar.gz 60218 BLAKE2B 1c35b38a22d95cffabb19e099d42697adf7aa6ad471f6cb62e02a30b6612c8405b9f7473ca61ea4f7f9c1f3b1ece6ee68f7ec711b79672330db3ac9e57642e0d SHA512 9977a3a172ca4fb5c3ad1f623ff109214f71900d2e244f175cc5d140f5f9993caca7e5ca3220728f18a1d6242d11a48990f9ce0150c36b7a9bb10a7a6d5a905a
-EBUILD avalon-logkit-2.1-r10.ebuild 1439 BLAKE2B 76428d98b1fbf65aecc143cb91016d219f642f9f7b9fd3d0f72ca767a46ff1da523b0632187003090ab13e235da7b8ca45c73d717cfac57a9bf0f7fa47b633e7 SHA512 70b417449e861e5dfb2a84765f8a89565243a9522da2a47cc652caae7d4e7fe75e1a4aacc085285c60e4e3756bcfd40378b33d2f207bc875893bf2b3d02edf63
+EBUILD avalon-logkit-2.1-r12.ebuild 2951 BLAKE2B 7e2ee819e01521f04dfd4f0dfec456273a24997f5f48df2a1671ea18836b74fa700c958f7beea3c08cdef34dd6876f5987527d3ceecd78447cd3a6e48e0de714 SHA512 6d283bb31bbc8b1a13ec0838d88583d4504f6824ee8c9379a0b267587dea8e0952b60acd3f1d709ea2c78bca2c2f452124e3426da449b2bc7ede61a497ef27bb
EBUILD avalon-logkit-2.1-r9.ebuild 1445 BLAKE2B 87d3271023f53f5e275c18ae926768186de5122d9b548d26153117c7decadfe47d1b34c384915a03eb118e4215296b417ea2002b6e9c82a7b49c336f1b70d9a0 SHA512 bbd130e50d2da2fa59735aeff1a88bc46599236f3cfb7531d1f63a84d26f27d0066502a63c40fb910022f042b1b5d70e7d200a9071d1398309023ec59c22dc60
MISC metadata.xml 243 BLAKE2B d1937cd00ce74d225075f1cf0e2584ce3f3d04b4ab3bd4ce636326ef8ed6ccaa54535a1c126025464e48a272959a579e08ceb008b8bacb2160f8f623fea5b6b3 SHA512 5431123c80f2e11811efde927819546af19c9ca93c9810399fe784c77ad2201696a081ed146df5b59fbf78ffb39cf8633cd6805e16ca82244aa8458c2ab8c4fd
diff --git a/dev-java/avalon-logkit/avalon-logkit-2.1-r10.ebuild b/dev-java/avalon-logkit/avalon-logkit-2.1-r10.ebuild
deleted file mode 100644
index a79ee489bd88..000000000000
--- a/dev-java/avalon-logkit/avalon-logkit-2.1-r10.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-JAVA_PKG_IUSE="doc source test"
-
-inherit java-pkg-2 java-ant-2
-
-# NB: this project is dead and we should look into removing it from the tree.
-# Take a look at the homepage.
-DESCRIPTION="Easy-to-use Java logging toolkit"
-HOMEPAGE="https://avalon.apache.org/closed.html"
-SRC_URI="https://archive.apache.org/dist/excalibur/avalon-logkit/source/avalon-logkit-${PV}-src.tar.gz"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-LICENSE="Apache-2.0"
-SLOT="2.0"
-IUSE=""
-
-CDEPEND="
- dev-java/log4j:0
- java-virtuals/jms:0
- dev-java/javax-mail:0
- java-virtuals/servlet-api:3.0"
-RDEPEND="${CDEPEND}
- >=virtual/jre-1.8:*"
-DEPEND="${CDEPEND}
- >=virtual/jdk-1.8:*
- test? (
- dev-java/ant-junit:0
- )"
-
-src_prepare() {
- default
- # Doesn't like 1.6 / 1.7 changes to JDBC
- eapply "${FILESDIR}/${P}-java7.patch"
-
- java-ant_ignore-system-classes
-
- java-ant_xml-rewrite \
- -f build.xml \
- -c -e available \
- -a classpathref \
- -v 'build.classpath' || die
-
- java-pkg_filter-compiler jikes
-}
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-JAVA_ANT_ENCODING="UTF-8"
-
-EANT_GENTOO_CLASSPATH="javax-mail,jms,log4j,servlet-api-3.0"
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar target/${P}.jar
- use doc && java-pkg_dojavadoc dist/docs/api
- use source && java-pkg_dosrc src/java/*
-}
diff --git a/dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild b/dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild
new file mode 100644
index 000000000000..fadec3b6862a
--- /dev/null
+++ b/dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2
+
+# NB: this project is dead and we should look into removing it from the tree.
+# Take a look at the homepage.
+# As of February 2022, dev-java/commons-logging is the only consumer of this
+# package besides dev-java/avalon-framework. However, commons-logging is still
+# used by many other consumers and does not have an updated version that do not
+# depend on this package.
+DESCRIPTION="Easy-to-use Java logging toolkit"
+HOMEPAGE="https://avalon.apache.org/closed.html"
+SRC_URI="https://archive.apache.org/dist/excalibur/avalon-logkit/source/avalon-logkit-${PV}-src.tar.gz"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+LICENSE="Apache-2.0"
+SLOT="2.0"
+
+CP_DEPEND="
+ dev-java/javax-mail:0
+ dev-java/jboss-jms-api:1.1
+ dev-java/log4j-12-api:2
+ java-virtuals/servlet-api:3.0"
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/ant-junit:0
+ )"
+
+src_prepare() {
+ default
+
+ # Unfortunately, LogFactor5 support is no longer provided by the Log4j 1.x
+ # bridge in Log4j 2. But it seems that LogFactor5 merely consists of a
+ # Swing-based GUI that is neither checked by this package's tests nor used
+ # by reverse dependencies in ::gentoo. If virtually nobody would use
+ # LogFactor5, components in this package pertaining to it could be simply
+ # removed to make the migration to Log4j 2 feasible.
+ # http://people.apache.org/~carnold/log4j/docs/x/logging-log4j-1.2.10/docs/lf5/overview.html
+ rm -rv src/java/org/apache/log/output/lf5 ||
+ die "Failed to remove support for stale LogFactor5 project"
+
+ # Doesn't like 1.6 / 1.7 changes to JDBC
+ eapply "${FILESDIR}/${P}-java7.patch"
+
+ java-ant_ignore-system-classes
+
+ java-ant_xml-rewrite \
+ -f build.xml \
+ -c -e available \
+ -a classpathref \
+ -v 'build.classpath' || die
+
+ java-pkg_filter-compiler jikes
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_ENCODING="UTF-8"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar "target/${P}.jar"
+ use doc && java-pkg_dojavadoc dist/docs/api
+ use source && java-pkg_dosrc src/java/*
+}
+
+pkg_postinst() {
+ # Display a message about LogFactor5 support drop upon first install
+ # or upgrade from a version before the drop
+ local changed_ver="2.1-r11"
+ local should_show_msg replaced_ver
+ [[ -z "${REPLACING_VERSIONS}" ]] && should_show_msg=1 # First install
+ for replaced_ver in ${REPLACING_VERSIONS}; do
+ if ver_test "${replaced_ver}" -lt "${changed_ver}"; then
+ should_show_msg=1
+ break
+ fi
+ done
+ [[ "${should_show_msg}" ]] || return
+ ewarn "Due to migration to Log4j 2, this package has to drop LogFactor5"
+ ewarn "support. As a result, the org.apache.log.output.lf5 Java package"
+ ewarn "is not available in the JAR installed by this package."
+}