From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-java/jboss-logging/Manifest | 7 + .../files/jboss-logging-3.1.4-MDC.patch | 152 ++++++++++++++++ .../files/jboss-logging-3.1.4-build.xml | 202 +++++++++++++++++++++ dev-java/jboss-logging/jboss-logging-3.1.4.ebuild | 51 ++++++ dev-java/jboss-logging/metadata.xml | 11 ++ 5 files changed, 423 insertions(+) create mode 100644 dev-java/jboss-logging/Manifest create mode 100644 dev-java/jboss-logging/files/jboss-logging-3.1.4-MDC.patch create mode 100644 dev-java/jboss-logging/files/jboss-logging-3.1.4-build.xml create mode 100644 dev-java/jboss-logging/jboss-logging-3.1.4.ebuild create mode 100644 dev-java/jboss-logging/metadata.xml (limited to 'dev-java/jboss-logging') diff --git a/dev-java/jboss-logging/Manifest b/dev-java/jboss-logging/Manifest new file mode 100644 index 000000000000..b936cfa94a38 --- /dev/null +++ b/dev-java/jboss-logging/Manifest @@ -0,0 +1,7 @@ +AUX jboss-logging-3.1.4-MDC.patch 5607 SHA256 670a30cef4ffe45f3ad2a1dee902a49b917c6e3333750e5fbd8dc362e3b026e9 SHA512 74ece235664dc49db51e4026902a67773e87655edd1879137da0b0d1cb0fefe20c4e67e3ba0625214d6c85b7f036e07732d07c842947bf312a2ed505c05ab535 WHIRLPOOL 6ea8aa9a9c6cd34247a17ed6048f615918bff24c70144064dea4221913044aad771a10ccf0f6dd6555c57277309c219c431fa85b83b0a459faef4097e6ada1f0 +AUX jboss-logging-3.1.4-build.xml 9295 SHA256 1668c26371950c3a699eeb500717676a904c9168763dedb732dfd0fd871a9cf7 SHA512 a4d1a44ee69d48686ff9d4d32540c74ea3dd0b8198f8bd04e5cf1572db5ae596bdf95bc0bd091cb19dc00b248f5f1a41f4f51271be9bb27be72420cc425d2a14 WHIRLPOOL 7cc82140bc1076d181660fbcaaa394d7458a86121cfc207035638b326b9b53ab7e97c453eeaeec96289faefb6e4f25aa490d6b17ec23c2099e40b7113d21c3e3 +DIST jboss-logging-3.1.4.tar.gz 25018 SHA256 805053336b77c4c62e89a920ef9b80cfc6577964fcdcadb7c3ab43b017e1c734 SHA512 633b18b079089444a5f7406a6a2b29100abd2c752306ada4fda0c15f07a60a363d67616e2521ec079f1df37ecdadcbb46e26819a9f5647e3d1a18219c494b73a WHIRLPOOL b60657d39425309c7917a9019b957d83898462c142bdfd95fe5ba1d8c91cb6b0d119515810747f68db15623d389f955c8a1adaafbebb58860570ad9994bffb14 +EBUILD jboss-logging-3.1.4.ebuild 1357 SHA256 580e8bac26c0512e2f2f760890f1745854f5ea2c79eaba2d8ba1a0034f2b0518 SHA512 3052c73492bb17b1032f5805b1d298b0b4d38b13f361a91bd6cb3969030263529aed262a7030ec99a437c888a976130db4f8321721fe81318fd5b4168fb6eede WHIRLPOOL 36a35cd6d3e1b6e39445de126d4e140ca61a27cc486998e961556feea896743402f4727c26f72b3aa9537182586bc10c0cc89ba6ac6ebebffd97af084ba46997 +MISC ChangeLog 3102 SHA256 ae253c28bd3c3ddb34de52a2d6882d3f9a1c76d2dde5e8a8bffc55241069a49d SHA512 90ae4805f76c157bfb841433321b607b5c6cb6cb269385a994705184acfc156f4c09132661cd3965037b99039b6c029e3823401f86eca8f18b6ba34b4a4ceef5 WHIRLPOOL 0328a2bf135c846976babd2a9af56e439c08881d23a92907768ee3a03f41c54c9c0c31826a192a963d283c57eff096b1cb343066c541f06b0ca8caa7ac875e38 +MISC ChangeLog-2015 1712 SHA256 9800e58fe7798bc220e8531d931ae1dd2610bc79814f0015a8949a3ee0278104 SHA512 44fb4b1f4725fe81a59573dfa11b723a9d8f81f042786988a11d41978eeaa5de098b1c2c5c0827aadcb29724e2af35c7b9ef19e4a46b1405cf3a7b9bf3551b28 WHIRLPOOL 8812b0553a2eccff3cde548d958c711dde2025af576e00354d42eddb5f8c6f3575ce64fd64aeae5a0dd17685386e4094f160fcc6a7d72c294629d5185f9cbde8 +MISC metadata.xml 328 SHA256 21904c2023a93150188c1bf4706a7df98441edb58ba714f9ae06953b65939fbe SHA512 acbf51ab138d93d7b6d137542047e019fd30e7230ba9e0ecabfac72faa1ebea3419fd8531ab9f1304ca1d735bf2082994ac4ab57e87e6febcf30588d4a0f91da WHIRLPOOL 9ade9a5ee9edf943d48092b023b251fe9c040a5505678ab58ba587eef4ac492b49a6114d9fe400d721be27c1624424efcb5098f2a848162557427a674df2b561 diff --git a/dev-java/jboss-logging/files/jboss-logging-3.1.4-MDC.patch b/dev-java/jboss-logging/files/jboss-logging-3.1.4-MDC.patch new file mode 100644 index 000000000000..e8a3a50a41fd --- /dev/null +++ b/dev-java/jboss-logging/files/jboss-logging-3.1.4-MDC.patch @@ -0,0 +1,152 @@ +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/AbstractMdcLoggerProvider.java.orig 2015-05-17 20:55:35.000000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/AbstractMdcLoggerProvider.java 2015-05-17 20:58:00.000000000 +0000 +@@ -23,27 +23,27 @@ + + abstract class AbstractMdcLoggerProvider extends AbstractLoggerProvider { + +- private final ThreadLocal> mdcMap = new ThreadLocal>(); ++ private final ThreadLocal> mdcMap = new ThreadLocal>(); + + public Object getMdc(String key) { + return mdcMap.get() == null ? null : mdcMap.get().get(key); + } + +- public Map getMdcMap() { ++ public Map getMdcMap() { + return mdcMap.get(); + } + +- public Object putMdc(String key, Object value) { +- Map map = mdcMap.get(); ++ public Object putMdc(String key, String value) { ++ Map map = mdcMap.get(); + if (map == null) { +- map = new HashMap(); ++ map = new HashMap(); + mdcMap.set(map); + } + return map.put(key, value); + } + + public void removeMdc(String key) { +- Map map = mdcMap.get(); ++ Map map = mdcMap.get(); + if (map == null) + return; + map.remove(key); +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/Log4jLoggerProvider.java.orig 2015-05-17 20:16:57.000000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/Log4jLoggerProvider.java 2015-05-17 21:21:25.157000000 +0000 +@@ -34,11 +34,11 @@ + } + + @SuppressWarnings("unchecked") +- public Map getMdcMap() { ++ public Map getMdcMap() { + return MDC.getContext(); + } + +- public Object putMdc(String key, Object val) { ++ public Object putMdc(String key, String val) { + try { + return MDC.get(key); + } finally { +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/Slf4jLoggerProvider.java.orig 2015-05-17 20:44:24.000000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/Slf4jLoggerProvider.java 2015-05-17 21:22:05.205000000 +0000 +@@ -33,14 +33,14 @@ + return new Slf4jLogger(name, l); + } + +- public Object putMdc(final String key, final Object value) { ++ public Object putMdc(final String key, final String value) { + try { + return MDC.get(key); + } finally { + if (value == null) { + MDC.remove(key); + } else { +- MDC.put(key, String.valueOf(value)); ++ MDC.put(key, value); + } + } + } +@@ -54,7 +54,7 @@ + } + + @SuppressWarnings({ "unchecked" }) +- public Map getMdcMap() { ++ public Map getMdcMap() { + return MDC.getCopyOfContextMap(); + } + } +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/JDKLoggerProvider.java.orig 2015-05-17 21:19:12.964000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/JDKLoggerProvider.java 2015-05-17 21:22:41.639000000 +0000 +@@ -23,4 +23,9 @@ + public Logger getLogger(final String name) { + return new JDKLogger(name); + } ++ ++ @Override ++ public Object putMdc(String key, String value) { ++ return null; ++ } + } +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/JBossLogManagerProvider.java.orig 2015-05-17 20:15:41.000000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/JBossLogManagerProvider.java 2015-05-17 21:20:42.844000000 +0000 +@@ -59,8 +59,8 @@ + } + } + +- public Object putMdc(final String key, final Object value) { +- return MDC.put(key, String.valueOf(value)); ++ public Object putMdc(final String key, final String value) { ++ return MDC.put(key, value); + } + + public Object getMdc(final String key) { +@@ -72,7 +72,7 @@ + } + + @SuppressWarnings({ "unchecked" }) +- public Map getMdcMap() { ++ public Map getMdcMap() { + // we can re-define the erasure of this map because MDC does not make further use of the copy + return (Map)MDC.copy(); + } +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/MDC.java.orig 2015-05-17 19:12:40.000000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/MDC.java 2015-05-17 21:22:27.689000000 +0000 +@@ -25,7 +25,7 @@ + private MDC() { + } + +- public static Object put(String key, Object val) { ++ public static Object put(String key, String val) { + return LoggerProviders.PROVIDER.putMdc(key, val); + } + +@@ -37,7 +37,7 @@ + LoggerProviders.PROVIDER.removeMdc(key); + } + +- public static Map getMap() { ++ public static Map getMap() { + return LoggerProviders.PROVIDER.getMdcMap(); + } + } +--- jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/LoggerProvider.java.orig 2015-05-17 19:06:30.000000000 +0000 ++++ jboss-logging-3.1.4.GA/src/main/java/org/jboss/logging/LoggerProvider.java 2015-05-17 21:21:43.083000000 +0000 +@@ -23,13 +23,13 @@ + public interface LoggerProvider { + Logger getLogger(String name); + +- Object putMdc(String key, Object value); ++ Object putMdc(String key, String value); + + Object getMdc(String key); + + void removeMdc(String key); + +- Map getMdcMap(); ++ Map getMdcMap(); + + void clearNdc(); + diff --git a/dev-java/jboss-logging/files/jboss-logging-3.1.4-build.xml b/dev-java/jboss-logging/files/jboss-logging-3.1.4-build.xml new file mode 100644 index 000000000000..35bbf84f9c39 --- /dev/null +++ b/dev-java/jboss-logging/files/jboss-logging-3.1.4-build.xml @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + <![CDATA[JBoss Logging 3.1.4.GA]]> +
<![CDATA[JBoss Logging 3.1.4.GA]]>
+
<![CDATA[JBoss Logging 3.1.4.GA]]>
+ <![CDATA[<i>Copyright &#169; 2012 Red Hat, Inc.</i>]]> + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/dev-java/jboss-logging/jboss-logging-3.1.4.ebuild b/dev-java/jboss-logging/jboss-logging-3.1.4.ebuild new file mode 100644 index 000000000000..9beb6d61f3e8 --- /dev/null +++ b/dev-java/jboss-logging/jboss-logging-3.1.4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="JBoss logging framework" +HOMEPAGE="http://www.jboss.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.GA.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" + +COMMON_DEPEND="dev-java/jboss-logmanager:0 + >=dev-java/slf4j-api-1.7.7 + dev-java/log4j:0" + +RDEPEND=">=virtual/jre-1.6 + ${COMMON_DEPEND}" + +DEPEND=">=virtual/jdk-1.6 + ${COMMON_DEPEND}" + +S="${WORKDIR}/${P}.GA/" + +EANT_GENTOO_CLASSPATH="jboss-logmanager,slf4j-api,log4j" +JAVA_ANT_REWRITE_CLASSPATH="true" + +java_prepare() { + cp "${FILESDIR}"/${P}-build.xml build.xml || die + + # https://github.com/qos-ch/slf4j/blob/master/slf4j-api/src/main/java/org/slf4j/MDC.java#L226 + # MDC returns a Map + # https://github.com/jboss-logging/jboss-logging/blob/master/src/main/java/org/jboss/logging/Slf4jLoggerProvider.java#L57 + # Yet, for some reason, the JBoss folks have decided that it should return a Map :| + # This patch mends this mistake. + epatch "${FILESDIR}"/"${P}"-MDC.patch +} + +src_install() { + java-pkg_newjar target/${PN}-3.1.4.GA.jar + + if use doc; then + java-pkg_dojavadoc target/site/apidocs + fi + use source && java-pkg_dosrc src/main/java/org +} diff --git a/dev-java/jboss-logging/metadata.xml b/dev-java/jboss-logging/metadata.xml new file mode 100644 index 000000000000..75c29510cedb --- /dev/null +++ b/dev-java/jboss-logging/metadata.xml @@ -0,0 +1,11 @@ + + + + + java@gentoo.org + Java + + + jboss-logging/jboss-logging + + -- cgit v1.2.3