diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-10-20 10:22:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-10-20 10:22:14 +0100 |
commit | 46eedbedafdb0040c37884982d4c775ce277fb7b (patch) | |
tree | db33a91259730be84999e13a8d8168c799f50ac0 /dev-java/commons-compress | |
parent | e23a08d0c97a0cc415aaa165da840b056f93c997 (diff) |
gentoo resync : 20.10.2021
Diffstat (limited to 'dev-java/commons-compress')
-rw-r--r-- | dev-java/commons-compress/Manifest | 3 | ||||
-rw-r--r-- | dev-java/commons-compress/commons-compress-1.21.ebuild | 73 | ||||
-rw-r--r-- | dev-java/commons-compress/files/commons-compress-1.21-asm7+.patch | 164 |
3 files changed, 240 insertions, 0 deletions
diff --git a/dev-java/commons-compress/Manifest b/dev-java/commons-compress/Manifest index 2e58076856c7..db695a09abb8 100644 --- a/dev-java/commons-compress/Manifest +++ b/dev-java/commons-compress/Manifest @@ -1,3 +1,6 @@ +AUX commons-compress-1.21-asm7+.patch 7037 BLAKE2B 49270e040492c413fb9f26ce81dde2e7594a02b48d4dfd68bfe977eefc9d41e21e585d1a0d2e56803d08d1af617f8c2d0e3f3d3b0cffa893bfc8d2d3c50b6d9d SHA512 6722a9fb119d72c7061d12b94452fac40eef63be7610eee81ddc115c346610e5e4caca0cbf659ec9e7ff1a58f9def4ebfef26476b915bc74299a1f984d2eb29c 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 EBUILD commons-compress-1.20.ebuild 1080 BLAKE2B 7f8ec8fd6bc9dd45e53cf4766a419bb2f74c9d3aad7de3641bdbc0c86cc67719e592dfb64583bc0a3df51f3b2b37264eade555133c4cf249a38b10a02bff6053 SHA512 a8f6cff1e9332f5ff83e58f01a6900dd81dcf51e190cc447fb92b0fd02f31583278b5d70aaa50ba114b4c04cffbce8af7d08db3ab2c0da7aacfe1fa1df628e00 +EBUILD commons-compress-1.21.ebuild 2361 BLAKE2B 84c3980c685abf58728d1b5e1c6ccc40780e16cb6237164751705c89bac091c7db69193025b831f624fcfa58c83b1a9a7762adca9b3a6a515ef8ec47af2a3844 SHA512 3c081300aad69e4b5e0cbc2cd8a318ef4b0826bbda4c275d637223b30919dec18122ba7138700a7681b2a51c429613f8814a694d405388834420d2ff52490333 MISC metadata.xml 233 BLAKE2B 2b385ca77219f08b2874b3a4a91a0c836d3cb45ec44b05babb33d590c56ceb5337ecb93a8450a37f8e6bbf4cfc1455892e8142d22e0a1d527d40361e2dce350b SHA512 1acc975a7dc3344bc63282d652ca00d8245970b58353b4fd00f09a4859db3eaba2dcd85e1537d424b7174e4f9c01c2ffb10ec6d107b5c895c9ca20730666de7f 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 |