mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 18:25:41 +03:00
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
From: Jakub Jirutka <jakub@jirutka.cz>
|
|
Date: Wed, 6 Apr 2016 00:52:00 +0200
|
|
Subject: [PATCH] Unbundle snappy
|
|
|
|
Use system-provided snappy library instead of downloading and building
|
|
snappy from the upstream.
|
|
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -10,7 +10,7 @@
|
|
|
|
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
|
|
@@ -86,9 +86,9 @@
|
|
cd $(SNAPPY_OUT) && cmake $(SNAPPY_CMAKE_OPTS) ../../$(SNAPPY_SRC_DIR)
|
|
touch $@
|
|
|
|
-jni-header: $(SNAPPY_GIT_UNPACKED) $(BITSHUFFLE_UNPACKED) $(SRC)/org/xerial/snappy/SnappyNative.h $(SRC)/org/xerial/snappy/BitShuffleNative.h
|
|
+jni-header: $(BITSHUFFLE_UNPACKED) $(SRC)/org/xerial/snappy/SnappyNative.h $(SRC)/org/xerial/snappy/BitShuffleNative.h
|
|
|
|
-snappy-header: $(SNAPPY_CMAKE_CACHE)
|
|
+snappy-header:
|
|
|
|
$(TARGET)/jni-classes/org/xerial/snappy/SnappyNative.class: $(SRC)/org/xerial/snappy/SnappyNative.java
|
|
@mkdir -p $(TARGET)/jni-classes
|
|
@@ -102,7 +102,7 @@
|
|
|
|
$(SRC)/org/xerial/snappy/BitShuffleNative.h: $(TARGET)/jni-classes/org/xerial/snappy/BitShuffleNative.class
|
|
|
|
-$(SNAPPY_SRC): $(SNAPPY_GIT_UNPACKED)
|
|
+$(SNAPPY_SRC):
|
|
|
|
# aarch64 can use big-endian optimzied code
|
|
ifeq ($(OS_ARCH),aarch64)
|
|
@@ -124,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)
|
|
@@ -144,7 +144,7 @@
|
|
|
|
native: jni-header snappy-header $(NATIVE_DLL)
|
|
native-nocmake: jni-header $(NATIVE_DLL)
|
|
-snappy: native $(TARGET)/$(snappy-jar-version).jar
|
|
+snappy: native
|
|
|
|
native-all: native mac64 win32 win64 native-arm linux32 linux64 linux-ppc64le
|
|
|
|
@@ -153,6 +153,7 @@
|
|
cp $(SNAPPY_OUT)/$(LIBNAME) $@
|
|
@mkdir -p $(NATIVE_TARGET_DIR)
|
|
cp $(SNAPPY_OUT)/$(LIBNAME) $(NATIVE_TARGET_DIR)/$(LIBNAME)
|
|
+ cp $(SNAPPY_OUT)/$(LIBNAME) $(TARGET)/
|
|
|
|
package: $(TARGET)/$(snappy-jar-version).jar
|
|
|