Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package re2 for openSUSE:Factory checked in 
at 2023-02-07 18:47:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/re2 (Old)
 and      /work/SRC/openSUSE:Factory/.re2.new.4462 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "re2"

Tue Feb  7 18:47:52 2023 rev:50 rq:1063451 version:MACRO

Changes:
--------
--- /work/SRC/openSUSE:Factory/re2/re2.changes  2022-12-05 18:00:36.308386843 
+0100
+++ /work/SRC/openSUSE:Factory/.re2.new.4462/re2.changes        2023-02-07 
18:47:53.866748792 +0100
@@ -1,0 +2,7 @@
+Sat Feb  4 16:59:53 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- update to 2023-02-01:
+  * improved support for ICU
+- build with ICU
+
+-------------------------------------------------------------------

Old:
----
  re2-2022-12-01.tar.gz

New:
----
  re2-2023-02-01.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ re2.spec ++++++
--- /var/tmp/diff_new_pack.pUC2MV/_old  2023-02-07 18:47:54.690753221 +0100
+++ /var/tmp/diff_new_pack.pUC2MV/_new  2023-02-07 18:47:54.698753264 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package re2
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,14 +16,9 @@
 #
 
 
-%global longver 2022-12-01
+%global longver 2023-02-01
 %global shortver %(echo %{longver}|sed 's|-||g')
 %define libname libre2-10
-%ifarch s390 s390x riscv64 armv6l armv6hl
-%bcond_with test
-%else
-%bcond_without test
-%endif
 Name:           re2
 Version:        %{shortver}
 Release:        0
@@ -33,12 +28,10 @@
 URL:            https://github.com/google/re2
 Source0:        %{url}/archive/%{longver}/%{name}-%{longver}.tar.gz
 Source99:       baselibs.conf
+BuildRequires:  c++_compiler
 BuildRequires:  cmake >= 3.10.2
-%if %{?suse_version} < 1550
-BuildRequires:  gcc11-c++
-%else
-BuildRequires:  gcc-c++
-%endif
+BuildRequires:  pkgconfig
+BuildRequires:  pkgconfig(icu-uc)
 
 %description
 RE2 is a C++ library providing a fast, safe, thread-friendly alternative to
@@ -84,26 +77,18 @@
 %autosetup -n %{name}-%{longver}
 
 %build
-%if 0%{?suse_version} < 1550
-export CXX=g++-11
-%endif
-%cmake -DCMAKE_BUILD_TYPE=Release
+%cmake \
+       -DCMAKE_BUILD_TYPE=Release \
+       -DRE2_USE_ICU=ON \
+       %{nil}
 %cmake_build
 
 %install
 %cmake_install
 
 %check
-# Test if created library is installed correctly
-%if 0%{?suse_version} < 1550
-export CXX=g++-11
-%endif
-%make_build shared-testinstall DESTDIR=%{buildroot} includedir=%{_includedir} 
libdir=%{_libdir}
-%if %{with test}
-# Actual functionality tests
 export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH
 %ctest --repeat until-pass:9
-%endif
 
 %post -n %{libname} -p /sbin/ldconfig
 %postun -n %{libname} -p /sbin/ldconfig

++++++ re2-2022-12-01.tar.gz -> re2-2023-02-01.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/BUILD new/re2-2023-02-01/BUILD
--- old/re2-2022-12-01/BUILD    2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/BUILD    2023-01-30 21:19:18.000000000 +0100
@@ -11,6 +11,7 @@
 cc_library(
     name = "re2",
     srcs = [
+        "re2/bitmap256.cc",
         "re2/bitmap256.h",
         "re2/bitstate.cc",
         "re2/compile.cc",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/CMakeLists.txt 
new/re2-2023-02-01/CMakeLists.txt
--- old/re2-2022-12-01/CMakeLists.txt   2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/CMakeLists.txt   2023-01-30 21:19:18.000000000 +0100
@@ -12,12 +12,18 @@
 include(GNUInstallDirs)
 
 option(BUILD_SHARED_LIBS "build shared libraries" OFF)
-option(USEPCRE "use PCRE in tests and benchmarks" OFF)
+option(RE2_USE_ICU "build against ICU for full Unicode properties support" OFF)
+
+# For historical reasons, this is just "USEPCRE", not "RE2_USE_PCRE".
+option(USEPCRE "build against PCRE for testing and benchmarking" OFF)
 
 # CMake seems to have no way to enable/disable testing per subproject,
 # so we provide an option similar to BUILD_TESTING, but just for RE2.
 option(RE2_BUILD_TESTING "enable testing for RE2" ON)
 
+# The pkg-config Requires: field.
+set(REQUIRES)
+
 # ABI version
 # http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
 set(SONAME 10)
@@ -43,17 +49,26 @@
 if(WIN32)
   add_definitions(-DUNICODE -D_UNICODE -DSTRICT -DNOMINMAX)
   add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
-elseif(UNIX)
+endif()
+
+if(UNIX)
   set(THREADS_PREFER_PTHREAD_FLAG ON)
   find_package(Threads REQUIRED)
 endif()
 
+if(RE2_USE_ICU)
+  find_package(ICU REQUIRED COMPONENTS uc)
+  add_definitions(-DRE2_USE_ICU)
+  list(APPEND REQUIRES icu-uc)
+endif()
+
 if(USEPCRE)
   add_definitions(-DUSEPCRE)
   list(APPEND EXTRA_TARGET_LINK_LIBRARIES pcre)
 endif()
 
 set(RE2_SOURCES
+    re2/bitmap256.cc
     re2/bitstate.cc
     re2/compile.cc
     re2/dfa.cc
@@ -88,6 +103,10 @@
   target_link_libraries(re2 PUBLIC Threads::Threads)
 endif()
 
+if(RE2_USE_ICU)
+  target_link_libraries(re2 PUBLIC ICU::uc)
+endif()
+
 if(RE2_BUILD_TESTING)
   set(TESTING_SOURCES
       re2/testing/backtrack.cc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/Makefile new/re2-2023-02-01/Makefile
--- old/re2-2022-12-01/Makefile 2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/Makefile 2023-01-30 21:19:18.000000000 +0100
@@ -7,7 +7,7 @@
 # CCICU=$(shell pkg-config icu-uc --cflags) -DRE2_USE_ICU
 # LDICU=$(shell pkg-config icu-uc --libs)
 
-# To build against PCRE for testing or benchmarking,
+# To build against PCRE for testing and benchmarking,
 # uncomment the next two lines:
 # CCPCRE=-I/usr/local/include -DUSEPCRE
 # LDPCRE=-L/usr/local/lib -lpcre
@@ -42,6 +42,12 @@
 SED_INPLACE=sed -i
 endif
 
+# The pkg-config Requires: field.
+REQUIRES=
+ifdef LDICU
+REQUIRES+=icu-uc
+endif
+
 # ABI version
 # http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
 SONAME=10
@@ -112,6 +118,7 @@
 OFILES=\
        obj/util/rune.o\
        obj/util/strutil.o\
+       obj/re2/bitmap256.o\
        obj/re2/bitstate.o\
        obj/re2/compile.o\
        obj/re2/dfa.o\
@@ -319,6 +326,7 @@
        $(INSTALL_DATA) re2.pc.in $(DESTDIR)$(libdir)/pkgconfig/re2.pc
        $(SED_INPLACE) -e "s#@CMAKE_INSTALL_FULL_INCLUDEDIR@#$(includedir)#" 
$(DESTDIR)$(libdir)/pkgconfig/re2.pc
        $(SED_INPLACE) -e "s#@CMAKE_INSTALL_FULL_LIBDIR@#$(libdir)#" 
$(DESTDIR)$(libdir)/pkgconfig/re2.pc
+       $(SED_INPLACE) -e "s#@REQUIRES@#$(REQUIRES)#" 
$(DESTDIR)$(libdir)/pkgconfig/re2.pc
        $(SED_INPLACE) -e "s#@SONAME@#$(SONAME)#" 
$(DESTDIR)$(libdir)/pkgconfig/re2.pc
 
 .PHONY: testinstall
@@ -328,27 +336,27 @@
        @echo
 
 .PHONY: static-testinstall
-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
-       @cp testinstall.cc obj/static-testinstall.cc
 ifeq ($(shell uname),Darwin)
        @echo Skipping test for libre2.a on Darwin.
 else ifeq ($(shell uname),SunOS)
        @echo Skipping test for libre2.a on SunOS.
 else
-       (cd obj && $(CXX) static-testinstall.cc -o static-testinstall 
$(CXXFLAGS) $(LDFLAGS))
+       @mkdir -p obj
+       @cp testinstall.cc obj/static-testinstall.cc
+       (cd obj && export PKG_CONFIG_PATH=$(DESTDIR)$(libdir)/pkgconfig; \
+         $(CXX) static-testinstall.cc -o static-testinstall $(CXXFLAGS) 
$(LDFLAGS) \
+         $$(pkg-config re2 --cflags --libs | sed -e "s#-lre2#-l:libre2.a#"))
        obj/static-testinstall
 endif
 
 .PHONY: shared-testinstall
-shared-testinstall: CXXFLAGS:=-pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS)
-shared-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -lre2 $(LDICU) 
$(LDFLAGS)
 shared-testinstall:
        @mkdir -p obj
        @cp testinstall.cc obj/shared-testinstall.cc
-       (cd obj && $(CXX) shared-testinstall.cc -o shared-testinstall 
$(CXXFLAGS) $(LDFLAGS))
+       (cd obj && export PKG_CONFIG_PATH=$(DESTDIR)$(libdir)/pkgconfig; \
+         $(CXX) shared-testinstall.cc -o shared-testinstall $(CXXFLAGS) 
$(LDFLAGS) \
+         $$(pkg-config re2 --cflags --libs))
 ifeq ($(shell uname),Darwin)
        DYLD_LIBRARY_PATH="$(DESTDIR)$(libdir):$(DYLD_LIBRARY_PATH)" 
obj/shared-testinstall
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/re2/bitmap256.cc 
new/re2-2023-02-01/re2/bitmap256.cc
--- old/re2-2022-12-01/re2/bitmap256.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/re2-2023-02-01/re2/bitmap256.cc 2023-01-30 21:19:18.000000000 +0100
@@ -0,0 +1,44 @@
+// Copyright 2023 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.
+
+#include "re2/bitmap256.h"
+
+#include <stdint.h>
+
+#include "util/util.h"
+#include "util/logging.h"
+
+namespace re2 {
+
+int Bitmap256::FindNextSetBit(int c) const {
+  DCHECK_GE(c, 0);
+  DCHECK_LE(c, 255);
+
+  // Check the word that contains the bit. Mask out any lower bits.
+  int i = c / 64;
+  uint64_t word = words_[i] & (~uint64_t{0} << (c % 64));
+  if (word != 0)
+    return (i * 64) + FindLSBSet(word);
+
+  // Check any following words.
+  i++;
+  switch (i) {
+    case 1:
+      if (words_[1] != 0)
+        return (1 * 64) + FindLSBSet(words_[1]);
+      FALLTHROUGH_INTENDED;
+    case 2:
+      if (words_[2] != 0)
+        return (2 * 64) + FindLSBSet(words_[2]);
+      FALLTHROUGH_INTENDED;
+    case 3:
+      if (words_[3] != 0)
+        return (3 * 64) + FindLSBSet(words_[3]);
+      FALLTHROUGH_INTENDED;
+    default:
+      return -1;
+  }
+}
+
+}  // namespace re2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/re2/bitmap256.h 
new/re2-2023-02-01/re2/bitmap256.h
--- old/re2-2022-12-01/re2/bitmap256.h  2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/re2/bitmap256.h  2023-01-30 21:19:18.000000000 +0100
@@ -11,7 +11,6 @@
 #include <stdint.h>
 #include <string.h>
 
-#include "util/util.h"
 #include "util/logging.h"
 
 namespace re2 {
@@ -82,36 +81,6 @@
   uint64_t words_[4];
 };
 
-int Bitmap256::FindNextSetBit(int c) const {
-  DCHECK_GE(c, 0);
-  DCHECK_LE(c, 255);
-
-  // Check the word that contains the bit. Mask out any lower bits.
-  int i = c / 64;
-  uint64_t word = words_[i] & (~uint64_t{0} << (c % 64));
-  if (word != 0)
-    return (i * 64) + FindLSBSet(word);
-
-  // Check any following words.
-  i++;
-  switch (i) {
-    case 1:
-      if (words_[1] != 0)
-        return (1 * 64) + FindLSBSet(words_[1]);
-      FALLTHROUGH_INTENDED;
-    case 2:
-      if (words_[2] != 0)
-        return (2 * 64) + FindLSBSet(words_[2]);
-      FALLTHROUGH_INTENDED;
-    case 3:
-      if (words_[3] != 0)
-        return (3 * 64) + FindLSBSet(words_[3]);
-      FALLTHROUGH_INTENDED;
-    default:
-      return -1;
-  }
-}
-
 }  // namespace re2
 
 #endif  // RE2_BITMAP256_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/re2.pc.in new/re2-2023-02-01/re2.pc.in
--- old/re2-2022-12-01/re2.pc.in        2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/re2.pc.in        2023-01-30 21:19:18.000000000 +0100
@@ -3,6 +3,7 @@
 
 Name: re2
 Description: RE2 is a fast, safe, thread-friendly regular expression engine.
+Requires: @REQUIRES@
 Version: @SONAME@.0.0
 Cflags: -pthread -I${includedir}
 Libs: -pthread -L${libdir} -lre2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/re2Config.cmake.in 
new/re2-2023-02-01/re2Config.cmake.in
--- old/re2-2022-12-01/re2Config.cmake.in       2022-11-29 16:47:56.000000000 
+0100
+++ new/re2-2023-02-01/re2Config.cmake.in       2023-01-30 21:19:18.000000000 
+0100
@@ -13,6 +13,10 @@
   find_dependency(Threads REQUIRED)
 endif()
 
+if(@RE2_USE_ICU@)
+  find_dependency(ICU REQUIRED COMPONENTS uc)
+endif()
+
 check_required_components(re2)
 
 if(TARGET re2::re2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/util/mutex.h 
new/re2-2023-02-01/util/mutex.h
--- old/re2-2022-12-01/util/mutex.h     2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/util/mutex.h     2023-01-30 21:19:18.000000000 +0100
@@ -10,6 +10,10 @@
  * You should assume the locks are *not* re-entrant.
  */
 
+#ifdef RE2_NO_THREADS
+#include <assert.h>
+#define MUTEX_IS_LOCK_COUNTER
+#else
 #ifdef _WIN32
 // Requires Windows Vista or Windows Server 2008 at minimum.
 #include <windows.h>
@@ -25,8 +29,11 @@
 #define MUTEX_IS_PTHREAD_RWLOCK
 #endif
 #endif
+#endif
 
-#if defined(MUTEX_IS_WIN32_SRWLOCK)
+#if defined(MUTEX_IS_LOCK_COUNTER)
+typedef int MutexType;
+#elif defined(MUTEX_IS_WIN32_SRWLOCK)
 typedef SRWLOCK MutexType;
 #elif defined(MUTEX_IS_PTHREAD_RWLOCK)
 #include <pthread.h>
@@ -64,7 +71,16 @@
   Mutex& operator=(const Mutex&) = delete;
 };
 
-#if defined(MUTEX_IS_WIN32_SRWLOCK)
+#if defined(MUTEX_IS_LOCK_COUNTER)
+
+Mutex::Mutex()             : mutex_(0) { }
+Mutex::~Mutex()            { assert(mutex_ == 0); }
+void Mutex::Lock()         { assert(--mutex_ == -1); }
+void Mutex::Unlock()       { assert(mutex_++ == -1); }
+void Mutex::ReaderLock()   { assert(++mutex_ > 0); }
+void Mutex::ReaderUnlock() { assert(mutex_-- > 0); }
+
+#elif defined(MUTEX_IS_WIN32_SRWLOCK)
 
 Mutex::Mutex()             : mutex_(SRWLOCK_INIT) { }
 Mutex::~Mutex()            { }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re2-2022-12-01/util/pcre.h 
new/re2-2023-02-01/util/pcre.h
--- old/re2-2022-12-01/util/pcre.h      2022-11-29 16:47:56.000000000 +0100
+++ new/re2-2023-02-01/util/pcre.h      2023-01-30 21:19:18.000000000 +0100
@@ -500,7 +500,7 @@
   bool                report_errors_;  // Silences error logging if false
   int                 match_limit_;    // Limit on execution resources
   int                 stack_limit_;    // Limit on stack resources (bytes)
-  mutable int32_t     hit_limit_;      // Hit limit during execution (bool)
+  mutable int         hit_limit_;      // Hit limit during execution (bool)
 
   PCRE(const PCRE&) = delete;
   PCRE& operator=(const PCRE&) = delete;

Reply via email to