1 |
commit: ed47bf684e7c27c4540bc551d205a818b8326d1a |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Fri Feb 25 21:56:12 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 26 08:42:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed47bf68 |
7 |
|
8 |
dev-java/avalon-logkit: Switch to jboss-jms-api |
9 |
|
10 |
Replace java-virtulas/jms with dev-java/jboss-jms-api |
11 |
|
12 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
13 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/24350 |
15 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
16 |
|
17 |
.../avalon-logkit/avalon-logkit-2.1-r12.ebuild | 93 ++++++++++++++++++++++ |
18 |
1 file changed, 93 insertions(+) |
19 |
|
20 |
diff --git a/dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild b/dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild |
21 |
new file mode 100644 |
22 |
index 000000000000..fadec3b6862a |
23 |
--- /dev/null |
24 |
+++ b/dev-java/avalon-logkit/avalon-logkit-2.1-r12.ebuild |
25 |
@@ -0,0 +1,93 @@ |
26 |
+# Copyright 1999-2022 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=8 |
30 |
+ |
31 |
+JAVA_PKG_IUSE="doc source test" |
32 |
+ |
33 |
+inherit java-pkg-2 java-ant-2 |
34 |
+ |
35 |
+# NB: this project is dead and we should look into removing it from the tree. |
36 |
+# Take a look at the homepage. |
37 |
+# As of February 2022, dev-java/commons-logging is the only consumer of this |
38 |
+# package besides dev-java/avalon-framework. However, commons-logging is still |
39 |
+# used by many other consumers and does not have an updated version that do not |
40 |
+# depend on this package. |
41 |
+DESCRIPTION="Easy-to-use Java logging toolkit" |
42 |
+HOMEPAGE="https://avalon.apache.org/closed.html" |
43 |
+SRC_URI="https://archive.apache.org/dist/excalibur/avalon-logkit/source/avalon-logkit-${PV}-src.tar.gz" |
44 |
+ |
45 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" |
46 |
+LICENSE="Apache-2.0" |
47 |
+SLOT="2.0" |
48 |
+ |
49 |
+CP_DEPEND=" |
50 |
+ dev-java/javax-mail:0 |
51 |
+ dev-java/jboss-jms-api:1.1 |
52 |
+ dev-java/log4j-12-api:2 |
53 |
+ java-virtuals/servlet-api:3.0" |
54 |
+RDEPEND="${CP_DEPEND} |
55 |
+ >=virtual/jre-1.8:*" |
56 |
+DEPEND="${CP_DEPEND} |
57 |
+ >=virtual/jdk-1.8:* |
58 |
+ test? ( |
59 |
+ dev-java/ant-junit:0 |
60 |
+ )" |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ default |
64 |
+ |
65 |
+ # Unfortunately, LogFactor5 support is no longer provided by the Log4j 1.x |
66 |
+ # bridge in Log4j 2. But it seems that LogFactor5 merely consists of a |
67 |
+ # Swing-based GUI that is neither checked by this package's tests nor used |
68 |
+ # by reverse dependencies in ::gentoo. If virtually nobody would use |
69 |
+ # LogFactor5, components in this package pertaining to it could be simply |
70 |
+ # removed to make the migration to Log4j 2 feasible. |
71 |
+ # http://people.apache.org/~carnold/log4j/docs/x/logging-log4j-1.2.10/docs/lf5/overview.html |
72 |
+ rm -rv src/java/org/apache/log/output/lf5 || |
73 |
+ die "Failed to remove support for stale LogFactor5 project" |
74 |
+ |
75 |
+ # Doesn't like 1.6 / 1.7 changes to JDBC |
76 |
+ eapply "${FILESDIR}/${P}-java7.patch" |
77 |
+ |
78 |
+ java-ant_ignore-system-classes |
79 |
+ |
80 |
+ java-ant_xml-rewrite \ |
81 |
+ -f build.xml \ |
82 |
+ -c -e available \ |
83 |
+ -a classpathref \ |
84 |
+ -v 'build.classpath' || die |
85 |
+ |
86 |
+ java-pkg_filter-compiler jikes |
87 |
+} |
88 |
+ |
89 |
+JAVA_ANT_REWRITE_CLASSPATH="yes" |
90 |
+JAVA_ANT_ENCODING="UTF-8" |
91 |
+ |
92 |
+src_test() { |
93 |
+ java-pkg-2_src_test |
94 |
+} |
95 |
+ |
96 |
+src_install() { |
97 |
+ java-pkg_newjar "target/${P}.jar" |
98 |
+ use doc && java-pkg_dojavadoc dist/docs/api |
99 |
+ use source && java-pkg_dosrc src/java/* |
100 |
+} |
101 |
+ |
102 |
+pkg_postinst() { |
103 |
+ # Display a message about LogFactor5 support drop upon first install |
104 |
+ # or upgrade from a version before the drop |
105 |
+ local changed_ver="2.1-r11" |
106 |
+ local should_show_msg replaced_ver |
107 |
+ [[ -z "${REPLACING_VERSIONS}" ]] && should_show_msg=1 # First install |
108 |
+ for replaced_ver in ${REPLACING_VERSIONS}; do |
109 |
+ if ver_test "${replaced_ver}" -lt "${changed_ver}"; then |
110 |
+ should_show_msg=1 |
111 |
+ break |
112 |
+ fi |
113 |
+ done |
114 |
+ [[ "${should_show_msg}" ]] || return |
115 |
+ ewarn "Due to migration to Log4j 2, this package has to drop LogFactor5" |
116 |
+ ewarn "support. As a result, the org.apache.log.output.lf5 Java package" |
117 |
+ ewarn "is not available in the JAR installed by this package." |
118 |
+} |