diff --git a/add-option-to-enable-rtti-set-default-to-current-ben.patch b/add-option-to-enable-rtti-set-default-to-current-ben.patch deleted file mode 100644 index 8630521c588c730d6c5f5108b9fb832e6ad34085..0000000000000000000000000000000000000000 --- a/add-option-to-enable-rtti-set-default-to-current-ben.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 07d1ae496bea8280f4cec08df5745845f7956365 Mon Sep 17 00:00:00 2001 -From: Ganesh Maharaj Mahalingam -Date: Wed, 6 Apr 2022 10:04:21 -0700 -Subject: [PATCH] snappy: Autospec creation for version 1.1.9 - -This patch addresses an issue with Ceph -https://tracker.ceph.com/issues/53060. There have been multiple patches -to upstream snappy, but they have all been rejected and the reasoning -has always been that snappy would like to be consistent in their build -flags with chrome as mentioned at -https://github.com/google/snappy/pull/144#issuecomment-968371042 -add-option-to-enable-rtti-set-default-to-current-ben.patch ---- - CMakeLists.txt | 14 ++++++++++---- - snappy-stubs-internal.h | 2 +- - 2 files changed, 11 insertions(+), 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 672561e..cafdc59 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,8 +53,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - 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-") -+ if(NOT SNAPPY_ENABLE_RTTI) -+ string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") -+ endif(SNAPPY_ENABLE_RTTI) - else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # Use -Wall for clang and gcc. - if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") -@@ -78,8 +80,10 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - 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") -+ if(NOT SNAPPY_ENABLE_RTTI) -+ string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") -+ endif(SNAPPY_ENABLE_RTTI) - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - - # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make -@@ -98,6 +102,8 @@ option(SNAPPY_REQUIRE_AVX2 "Target processors with AVX2 support." OFF) - - option(SNAPPY_INSTALL "Install Snappy's header and library" ON) - -+option(SNAPPY_ENABLE_RTTI "Enable RTTI for Snappy's library" OFF) -+ - include(TestBigEndian) - test_big_endian(SNAPPY_IS_BIG_ENDIAN) - -diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h -index c2a838f..5bf7870 100644 ---- a/snappy-stubs-internal.h -+++ b/snappy-stubs-internal.h -@@ -100,7 +100,7 @@ - - // Inlining hints. - #if HAVE_ATTRIBUTE_ALWAYS_INLINE --#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) -+#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE - #else - #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE - #endif // HAVE_ATTRIBUTE_ALWAYS_INLINE --- -2.24.4 diff --git a/snappy-1.2.1.tar.gz b/snappy-1.2.1.tar.gz deleted file mode 100644 index 76606382555f99ad19b188094b59d6e278755bbe..0000000000000000000000000000000000000000 Binary files a/snappy-1.2.1.tar.gz and /dev/null differ diff --git a/snappy-1.2.2.tar.gz b/snappy-1.2.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3ea4f05b319c5e7f2e65fe15f3a014103c06bdd3 Binary files /dev/null and b/snappy-1.2.2.tar.gz differ diff --git a/snappy-do-not-disable-rtti.patch b/snappy-do-not-disable-rtti.patch new file mode 100644 index 0000000000000000000000000000000000000000..f3d29448025bebc6bea6422b982b162d0eae1cb7 --- /dev/null +++ b/snappy-do-not-disable-rtti.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,10 +81,6 @@ + # 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(MSVC) + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make diff --git a/snappy-thirdparty.patch b/snappy-thirdparty.patch index a1bfdb7342ea7485c32192639bc2527f7665f2e9..0569f1952f0312d2ee98f36fb252ae03df2f2f1a 100644 --- a/snappy-thirdparty.patch +++ b/snappy-thirdparty.patch @@ -1,15 +1,6 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -26,7 +26,7 @@ - # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --cmake_minimum_required(VERSION 3.1) -+cmake_minimum_required(VERSION 3.5) - project(Snappy VERSION 1.2.1 LANGUAGES C CXX) - - # C++ standard can be overridden when this is used as a sub-project. @@ -319,34 +319,12 @@ if(SNAPPY_BUILD_TESTS) enable_testing() diff --git a/snappy.spec b/snappy.spec index cfc172ec45d617112314927085d357ebf4779865..09942f5a12be3b8532ea6d5d03bfc2693a3d81fc 100644 --- a/snappy.spec +++ b/snappy.spec @@ -1,13 +1,13 @@ Name: snappy -Version: 1.2.1 +Version: 1.2.2 Release: 1 Summary: A fast compressor/decompressor -License: BSD +License: BSD-3-Clause URL: https://github.com/google/snappy Source0: https://github.com/google/snappy/archive/%{version}/%{name}-%{version}.tar.gz Patch0: snappy-thirdparty.patch -Patch2: add-option-to-enable-rtti-set-default-to-current-ben.patch +Patch2: snappy-do-not-disable-rtti.patch BuildRequires: gcc-c++ make gtest-devel cmake @@ -30,7 +30,7 @@ This package is the development files for snappy. %autosetup -n %{name}-%{version} -p1 %build -%cmake -DSNAPPY_ENABLE_RTTI=ON -DCMAKE_CXX_STANDARD=14 +%cmake -DSNAPPY_ENABLE_RTTI=ON -DCMAKE_CXX_STANDARD=17 %cmake_build %install @@ -69,6 +69,9 @@ EOF %doc NEWS README.md %changelog +* Wed May 14 2025 Funda Wang - 1.2.2-1 +- update to 1.2.2 + * Fri Mar 07 2025 Funda Wang - 1.2.1-1 - update to 1.2.1