git: 57c666779230 - main - archivers/snappy: Enable RTTI info

Yuri Victorovich yuri at FreeBSD.org
Wed Jun 16 02:40:20 UTC 2021


The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=57c66677923080197589551026e400442848491c

commit 57c66677923080197589551026e400442848491c
Author:     Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-06-16 02:36:53 +0000
Commit:     Yuri Victorovich <yuri at FreeBSD.org>
CommitDate: 2021-06-16 02:40:17 +0000

    archivers/snappy: Enable RTTI info
    
    devel/folly is (silently) built with unresolved symbols because snappy disables RTTI info.
    This later causes www/proxygen build failure.
    
    PR:             256625
    Approved by:    vanilla (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 b9745ba629b0..983fe03ad491 100644
--- a/archivers/snappy/Makefile
+++ b/archivers/snappy/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	snappy
 PORTVERSION=	1.1.9
+PORTREVISION=	1
 CATEGORIES=	archivers
 
 MAINTAINER=	vanilla at FreeBSD.org
diff --git a/archivers/snappy/files/patch-CMakeLists.txt b/archivers/snappy/files/patch-CMakeLists.txt
index cc912901362c..306df294b015 100644
--- a/archivers/snappy/files/patch-CMakeLists.txt
+++ b/archivers/snappy/files/patch-CMakeLists.txt
@@ -1,6 +1,19 @@
 --- CMakeLists.txt.orig	2021-05-04 22:53:34 UTC
 +++ CMakeLists.txt
-@@ -213,8 +213,7 @@ configure_file(
+@@ -78,8 +78,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") # devel/folly requires RTTI info, see https://github.com/facebook/folly/issues/1606
++    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
+@@ -213,8 +215,7 @@ configure_file(
    "snappy-stubs-public.h.in"
    "${PROJECT_BINARY_DIR}/snappy-stubs-public.h")
  
@@ -10,7 +23,7 @@
    PRIVATE
      "snappy-internal.h"
      "snappy-stubs-internal.h"
-@@ -235,20 +234,35 @@ target_sources(snappy
+@@ -235,20 +236,35 @@ target_sources(snappy
      $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/snappy-stubs-public.h>
      $<INSTALL_INTERFACE:include/snappy-stubs-public.h>
  )
@@ -50,7 +63,7 @@
  if(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS)
    add_library(snappy_test_support "")
    target_sources(snappy_test_support
-@@ -359,7 +373,7 @@ endif(SNAPPY_FUZZING_BUILD)
+@@ -359,7 +375,7 @@ endif(SNAPPY_FUZZING_BUILD)
  include(GNUInstallDirs)
  
  if(SNAPPY_INSTALL)


More information about the dev-commits-ports-main mailing list