public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/avalon-logkit/
Date: Thu, 17 Feb 2022 08:47:45 +0000 (UTC)	[thread overview]
Message-ID: <1645087226.79bc69e72605d79d13124d5bd94671bab975debb.fordfrog@gentoo> (raw)

commit:     79bc69e72605d79d13124d5bd94671bab975debb
Author:     Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Tue Feb  8 19:43:14 2022 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Feb 17 08:40:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79bc69e7

dev-java/avalon-logkit: Switch to log4j-12-api:2

Closes: https://bugs.gentoo.org/831716
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../avalon-logkit/avalon-logkit-2.1-r11.ebuild     | 93 ++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/dev-java/avalon-logkit/avalon-logkit-2.1-r11.ebuild b/dev-java/avalon-logkit/avalon-logkit-2.1-r11.ebuild
new file mode 100644
index 000000000000..fd49d86024bc
--- /dev/null
+++ b/dev-java/avalon-logkit/avalon-logkit-2.1-r11.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 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+LICENSE="Apache-2.0"
+SLOT="2.0"
+
+CP_DEPEND="
+	dev-java/log4j-12-api:2
+	java-virtuals/jms:0
+	dev-java/javax-mail:0
+	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."
+}


             reply	other threads:[~2022-02-17  8:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17  8:47 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-31 18:58 [gentoo-commits] repo/gentoo:master commit in: dev-java/avalon-logkit/ Arthur Zamarin
2022-03-31 16:47 Arthur Zamarin
2022-03-30 11:47 Agostino Sarubbo
2022-03-30 11:09 Jakov Smolić
2022-03-30 11:09 Jakov Smolić
2022-03-06 17:07 Florian Schmaus
2022-02-26  8:42 Miroslav Šulc
2022-02-18  8:04 Arthur Zamarin
2022-02-18  8:02 Arthur Zamarin
2022-01-30  9:00 Florian Schmaus
2021-05-16 18:58 Sam James
2021-04-22 11:22 Miroslav Šulc
2021-04-22 11:22 Miroslav Šulc
2018-03-01  8:39 Michał Górny
2017-08-28 22:01 James Le Cuirot
2017-08-15  5:41 Alexis Ballier
2017-07-05  9:56 Patrice Clement
2017-07-05  9:56 Patrice Clement
2016-03-17 22:06 James Le Cuirot
2016-03-17 22:06 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1645087226.79bc69e72605d79d13124d5bd94671bab975debb.fordfrog@gentoo \
    --to=fordfrog@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox