1 |
commit: 036d6a13a4f8b6288caae648525c3b49ed4584f7 |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Tue Jan 4 17:04:29 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 19 06:16:38 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=036d6a13 |
7 |
|
8 |
dev-java/commons-logging: add 1.3.0_pre20230317 |
9 |
|
10 |
- Uses snapshot with many fixes and updates |
11 |
- Drops dependencies on dev-java/avalon-{logkit,framework} |
12 |
- Switches to java-pkg-simple.eclass |
13 |
- Tests still tbd, https://bugs.gentoo.org/839681 |
14 |
|
15 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
16 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
17 |
Closes: https://github.com/gentoo/gentoo/pull/30217 |
18 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
19 |
|
20 |
dev-java/commons-logging/Manifest | 1 + |
21 |
.../commons-logging-1.3.0_pre20230317.ebuild | 102 +++++++++++++++++++++ |
22 |
dev-java/commons-logging/metadata.xml | 27 ++++-- |
23 |
3 files changed, 120 insertions(+), 10 deletions(-) |
24 |
|
25 |
diff --git a/dev-java/commons-logging/Manifest b/dev-java/commons-logging/Manifest |
26 |
index 7831dfb07830..caa33d505a88 100644 |
27 |
--- a/dev-java/commons-logging/Manifest |
28 |
+++ b/dev-java/commons-logging/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
DIST commons-logging-1.2-src.tar.gz 188536 BLAKE2B 80613b78619f7b3429f60df4fb9b66dd4836e8b89fcf93a3a1bcd5cb7e410d474be010da16b325143e028a40ff4dd971753962c9d9145f85b1738f5dda13ba99 SHA512 9f3761184950f2f13e85d8bc447709ab8be631dfd231b4f053f8147468db1bf71fb116ddba95e39f4afc4cf28c742e07d40c7a637f28004a60dc13935f9609f9 |
31 |
+DIST commons-logging-1.3.0_pre20230317.tar.gz 184981 BLAKE2B 00d171a8345907dc2686d1eff1130b7fd1ef653c8f2a7c6b5e45e6522f3d195ba695d93371add97a2d459451e3757ef9ec21f483f0cd37a6bcbb98e76e1b446f SHA512 737058214bfa86c11c2d7b450132a15824652c80ffae6208c3a8fc2386e7b2c7c61b39fd2b75008373f611e4bbed26e851f98f910d3e6f33df4f85f35c0a5462 |
32 |
|
33 |
diff --git a/dev-java/commons-logging/commons-logging-1.3.0_pre20230317.ebuild b/dev-java/commons-logging/commons-logging-1.3.0_pre20230317.ebuild |
34 |
new file mode 100644 |
35 |
index 000000000000..3fb433092d18 |
36 |
--- /dev/null |
37 |
+++ b/dev-java/commons-logging/commons-logging-1.3.0_pre20230317.ebuild |
38 |
@@ -0,0 +1,102 @@ |
39 |
+# Copyright 1999-2023 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=8 |
43 |
+ |
44 |
+JAVA_PKG_IUSE="doc source test" |
45 |
+MAVEN_ID="commons-logging:commons-logging:1.3.0" |
46 |
+# Not yet supported, see https://bugs.gentoo.org/839681 |
47 |
+# JAVA_TESTING_FRAMEWORKS="junit-vintage" |
48 |
+ |
49 |
+inherit java-pkg-2 java-pkg-simple |
50 |
+ |
51 |
+DESCRIPTION="Thin adapter allowing configurable bridging to other well known logging systems" |
52 |
+HOMEPAGE="https://commons.apache.org/proper/commons-logging/" |
53 |
+MY_COMMIT="058cf5ee350cd83d1ab28b000ad6be903ca160c5" |
54 |
+SRC_URI="https://github.com/apache/${PN}/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" |
55 |
+S="${WORKDIR}/${PN}-${MY_COMMIT}" |
56 |
+ |
57 |
+LICENSE="Apache-2.0" |
58 |
+SLOT="0" |
59 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
60 |
+IUSE="log4j" |
61 |
+ |
62 |
+CDEPEND=" |
63 |
+ log4j? ( |
64 |
+ dev-java/log4j-12-api:2 |
65 |
+ dev-java/log4j-api:2 |
66 |
+ dev-java/log4j-core:2 |
67 |
+ ) |
68 |
+" |
69 |
+ |
70 |
+DEPEND="${CDEPEND} |
71 |
+ dev-java/javax-servlet-api:2.5 |
72 |
+ >=virtual/jdk-1.8:* |
73 |
+" |
74 |
+ |
75 |
+RDEPEND="${CDEPEND} |
76 |
+ >=virtual/jre-1.8:*" |
77 |
+ |
78 |
+DOCS=( README.md src/changes/changes.xml ) |
79 |
+ |
80 |
+JAVA_AUTOMATIC_MODULE_NAME="org.apache.commons.logging" |
81 |
+JAVA_ENCODING="iso-8859-1" |
82 |
+JAVA_CLASSPATH_EXTRA="javax-servlet-api-2.5" |
83 |
+JAVA_SRC_DIR="src/main/java" |
84 |
+ |
85 |
+src_prepare() { |
86 |
+ java-pkg-2_src_prepare |
87 |
+ # https://avalon.apache.org/closed.html Apache Avalon has closed. |
88 |
+ rm src/main/java/org/apache/commons/logging/impl/{Avalon,LogKit}Logger.java || die |
89 |
+ rm src/test/java/org/apache/commons/logging/{avalon/AvalonLogger,logkit/Standard}TestCase.java || die |
90 |
+ |
91 |
+ if use !log4j; then |
92 |
+ rm src/main/java/org/apache/commons/logging/impl/Log4JLogger.java || die |
93 |
+ rm -r src/test/java/org/apache/commons/logging/log4j || die |
94 |
+ fi |
95 |
+} |
96 |
+ |
97 |
+src_compile() { |
98 |
+ if use log4j; then |
99 |
+ JAVA_GENTOO_CLASSPATH="log4j-12-api-2,log4j-api-2,log4j-core-2" |
100 |
+ fi |
101 |
+ java-pkg-simple_src_compile |
102 |
+ |
103 |
+ pushd target/classes > /dev/null || die |
104 |
+ |
105 |
+ # Need Automatic-Module-Name also for the other JAR files |
106 |
+ jar xvf ../../commons-logging.jar META-INF/MANIFEST.MF || die |
107 |
+ |
108 |
+ # https://github.com/apache/commons-logging/blob/058cf5ee350cd83d1ab28b000ad6be903ca160c5/pom.xml#L215-L236 |
109 |
+ jar -cvfm ../../commons-logging-api.jar META-INF/MANIFEST.MF \ |
110 |
+ $(find . -type f -name '*.class' \ |
111 |
+ ! -name 'Jdk13LumberjackLogger.class' \ |
112 |
+ ! -name 'ServletContextCleaner.class' \ |
113 |
+ ) || die |
114 |
+ |
115 |
+ # https://github.com/apache/commons-logging/blob/058cf5ee350cd83d1ab28b000ad6be903ca160c5/pom.xml#L240-L257 |
116 |
+ jar -cvfm ../../commons-logging-adapters.jar META-INF/MANIFEST.MF \ |
117 |
+ $(find . -type f -path './org/apache/commons/logging/impl/**.class' \ |
118 |
+ ! -name 'WeakHashtable*.class' \ |
119 |
+ ! -name 'LogFactoryImpl*.class' \ |
120 |
+ ) || die |
121 |
+ |
122 |
+ popd > /dev/null || die |
123 |
+} |
124 |
+ |
125 |
+# https://github.com/apache/commons-logging/blob/058cf5ee350cd83d1ab28b000ad6be903ca160c5/pom.xml#L396-L407 |
126 |
+# src_test() { |
127 |
+# JAVA_TEST_EXTRA_ARGS=( |
128 |
+# -Dtestclasses="commons-logging-tests.jar" |
129 |
+# -Dcommons-logging="commons-logging.jar" |
130 |
+# -Dcommons-logging-api="commons-logging-api.jar" |
131 |
+# -Dcommons-logging-adapters="commons-logging-adapters.jar" |
132 |
+# ) |
133 |
+# JAVA_TEST_RESOURCE_DIRS="src/test/resources" |
134 |
+# JAVA_TEST_SRC_DIR="src/test/java" |
135 |
+# if use log4j; then |
136 |
+# JAVA_TEST_EXTRA_ARGS+=" -Dlog4j12=$(java-pkg_getjars log4j-12-api-2,log4j-core-2)" |
137 |
+# fi |
138 |
+# JAVA_TEST_EXTRA_ARGS+=" -Dservlet-api=$(java-pkg_getjars javax-servlet-api-2.5)" |
139 |
+# java-pkg-simple_src_test |
140 |
+# } |
141 |
|
142 |
diff --git a/dev-java/commons-logging/metadata.xml b/dev-java/commons-logging/metadata.xml |
143 |
index 929f4e61cf4e..c3b68538712d 100644 |
144 |
--- a/dev-java/commons-logging/metadata.xml |
145 |
+++ b/dev-java/commons-logging/metadata.xml |
146 |
@@ -1,14 +1,21 @@ |
147 |
<?xml version="1.0" encoding="UTF-8"?> |
148 |
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
149 |
<pkgmetadata> |
150 |
- <maintainer type="project"> |
151 |
- <email>java@g.o</email> |
152 |
- <name>Java</name> |
153 |
- </maintainer> |
154 |
- <use> |
155 |
- <flag name="avalon-framework">Add optional support for avalon-framework</flag> |
156 |
- <flag name="avalon-logkit">Add optional support for avalon-logkit</flag> |
157 |
- <flag name="log4j">Add optional support for log4j</flag> |
158 |
- <flag name="servletapi">Add optional support for servletapi</flag> |
159 |
- </use> |
160 |
+ <maintainer type="project"> |
161 |
+ <email>java@g.o</email> |
162 |
+ <name>Java</name> |
163 |
+ </maintainer> |
164 |
+ <upstream> |
165 |
+ <bugs-to>https://issues.apache.org/jira/projects/LOGGING/issues/</bugs-to> |
166 |
+ <remote-id type="github">apache/commons-logging</remote-id> |
167 |
+ </upstream> |
168 |
+ <use> |
169 |
+ <flag name="avalon-framework">Add optional support for avalon-framework</flag> |
170 |
+ <flag name="avalon-logkit">Add optional support for avalon-logkit</flag> |
171 |
+ <flag name="log4j">Add optional support for log4j</flag> |
172 |
+ <flag name="servletapi">Add optional support for servletapi</flag> |
173 |
+ </use> |
174 |
+ <longdescription> |
175 |
+ Apache Commons Logging is a thin adapter allowing configurable bridging to other, well known logging systems. |
176 |
+ </longdescription> |
177 |
</pkgmetadata> |