summaryrefslogtreecommitdiff
path: root/dev-java/snappy-java
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-27 01:25:47 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-27 01:25:47 +0100
commitabc3bfc07d931f667a0f50cf607f1c8a49af879f (patch)
treee1955376c90c745c2b110a9abf62eb2d5c209a2b /dev-java/snappy-java
parent21dea977c89ba487b57c7856a4924950e667f209 (diff)
gentoo auto-resync : 27:09:2024 - 01:25:47
Diffstat (limited to 'dev-java/snappy-java')
-rw-r--r--dev-java/snappy-java/Manifest12
-rw-r--r--dev-java/snappy-java/files/1.1.7.8-gentoo.patch28
-rw-r--r--dev-java/snappy-java/files/1.1.7.8-java-version-target.patch47
-rw-r--r--dev-java/snappy-java/files/1.1.7.8-unbundle-bitshuffle.patch26
-rw-r--r--dev-java/snappy-java/files/snappy-1.1.10.1-commons-lang3.patch11
-rw-r--r--dev-java/snappy-java/files/snappy-1.1.10.1-unbundle-snappy.patch51
-rw-r--r--dev-java/snappy-java/files/snappy-1.1.10.5-SnappyOutputStreamTest.patch30
-rw-r--r--dev-java/snappy-java/metadata.xml11
-rw-r--r--dev-java/snappy-java/snappy-java-1.1.10.5-r2.ebuild125
-rw-r--r--dev-java/snappy-java/snappy-java-1.1.10.7.ebuild124
10 files changed, 465 insertions, 0 deletions
diff --git a/dev-java/snappy-java/Manifest b/dev-java/snappy-java/Manifest
new file mode 100644
index 000000000000..4219d9fdd75e
--- /dev/null
+++ b/dev-java/snappy-java/Manifest
@@ -0,0 +1,12 @@
+AUX 1.1.7.8-gentoo.patch 832 BLAKE2B 0e3a5061c0b410b7609ac49ec3b610ca7934c664398488020a15033fabf3c1576ee9900359948e69e2e86c54a56709f98b68482a75dff156a77874ffaa966674 SHA512 2a75eebf1851bebda7d6204c43503b6464416adff12cf5de5e35825fd6a9c43495419e886343cf3566f6ae437295eff2098aea0f17314a5c138011a3abf6f9b9
+AUX 1.1.7.8-java-version-target.patch 1875 BLAKE2B 6e2b66e642806acbf3de146fa853bb642764eb73ebb3489edd5208622f15fa9bc037bcb26447c4f45cfb362ce72910943b76dd8c1a6cf5f61fd4b05f6929a974 SHA512 5a60cc590dd10829487108c04c82a10b207fe95524f94163be967f557782537c0e19176a44782a1189f0e72e14dbd62a9c0f2f8415476d0fc133e040881a7d61
+AUX 1.1.7.8-unbundle-bitshuffle.patch 1006 BLAKE2B 99b88fd2af02ff6d95d90ec2e302593c7ae00691156b283e11425677f904847d2809ce91d7094de8a5ec759595e721bf0f80d3deadd56f0f05e8d4ae1d4c4613 SHA512 dd4877f023095f7d41e6d22213d1916ae17ec8a88977354d5e1662fa3e555f89bc27def9537cd6ffd07a75794c25719379189b14a0db481df1c2e729525b12f0
+AUX snappy-1.1.10.1-commons-lang3.patch 507 BLAKE2B 17a9219e4e9fbcf8900dff8ce06762262d5d40ac07861d895ba29da8a2583ce37c011b04892382359a86c79ffff77ceac36d0f8fcca420fc20011d3411f9078a SHA512 2c08bbf6fe408778233a1194df72182a5cf4083b8647f9baea740b9fb403f31e001e1671913992624465d2e7d7197142ea47cc4891d64124fc54ac95a9d9accb
+AUX snappy-1.1.10.1-unbundle-snappy.patch 1928 BLAKE2B cc67a38e53dcd08d208b33796a003d7ca73f79a54a8d0a4411de9f15aae1e09e079bc55c9230964e990f8a27e4be3872e9d5092fe7abb5af760ce91641b753c1 SHA512 78cef705a76c379ec7cc59e4f4c6012bbba5f54b4a24172b7ab2ef0ccd7a8e22cf3e469938c9dca5933e066990c3e973893c0c93368fecd90486010f9b8ad69f
+AUX snappy-1.1.10.5-SnappyOutputStreamTest.patch 1215 BLAKE2B 34005766546b28012ffbd86927b37d9368eab212b3fc2252492f2c49f7b639519cdf5bd197fb7dce3769108bab1175414f0b9287cf4893d41ad784e9f27ae8c0 SHA512 3c65030686fcdd1177c6865894510081ba41631db9c3945c52aeef921ccf049fa65083225af9f022a1537814e8a50de2ad0740292b9d6d8e8ee900176ff69267
+DIST hadoop-common-3.3.5.jar 4535144 BLAKE2B 66582661a1832cc54493fc9dcea9076eb0e3f4e974a7d24d593e8fff2b9e2a3a82ed6eb4587f23523473aecc35d2a15de2ad81b2617c1bdac50847149cdeb6a8 SHA512 f1fb439a5853b04e9e771ec4e80e1ed078494ecfaa741abe065936fc1c26b5369fdd4e8082f4da59c1a3a7a5c025beaa14a68c38dc772e81499f83a3cb91717b
+DIST snappy-java-1.1.10.5.tar.gz 3917442 BLAKE2B 0632fa7ba4d0a863801e88ced22098c3bc228c1f3e188c67cb9ff62807f9454b580b49fff15c7deee1e790db51f4664c50a6546259439eda18597097a5128329 SHA512 f84778f59635eb97c0072489766904a16208be4f41b28151b14eecd0fe84f3f04a44c18d452b9d79e752b22d5e5b9ab5b36064cc8aeec8de655d7635132093ea
+DIST snappy-java-1.1.10.7.tar.gz 3953515 BLAKE2B 40657085a25186b7c78024196406002a39afe26e97145f57a438d783fb512c0168b48ef3f38d9d123954458c56e593f8490a5069a1712bb7d4ec86cf425a828c SHA512 1d7f484202f6bfd59454d56a9f57b0795f0919ae607e0bfd4da0b58c0caae437ae3c3f8638699a94b0b4794197a03058c3b5e258c5cf87b95683587a3e8396fe
+EBUILD snappy-java-1.1.10.5-r2.ebuild 2922 BLAKE2B 25af341dc6335dc9f98b909a0e377f25db2abe3d2cdfdfffe8d99b18dda2b5ee691c279480e5eb2159d3571429530d5951fdcb6b2194fee4a42a33ae86b50765 SHA512 1ed635845def6d4f6a6e7095b31aaa5b3f3da082f8c21dc66e3411a19738237a82001abb54ca8f017773c80c39d71fa4e49479faa1ed5f0b2af117f37cab8678
+EBUILD snappy-java-1.1.10.7.ebuild 2875 BLAKE2B 4cf7226007f7729ca9ca7b88f25814bf394cecf01ae991faa426aa5ecb8e8336c4c9554f0b0e01b685d41239cce47d3366037e1e619ab2f791f64d6a8b9fdeba SHA512 e0bbc7f932d6d934ed94bfc7a34ae18084530aab998ea02f1df141b6c6c8eefbd1949be59cf32bb1c86b32da0b2bce73239ff016e7f04be58170d13db74b4abd
+MISC metadata.xml 320 BLAKE2B 5e3039edeec0b66e6b896158777909fdfed881f06def61b5e3424baeb51ea898cb3cb273e6ddc939b7efea88860a945b5f29da513be22ee6b601551a6e02170a SHA512 c2e9282ce950b419588d080145e85e63e6491500edce141678a4aaae65a43d945694ad992dd4d485c94748e26ac225e58177fcff11db3430035b837741ec45af
diff --git a/dev-java/snappy-java/files/1.1.7.8-gentoo.patch b/dev-java/snappy-java/files/1.1.7.8-gentoo.patch
new file mode 100644
index 000000000000..b4a58e6482be
--- /dev/null
+++ b/dev-java/snappy-java/files/1.1.7.8-gentoo.patch
@@ -0,0 +1,28 @@
+--- a/Makefile
++++ b/Makefile
+@@ -124,11 +124,7 @@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ $(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
+- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy -lbitshuffle
+- # Workaround for strip Protocol error when using VirtualBox on Mac
+- cp $@ /tmp/$(@F)
+- $(STRIP) /tmp/$(@F)
+- cp /tmp/$(@F) $@
++ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy -lbitshuffle $(LDFLAGS)
+
+ clean-native:
+ rm -rf $(SNAPPY_OUT)
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -274,8 +274,8 @@
+
+ CXX := $($(os_arch)_CXX)
+ STRIP := $($(os_arch)_STRIP)
+-CXXFLAGS := $($(os_arch)_CXXFLAGS)
+-LINKFLAGS := $($(os_arch)_LINKFLAGS)
++CXXFLAGS := $($(os_arch)_CXXFLAGS) $(CXXFLAGS)
++LINKFLAGS := $($(os_arch)_LINKFLAGS) $(LDFLAGS)
+ LIBNAME := $($(os_arch)_LIBNAME)
+ SNAPPY_FLAGS := $($(os_arch)_SNAPPY_FLAGS)
+
diff --git a/dev-java/snappy-java/files/1.1.7.8-java-version-target.patch b/dev-java/snappy-java/files/1.1.7.8-java-version-target.patch
new file mode 100644
index 000000000000..a852d0bdb807
--- /dev/null
+++ b/dev-java/snappy-java/files/1.1.7.8-java-version-target.patch
@@ -0,0 +1,47 @@
+From e7d1d0167426790ba9b1d28ffa11e0d0c523f3b5 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sun, 6 Feb 2022 08:29:20 -0800
+Subject: [PATCH] Allow Java version target to be specified using variable
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ Makefile | 4 ++--
+ Makefile.common | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1d82a8a..8eaa319 100644
+--- a/Makefile
++++ b/Makefile
+@@ -92,13 +92,13 @@ snappy-header: $(SNAPPY_CMAKE_CACHE)
+
+ $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class: $(SRC)/org/xerial/snappy/SnappyNative.java
+ @mkdir -p $(TARGET)/jni-classes
+- $(JAVAC) -source 1.7 -target 1.7 -h $(SRC)/org/xerial/snappy/ -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
++ $(JAVAC) -source $(JAVA_SOURCE) -target $(JAVA_TARGET) -h $(SRC)/org/xerial/snappy/ -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
+
+ $(SRC)/org/xerial/snappy/SnappyNative.h: $(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class
+
+ $(TARGET)/jni-classes/org/xerial/snappy/BitShuffleNative.class: $(SRC)/org/xerial/snappy/BitShuffleNative.java
+ @mkdir -p $(TARGET)/jni-classes
+- $(JAVAC) -source 1.7 -target 1.7 -h $(SRC)/org/xerial/snappy/ -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
++ $(JAVAC) -source $(JAVA_SOURCE) -target $(JAVA_TARGET) -h $(SRC)/org/xerial/snappy/ -d $(TARGET)/jni-classes -sourcepath $(SRC) $<
+
+ $(SRC)/org/xerial/snappy/BitShuffleNative.h: $(TARGET)/jni-classes/org/xerial/snappy/BitShuffleNative.class
+
+diff --git a/Makefile.common b/Makefile.common
+index 534bc4f..86d839b 100755
+--- a/Makefile.common
++++ b/Makefile.common
+@@ -10,6 +10,8 @@ endif
+ JAVA := "$$JAVA_HOME/bin/java"
+ JAVAC := "$$JAVA_HOME/bin/javac"
+ JAVAH := "$$JAVA_HOME/bin/javah"
++JAVA_SOURCE := 1.8
++JAVA_TARGET := 1.8
+
+ LITTLE_ENDIAN := "Little Endian"
+ BIG_ENDIAN := "Big Endian"
+--
+2.34.1
+
diff --git a/dev-java/snappy-java/files/1.1.7.8-unbundle-bitshuffle.patch b/dev-java/snappy-java/files/1.1.7.8-unbundle-bitshuffle.patch
new file mode 100644
index 000000000000..e4f699ad123e
--- /dev/null
+++ b/dev-java/snappy-java/files/1.1.7.8-unbundle-bitshuffle.patch
@@ -0,0 +1,26 @@
+--- a/Makefile
++++ b/Makefile
+@@ -36,11 +36,11 @@
+
+ $(SNAPPY_OUT)/%.o: $(BITSHUFFLE_SRC_DIR)/%.c
+ @mkdir -p $(@D)
+- $(CXX) $(CXXFLAGS) $(CXXFLAGS_BITSHUFFLE) -c $< -o $@
++ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+-SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) $(patsubst %.c,%.o,$(BITSHUFFLE_C)) SnappyNative.o BitShuffleNative.o)
++SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o BitShuffleNative.o)
+
+-CXXFLAGS:=$(CXXFLAGS) -I$(SNAPPY_SRC_DIR) -I$(SNAPPY_OUT) -I$(BITSHUFFLE_SRC_DIR)
++CXXFLAGS:=$(CXXFLAGS) -I$(SNAPPY_SRC_DIR) -I$(SNAPPY_OUT)
+
+ ifndef CXXFLAGS_BITSHUFFLE
+ ifeq ($(OS_NAME)-$(OS_ARCH),Linux-x86_64)
+@@ -124,7 +124,7 @@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ $(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
+- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy
++ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy -lbitshuffle
+ # Workaround for strip Protocol error when using VirtualBox on Mac
+ cp $@ /tmp/$(@F)
+ $(STRIP) /tmp/$(@F)
diff --git a/dev-java/snappy-java/files/snappy-1.1.10.1-commons-lang3.patch b/dev-java/snappy-java/files/snappy-1.1.10.1-commons-lang3.patch
new file mode 100644
index 000000000000..064482eabb7f
--- /dev/null
+++ b/dev-java/snappy-java/files/snappy-1.1.10.1-commons-lang3.patch
@@ -0,0 +1,11 @@
+--- a/src/test/java/org/xerial/snappy/SnappyHadoopCompatibleOutputStreamTest.java
++++ b/src/test/java/org/xerial/snappy/SnappyHadoopCompatibleOutputStreamTest.java
+@@ -2,7 +2,7 @@ package org.xerial.snappy;
+
+ import org.apache.commons.io.FileUtils;
+ import org.apache.commons.io.IOUtils;
+-import org.apache.commons.lang.SystemUtils;
++import org.apache.commons.lang3.SystemUtils;
+ import org.apache.hadoop.conf.Configuration;
+ import org.apache.hadoop.io.compress.SnappyCodec;
+ import org.junit.AfterClass;
diff --git a/dev-java/snappy-java/files/snappy-1.1.10.1-unbundle-snappy.patch b/dev-java/snappy-java/files/snappy-1.1.10.1-unbundle-snappy.patch
new file mode 100644
index 000000000000..d516495bb6a7
--- /dev/null
+++ b/dev-java/snappy-java/files/snappy-1.1.10.1-unbundle-snappy.patch
@@ -0,0 +1,51 @@
+--- a/Makefile
++++ b/Makefile
+@@ -10,7 +10,7 @@ all: snappy
+
+ SNAPPY_OUT:=$(TARGET)/snappy-$(SNAPPY_VERSION)-$(os_arch)
+ SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(SNAPPY_VERSION).tar.gz
+-SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc snappy.cc
++SNAPPY_CC:=
+ SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(SNAPPY_VERSION)
+ SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC))
+ SNAPPY_GIT_REPO_URL:=https://github.com/google/snappy
+@@ -102,7 +102,8 @@ $(TARGET)/jni-classes/org/xerial/snappy/BitShuffleNative.class: $(SRC)/org/xeria
+
+ $(SRC)/org/xerial/snappy/BitShuffleNative.h: $(TARGET)/jni-classes/org/xerial/snappy/BitShuffleNative.class
+
+-$(SNAPPY_SRC): $(SNAPPY_GIT_UNPACKED)
++$(SNAPPY_SRC):
++# $(SNAPPY_GIT_UNPACKED)
+
+ # aarch64 can use big-endian optimzied code
+ ifeq ($(OS_ARCH),aarch64)
+@@ -124,7 +125,7 @@ $(SNAPPY_OUT)/BitShuffleNative.o: $(SRC)/org/xerial/snappy/BitShuffleNative.cpp
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ $(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
+- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS)
++ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy
+ # Workaround for strip Protocol error when using VirtualBox on Mac
+ cp $@ /tmp/$(@F)
+ $(STRIP) /tmp/$(@F)
+@@ -145,9 +146,9 @@ snappy-jar-version:=snappy-java-$(shell ./script/dynver.sh | cut -d'=' -f2 | sed
+ jar-version:
+ echo $(snappy-jar-version)
+
+-native: jni-header snappy-header $(NATIVE_DLL)
+-native-nocmake: jni-header $(NATIVE_DLL)
+-snappy: native $(TARGET)/$(snappy-jar-version).jar
++native: $(NATIVE_DLL)
++native-nocmake: $(NATIVE_DLL)
++snappy: native
+
+ native-all: native native-arm clean-docker mac64 win32 win64 linux32 linux64 linux-ppc64le linux-riscv64 linux-s390x
+
+@@ -166,6 +167,7 @@ $(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME)
+ cp $(SNAPPY_OUT)/$(LIBNAME) $@
+ @mkdir -p $(NATIVE_TARGET_DIR)
+ cp $(SNAPPY_OUT)/$(LIBNAME) $(NATIVE_TARGET_DIR)/$(LIBNAME)
++ cp $< $(TARGET)/
+
+ package: $(TARGET)/$(snappy-jar-version).jar
+
diff --git a/dev-java/snappy-java/files/snappy-1.1.10.5-SnappyOutputStreamTest.patch b/dev-java/snappy-java/files/snappy-1.1.10.5-SnappyOutputStreamTest.patch
new file mode 100644
index 000000000000..43272e9d4a7f
--- /dev/null
+++ b/dev-java/snappy-java/files/snappy-1.1.10.5-SnappyOutputStreamTest.patch
@@ -0,0 +1,30 @@
+There was 1 failure:
+1) batchingOfWritesShouldNotAffectCompressedDataSize(org.xerial.snappy.SnappyOutputStreamTest)
+java.lang.AssertionError: expected:<91080> but was:<91051>
+ at org.junit.Assert.fail(Assert.java:89)
+ at org.junit.Assert.failNotEquals(Assert.java:835)
+ at org.junit.Assert.assertEquals(Assert.java:647)
+ at org.junit.Assert.assertEquals(Assert.java:633)
+ at org.xerial.snappy.SnappyOutputStreamTest.batchingOfWritesShouldNotAffectCompressedDataSize(SnappyOutputStreamTest.java:183)
+
+FAILURES!!!
+Tests run: 104, Failures: 1
+--- a/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java
++++ b/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java
+@@ -34,6 +34,7 @@ import java.lang.ref.WeakReference;
+ import java.nio.ByteOrder;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.Assert;
+ import org.xerial.snappy.buffer.BufferAllocatorFactory;
+ import org.xerial.snappy.buffer.CachedBufferAllocator;
+@@ -165,7 +166,7 @@ public class SnappyOutputStreamTest
+ return b.toByteArray();
+ }
+
+- @Test
++ @Test @Ignore
+ public void batchingOfWritesShouldNotAffectCompressedDataSize()
+ throws Exception
+ {
diff --git a/dev-java/snappy-java/metadata.xml b/dev-java/snappy-java/metadata.xml
new file mode 100644
index 000000000000..db7de7da5a64
--- /dev/null
+++ b/dev-java/snappy-java/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">xerial/snappy-java</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-java/snappy-java/snappy-java-1.1.10.5-r2.ebuild b/dev-java/snappy-java/snappy-java-1.1.10.5-r2.ebuild
new file mode 100644
index 000000000000..b90ae8cf8058
--- /dev/null
+++ b/dev-java/snappy-java/snappy-java-1.1.10.5-r2.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.xerial.snappy:snappy-java:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple toolchain-funcs check-reqs
+
+DESCRIPTION="Snappy compressor/decompressor for Java"
+HOMEPAGE="https://github.com/xerial/snappy-java/"
+# ::gentoo does not have hadoop-common packaged. Currently we bundle the binary version.
+# It's used for testing only and does not get installed.
+HCV="3.3.5"
+SRC_URI="https://github.com/xerial/snappy-java/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/${HCV}/hadoop-common-${HCV}.jar )"
+S="${WORKDIR}/${P}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ppc64 x86"
+
+CP_DEPEND="dev-java/osgi-core:0"
+
+CDEPEND="
+ app-arch/snappy
+ >=dev-libs/bitshuffle-0.3.5-r1
+"
+
+DEPEND=">=virtual/jdk-1.8:*
+ ${CP_DEPEND}
+ ${CDEPEND}
+ test? (
+ >=dev-java/ant-1.10.14:0[junit4]
+ dev-java/commons-io:1
+ dev-java/commons-lang:3.6
+ dev-java/plexus-classworlds:0
+ dev-java/xerial-core:0
+ )"
+
+RDEPEND=">=virtual/jre-1.8:*
+ ${CP_DEPEND}
+ ${CDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/1.1.7.8-java-version-target.patch"
+ "${FILESDIR}/snappy-1.1.10.1-unbundle-snappy.patch"
+ "${FILESDIR}/1.1.7.8-unbundle-bitshuffle.patch"
+ "${FILESDIR}/1.1.7.8-gentoo.patch"
+ "${FILESDIR}/snappy-1.1.10.5-SnappyOutputStreamTest.patch"
+ "${FILESDIR}/snappy-1.1.10.1-commons-lang3.patch"
+)
+
+JAVA_RESOURCE_DIRS="src/main/resources"
+JAVA_SRC_DIR="src/main/java"
+
+JAVA_TEST_GENTOO_CLASSPATH="
+ commons-io-1
+ commons-lang-3.6
+ junit-4
+ plexus-classworlds
+ xerial-core
+"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+check_env() {
+ if use test; then
+ # this is needed only for tests
+ CHECKREQS_MEMORY="2560M"
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_env
+}
+
+pkg_setup() {
+ check_env
+ java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ # remove pre-compiled sofiles
+ rm -r src/main/resources/org/xerial/snappy/native || die
+ rm -r src/test/resources/lib || die
+}
+
+src_compile() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ JAVA_SOURCE="$(java-pkg_get-source)" \
+ JAVA_TARGET="$(java-pkg_get-target)"
+
+ java-pkg-simple_src_compile
+}
+
+src_test() {
+ JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/hadoop-common-${HCV}.jar"
+ JAVA_TEST_EXTRA_ARGS=( -Xmx${CHECKREQS_MEMORY} )
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge 17; then
+ java-pkg-simple_src_test
+ else
+ einfo "Tests need jdk-17 to pass."
+ fi
+}
+
+src_install() {
+ java-pkg-simple_src_install
+
+ local jniext=.so
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ jniext=.jnilib
+ # avoid install_name check failure
+ install_name_tool -id "@loader_path/libsnappyjava${jniext}" \
+ "target/libsnappyjava${jniext}"
+ fi
+ java-pkg_doso "target/libsnappyjava${jniext}"
+}
diff --git a/dev-java/snappy-java/snappy-java-1.1.10.7.ebuild b/dev-java/snappy-java/snappy-java-1.1.10.7.ebuild
new file mode 100644
index 000000000000..8824060b3581
--- /dev/null
+++ b/dev-java/snappy-java/snappy-java-1.1.10.7.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.xerial.snappy:snappy-java:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple toolchain-funcs check-reqs
+
+DESCRIPTION="Snappy compressor/decompressor for Java"
+HOMEPAGE="https://github.com/xerial/snappy-java/"
+# ::gentoo does not have hadoop-common packaged. Currently we bundle the binary version.
+# It's used for testing only and does not get installed.
+HCV="3.3.5"
+SRC_URI="https://github.com/xerial/snappy-java/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/${HCV}/hadoop-common-${HCV}.jar )"
+S="${WORKDIR}/${P}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+CP_DEPEND="dev-java/osgi-core:0"
+
+CDEPEND="
+ app-arch/snappy
+ >=dev-libs/bitshuffle-0.3.5-r1
+"
+
+DEPEND=">=virtual/jdk-1.8:*
+ ${CP_DEPEND}
+ ${CDEPEND}
+ test? (
+ >=dev-java/ant-1.10.14:0[junit4]
+ dev-java/commons-io:1
+ dev-java/commons-lang:3.6
+ dev-java/plexus-classworlds:0
+ dev-java/xerial-core:0
+ )"
+
+RDEPEND=">=virtual/jre-1.8:*
+ ${CP_DEPEND}
+ ${CDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/1.1.7.8-java-version-target.patch"
+ "${FILESDIR}/snappy-1.1.10.1-unbundle-snappy.patch"
+ "${FILESDIR}/1.1.7.8-unbundle-bitshuffle.patch"
+ "${FILESDIR}/1.1.7.8-gentoo.patch"
+ "${FILESDIR}/snappy-1.1.10.5-SnappyOutputStreamTest.patch"
+)
+
+JAVA_RESOURCE_DIRS="src/main/resources"
+JAVA_SRC_DIR="src/main/java"
+
+JAVA_TEST_GENTOO_CLASSPATH="
+ commons-io-1
+ commons-lang-3.6
+ junit-4
+ plexus-classworlds
+ xerial-core
+"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+check_env() {
+ if use test; then
+ # this is needed only for tests
+ CHECKREQS_MEMORY="2560M"
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_env
+}
+
+pkg_setup() {
+ check_env
+ java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ # remove pre-compiled sofiles
+ rm -r src/main/resources/org/xerial/snappy/native || die
+ rm -r src/test/resources/lib || die
+}
+
+src_compile() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ JAVA_SOURCE="$(java-pkg_get-source)" \
+ JAVA_TARGET="$(java-pkg_get-target)"
+
+ java-pkg-simple_src_compile
+}
+
+src_test() {
+ JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/hadoop-common-${HCV}.jar"
+ JAVA_TEST_EXTRA_ARGS=( -Xmx${CHECKREQS_MEMORY} )
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge 17; then
+ java-pkg-simple_src_test
+ else
+ einfo "Tests need jdk-17 to pass."
+ fi
+}
+
+src_install() {
+ java-pkg-simple_src_install
+
+ local jniext=.so
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ jniext=.jnilib
+ # avoid install_name check failure
+ install_name_tool -id "@loader_path/libsnappyjava${jniext}" \
+ "target/libsnappyjava${jniext}"
+ fi
+ java-pkg_doso "target/libsnappyjava${jniext}"
+}