git: 4998b87533cc - main - archivers/snappy: Enable RTTI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Jul 2024 02:23:50 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=4998b87533cc000fa9cce7c64e1a499f19efd29a commit 4998b87533cc000fa9cce7c64e1a499f19efd29a Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-07-09 02:16:37 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-07-09 02:23:44 +0000 archivers/snappy: Enable RTTI This fixes the build problem at least in www/proxygen when it expects typeinfo of some Snappy class that is missing w/out the RTTI info. PR: 279969 Approved by: vanilla@FreeBSD.org (maintainer) --- archivers/snappy/Makefile | 1 + archivers/snappy/files/patch-CMakeLists.txt | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/archivers/snappy/Makefile b/archivers/snappy/Makefile index 4f722de84b77..32e11fb58fbf 100644 --- a/archivers/snappy/Makefile +++ b/archivers/snappy/Makefile @@ -1,5 +1,6 @@ PORTNAME= snappy DISTVERSION= 1.2.1 +PORTREVISION= 1 CATEGORIES= archivers MAINTAINER= vanilla@FreeBSD.org diff --git a/archivers/snappy/files/patch-CMakeLists.txt b/archivers/snappy/files/patch-CMakeLists.txt index be8f6d0055d1..52c04875092f 100644 --- a/archivers/snappy/files/patch-CMakeLists.txt +++ b/archivers/snappy/files/patch-CMakeLists.txt @@ -13,7 +13,20 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Use -Wall for clang and gcc. if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") -@@ -248,8 +250,7 @@ configure_file( +@@ -83,8 +85,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 CMAKE_SYSTEM_NAME MATCHES "FreeBSD") ++ string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") ++ endif() + endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make +@@ -248,8 +252,7 @@ configure_file( "snappy-stubs-public.h.in" "${PROJECT_BINARY_DIR}/snappy-stubs-public.h") @@ -23,7 +36,7 @@ PRIVATE "snappy-internal.h" "snappy-stubs-internal.h" -@@ -270,20 +271,34 @@ target_sources(snappy +@@ -270,20 +273,34 @@ target_sources(snappy $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/snappy-stubs-public.h> $<INSTALL_INTERFACE:include/snappy-stubs-public.h> ) @@ -62,7 +75,7 @@ if(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS) add_library(snappy_test_support "") target_sources(snappy_test_support -@@ -399,7 +414,7 @@ if(SNAPPY_INSTALL) +@@ -399,7 +416,7 @@ if(SNAPPY_INSTALL) include(GNUInstallDirs) if(SNAPPY_INSTALL)