mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
app-arch/snappy: add 1.2.2
Closes: https://bugs.gentoo.org/951682 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41351 Closes: https://github.com/gentoo/gentoo/pull/41351 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
6104eabf28
commit
6768ee4acf
@ -1 +1,2 @@
|
||||
DIST snappy-1.2.1.tar.gz 1108761 BLAKE2B a3a93331344052e8da18b220575764ba6a75f471867e946fcca48a18b68ff5335e672b0b54100ac18e435e87ee66bcfea3ead7349fe016ec7d9bb7b57e2c7386 SHA512 e7290d79ddd45605aafd02cba9eaa32309c94af04f137552a97a915c391f185dccab9b7b21a01b28f3f446be420232c3c22d91c06e0be6e1e2e32d645174798c
|
||||
DIST snappy-1.2.2.tar.gz 1108618 BLAKE2B 2f809e86c798386d5f3abe1db1c8ecce787503889fa8be57bdf2a81712af19d264c802f161ed5e2406ea988a8083faab67c6695db2dd30cca0c0aeff20be04aa SHA512 0c1e1019e1bec9281f9877996d896e59e1533456130143224acb9cbfc35c1b0dd9de0a76e4a36494844d9ec58c295eed8c50bdf6dbabe47cf679652eb24b1281
|
||||
|
||||
32
app-arch/snappy/files/snappy-1.2.2_remove-no-rtti.patch
Normal file
32
app-arch/snappy/files/snappy-1.2.2_remove-no-rtti.patch
Normal file
@ -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(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(MSVC)
|
||||
|
||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
||||
--
|
||||
2.43.2
|
||||
|
||||
48
app-arch/snappy/snappy-1.2.2.ebuild
Normal file
48
app-arch/snappy/snappy-1.2.2.ebuild
Normal file
@ -0,0 +1,48 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
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"
|
||||
# ABI may be broken without a new SONAME. Please use abidiff on bumps.
|
||||
SLOT="0/1.1"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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 )"
|
||||
|
||||
DOCS=( format_description.txt framing_format.txt NEWS README.md )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.2.0_external-gtest.patch"
|
||||
"${FILESDIR}/${PN}-1.2.0_no-werror.patch"
|
||||
"${FILESDIR}/${PN}-1.2.2_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
|
||||
-DHAVE_LIBLZO2=NO
|
||||
-DHAVE_LIBLZ4=NO
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
# run tests directly to get verbose output
|
||||
cd "${S}" || die
|
||||
"${BUILD_DIR}"/snappy_unittest || die
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user