summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-10-12 08:51:38 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-10-12 08:51:48 +0200
commit67f37a4652c157fd4e616cbb052f725d84dd3315 (patch)
tree4465870b4dae7ed3b0bc5700316817723b29968d /dev-java
parentdev-python/pooch: Bump to 1.5.2 (diff)
downloadgentoo-67f37a4652c157fd4e616cbb052f725d84dd3315.tar.gz
gentoo-67f37a4652c157fd4e616cbb052f725d84dd3315.tar.bz2
gentoo-67f37a4652c157fd4e616cbb052f725d84dd3315.zip
dev-java/commons-compress: bump to 1.21
Bug: https://bugs.gentoo.org/802078 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/commons-compress/Manifest1
-rw-r--r--dev-java/commons-compress/commons-compress-1.21.ebuild73
-rw-r--r--dev-java/commons-compress/files/commons-compress-1.21-asm7+.patch164
3 files changed, 238 insertions, 0 deletions
diff --git a/dev-java/commons-compress/Manifest b/dev-java/commons-compress/Manifest
index 9ce212e7e1ba..5de04003112c 100644
--- a/dev-java/commons-compress/Manifest
+++ b/dev-java/commons-compress/Manifest
@@ -1 +1,2 @@
DIST commons-compress-1.20-sources.tar.gz 12990994 BLAKE2B 5709419bc7b54ac9eee4ee9a42f2ecef9ae7ed0d4b1a91e0b79c791f4cf018aed8bff4ce507d1ef9136fdc28bd550d234632d0bb9ebe7819b57c5ce99694adb6 SHA512 1794bae69e00339d9e4d35b3276543ff6f9a0f1614ec9bd7c4ec8ff1bc86d08cd48e9dc3ec712b969cf8ccd61ef6054d0c6203d7cba0c28b22e6a3ecccd0c43e
+DIST commons-compress-1.21-sources.tar.gz 15165800 BLAKE2B 3fed32af039860c6b434c485f0c78939ed810a224a12680ddf1d9d6ed540f4e74530edd0e0077fd41af31404c296a607db912465cfd725c31446bc6fa7b8df8a SHA512 8041371b491057435ca62390e70b30031e4d21e80c37d9cb922fdffa794b56aee3b5d60d8241e4db0cecc28c82dfdaafbe52b2175e26062da169fec8efbb17e1
diff --git a/dev-java/commons-compress/commons-compress-1.21.ebuild b/dev-java/commons-compress/commons-compress-1.21.ebuild
new file mode 100644
index 000000000000..3d5ac30baec0
--- /dev/null
+++ b/dev-java/commons-compress/commons-compress-1.21.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://apache.miloslavbrada.cz//commons/compress/source/commons-compress-1.21-src.tar.gz --slot 0 --keywords "~amd64 ~arm64 ~x86" --ebuild commons-compress-1.21.ebuild
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source"
+MAVEN_ID="org.apache.commons:commons-compress:1.21"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Java API for working with archive files"
+HOMEPAGE="https://commons.apache.org/proper/commons-compress/"
+SRC_URI="mirror://apache/commons/compress/source/${P}-src.tar.gz -> ${P}-sources.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+# Common dependencies
+# POM: pom.xml
+# asm:asm:3.2 -> !!!groupId-not-found!!!
+# com.github.luben:zstd-jni:1.5.0-2 -> >=dev-java/zstd-jni-1.5.0.4:0
+# org.brotli:dec:0.1.2 -> >=dev-java/brotli-dec-0.1.2:0
+# org.tukaani:xz:1.9 -> >=dev-java/xz-java-1.9:0
+
+CDEPEND="
+ dev-java/asm:9
+ >=dev-java/brotli-dec-0.1.2:0
+ >=dev-java/xz-java-1.9:0
+ >=dev-java/zstd-jni-1.5.0.4:0
+"
+
+# Compile dependencies
+# POM: pom.xml
+# org.osgi:org.osgi.core:6.0.0 -> !!!artifactId-not-found!!!
+# POM: pom.xml
+# test? com.github.marschall:memoryfilesystem:2.1.0 -> !!!groupId-not-found!!!
+# test? javax.inject:javax.inject:1 -> !!!groupId-not-found!!!
+# test? junit:junit:4.13.2 -> >=dev-java/junit-4.13.2:4
+# test? org.apache.felix:org.apache.felix.framework:7.0.0 -> !!!groupId-not-found!!!
+# test? org.hamcrest:hamcrest:2.2 -> !!!artifactId-not-found!!!
+# test? org.mockito:mockito-core:3.11.1 -> !!!suitable-mavenVersion-not-found!!!
+# test? org.ops4j.pax.exam:pax-exam-cm:4.13.1 -> !!!groupId-not-found!!!
+# test? org.ops4j.pax.exam:pax-exam-container-native:4.13.1 -> !!!groupId-not-found!!!
+# test? org.ops4j.pax.exam:pax-exam-junit4:4.13.1 -> !!!groupId-not-found!!!
+# test? org.ops4j.pax.exam:pax-exam-link-mvn:4.13.1 -> !!!groupId-not-found!!!
+# test? org.slf4j:slf4j-api:1.7.30 -> >=dev-java/slf4j-api-1.7.30:0
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ ${CDEPEND}
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CDEPEND}"
+
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}/${P}-asm7+.patch"
+)
+
+JAVA_ENCODING="iso-8859-1"
+
+JAVA_GENTOO_CLASSPATH="asm-9,zstd-jni,brotli-dec,xz-java"
+JAVA_SRC_DIR="src/main/java"
+
+src_prepare() {
+ default
+}
diff --git a/dev-java/commons-compress/files/commons-compress-1.21-asm7+.patch b/dev-java/commons-compress/files/commons-compress-1.21-asm7+.patch
new file mode 100644
index 000000000000..e20fa89787dc
--- /dev/null
+++ b/dev-java/commons-compress/files/commons-compress-1.21-asm7+.patch
@@ -0,0 +1,164 @@
+From 7709c8be97147e8d5c5d7fa42d076504931ba9e0 Mon Sep 17 00:00:00 2001
+From: Stephan Blecher <token_github@blecher.at>
+Date: Tue, 10 Aug 2021 14:39:21 +0200
+Subject: [PATCH] COMPRESS-582: update harmony to ASM >= 7.0
+
+---
+ pom.xml | 5 +--
+ .../harmony/pack200/Pack200ClassReader.java | 2 +-
+ .../compress/harmony/pack200/Segment.java | 35 +++++++++++++++----
+ .../harmony/pack200/tests/ArchiveTest.java | 0
+ 4 files changed, 32 insertions(+), 10 deletions(-)
+ mode change 100644 => 100755 src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java
+
+diff --git a/pom.xml b/pom.xml
+index 28f50f06a..1c6844d24 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -78,6 +78,7 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj.
+ <commons.jacoco.version>0.8.7</commons.jacoco.version>
+ <commons.japicmp.version>0.15.3</commons.japicmp.version>
+ <commons.javadoc.version>3.3.0</commons.javadoc.version>
++ <asm.version>7.0</asm.version>
+ </properties>
+
+ <issueManagement>
+@@ -119,9 +120,9 @@ Brotli, Zstandard and ar, cpio, jar, tar, zip, dump, 7z, arj.
+
+ <!-- Pack200 -->
+ <dependency>
+- <groupId>asm</groupId>
++ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+- <version>3.2</version>
++ <version>${asm.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+diff --git a/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200ClassReader.java b/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200ClassReader.java
+index 2a017bc01..7022b7b30 100644
+--- a/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200ClassReader.java
++++ b/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200ClassReader.java
+@@ -40,7 +40,7 @@ public int readUnsignedShort(final int index) {
+ // Doing this to check whether last load-constant instruction was ldc (18) or ldc_w (19)
+ // TODO: Assess whether this impacts on performance
+ final int unsignedShort = super.readUnsignedShort(index);
+- if (b[index - 1] == 19) {
++ if (index > 0 && b[index - 1] == 19) {
+ lastUnsignedShort = unsignedShort;
+ } else {
+ lastUnsignedShort = Short.MIN_VALUE;
+diff --git a/src/main/java/org/apache/commons/compress/harmony/pack200/Segment.java b/src/main/java/org/apache/commons/compress/harmony/pack200/Segment.java
+index 0609aa4c2..1bc73a018 100644
+--- a/src/main/java/org/apache/commons/compress/harmony/pack200/Segment.java
++++ b/src/main/java/org/apache/commons/compress/harmony/pack200/Segment.java
+@@ -32,12 +32,20 @@
+ import org.objectweb.asm.FieldVisitor;
+ import org.objectweb.asm.Label;
+ import org.objectweb.asm.MethodVisitor;
++import org.objectweb.asm.Opcodes;
+ import org.objectweb.asm.Type;
+
++
+ /**
+ * A Pack200 archive consists of one or more Segments.
+ */
+-public class Segment implements ClassVisitor {
++public class Segment extends ClassVisitor {
++
++ public static int ASM_API = Opcodes.ASM4; /* see https://asm.ow2.io/javadoc/org/objectweb/asm/Opcodes.html#ASM4 */
++
++ public Segment() {
++ super(ASM_API);
++ }
+
+ private SegmentHeader segmentHeader;
+ private CpBands cpBands;
+@@ -255,8 +263,12 @@ public void visitEnd() {
+ *
+ * It delegates to BcBands for bytecode related visits and to ClassBands for everything else.
+ */
+- public class SegmentMethodVisitor implements MethodVisitor {
+-
++ public class SegmentMethodVisitor extends MethodVisitor {
++
++ public SegmentMethodVisitor() {
++ super(ASM_API);
++ }
++
+ @Override
+ public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
+ return new SegmentAnnotationVisitor(MetadataBandGroup.CONTEXT_METHOD, desc, visible);
+@@ -427,7 +439,7 @@ public ClassBands getClassBands() {
+ /**
+ * SegmentAnnotationVisitor implements <code>AnnotationVisitor</code> to visit Annotations found in a class file.
+ */
+- public class SegmentAnnotationVisitor implements AnnotationVisitor {
++ public class SegmentAnnotationVisitor extends AnnotationVisitor {
+
+ private int context = -1;
+ private int parameter = -1;
+@@ -443,17 +455,20 @@ public ClassBands getClassBands() {
+ private final List nestPairN = new ArrayList();
+
+ public SegmentAnnotationVisitor(final int context, final String desc, final boolean visible) {
++ super(ASM_API);
+ this.context = context;
+ this.desc = desc;
+ this.visible = visible;
+ }
+
+ public SegmentAnnotationVisitor(final int context) {
++ super(ASM_API);
+ this.context = context;
+ }
+
+ public SegmentAnnotationVisitor(final int context, final int parameter, final String desc,
+ final boolean visible) {
++ super(ASM_API);
+ this.context = context;
+ this.parameter = parameter;
+ this.desc = desc;
+@@ -478,7 +493,7 @@ public AnnotationVisitor visitAnnotation(String name, final String desc) {
+ nameRU.add(name);
+ nestTypeRS.add(desc);
+ nestPairN.add(Integer.valueOf(0));
+- return new AnnotationVisitor() {
++ return new AnnotationVisitor(context, av) {
+ @Override
+ public void visit(final String name, final Object value) {
+ final Integer numPairs = (Integer) nestPairN.remove(nestPairN.size() - 1);
+@@ -552,7 +567,7 @@ public void visitEnum(String name, final String desc, final String value) {
+ }
+ }
+
+- public class ArrayVisitor implements AnnotationVisitor {
++ public class ArrayVisitor extends AnnotationVisitor {
+
+ private final int indexInCaseArrayN;
+ private final List caseArrayN;
+@@ -561,6 +576,8 @@ public void visitEnum(String name, final String desc, final String value) {
+ private final List T;
+
+ public ArrayVisitor(final List caseArrayN, final List T, final List nameRU, final List values) {
++ super(ASM_API);
++
+ this.caseArrayN = caseArrayN;
+ this.T = T;
+ this.nameRU = nameRU;
+@@ -612,7 +629,11 @@ public void visitEnum(final String name, final String desc, final String value)
+ * SegmentFieldVisitor implements <code>FieldVisitor</code> to visit the metadata relating to fields in a class
+ * file.
+ */
+- public class SegmentFieldVisitor implements FieldVisitor {
++ public class SegmentFieldVisitor extends FieldVisitor {
++
++ public SegmentFieldVisitor() {
++ super(ASM_API);
++ }
+
+ @Override
+ public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
+diff --git a/src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java b/src/test/java/org/apache/commons/compress/harmony/pack200/tests/ArchiveTest.java
+old mode 100644
+new mode 100755