summaryrefslogtreecommitdiff
path: root/app-arch/snappy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-arch/snappy
reinit the tree, so we can have metadata
Diffstat (limited to 'app-arch/snappy')
-rw-r--r--app-arch/snappy/Manifest13
-rw-r--r--app-arch/snappy/files/snappy-1.1.6-0001-cmake-Use-GNUInstallDirs-to-provide-configurable-cor.patch91
-rw-r--r--app-arch/snappy/files/snappy-1.1.6-0002-cmake-Correct-unify-CMake-install-path.patch37
-rw-r--r--app-arch/snappy/files/snappy-1.1.6-0003-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch28
-rw-r--r--app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch31
-rw-r--r--app-arch/snappy/metadata.xml15
-rw-r--r--app-arch/snappy/snappy-1.1.3-r1.ebuild40
-rw-r--r--app-arch/snappy/snappy-1.1.6.ebuild66
-rw-r--r--app-arch/snappy/snappy-1.1.7.ebuild64
9 files changed, 385 insertions, 0 deletions
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest
new file mode 100644
index 000000000000..e3778c7e3115
--- /dev/null
+++ b/app-arch/snappy/Manifest
@@ -0,0 +1,13 @@
+AUX snappy-1.1.6-0001-cmake-Use-GNUInstallDirs-to-provide-configurable-cor.patch 3562 SHA256 f50f262a44ca45651fe0ae466ad2187383cf3b8bd124db7b8812e6c6ed6429bd SHA512 8d97bca1ec972e3b0727d5d2705cf1a499a62de478c653fba39deac5da5bc8c67f29cb83eaaa95ba08681e1c12f507d25bb6f903e6daf1da776ec017065c139d WHIRLPOOL 0fc31996dbf0fb07c10d11969a84835dc543ddb2f010d0f3e93977e496affe8e9d965e4f53ff1c221c7a3dc7c9503254e6b810a89c6a92cc13efd8612c4d2f5d
+AUX snappy-1.1.6-0002-cmake-Correct-unify-CMake-install-path.patch 1451 SHA256 c818b8b2a70ddaf270029662dd41a6067ddf231c558f411452fe5f385a071d6c SHA512 2ad8647f89ff59ff96a24c7ab5067292d58269b7413e18c9b5165cfced8526abbf2d008f19bb18288a78a9a4f479790899648b1ef55df318eacae64d33fe417b WHIRLPOOL de39e8e6d21058a52a8913a245b018fe3802bbb286555279c648481e4464b23c2c8bff90399dc78cc00dbd38377f642fd71aa7ff7cad7824a67435f67aaf8020
+AUX snappy-1.1.6-0003-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch 1123 SHA256 8801b43c9c5aaefc38686f9c7b87f539b72f8f42b7ce866c971d62fff57355f4 SHA512 05265f5af9edbb69c518c4cd5260f6ef0c318292fb7d93556ab710d35d143a9d9d212b1f70b3f8e0fa6310b178f6e65bb07c370f33d7203a48a1101b660753bf WHIRLPOOL 4aa9fde6b7e827ec1d7657b6d1857d8009afcb9a46fd6d81a4b09ca5df8b01f2970573b659e0b4834666d5d2251a0694ed23ef5a79c47b4cf6524c6edf437890
+AUX snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch 1017 SHA256 f83e3f116315bf4e8b4cf4c2a89470fae50a82d8780322714672a4e8f7bebf2f SHA512 52bf7db93ddfaba96fb16379f5d3e923bb27b6763db15698b5a5b6529c17e667b9b5c98108291a8eb9ddb98b7cfb0b5836602f66ac6beeacafa9da654e632ef4 WHIRLPOOL ff63a1029a5eba8d4c86fa57fa19fa76ef74924299bf16dd833366557abf21f449568ddd93f4b46b8103fc57c2bbb7da5fb1eee0690baa7911f0a9f451f27d8f
+DIST snappy-1.1.3.tar.gz 1509026 SHA256 2f1e82adf0868c9e26a5a7a3115111b6da7e432ddbac268a7ca2fae2a247eef3 SHA512 4c4f47c657a072989179be9df0e5e98d14f4a67c27ec7ae0e5a15d14289a75d4e266bc6c5c89723f3e9860408ffcc7138a815f8ad9299407c4a1946fc00ab5bf WHIRLPOOL 97f82d1439973582f0ba3fde43ba2ee2c23b2512e0ee426b9e372fbfbba87921355c1f6bf0bf80671d7c4da26a23d480508cb7a188e414b9cb5d95996bfabe39
+DIST snappy-1.1.6.tar.gz 1128388 SHA256 6fa92cde5b2caefd0d9a60336991ba42e5a7ddc3bdc36c5610451373751d0495 SHA512 38698b7ff03b39528de88bf62a84fcfc6f3dce2e98efa25a97ebdf396b6aba49860072ffa99830323944ab41c3721a3c53ff2636beb3422d5f812e84afe8dadf WHIRLPOOL 87ee2fd77e4c68911d5bd5c5a278460b8e4200a2b4c96a454b2af0b61444588dfad68015effd22bebfb2bf8f9d3e0c6b8f8cc3e89614626f0bc1f91b18402eec
+DIST snappy-1.1.7.tar.gz 1090550 SHA256 3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4 SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf WHIRLPOOL ed5dacdbdcbfbe88982b23d389d781548bf8780c1ecb9b99c8a09442821a97b6aca2fe5eec86b8db1c8e305e17b381391a595d5abacd24b9ace5048dc64cf232
+EBUILD snappy-1.1.3-r1.ebuild 965 SHA256 e70878882f78c0da0b3aca3a83e54be007e905148d18777919f8126f05555ac4 SHA512 78b96490c77f3a70cd5fb84e54aa50fc05185e064214c02baf9edd6519e236b76bfba64cec67b32f0d1860dfc6e73dd9be143d97d7421be0d93e0db0f2723293 WHIRLPOOL 824be82c9097a0143355e935fd7663f41542138141bbaf4aca1d67e55a83d080786db1f02fddf08a8db90734674b82a62f2a62c1e1bc30abb375ed7ac48b41af
+EBUILD snappy-1.1.6.ebuild 2096 SHA256 62f14b41dd8a8fc36f98f65b76f82c30eec52347040d7f8d95950924faf01b51 SHA512 4e91da054ef6db6625654883458eec94e154575114ebeb1e47f15682aaee298357ec469e1ae428a9d90d1e00f62d5e33bce394ca7ad7d12c4f8b91720f7b481f WHIRLPOOL e32384f23be790be148e767fdcc56fbeaa7b2b64e6d9af14d567c7294391eac9847a129794439974b4beea0a27583e4fa0afea6443ad2d215529c50cd1a86f40
+EBUILD snappy-1.1.7.ebuild 1908 SHA256 390eba923ba16713ba58295a473b7617063bee3a3aefba3a3a8ae7fedbdc42e7 SHA512 e6308d87213eaa2e70b8afd779ebdad8379ec47d78a1f5d958aa70f87c736d0433107aac23ecf863c41c0ffac26f403228ba70a449e6d3087f5d77c9b6634107 WHIRLPOOL 68f2a62cbfd4141f726ee7215e230567f13f82ea8617f681bbe6dc8f4f8d1f3f1845ed32b21e5c5ee6d77ea3254bf40a1e56efa6290eacbbeeda56e6215c8d16
+MISC ChangeLog 6533 SHA256 d83e8fab2af5d2e43708dc0f4b590875e2f798aac1ede0180e004029721b06ea SHA512 e8935a5c5c262c250e4aea2f8169585df61ab57cf84d7cc2a8e25785d2efd75d3f6634036533b04361decf841f4dc699e794ccaf87a9da8b330680265549d7d0 WHIRLPOOL 59b08a6091134ffe7ad95eaf08dba4cb510745cecb71c1ee99e86ecc89e533460ee67771e3b7716f80ca4f5631c87fabdf9471c458892f3d46854cae0fe471f5
+MISC ChangeLog-2015 3009 SHA256 496f7049cf9169cd876f483f36355d834dae5d53ee5e7d4ea832d94f8a91223b SHA512 16b814e292d70e3d7b8483c2e033810a0c92cdbc2f6916c3804129fbc06b19315dd5fafb0984c1ec34dd269b447465e07e1eb2513a7f2bce2e508f51c3794b38 WHIRLPOOL 89c95a8bf42c4ca793e68599238a4baee414f5537937ac58019410e2740e5aa881cb5a235caf3eecfefec7ca031a1f04d4808c5340bd42edd85547d9d6857664
+MISC metadata.xml 584 SHA256 f04f34c234737a786878b755c50e60c82f305a916e6540d78d64e4e125163da9 SHA512 5897170c6fb84f520d879b5df295608b92376150ed2535b578ff04c5cfb5a0ba334a7aee3ad1ef41a8ed45b3fb36425e1dc0e54c0fb880e0c2bf72803a2da552 WHIRLPOOL ca57c4d5abcd31ffe119bb9a85653c5addc651846cffe9d0196fa91eb1a0b748589962b580b544501b8af52b57fa89347bf7b0d0056792b89233e202abf03232
diff --git a/app-arch/snappy/files/snappy-1.1.6-0001-cmake-Use-GNUInstallDirs-to-provide-configurable-cor.patch b/app-arch/snappy/files/snappy-1.1.6-0001-cmake-Use-GNUInstallDirs-to-provide-configurable-cor.patch
new file mode 100644
index 000000000000..b83bc93465af
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.1.6-0001-cmake-Use-GNUInstallDirs-to-provide-configurable-cor.patch
@@ -0,0 +1,91 @@
+From 7507c5fcadc53894b128f3b9fc4b073d15564704 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 29 Jun 2017 11:12:44 +0200
+Subject: [PATCH 1/3] cmake: Use GNUInstallDirs to provide configurable &
+ correct install dirs
+
+Use the GNUInstallDirs CMake module to provide a standard set of
+variables to control install paths. Otherwise, the package is
+incorrectly installed into 'lib' (instead of 'lib64') on 64-bit systems.
+While this could be solved via providing custom variables for each
+directory, it is simpler to reuse what's already in CMake.
+---
+ CMakeLists.txt | 21 +++++++++------------
+ cmake/SnappyConfig.cmake.in | 8 ++++----
+ 2 files changed, 13 insertions(+), 16 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index de52666..1ca77c1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,7 @@ INCLUDE(CheckLibraryExists)
+ INCLUDE(CheckCXXSourceCompiles)
+ INCLUDE(TestBigEndian)
+ INCLUDE(CMakePackageConfigHelpers)
++INCLUDE(GNUInstallDirs)
+
+ TEST_BIG_ENDIAN(WORDS_BIG_ENDIAN)
+ IF (WORDS_BIG_ENDIAN)
+@@ -98,33 +99,29 @@ INSTALL(FILES snappy.h
+ snappy-c.h
+ snappy-sinksource.h
+ ${Snappy_BINARY_DIR}/snappy-stubs-public.h
+- DESTINATION include)
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+ INSTALL(TARGETS snappy
+ EXPORT SnappyTargets
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+-INSTALL(EXPORT SnappyTargets NAMESPACE Snappy:: DESTINATION lib/cmake/Snappy)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++INSTALL(EXPORT SnappyTargets NAMESPACE Snappy:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Snappy)
+
+ SET_TARGET_PROPERTIES(snappy PROPERTIES VERSION ${PROJECT_VERSION}
+ SOVERSION ${PROJECT_VERSION_MAJOR})
+
+-SET(INCLUDE_INSTALL_DIR include)
+-SET(LIBRARY_INSTALL_DIR lib)
+-SET(BINARY_INSTALL_DIR bin)
+-
+ CONFIGURE_PACKAGE_CONFIG_FILE(cmake/SnappyConfig.cmake.in
+ ${Snappy_BINARY_DIR}/SnappyConfig.cmake
+- INSTALL_DESTINATION lib/Snappy/cmake
+- PATH_VARS INCLUDE_INSTALL_DIR LIBRARY_INSTALL_DIR BINARY_INSTALL_DIR
++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/Snappy/cmake
++ PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_BINDIR
+ )
+
+ WRITE_BASIC_PACKAGE_VERSION_FILE(${Snappy_BINARY_DIR}/SnappyConfigVersion.cmake
+ COMPATIBILITY SameMajorVersion)
+ INSTALL(FILES ${Snappy_BINARY_DIR}/SnappyConfig.cmake
+ ${Snappy_BINARY_DIR}/SnappyConfigVersion.cmake
+- DESTINATION lib/cmake)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+
+ ENABLE_TESTING()
+
+diff --git a/cmake/SnappyConfig.cmake.in b/cmake/SnappyConfig.cmake.in
+index 5e604fe..d47656b 100644
+--- a/cmake/SnappyConfig.cmake.in
++++ b/cmake/SnappyConfig.cmake.in
+@@ -2,8 +2,8 @@ set(SNAPPY_VERSION @SNAPPY_MAJOR@.@SNAPPY_MINOR@.@SNAPPY_PATCHLEVEL@)
+
+ @PACKAGE_INIT@
+
+-set_and_check(SNAPPY_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
+-set_and_check(SNAPPY_LIBRARY_DIR "@PACKAGE_LIBRARY_INSTALL_DIR@")
+-set_and_check(SNAPPY_BINARY_DIR "@PACKAGE_BINARY_INSTALL_DIR@")
++set_and_check(SNAPPY_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
++set_and_check(SNAPPY_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
++set_and_check(SNAPPY_BINARY_DIR "@PACKAGE_CMAKE_INSTALL_BINDIR@")
+
+-check_required_components(SNAPPY)
+\ No newline at end of file
++check_required_components(SNAPPY)
+--
+2.13.2
+
diff --git a/app-arch/snappy/files/snappy-1.1.6-0002-cmake-Correct-unify-CMake-install-path.patch b/app-arch/snappy/files/snappy-1.1.6-0002-cmake-Correct-unify-CMake-install-path.patch
new file mode 100644
index 000000000000..0b7faa08772b
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.1.6-0002-cmake-Correct-unify-CMake-install-path.patch
@@ -0,0 +1,37 @@
+From e801bd3553dc4e49e19a031ce4007620c35764f8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 29 Jun 2017 11:14:37 +0200
+Subject: [PATCH 2/3] cmake: Correct & unify CMake install path
+
+The CMake file is using 'lib/cmake/Snappy', 'lib/Snappy/cmake'
+and 'lib/cmake' inconsistently. Replace all of them with a single
+'lib/cmake/Snappy' that matches most of standard CMake packages.
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1ca77c1..3d1a304 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -113,7 +113,7 @@ SET_TARGET_PROPERTIES(snappy PROPERTIES VERSION ${PROJECT_VERSION}
+
+ CONFIGURE_PACKAGE_CONFIG_FILE(cmake/SnappyConfig.cmake.in
+ ${Snappy_BINARY_DIR}/SnappyConfig.cmake
+- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/Snappy/cmake
++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Snappy
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_BINDIR
+ )
+
+@@ -121,7 +121,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(${Snappy_BINARY_DIR}/SnappyConfigVersion.cmake
+ COMPATIBILITY SameMajorVersion)
+ INSTALL(FILES ${Snappy_BINARY_DIR}/SnappyConfig.cmake
+ ${Snappy_BINARY_DIR}/SnappyConfigVersion.cmake
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Snappy)
+
+ ENABLE_TESTING()
+
+--
+2.13.2
+
diff --git a/app-arch/snappy/files/snappy-1.1.6-0003-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch b/app-arch/snappy/files/snappy-1.1.6-0003-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
new file mode 100644
index 000000000000..b1b8a2cd5e97
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.1.6-0003-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
@@ -0,0 +1,28 @@
+From 93d30c53e28759c9dbe82535821f3b1df29e5767 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 29 Jun 2017 10:01:37 +0200
+Subject: [PATCH 3/3] cmake: Add missing linking to GTEST_LIBRARIES
+
+Since the snappy_unittest target uses gtest routines (when available),
+it needs to link to gtest explicitly. Otherwise, the build fails due
+to unavailable gtest symbols.
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d1a304..9f2cc23 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -144,7 +144,7 @@ ENDIF (HAVE_LIBQUICKLZ)
+ ADD_EXECUTABLE(snappy-unittest snappy_unittest.cc snappy-test.cc)
+ TARGET_COMPILE_DEFINITIONS(snappy-unittest PRIVATE -DHAVE_CONFIG_H)
+ TARGET_LINK_LIBRARIES(snappy-unittest snappy ${COMPRESSION_LIBS}
+- ${GFLAGS_LIBRARIES})
++ ${GFLAGS_LIBRARIES} ${GTEST_LIBRARIES})
+ TARGET_INCLUDE_DIRECTORIES(snappy-unittest BEFORE PRIVATE ${Snappy_SOURCE_DIR}
+ ${GTEST_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS})
+
+--
+2.13.2
+
diff --git a/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch b/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
new file mode 100644
index 000000000000..3327b8bcf0ac
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
@@ -0,0 +1,31 @@
+From 1c9f699a6275f085ad710c9ae940e096ce552452 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 31 Jul 2017 20:49:22 +0200
+Subject: [PATCH] cmake: Add missing linking to GTEST_LIBRARIES
+
+Since the snappy_unittest target uses gtest routines (when available),
+it needs to link to gtest explicitly. Otherwise, the build fails due
+to unavailable gtest symbols.
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3f534b1..3a44aa9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -118,7 +118,10 @@ if(SNAPPY_BUILD_TESTS)
+ "${PROJECT_SOURCE_DIR}/snappy-test.cc"
+ )
+ target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
+- target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
++ target_link_libraries(snappy_unittest
++ snappy
++ ${GFLAGS_LIBRARIES}
++ ${GTEST_LIBRARIES})
+
+ if(HAVE_LIBZ)
+ target_link_libraries(snappy_unittest z)
+--
+2.14.1
+
diff --git a/app-arch/snappy/metadata.xml b/app-arch/snappy/metadata.xml
new file mode 100644
index 000000000000..e5215ea6cd04
--- /dev/null
+++ b/app-arch/snappy/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type='person'>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <longdescription lang="en">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.</longdescription>
+ <upstream>
+ <remote-id type="github">google/snappy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-arch/snappy/snappy-1.1.3-r1.ebuild b/app-arch/snappy/snappy-1.1.3-r1.ebuild
new file mode 100644
index 000000000000..cdb3bf06ca4e
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.3-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools multilib-minimal
+
+DESCRIPTION="A high-speed compression/decompression library by Google"
+HOMEPAGE="https://github.com/google/snappy"
+SRC_URI="https://github.com/google/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+src_prepare() {
+ # Avoid automagic lzo and gzip by not checking for it
+ sed -i '/^CHECK_EXT_COMPRESSION_LIB/d' configure.ac || die
+
+ # don't install unwanted files
+ sed -i 's/COPYING INSTALL//' Makefile.am || die
+
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --without-gflags
+ --disable-gtest
+ $(use_enable static-libs static)
+ )
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ find "${ED%/}"/usr/lib* -name '*.la' -delete || die
+}
diff --git a/app-arch/snappy/snappy-1.1.6.ebuild b/app-arch/snappy/snappy-1.1.6.ebuild
new file mode 100644
index 000000000000..bd50aa801442
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.6.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit cmake-multilib
+
+DESCRIPTION="A high-speed compression/decompression library by Google"
+HOMEPAGE="https://github.com/google/snappy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV%%.*}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs test"
+# upstream killed static lib support with build system update
+# (and we have packages depending on the flag)
+REQUIRED_USE="!static-libs"
+
+# all test dependencies are optional:
+# - gflags-2.2 is supposedly needed for command-line option parsing
+# but it's a huge hack and does not work,
+# - gtest probably gives nicer output,
+# - compression libraries are used for benchmarks which we do not run.
+DEPEND="test? ( dev-cpp/gtest )"
+
+# AUTHORS is useless, ChangeLog is stale
+DOCS=( format_description.txt framing_format.txt NEWS README.md )
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/snappy-1.1.6-0001-cmake-Use-GNUInstallDirs-to-provide-configurable-cor.patch
+ "${FILESDIR}"/snappy-1.1.6-0002-cmake-Correct-unify-CMake-install-path.patch
+ "${FILESDIR}"/snappy-1.1.6-0003-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
+ )
+
+ # command-line option parsing does not work at all, so just force
+ # it off
+ sed -i -e '/run_microbenchmarks/s:true:false:' snappy-test.cc || die
+
+ default
+}
+
+multilib_src_configure() {
+ # TODO: would be nice to make unittest build conditional
+ # but it is not a priority right now
+ local mycmakeargs=(
+ # use gtest for tests only
+ -DCMAKE_DISABLE_FIND_PACKAGE_GTest=$(usex '!test')
+ # gflags does not work anyway
+ -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON
+
+ # we do not want to run benchmarks, and those are only used
+ # for benchmarks
+ -DHAVE_LIBZ=NO
+ -DHAVE_LIBLZO2=NO
+ -DHAVE_LIBLZF=NO
+ -DHAVE_LIBQUICKLZ=NO
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ # run tests directly to get verbose output
+ cd "${S}" || die
+ "${BUILD_DIR}"/snappy-unittest || die
+}
diff --git a/app-arch/snappy/snappy-1.1.7.ebuild b/app-arch/snappy/snappy-1.1.7.ebuild
new file mode 100644
index 000000000000..c87bf5a20151
--- /dev/null
+++ b/app-arch/snappy/snappy-1.1.7.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit cmake-multilib
+
+DESCRIPTION="A high-speed compression/decompression library by Google"
+HOMEPAGE="https://github.com/google/snappy"
+SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV%%.*}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs test"
+# upstream killed static lib support with build system update
+# (and we have packages depending on the flag)
+REQUIRED_USE="!static-libs"
+
+# all test dependencies are optional:
+# - gflags-2.2 is supposedly needed for command-line option parsing
+# but it's a huge hack and does not work,
+# - gtest probably gives nicer output,
+# - compression libraries are used for benchmarks which we do not run.
+DEPEND="test? ( dev-cpp/gtest )"
+
+# AUTHORS is useless, ChangeLog is stale
+DOCS=( format_description.txt framing_format.txt NEWS README.md )
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/snappy-1.1.7-0001-cmake-Add-missing-linking-to-GTEST_LIBRARIES.patch
+ )
+
+ # command-line option parsing does not work at all, so just force
+ # it off
+ sed -i -e '/run_microbenchmarks/s:true:false:' snappy-test.cc || die
+
+ default
+}
+
+multilib_src_configure() {
+ # TODO: would be nice to make unittest build conditional
+ # but it is not a priority right now
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=ON
+
+ # use gtest for tests only
+ -DCMAKE_DISABLE_FIND_PACKAGE_GTest=$(usex '!test')
+ # gflags does not work anyway
+ -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON
+
+ # we do not want to run benchmarks, and those are only used
+ # for benchmarks
+ -DHAVE_LIBZ=NO
+ -DHAVE_LIBLZO2=NO
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ # run tests directly to get verbose output
+ cd "${S}" || die
+ "${BUILD_DIR}"/snappy_unittest || die
+}