From ba3f8497c080ef59ee3e512593bc212245c5b7a3 Mon Sep 17 00:00:00 2001 From: Denis Arnaud Date: Feb 22 2023 10:16:45 +0000 Subject: Upstream upgrade --- diff --git a/0001-Fix-CMake-packaging-for-installation.patch b/0001-Fix-CMake-packaging-for-installation.patch deleted file mode 100644 index 7aceb82..0000000 --- a/0001-Fix-CMake-packaging-for-installation.patch +++ /dev/null @@ -1,87 +0,0 @@ -From cb5bbb250e07e7621a5cfe3818f8141e33967f0e Mon Sep 17 00:00:00 2001 -From: Andrei BENCSIK -Date: Fri, 24 Dec 2021 14:04:47 +0200 -Subject: [PATCH] Fix CMake packaging for installation. - -Add CMake config file (re2Config.cmake) for find_package(re2) - fixes finding Threads dependency -Add CMake version file (re2ConfigVersion.cmake) - allows find_package(re2 ...) - -Change-Id: I6c1de1bfc59121085d70a277bd0821504b9d8736 -Reviewed-on: https://code-review.googlesource.com/c/re2/+/59530 -Reviewed-by: Andrei Bencsik -Reviewed-by: Paul Wankadia ---- - CMakeLists.txt | 18 ++++++++++++++++-- - re2Config.cmake.in | 22 ++++++++++++++++++++++ - 2 files changed, 38 insertions(+), 2 deletions(-) - create mode 100644 re2Config.cmake.in - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fcd3870..62d4995 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,6 +6,7 @@ - cmake_minimum_required(VERSION 3.5.1) - - project(RE2 CXX) -+include(CMakePackageConfigHelpers) - include(CTest) - include(GNUInstallDirs) - -@@ -154,10 +155,23 @@ set(RE2_HEADERS - - install(FILES ${RE2_HEADERS} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/re2) --install(TARGETS re2 EXPORT re2Config -+install(TARGETS re2 EXPORT re2Targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) --install(EXPORT re2Config -+install(EXPORT re2Targets - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2 NAMESPACE re2::) -+ -+configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/re2Config.cmake.in -+ ${CMAKE_CURRENT_BINARY_DIR}/re2Config.cmake -+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2 -+ ) -+write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/re2ConfigVersion.cmake -+ VERSION ${SONAME}.0.0 -+ COMPATIBILITY SameMajorVersion -+ ) -+ -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/re2Config.cmake -+ ${CMAKE_CURRENT_BINARY_DIR}/re2ConfigVersion.cmake -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2) -diff --git a/re2Config.cmake.in b/re2Config.cmake.in -new file mode 100644 -index 0000000..7698107 ---- /dev/null -+++ b/re2Config.cmake.in -@@ -0,0 +1,22 @@ -+# Copyright 2022 The RE2 Authors. All Rights Reserved. -+# Use of this source code is governed by a BSD-style -+# license that can be found in the LICENSE file. -+ -+@PACKAGE_INIT@ -+ -+include(CMakeFindDependencyMacro) -+ -+set_and_check(re2_INCLUDE_DIR ${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@) -+ -+if(UNIX) -+ set(THREADS_PREFER_PTHREAD_FLAG ON) -+ find_dependency(Threads REQUIRED) -+endif() -+ -+check_required_components(re2) -+ -+if(TARGET re2::re2) -+ return() -+endif() -+ -+include(${CMAKE_CURRENT_LIST_DIR}/re2Targets.cmake) --- -2.34.1 - diff --git a/re2-compiler-flag-fix.patch b/re2-compiler-flag-fix.patch deleted file mode 100644 index 3819901..0000000 --- a/re2-compiler-flag-fix.patch +++ /dev/null @@ -1,70 +0,0 @@ -From a022cc0c55b0519629d64d775e7a5195af34a477 Mon Sep 17 00:00:00 2001 -From: Stefano Rivera -Date: Sun, 16 Jan 2022 10:16:32 -0400 -Subject: [PATCH] Don't specify the `-std` flag in Makefile or re2.pc. - -As Frank Heckenbach notes in https://bugs.debian.org/1003482: - -> re2.pc contains "-std=c++11". This conflicts with other "-std" -> options, especially if one wants to use a newer standard (which -> otherwise works with libre2, as indicated by its support for -> string_view, e.g.). -> -> In order to make sure it's used only with C++11 or newer, you may -> want to check __cplusplus in the header instead. - -As gcc and clang default to C++ standards greater than 11, these days, -we can use with the default, rather than the older standard. - -Fixes #352. - -Change-Id: I1b078df54f583e0b980e1b6341c6d401c8c9d937 -Reviewed-on: https://code-review.googlesource.com/c/re2/+/59570 -Reviewed-by: Paul Wankadia ---- - Makefile | 6 +++--- - re2.pc | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Makefile b/Makefile -index ab67ad03..c7c8145e 100644 ---- a/Makefile -+++ b/Makefile -@@ -17,7 +17,7 @@ CXX?=g++ - CXXFLAGS?=-O3 -g - LDFLAGS?= - # required --RE2_CXXFLAGS?=-std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. $(CCICU) $(CCPCRE) -+RE2_CXXFLAGS?=-pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. $(CCICU) $(CCPCRE) - RE2_LDFLAGS?=-pthread $(LDICU) $(LDPCRE) - AR?=ar - ARFLAGS?=rsc -@@ -327,7 +327,7 @@ testinstall: static-testinstall shared-testinstall - @echo - - .PHONY: static-testinstall --static-testinstall: CXXFLAGS:=-std=c++11 -pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS) -+static-testinstall: CXXFLAGS:=-pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS) - static-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -l:libre2.a $(LDICU) $(LDFLAGS) - static-testinstall: - @mkdir -p obj -@@ -342,7 +342,7 @@ else - endif - - .PHONY: shared-testinstall --shared-testinstall: CXXFLAGS:=-std=c++11 -pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS) -+shared-testinstall: CXXFLAGS:=-pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS) - shared-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -lre2 $(LDICU) $(LDFLAGS) - shared-testinstall: - @mkdir -p obj -diff --git a/re2.pc b/re2.pc -index 50fd637d..a590ab8e 100644 ---- a/re2.pc -+++ b/re2.pc -@@ -4,5 +4,5 @@ libdir=@libdir@ - Name: re2 - Description: RE2 is a fast, safe, thread-friendly regular expression engine. - Version: 0.0.0 --Cflags: -std=c++11 -pthread -I${includedir} -+Cflags: -pthread -I${includedir} - Libs: -pthread -L${libdir} -lre2 diff --git a/re2.spec b/re2.spec index 91ccaf1..7b3deed 100644 --- a/re2.spec +++ b/re2.spec @@ -4,15 +4,11 @@ Name: re2 Version: %{shortver} Epoch: 1 -Release: 5%{?dist} +Release: 1%{?dist} Summary: C++ fast alternative to backtracking RE engines License: BSD URL: http://github.com/google/%{name}/ Source0: https://github.com/google/re2/archive/%{longver}.tar.gz -# https://github.com/google/re2/commit/cb5bbb250e07e7621a5cfe3818f8141e33967f0e -Patch0: 0001-Fix-CMake-packaging-for-installation.patch -# https://github.com/google/re2/commit/a022cc0c55b0519629d64d775e7a5195af34a477 -Patch1: re2-compiler-flag-fix.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -40,8 +36,6 @@ you will need to install %{name}-devel. %prep %setup -q -n %{name}-%{longver} -%patch0 -p1 -%patch1 -p1 %build # The RPM macro for the linker flags does not exist on EPEL @@ -86,6 +80,9 @@ install -m 0644 re2.pc %{buildroot}%{_libdir}/pkgconfig/ %{_libdir}/cmake/re2/*.cmake %changelog +* Wed Feb 22 2023 Denis Arnaud - 1:20220601-1 +- Upstream upgrade + * Mon Feb 20 2023 Vitaly Zaitsev - 1:20211101-5 - Backported upstream patch with compiler flags fixes.