diff options
author | TBK <tbk@jjtc.dk> | 2018-05-21 22:55:25 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-22 14:28:46 +0200 |
commit | 94048b3da99cb81a8bffa47bc212e58d465dd32a (patch) | |
tree | f07457814a7750d7b6e38a9bdf6ad6662964bd3c | |
parent | 5220530cc587c8cebc12e88b8013dddba10bca81 (diff) | |
download | aports-94048b3da99cb81a8bffa47bc212e58d465dd32a.tar.bz2 aports-94048b3da99cb81a8bffa47bc212e58d465dd32a.tar.xz |
community/java-snappy: upgrade to 1.1.7.1, modernize
-rw-r--r-- | community/java-snappy/0001-unbundle-snappy.patch | 59 | ||||
-rw-r--r-- | community/java-snappy/APKBUILD | 27 | ||||
-rw-r--r-- | community/java-snappy/add-linux-aarch64-support.patch | 75 | ||||
-rw-r--r-- | community/java-snappy/unbundle-snappy.patch | 65 |
4 files changed, 75 insertions, 151 deletions
diff --git a/community/java-snappy/0001-unbundle-snappy.patch b/community/java-snappy/0001-unbundle-snappy.patch deleted file mode 100644 index b89602386a..0000000000 --- a/community/java-snappy/0001-unbundle-snappy.patch +++ /dev/null @@ -1,59 +0,0 @@ -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. - -diff --git a/Makefile b/Makefile -index 13838dc..14feedd 100644 ---- a/Makefile -+++ b/Makefile -@@ -8,7 +8,7 @@ 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_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) -@@ -59,7 +59,7 @@ $(SRC)/org/xerial/snappy/SnappyNative.h: $(TARGET)/jni-classes/org/xerial/snappy - $(JAVAH) -force -classpath $(TARGET)/jni-classes -o $@ org.xerial.snappy.SnappyNative - - ifndef USE_GIT -- $(SNAPPY_SRC): $(SNAPPY_UNPACKED) -+ $(SNAPPY_SRC): - else - $(SNAPPY_SRC): $(SNAPPY_GIT_UNPACKED) - endif -@@ -74,7 +74,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: -@@ -90,17 +90,18 @@ 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") - - ifndef USE_GIT -- native: $(SNAPPY_UNPACKED) $(NATIVE_DLL) -+ native: $(NATIVE_DLL) - else - native: $(SNAPPY_GIT_UNPACKED) $(NATIVE_DLL) - endif --snappy: native $(TARGET)/$(snappy-jar-version).jar -+snappy: native - - $(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME) - @mkdir -p $(@D) - cp $< $@ - @mkdir -p $(NATIVE_TARGET_DIR) - cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME) -+ cp $< $(TARGET)/ - - - package: $(TARGET)/$(snappy-jar-version).jar diff --git a/community/java-snappy/APKBUILD b/community/java-snappy/APKBUILD index 55b2d3d5b2..f9549fb0d5 100644 --- a/community/java-snappy/APKBUILD +++ b/community/java-snappy/APKBUILD @@ -2,24 +2,24 @@ # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=java-snappy _pkgname=snappy-java -pkgver=1.1.2.6 +pkgver=1.1.7.1 _libver=${pkgver%.*} -pkgrel=1 +pkgrel=0 pkgdesc="Snappy compressor/decompressor for Java" url="https://github.com/xerial/snappy-java" arch="all" license="Apache-2.0" +options="!check" # Tests does not work correctly depends="openjdk8-jre-base" makedepends="bash openjdk8 perl snappy-dev>=$_libver" subpackages="$pkgname-native" source="$pkgname-$pkgver.tar.gz::https://github.com/xerial/$_pkgname/archive/$pkgver.tar.gz - 0001-unbundle-snappy.patch - add-linux-aarch64-support.patch + unbundle-snappy.patch " builddir="$srcdir/$_pkgname-$pkgver" prepare() { - default_prepare || return 1 + default_prepare cd "$builddir" @@ -35,7 +35,7 @@ prepare() { build() { cd "$builddir" - JAVA_HOME="/usr/lib/jvm/default-jvm" make || return 1 + JAVA_HOME="/usr/lib/jvm/default-jvm" make msg "Downloading SBT and then building JAR (this will take few minutes)..." JVM_OPTS="-Xms256m -Xmx256m -Xss2m" \ @@ -46,7 +46,7 @@ package() { depends="$depends $pkgname-native" install -m644 -D "$builddir"/target/$_pkgname-*.jar \ - "$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar || return 1 + "$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar ln -sf $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar } @@ -54,16 +54,9 @@ native() { local soname="libsnappyjava.so" install -m755 -D "$builddir"/target/$soname \ - "$subpkgdir"/usr/lib/$soname.$_libver || return 1 + "$subpkgdir"/usr/lib/$soname.$_libver ln -sf $soname.$_libver "$subpkgdir"/usr/lib/$soname } -md5sums="8938dc2d64ec7405581faa454bdf8ed2 java-snappy-1.1.2.6.tar.gz -1bf623f419c1103bce8a76ef129e974b 0001-unbundle-snappy.patch -2c4aa1f420e29f55c77a98d4fb7bba9a add-linux-aarch64-support.patch" -sha256sums="404fa39e5337f08b5c80b20b45096af805b5abb3ded126ef63e43ba4538e8d6e java-snappy-1.1.2.6.tar.gz -d624485186c880d7a7ede00b81e70ae345b9f429a218dd49bb85d3a9fb837cfe 0001-unbundle-snappy.patch -3ed5fd2840bb0d41744cb2f803d50fe376b5424c7f6f6bb4b21902541fa69dc7 add-linux-aarch64-support.patch" -sha512sums="647c7942249fd08d402538da5442bbbbd6a3fc2d6173999253ebcf270e8dea5135a2c702c12ea1f170e3e187f0092270d9d7db28593c438c58a7eb9dd2ca157c java-snappy-1.1.2.6.tar.gz -23aa84f1bee4f2a419402912e17ee04259f37a41a2eac9a6cc271d7a87899778a196b9bbcced856335bb56ea905bd6448f4ef39da9cbd8c83882506651e13a9c 0001-unbundle-snappy.patch -4575f146a2a25284381978e8e6de920c904bc8055e4814821b68668fd74c2beef77efa33486a3564896ce0010c1d70d71b936f6623edc74fb27c14c9647ab416 add-linux-aarch64-support.patch" +sha512sums="2531576a31929592a264502211e8e71666b119e17e25dc4548ad914d3c2873da1b4903c5bde9f03a0839c09451fa33898a0cccfa08e568efb4bd77977439cd89 java-snappy-1.1.7.1.tar.gz +3533a62aefa0f2b9943fa7a360c38c468eb6917fc709ad8ae3de597e91ae8ebe935697a24a7fdbba6ecebe2e416806e35db66cce42570c62f2c880c59c0c6e62 unbundle-snappy.patch" diff --git a/community/java-snappy/add-linux-aarch64-support.patch b/community/java-snappy/add-linux-aarch64-support.patch deleted file mode 100644 index 63b92f5694..0000000000 --- a/community/java-snappy/add-linux-aarch64-support.patch +++ /dev/null @@ -1,75 +0,0 @@ -From cfb114f92f720ab13966eef71f11644ba9dfa5d3 Mon Sep 17 00:00:00 2001 -From: "Santiago M. Mola" <santi@mola.io> -Date: Mon, 7 Mar 2016 21:03:54 +0100 -Subject: [PATCH] Add Linux aarch64 support. - -diff --git a/Makefile.common b/Makefile.common -index e152b68..d198b1f 100755 ---- a/Makefile.common -+++ b/Makefile.common -@@ -42,7 +42,7 @@ endif - - # os=Default is meant to be generic unix/linux - --known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armhf Linux-ppc Linux-ppc64 Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 -+known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armhf Linux-aarch64 Linux-ppc Linux-ppc64 Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64 - os_arch := $(OS_NAME)-$(OS_ARCH) - IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7")) - -@@ -200,6 +200,13 @@ Linux-armhf_LINKFLAGS := -shared -static-libgcc - Linux-armhf_LIBNAME := libsnappyjava.so - Linux-armhf_SNAPPY_FLAGS:= - -+Linux-aarch64_CXX := $(CROSS_PREFIX)g++ -+Linux-aarch64_STRIP := $(CROSS_PREFIX)strip -+Linux-aarch64_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden -+Linux-aarch64_LINKFLAGS := -shared -static-libgcc -+Linux-aarch64_LIBNAME := libsnappyjava.so -+Linux-aarch64_SNAPPY_FLAGS:= -+ - Mac-x86_CXX := g++ -arch i386 - Mac-x86_STRIP := strip -x - Mac-x86_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.4 -fvisibility=hidden -diff --git a/README.md b/README.md -index 89b40ec..977af0d 100755 ---- a/README.md -+++ b/README.md -@@ -146,7 +146,7 @@ Older snapshots of snappy contain a buggy config.h.in that does not work properl - ## Cross-compiling for other platforms - The Makefile contains rules for cross-compiling the native library for other platforms so that the snappy-java JAR can support multiple platforms. For example, to build the native libraries for x86 Linux, x86 and x86-64 Windows, and soft- and hard-float ARM: - -- $ make linux32 win32 win64 linux-arm linux-armhf -+ $ make linux32 win32 win64 linux-arm linux-armhf linux-aarch64 - - If you append `snappy` to the line above, it will also build the native library for the current platform and then build the snappy-java JAR (containing all native libraries built so far). - -@@ -157,6 +157,7 @@ Of course, you must first have the necessary cross-compilers and development lib - * win64: `sudo apt-get install g++-mingw-w64-x86-64` - * arm: `sudo apt-get install g++-arm-linux-gnueabi` - * armhf: `sudo apt-get install g++-arm-linux-gnueabihf` -+ * aarch64: `sudo apt-get install g++-aarch64-linux` - - Unfortunately, cross-compiling for Mac OS X is not currently possible; you must compile within OS X. - -diff --git a/src/main/java/org/xerial/snappy/OSInfo.java b/src/main/java/org/xerial/snappy/OSInfo.java -index ff366fa..cf6b0bc 100755 ---- a/src/main/java/org/xerial/snappy/OSInfo.java -+++ b/src/main/java/org/xerial/snappy/OSInfo.java -@@ -45,6 +45,7 @@ - public static final String PPC64 = "ppc64"; - public static final String IBMZ = "s390"; - public static final String IBMZ_64 = "s390x"; -+ public static final String AARCH_64 = "aarch64"; - - static { - // x86 mappings -@@ -88,6 +89,9 @@ - - // IBM z 64-bit mappings - archMapping.put(IBMZ_64, IBMZ_64); -+ -+ // Aarch64 mappings -+ archMapping.put(AARCH_64, AARCH_64); - } - - public static void main(String[] args) diff --git a/community/java-snappy/unbundle-snappy.patch b/community/java-snappy/unbundle-snappy.patch new file mode 100644 index 0000000000..edd6fd56df --- /dev/null +++ b/community/java-snappy/unbundle-snappy.patch @@ -0,0 +1,65 @@ +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 +@@ -8,7 +8,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.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 +@@ -84,9 +84,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 + $(JAVAH) -force -classpath $(TARGET)/jni-classes -o $@ org.xerial.snappy.BitShuffleNative + +-$(SNAPPY_SRC): $(SNAPPY_GIT_UNPACKED) ++$(SNAPPY_SRC): + + # aarch64 can use big-endian optimzied code + ifeq ($(OS_ARCH),aarch64) +@@ -122,7 +122,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) +@@ -142,7 +142,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: win32 win64 mac64 native-arm linux32 linux64 linux-ppc64le linux-aarch64 + +@@ -151,6 +151,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 + |