summaryrefslogtreecommitdiffstats
path: root/development/snappy
diff options
context:
space:
mode:
Diffstat (limited to 'development/snappy')
-rw-r--r--development/snappy/73.patch23
-rw-r--r--development/snappy/README32
-rw-r--r--development/snappy/snappy.SlackBuild40
-rw-r--r--development/snappy/snappy.info10
4 files changed, 67 insertions, 38 deletions
diff --git a/development/snappy/73.patch b/development/snappy/73.patch
new file mode 100644
index 0000000000..20f7bfada6
--- /dev/null
+++ b/development/snappy/73.patch
@@ -0,0 +1,23 @@
+From 89342ecf34894461cc64c9cbe3f8bc0d18df5073 Mon Sep 17 00:00:00 2001
+From: "liangyukun.lyk" <lyk19961210@gmail.com>
+Date: Mon, 27 Aug 2018 18:08:46 +0800
+Subject: [PATCH] fix cmake build error
+
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 41a2124..2a822dd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -145,6 +145,9 @@ if(SNAPPY_BUILD_TESTS)
+ target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
+ target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
+
++ if(HAVE_GTEST)
++ target_link_libraries(snappy_unittest gtest)
++ endif(HAVE_GTEST)
+ if(HAVE_LIBZ)
+ target_link_libraries(snappy_unittest z)
+ endif(HAVE_LIBZ)
diff --git a/development/snappy/README b/development/snappy/README
index 0d694cb59e..01f12d35f0 100644
--- a/development/snappy/README
+++ b/development/snappy/README
@@ -1,21 +1,23 @@
-Snappy is a compression/decompression library. It does not aim for maximum
-compression, or compatibility with any other compression library; instead,
-it aims for very high speeds and reasonable compression. For instance,
-compared to the fastest mode of zlib, Snappy is an order of magnitude faster
-for most inputs, but the resulting compressed files are anywhere from 20% to
-100% bigger. (For more information, see "Performance", below.)
+Snappy is a compression/decompression library. It does not aim for
+maximum compression, or compatibility with any other compression
+library; instead, it aims for very high speeds and reasonable
+compression. For instance, compared to the fastest mode of zlib,
+Snappy is an order of magnitude faster for most inputs, but the
+resulting compressed files are anywhere from 20% to 100% bigger. (For
+more information, see "Performance", below.)
Snappy has the following properties:
-* Fast: Compression speeds at 250 MB/sec and beyond, with no assembler code.
-See "Performance" below.
-* Stable: Over the last few years, Snappy has compressed and decompressed
-petabytes of data in Google's production environment. The Snappy bitstream
-format is stable and will not change between versions.
-* Robust: The Snappy decompressor is designed not to crash in the face of
-corrupted or malicious input.
-* Free and open source software: Snappy is licensed under a BSD-type license.
-For more information, see the included COPYING file.
+* Fast: Compression speeds at 250 MB/sec and beyond, with no assembler
+ code. See "Performance" below.
+* Stable: Over the last few years, Snappy has compressed and
+ decompressed petabytes of data in Google's production environment. The
+ Snappy bitstream format is stable and will not change between
+ versions.
+* Robust: The Snappy decompressor is designed not to crash in the face
+ of corrupted or malicious input.
+* Free and open source software: Snappy is licensed under a BSD-type
+ license. For more information, see the included COPYING file.
Snappy has previously been called "Zippy" in some Google presentations
and the like.
diff --git a/development/snappy/snappy.SlackBuild b/development/snappy/snappy.SlackBuild
index e69476def8..dfdae90c56 100644
--- a/development/snappy/snappy.SlackBuild
+++ b/development/snappy/snappy.SlackBuild
@@ -1,10 +1,10 @@
#!/bin/sh
#
# Slackware build script for Snappy
-# Written by Mário Antunes (mariolpantunes@gmail.com)
+# Written by Mário Antunes (mariolpantunes@gmail.com)
PRGNAM=snappy
-VERSION=${VERSION:-1.1.3}
+VERSION=${VERSION:-1.1.8}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
@@ -41,37 +41,41 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
+
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --sysconfdir=/etc \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- --enable-shared \
- --disable-gtest \
- --localstatedir=/var
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Fix build with gtest installed
+patch -p1 < $CWD/73.patch
+
+mkdir -p build
+cd build
+cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE="Release" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ ..
make
make install DESTDIR=$PKG
+cd ..
+
+ls -la
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
diff --git a/development/snappy/snappy.info b/development/snappy/snappy.info
index 3833ca16f5..0452162f11 100644
--- a/development/snappy/snappy.info
+++ b/development/snappy/snappy.info
@@ -1,10 +1,10 @@
PRGNAM="snappy"
-VERSION="1.1.3"
-HOMEPAGE="http://google.github.io/snappy/"
-DOWNLOAD="https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz"
-MD5SUM="7358c82f133dc77798e4c2062a749b73"
+VERSION="1.1.8"
+HOMEPAGE="https://github.com/google/snappy"
+DOWNLOAD="https://github.com/google/snappy/archive/1.1.8/snappy-1.1.8.tar.gz"
+MD5SUM="70e48cba7fecf289153d009791c9977f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Mário Antunes"
+MAINTAINER="Mário Antunes"
EMAIL="mariolpantunes@gmail.com"