aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-07 01:26:07 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-07 01:26:07 +0700
commit094df1d5210d15b2e05fd98b47e9a91221c283f5 (patch)
tree86a6b9073c8133396d6f04bf0c4305f416ac639a
parent6547be4996ee58951c779c0f17be4a33f57b4719 (diff)
development/snappy: Fix build with gtest installed.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--development/snappy/73.patch23
-rw-r--r--development/snappy/snappy.SlackBuild5
2 files changed, 27 insertions, 1 deletions
diff --git a/development/snappy/73.patch b/development/snappy/73.patch
new file mode 100644
index 0000000000000..20f7bfada6892
--- /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/snappy.SlackBuild b/development/snappy/snappy.SlackBuild
index fcaa12847c149..a75bde58c07cc 100644
--- a/development/snappy/snappy.SlackBuild
+++ b/development/snappy/snappy.SlackBuild
@@ -5,7 +5,7 @@
PRGNAM=snappy
VERSION=${VERSION:-1.1.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -52,6 +52,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-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 \