summaryrefslogtreecommitdiff
path: root/dev-java/snappy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-java/snappy
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-java/snappy')
-rw-r--r--dev-java/snappy/Manifest11
-rw-r--r--dev-java/snappy/files/1.1.0.1-gentoo.patch14
-rw-r--r--dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch51
-rw-r--r--dev-java/snappy/files/1.1.7.8-gentoo.patch28
-rw-r--r--dev-java/snappy/files/1.1.7.8-java-version-target.patch47
-rw-r--r--dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch38
-rw-r--r--dev-java/snappy/files/1.1.7.8-unbundle-bitshuffle.patch26
-rw-r--r--dev-java/snappy/files/1.1.7.8-unbundle-snappy.patch54
-rw-r--r--dev-java/snappy/snappy-1.1.0.1.ebuild72
-rw-r--r--dev-java/snappy/snappy-1.1.7.8.ebuild97
10 files changed, 297 insertions, 141 deletions
diff --git a/dev-java/snappy/Manifest b/dev-java/snappy/Manifest
index 98475bac6676..bd6d8353499c 100644
--- a/dev-java/snappy/Manifest
+++ b/dev-java/snappy/Manifest
@@ -1,6 +1,9 @@
-AUX 1.1.0.1-gentoo.patch 407 BLAKE2B 1ee8af08605bfcf4b61b23784da9fdb7f116536742db4d0a6dda2b04c10115fb989c488632b495496899c2e7547549b997f120b96a7add64311584e0595d4763 SHA512 0e12de9c8b1c86791b43565312a12c50036cd501c5eea5bf45a09408121b99d79f58a1047acd26202afbac246f1264dfa86da785705f83f9db1356d824c9e40f
-AUX 1.1.0.1-unbundle-snappy.patch 1780 BLAKE2B 972bb8ed77fea8de8627bd15c9abc633def05cbcc696ff198ced852584c5dafb6abd89bba73afa7406f1fea008f1098b1ccd4951f0d59c6570583dd6c22c673a SHA512 75553615c0d6c5a24c14820b09021c225c89fcf2c680eabb27957cf45f3796344745f546939d0b98d78aca192c3cd23bfe7836f6f1c7a0b03748f084579b65df
+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-remove-perl-usage.patch 1720 BLAKE2B f6e1462356bfa94e946fb2e8a4200bd62f17e56bd64cb115e7ee1826dce3d79286e0e192443d13e0bd16018e6450d08d772f0ddf06183d5a86bb419ccd710543 SHA512 0ed15f3bd969ce20b1ea9f3ccf73cdfecfe4568719840a2a244617fd12f9dc9ab511678782127c53456b64494c043adfa61b9fb4ca3d716b99f01b70098029d0
+AUX 1.1.7.8-unbundle-bitshuffle.patch 1006 BLAKE2B 99b88fd2af02ff6d95d90ec2e302593c7ae00691156b283e11425677f904847d2809ce91d7094de8a5ec759595e721bf0f80d3deadd56f0f05e8d4ae1d4c4613 SHA512 dd4877f023095f7d41e6d22213d1916ae17ec8a88977354d5e1662fa3e555f89bc27def9537cd6ffd07a75794c25719379189b14a0db481df1c2e729525b12f0
+AUX 1.1.7.8-unbundle-snappy.patch 1820 BLAKE2B ec2f5724675cef1a796678f5b12ccd4b49c2415fcfd98e2a3f9214bb63477bfd9bed93999c2f12b2f0e8b5aedb705299bf37e52a16833797a745bf4e1eeecdd9 SHA512 408c09f01cb65dcf17b7ecd5542cd622b6296ab6d433be79ff2a8d03dc4e8f8b9c48165d95afa0b865c8ab196c4470e93f5b07e9eeded1f492d1ef2d8d91fa82
AUX 1.x-build.xml 8496 BLAKE2B 0ab98a4149d0d7b294efec29374c59af8599362fa40d04737d50d1106157d8e604e17ce06c9180c2d9ca2b612cb5d025a111fe620739f7109a0c384ae940d4dc SHA512 ed47379879bab5cbaa4111616c3cca526725e4fa3d8d42da72d19a21738cc42826e37756a181e6d541f27aa4abe7f2353be90c51f4d89d04413501e6ccdb4cb0
-DIST snappy-java-1.1.0.1.tar.gz 4909520 BLAKE2B 65daf3d01f1cb46dd0d51609e2d95fc954d56e41fbb2d22e9eca24fad16a6d4ba16083e633fb13e68dacf6c2fb0d10ec6fb1e6dcdda6dc611b58b172710fcd62 SHA512 32d0afce880ecccd814f7738eb375a13bd533998c73d79908964061337730ad76fb4794f78fd1fcdc4a4562db57cbc4c6f912d9f3351b1d75b12ce3224ec387e
-EBUILD snappy-1.1.0.1.ebuild 1697 BLAKE2B 303375436532cd1e63fb71b70230f072f7678519b39415e11137cd040ab0562e4fa850c980b0c7c9c343e63ef8aedf1da9311f33ffbecbbd72ba725e79b5bf86 SHA512 3f7c40dd83d8a7205640663a14f8ef31f7944000d8011019690a7c37b4fdb32e6c541139cdae2ac67ba02f666d61c98351cc08aeff6816803bdb3c2f7433b86d
+DIST snappy-java-1.1.7.8.tar.gz 3558859 BLAKE2B 871f4190212399c5bd34a72766d7f3abca9a09608d9acddc126905bcdafc723613aa33d0cdb59419e6bfba46ff27e91f5ca5382073dd895d5601f6d84929ef96 SHA512 8129d4ae2abd78f967c07e7f13df8cb9043cc34bd8346be28625a3d2bea06674ce6dd09b521af2b7053b25d0132a0e822b78c06e09bacd0067ba8178bd167691
+EBUILD snappy-1.1.7.8.ebuild 2569 BLAKE2B 5744632d7f2d1931790e0b5ef481444653eb3711e4311688f6cda071b9b2f339d2743e8f0a2cd299ba93164e8c1e135110c315256f3b6b0330ce721dd2964b89 SHA512 f274294167f77a7f9c96868117c4ee75f1e0fa062bbab9027f12bf98333fcb0bf6ae7bb0e5692bfba0193ce423598674bc6b982bbb700e3255ce557d4c7c6572
MISC metadata.xml 320 BLAKE2B 5e3039edeec0b66e6b896158777909fdfed881f06def61b5e3424baeb51ea898cb3cb273e6ddc939b7efea88860a945b5f29da513be22ee6b601551a6e02170a SHA512 c2e9282ce950b419588d080145e85e63e6491500edce141678a4aaae65a43d945694ad992dd4d485c94748e26ac225e58177fcff11db3430035b837741ec45af
diff --git a/dev-java/snappy/files/1.1.0.1-gentoo.patch b/dev-java/snappy/files/1.1.0.1-gentoo.patch
deleted file mode 100644
index 61403dd9167f..000000000000
--- a/dev-java/snappy/files/1.1.0.1-gentoo.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 04f0435..0249d09 100644
---- a/Makefile
-+++ b/Makefile
-@@ -60,8 +60,7 @@ $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/
-
-
- $(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
-- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy
-- $(STRIP) $@
-+ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy $(LDFLAGS)
-
- clean-native:
- rm -rf $(SNAPPY_OUT)
diff --git a/dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch b/dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch
deleted file mode 100644
index 17fb2e1583ed..000000000000
--- a/dev-java/snappy/files/1.1.0.1-unbundle-snappy.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 0821c87..04f0435 100644
---- a/Makefile
-+++ b/Makefile
-@@ -7,7 +7,8 @@ all: snappy
-
- SNAPPY_OUT:=$(TARGET)/$(snappy)-$(os_arch)
- SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz
--SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc
-+#SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc
-+SNAPPY_CC:=
- SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(VERSION)
- SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC))
- SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o)
-@@ -46,7 +47,8 @@ src/main/resources/org/xerial/snappy/SnappyNativeLoader.bytecode: src/main/resou
- $(JAVAC) -source 1.5 -target 1.5 -d $(TARGET)/temp $<
- cp $(TARGET)/temp/org/xerial/snappy/SnappyNativeLoader.class $@
-
--$(SNAPPY_SRC): $(SNAPPY_UNPACKED)
-+$(SNAPPY_SRC):
-+# $(SNAPPY_UNPACKED)
-
- $(SNAPPY_OUT)/%.o : $(SNAPPY_SRC_DIR)/%.cc
- @mkdir -p $(@D)
-@@ -58,7 +60,7 @@ $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/
-
-
- $(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
-- $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS)
-+ $(CXX) $(CXXFLAGS) -o $@ $+ $(LINKFLAGS) -lsnappy
- $(STRIP) $@
-
- clean-native:
-@@ -73,14 +75,15 @@ NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME)
-
- snappy-jar-version:=snappy-java-$(shell $(JAVA) -jar lib/silk-weaver.jar find 'project(artifactId, version)' pom.xml | grep snappy-java | awk '{ print $$2; }')
-
--native: $(SNAPPY_UNPACKED) $(NATIVE_DLL)
--snappy: native $(TARGET)/$(snappy-jar-version).jar
-+native: $(NATIVE_DLL)
-+snappy: native
-
- $(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME)
- @mkdir -p $(@D)
- cp $< $@
- @mkdir -p $(NATIVE_TARGET_DIR)
- cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME)
-+ cp $< $(TARGET)/
-
-
- $(TARGET)/$(snappy-jar-version).jar: native $(NATIVE_DLL)
diff --git a/dev-java/snappy/files/1.1.7.8-gentoo.patch b/dev-java/snappy/files/1.1.7.8-gentoo.patch
new file mode 100644
index 000000000000..b4a58e6482be
--- /dev/null
+++ b/dev-java/snappy/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/files/1.1.7.8-java-version-target.patch b/dev-java/snappy/files/1.1.7.8-java-version-target.patch
new file mode 100644
index 000000000000..a852d0bdb807
--- /dev/null
+++ b/dev-java/snappy/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/files/1.1.7.8-remove-perl-usage.patch b/dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch
new file mode 100644
index 000000000000..0c64240f12a3
--- /dev/null
+++ b/dev-java/snappy/files/1.1.7.8-remove-perl-usage.patch
@@ -0,0 +1,38 @@
+From 1413a33ef00e722bacab2e17297b89bb55b2bd49 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Tue, 21 Dec 2021 07:33:52 -0800
+Subject: [PATCH] Makefile: Eliminate usage of the `perl` command
+
+dev-lang/perl is not an implicit system dependency, so we cannot assume
+its existence during build time. The Makefile uses the `perl` command
+to generate the name of the JAR being built with it, but the ebuild uses
+Ant and a custom build.xml to build the JAR, and it uses the Makefile to
+build only the JNI part, thus the name of JAR in the Makefile will not
+be used. For this reason, this package can still be built and installed
+without dev-lang/perl. However, a QA notice for absent `perl` command
+will appear in this case. Rather than declaring dev-lang/perl as a
+dependency, it might be better to eliminate usage of the `perl` command
+if it is never used in any meaningful way.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index a7bd87c..d1d3d32 100644
+--- a/Makefile
++++ b/Makefile
+@@ -138,7 +138,8 @@ NATIVE_DIR:=src/main/resources/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH)
+ NATIVE_TARGET_DIR:=$(TARGET)/classes/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH)
+ NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME)
+
+-snappy-jar-version:=snappy-java-$(shell perl -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | sed -e "/^$$/d")
++#snappy-jar-version:=snappy-java-$(shell perl -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | sed -e "/^$$/d")
++snappy-jar-version:=snappy
+
+ native: jni-header snappy-header $(NATIVE_DLL)
+ native-nocmake: jni-header $(NATIVE_DLL)
+--
+2.32.0
+
diff --git a/dev-java/snappy/files/1.1.7.8-unbundle-bitshuffle.patch b/dev-java/snappy/files/1.1.7.8-unbundle-bitshuffle.patch
new file mode 100644
index 000000000000..e4f699ad123e
--- /dev/null
+++ b/dev-java/snappy/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/files/1.1.7.8-unbundle-snappy.patch b/dev-java/snappy/files/1.1.7.8-unbundle-snappy.patch
new file mode 100644
index 000000000000..6113019be3ea
--- /dev/null
+++ b/dev-java/snappy/files/1.1.7.8-unbundle-snappy.patch
@@ -0,0 +1,54 @@
+diff --git a/Makefile b/Makefile
+index 0821c87..04f0435 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,8 @@
+
+ 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.cc
++#SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.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
+@@ -100,7 +101,8 @@
+
+ $(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)
+@@ -122,7 +124,7 @@
+ $(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)
+@@ -140,9 +142,9 @@
+ #snappy-jar-version:=snappy-java-$(shell perl -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | sed -e "/^$$/d")
+ snappy-jar-version:=snappy
+
+-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 win32 win64 native-arm linux32 linux64 linux-ppc64le
+
+@@ -151,6 +153,7 @@
+ 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/snappy-1.1.0.1.ebuild b/dev-java/snappy/snappy-1.1.0.1.ebuild
deleted file mode 100644
index 443002b9ab82..000000000000
--- a/dev-java/snappy/snappy-1.1.0.1.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-JAVA_PKG_IUSE="doc source test"
-
-inherit java-pkg-2 java-ant-2
-
-MY_PN="${PN}-java"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="Snappy compressor/decompressor for Java"
-HOMEPAGE="https://github.com/xerial/snappy-java/"
-SRC_URI="https://github.com/xerial/${MY_PN}/archive/${PV}.tar.gz -> ${PN}-java-${PV}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="1.1"
-KEYWORDS="~amd64 ~x86 ~x64-macos"
-IUSE=""
-
-CDEPEND="dev-java/osgi-core-api:0
- app-arch/snappy"
-
-DEPEND=">=virtual/jdk-1.6
- test? (
- dev-java/junit:4
- dev-java/xerial-core:0
- dev-java/plexus-classworlds:0
- )
- ${CDEPEND}"
-
-RDEPEND=">=virtual/jre-1.6
- ${CDEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-JAVA_ANT_REWRITE_CLASSPATH="true"
-EANT_GENTOO_CLASSPATH="osgi-core-api"
-EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4,xerial-core,plexus-classworlds"
-EANT_TEST_ANT_TASKS="ant-junit"
-
-java_prepare() {
- cp "${FILESDIR}"/1.x-build.xml "${S}"/build.xml || die
- rm -r "${S}"/src/main/resources/org/xerial/snappy/native/ || die
- epatch "${FILESDIR}"/${PV}-unbundle-snappy.patch
- epatch "${FILESDIR}"/${PV}-gentoo.patch
-}
-
-src_compile() {
- emake
- java-pkg-2_src_compile
-}
-
-src_install() {
- local jniext=.so
- if [[ ${CHOST} == *-darwin* ]] ; then
- jniext=.jnilib
- # avoid install_name check failure
- install_name_tool -id @loader_path/libsnappyjava${jniext} \
- "${S}"/target/libsnappyjava${jniext}
- fi
- java-pkg_doso "${S}"/target/libsnappyjava${jniext}
- java-pkg_dojar "${S}/target/${PN}.jar"
-
- use source && java-pkg_dosrc "${S}"/src/main/java/*
- use doc && java-pkg_dojavadoc "${S}"/target/site/apidocs
-}
-
-src_test() {
- java-pkg-2_src_test
-}
diff --git a/dev-java/snappy/snappy-1.1.7.8.ebuild b/dev-java/snappy/snappy-1.1.7.8.ebuild
new file mode 100644
index 000000000000..bb7a64023a0a
--- /dev/null
+++ b/dev-java/snappy/snappy-1.1.7.8.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2022 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:1.1.7.8"
+
+inherit java-pkg-2 java-ant-2 toolchain-funcs
+
+MY_PN="${PN}-java"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Snappy compressor/decompressor for Java"
+HOMEPAGE="https://github.com/xerial/snappy-java/"
+SRC_URI="https://github.com/xerial/${MY_PN}/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="1.1"
+KEYWORDS="amd64 ~arm arm64 ppc64 x86"
+
+# Tests require org.apache.hadoop:hadoop-common:2.7.*, which is yet to be
+# packaged. Some extra steps are required before running the tests:
+# 1. Download hadoop-common 2.7.x from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
+# 2. Set EANT_GENTOO_CLASSPATH_EXTRA to the path to hadoop-common-2.7.*.jar
+# 3. Set ALLOW_TEST="all"
+RESTRICT="test"
+
+CDEPEND="dev-java/osgi-core-api:0
+ app-arch/snappy
+ dev-libs/bitshuffle"
+
+DEPEND=">=virtual/jdk-1.8:*
+ ${CDEPEND}
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/commons-io:1
+ dev-java/commons-lang:2.1
+ dev-java/plexus-classworlds:0
+ dev-java/xerial-core:0
+ )"
+
+RDEPEND=">=virtual/jre-1.8:*
+ ${CDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+JAVA_ANT_CLASSPATH_TAGS="javac javadoc"
+EANT_GENTOO_CLASSPATH="osgi-core-api"
+EANT_TEST_GENTOO_CLASSPATH="
+ ${EANT_GENTOO_CLASSPATH}
+ commons-io-1
+ commons-lang-2.1
+ plexus-classworlds
+ xerial-core
+"
+
+src_prepare() {
+ cp "${FILESDIR}/1.x-build.xml" build.xml || die
+ rm -r src/main/resources/org/xerial/snappy/native || die
+ eapply "${FILESDIR}/${PV}-java-version-target.patch"
+ eapply "${FILESDIR}/${PV}-remove-perl-usage.patch"
+ eapply "${FILESDIR}/${PV}-unbundle-snappy.patch"
+ eapply "${FILESDIR}/${PV}-unbundle-bitshuffle.patch"
+ eapply "${FILESDIR}/${PV}-gentoo.patch"
+ java-pkg-2_src_prepare
+}
+
+src_compile() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ JAVA_SOURCE="$(java-pkg_get-source)" \
+ JAVA_TARGET="$(java-pkg_get-target)"
+ java-pkg-2_src_compile
+}
+
+src_test() {
+ cp -r src/test/resources/org/xerial/snappy/* \
+ src/test/java/org/xerial/snappy || die
+ java-pkg-2_src_test
+}
+
+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}"
+ java-pkg_dojar "target/${PN}.jar"
+
+ use source && java-pkg_dosrc src/main/java/*
+ use doc && java-pkg_dojavadoc target/site/apidocs
+}