summaryrefslogtreecommitdiff
path: root/dev-java/snappy/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/snappy/files')
-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
7 files changed, 193 insertions, 65 deletions
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
+