summaryrefslogtreecommitdiff
path: root/app-arch/snappy
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/snappy')
-rw-r--r--app-arch/snappy/Manifest8
-rw-r--r--app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch67
-rw-r--r--app-arch/snappy/files/snappy-1.2.0_external-gtest.patch46
-rw-r--r--app-arch/snappy/files/snappy-1.2.0_no-werror.patch24
-rw-r--r--app-arch/snappy/files/snappy-1.2.0_remove-no-rtti.patch32
-rw-r--r--app-arch/snappy/snappy-1.2.0.ebuild (renamed from app-arch/snappy/snappy-1.1.9-r1.ebuild)19
6 files changed, 118 insertions, 78 deletions
diff --git a/app-arch/snappy/Manifest b/app-arch/snappy/Manifest
index 6e39594f1845..c70cd30c8c77 100644
--- a/app-arch/snappy/Manifest
+++ b/app-arch/snappy/Manifest
@@ -1,9 +1,11 @@
AUX snappy-1.1.9-clang-werror.patch 662 BLAKE2B 232e844f269658a757fbb904744b778d1f4c0f5127fb5596143463056238d8e0c1e448bfa0223cf061c2175e397c11965f1db9899434e8777fbc1bf310f0805b SHA512 82424729bbc8698fb0ff3827dfc5cbda9000cb5a80b6f668e30bcea38f1022a7008c60a56fc9b52dc57e771cf59766e4a43f60e04e0f750001c510e71f4263cc
AUX snappy-1.1.9_external_gtest.patch 1092 BLAKE2B 392ee98254749dbf65ae8317dd2c26dfc140b768a08fe265cca26a0dce0eb43a1283eb55659c1fbf8e36e7037e65ec3f5ef970eb6436822fb6af212981f1facb SHA512 0b867b60b6e90551ab3c1ce4990775f2b0085d68fae72c4b63925f772b565cd86e9ad36659dae3a5cfb621ee628a0a547c82356f0f44d67ca2cc4ad9bfe16333
-AUX snappy-1.1.9_gcc_inline.patch 3166 BLAKE2B b4d05035647a97709ba43ee9673fbdaf1a160cc5859fd7401a8cdb67e04ba49bdfe98a9801257356841326b26759eff1022af3d5253628a87b0035af122a8fdd SHA512 5e8389e31a8d6e092843a3456f4a75d1f5f26af25d9d7ddfec283573a423522ce779b9ed4da5d2e3b6346153b5d137070611f88ebc907cfec64748afd29759f2
AUX snappy-1.1.9_remove-no-rtti.patch 1420 BLAKE2B de5194681f365e8d34ac9f56fb3951caad18f1f8af9c3fd65e0ce21de0dd45e8b5fa28c831d04bedc88c8a9fd3b3745c6bacd696b407bb23be766e259ec05aea SHA512 96e16b453ee5e7718930227c8203a5e814e5c0183cf3e13a310d232551dff32bae08dd88552acd714cf373cf7f052630d9c4091776c72d3f451dd395f8bba1b2
+AUX snappy-1.2.0_external-gtest.patch 1586 BLAKE2B 0517d2664cb523f9b07c4250b1092e84775277ddcea3793a4847e5001b931e29b95598463a97208300aa96d184c6d39d8d3266f54a963e58b3612c2ab66a9815 SHA512 886d63c65ec8c8504571e844df26e0a0400d32525685778053acae7591a87fdf46556be87327d01dd03f3bc73fd09687ff1935470b924e3bccfab73624ec5b24
+AUX snappy-1.2.0_no-werror.patch 897 BLAKE2B f7899dc4b92231443c2f0caffd05657de9eaaaaeb765b198024e5216bd2cd63d4c5cee499967ac540f2d4a4a36fa48b88c51c6353510d38a2fa30d739fe8d32b SHA512 c5c734926bc3cdfeb9d52fab5dc04128e45eef7c8708272ca1629e13792e6a8b384a76f561715cf1474b04095d4fb4e4fb09a6d6e08073710d65009340c6e1d7
+AUX snappy-1.2.0_remove-no-rtti.patch 1267 BLAKE2B 1612abae4e0cff9ad219f6271aaaf21b798c131d08b517f9a343855cbb361ec6e9c50b6f33cbdc37640d1ea4548149c8212ca228aa8e307800176c34e66880d8 SHA512 a37fcc5329a067c640bff92649bfc61747a59a3080fc60457972effe5b1f84408cebd1d03841b21a4a1fb0667acd2e6799d7e0df496b457a767be17c40deed70
DIST snappy-1.1.10.tar.gz 1105312 BLAKE2B 5195335fb1883974d290e7dca2b6d928bde2b183f3f61bca9da28855b39fd9a4ee1c24014322d238d2ec94f3a3a55fd43110c88283e85865272226e11cbb4834 SHA512 3578597f1d4ec09104ce0296b825b013590351230dfe56c635081fd282ce7a13a34caf2c283ac77bd24065e2d27af6db068d1f84b98cec2fd39a0e37a0d77070
-DIST snappy-1.1.9.tar.gz 1102382 BLAKE2B 926d03156168e3d4800dc17144db3de2c182c6eb9970d87a00b94fb09b67e403479a64cbed75833b83fd03173c1bb8caaf248a55627e89fe2a34456f12ff3b42 SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024
+DIST snappy-1.2.0.tar.gz 1107265 BLAKE2B 327b60ea032ceb004c5f5e36a0013dc2a44258ec303d0701cf23446904b83e72a66b7e59866a7331c7751a08ce6ec6b871bc056efa6eeb86733d4640569d8072 SHA512 5b3b4e73ff24295885ff9f3d75ccb090e6c7dba40d4965f0892163aa9876296e61590d62023a32d750949268af8ce89df93273b02179d5b3a55de00966a3ae0a
EBUILD snappy-1.1.10-r1.ebuild 1496 BLAKE2B 43e6e9d29cb153100086ec377a1b494beb70303d872dd3c21fceba7a22cdf03717652e1f14deb0ef4b853442706fdc690367995866161325d8604c04ea3b0488 SHA512 ac2d9c78ec6e08bc1060137ba4a2568bf69e28bf724c68ce0648e024195098aedc84dbe961b7615a07817f5c87da7204a6a996649855e3e39ee82acbb91af805
-EBUILD snappy-1.1.9-r1.ebuild 1259 BLAKE2B 9678bcc5829074ffeb2bdf2e05f028c10d2d5a58611242ca6dafcd83b11087ea754b72a2eb4e77e9dddd6b6d36f0606ca5ad4137881b51642f8a4dbd97b72b73 SHA512 f7ae64ae9963d2605c1be080b55b973d59666d8a50821c8e5e5d33acf7718baa0a815037adc41ac8735561e2b4e5fb613aa915ca6e1c4bcb029c61e4012935f4
+EBUILD snappy-1.2.0.ebuild 1499 BLAKE2B 3286a4074cc8cfeef16855b416fb30f2ee1b033d34b5267561e74e0de8c8ef0e11691432c6567bedc7abba9e12336f3eccacf7f25db894db017f8f08e94bedbc SHA512 50981979fb4885c28019ae01c1824ab2f290beffe78fa4e074b87bc0ecaf6faf7f673d3f27c70b34acdfcfbed6fec7ee3f087cfd0de6bf838063365792f4d7cf
MISC metadata.xml 801 BLAKE2B dd35b7d1e7c5113cdf16e4ca002c07bd433f47265486a5f1710c3908d7d494b5c6dde77ef1ede60cab913b74b8ff645dcd89cf2c59b21f313e6cd4f4b4740dfa SHA512 13d13dc4efa03efdded3c8e9313753315a132a05d4b53471f7268715c80a95faea18df466eb9b3a756a018fc21e5f5b31cf10b024652b94cd7cfd40f44d56cc7
diff --git a/app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch b/app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch
deleted file mode 100644
index 04d35f56ee98..000000000000
--- a/app-arch/snappy/files/snappy-1.1.9_gcc_inline.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 0c716d435abe65250100c2caea0e5126ac4e14bd Mon Sep 17 00:00:00 2001
-From: "Georgi D. Sotirov" <gdsotirov@gmail.com>
-Date: Wed, 5 May 2021 14:16:46 +0300
-Subject: [PATCH] Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE
-
-Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE on AdvanceToNextTag to
-fix the following compilation errors and a warning with GCC:
-
-[ 2%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o
-/usr/bin/c++ -DHAVE_CONFIG_H -Dsnappy_EXPORTS
--I/tmp/snappy-1.1.9/build -I/tmp/snappy-1.1.9 -O3
--march=i586 -mtune=i686 -Wall -Wextra -fno-exceptions -fno-rtti -O3
--DNDEBUG -fPIC -std=c++11 -o CMakeFiles/snappy.dir/snappy.cc.o -c
-/tmp/snappy-1.1.9/snappy.cc
-/tmp/snappy-1.1.9/snappy.cc:1017:8: warning: always_inline
-function might not be inlinable [-Wattributes]
- size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
- ^
-/tmp/snappy-1.1.9/snappy.cc: In function 'std::pair<const
-unsigned char*, int> snappy::DecompressBranchless(const uint8_t*, const
-uint8_t*, ptrdiff_t, T, ptrdiff_t) [with T = char*; uint8_t = unsigned
-char; ptrdiff_t = int]':
-/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
-call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
-size_t*)': function body can be overwritten at link time
-/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
- size_t tag_type = AdvanceToNextTag(&ip, &tag);
- ^
-/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
-call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
-size_t*)': function body can be overwritten at link time
- size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
- ^
-/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
- size_t tag_type = AdvanceToNextTag(&ip, &tag);
- ^
-/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
-call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
-size_t*)': function body can be overwritten at link time
- size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
- ^
-/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
- size_t tag_type = AdvanceToNextTag(&ip, &tag);
- ^
-CMakeFiles/snappy.dir/build.make:137: recipe for target
-'CMakeFiles/snappy.dir/snappy.cc.o' failed
-
-Just like with other functions using SNAPPY_ATTRIBUTE_ALWAYS_INLINE
-macro (i.e. __attribute__((always_inline)) ) it is necessary to use C++
-inline specifier.
----
- snappy.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/snappy.cc b/snappy.cc
-index 79dc0e8..51157be 100644
---- a/snappy.cc
-+++ b/snappy.cc
-@@ -1014,7 +1014,7 @@ void MemMove(ptrdiff_t dst, const void* src, size_t size) {
- }
-
- SNAPPY_ATTRIBUTE_ALWAYS_INLINE
--size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
-+inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
- const uint8_t*& ip = *ip_p;
- // This section is crucial for the throughput of the decompression loop.
- // The latency of an iteration is fundamentally constrained by the
diff --git a/app-arch/snappy/files/snappy-1.2.0_external-gtest.patch b/app-arch/snappy/files/snappy-1.2.0_external-gtest.patch
new file mode 100644
index 000000000000..6d929821ba0b
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.2.0_external-gtest.patch
@@ -0,0 +1,46 @@
+From 4e6c67832f53b126d1e54b9398b88f23e75846f3 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 11 Apr 2024 10:05:30 +0300
+Subject: [PATCH 1/3] Use external GTest suite
+
+---
+ CMakeLists.txt | 22 ++--------------------
+ 1 file changed, 2 insertions(+), 20 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 85afe58..e23d2ca 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -319,27 +319,9 @@ endif(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS)
+ if(SNAPPY_BUILD_TESTS)
+ enable_testing()
+
+- # Prevent overriding the parent project's compiler/linker settings on Windows.
+- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+- set(install_gtest OFF)
+- set(install_gmock OFF)
+- set(build_gmock ON)
+-
+ # This project is tested using GoogleTest.
+- add_subdirectory("third_party/googletest")
+-
+- # GoogleTest triggers a missing field initializers warning.
+- if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+- set_property(TARGET gtest
+- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+- set_property(TARGET gmock
+- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
+- endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
+-
+- if(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
+- set_property(TARGET gtest
+- APPEND PROPERTY COMPILE_OPTIONS -Wno-implicit-int-float-conversion)
+- endif(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
++ find_package(GTest REQUIRED)
++ include(GoogleTest)
+
+ add_executable(snappy_unittest "")
+ target_sources(snappy_unittest
+--
+2.43.2
+
diff --git a/app-arch/snappy/files/snappy-1.2.0_no-werror.patch b/app-arch/snappy/files/snappy-1.2.0_no-werror.patch
new file mode 100644
index 000000000000..813ff7a59136
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.2.0_no-werror.patch
@@ -0,0 +1,24 @@
+From 8a262c4de10c4a7e07db41779fd7ca1565d92631 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 11 Apr 2024 10:06:47 +0300
+Subject: [PATCH 2/3] Don't use -Werror
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -66,13 +66,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
+ endif(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra")
+
+- # Use -Werror for clang only.
+- if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+- endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror")
+- endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-
+ # Disable sign comparison warnings. Matches upcoming Bazel setup.
+ if(NOT CMAKE_CXX_FLAGS MATCHES "-Wno-sign-compare")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare")
+--
+2.43.2
+
diff --git a/app-arch/snappy/files/snappy-1.2.0_remove-no-rtti.patch b/app-arch/snappy/files/snappy-1.2.0_remove-no-rtti.patch
new file mode 100644
index 000000000000..dcfeae45cfbb
--- /dev/null
+++ b/app-arch/snappy/files/snappy-1.2.0_remove-no-rtti.patch
@@ -0,0 +1,32 @@
+From 012ff3ef652027abd1a422268cf9f164b386f340 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 11 Apr 2024 10:07:45 +0300
+Subject: [PATCH 3/3] Don't disable RTTI
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,10 +51,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-")
+ add_definitions(-D_HAS_EXCEPTIONS=0)
+-
+- # Disable RTTI.
+- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
+ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ # Use -Wall for clang and gcc.
+ if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
+@@ -88,10 +84,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ # Disable C++ exceptions.
+ string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
+-
+- # Disable RTTI.
+- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+ endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+
+ # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
+--
+2.43.2
+
diff --git a/app-arch/snappy/snappy-1.1.9-r1.ebuild b/app-arch/snappy/snappy-1.2.0.ebuild
index b6cbd7792108..c1a06ba97416 100644
--- a/app-arch/snappy/snappy-1.1.9-r1.ebuild
+++ b/app-arch/snappy/snappy-1.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,9 +10,11 @@ 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 ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-IUSE="test"
+# ${PV%%.*}.FUDGE where FUDGE is incremented if ABI is broken without a new SONAME
+# Please use abidiff on bumps.
+SLOT="0/${PV%%.*}.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 test"
RESTRICT="!test? ( test )"
DEPEND="test? ( dev-cpp/gtest )"
@@ -20,16 +22,17 @@ DEPEND="test? ( dev-cpp/gtest )"
DOCS=( format_description.txt framing_format.txt NEWS README.md )
PATCHES=(
- "${FILESDIR}/${P}_gcc_inline.patch"
- "${FILESDIR}/${P}_external_gtest.patch"
- "${FILESDIR}/${P}-clang-werror.patch"
- "${FILESDIR}/${P}_remove-no-rtti.patch"
+ "${FILESDIR}/${PN}-1.2.0_external-gtest.patch"
+ "${FILESDIR}/${PN}-1.2.0_no-werror.patch"
+ "${FILESDIR}/${PN}-1.2.0_remove-no-rtti.patch"
)
multilib_src_configure() {
local mycmakeargs=(
-DCMAKE_CXX_STANDARD=14 # Latest gtest needs -std=c++14 or newer
-DSNAPPY_BUILD_TESTS=$(usex test)
+ -DSNAPPY_REQUIRE_AVX=$(usex cpu_flags_x86_avx)
+ -DSNAPPY_REQUIRE_AVX2=$(usex cpu_flags_x86_avx2)
-DSNAPPY_BUILD_BENCHMARKS=OFF
# Options below are related to benchmarking, that we disable.
-DHAVE_LIBZ=NO