From fc4676925293d20ec984eee293dd8209117a0993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 23 Jun 2024 10:44:28 +0700 Subject: [PATCH] re2: update to 2024.06.01. --- common/shlibs | 2 +- srcpkgs/re2/patches/pkg-config.patch | 41 ++++++++++++++++++++++++++++ srcpkgs/re2/template | 16 +++++++---- 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/re2/patches/pkg-config.patch diff --git a/common/shlibs b/common/shlibs index 4ebfd6bb20f..092fd9b409d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1312,7 +1312,7 @@ librumpdev_audio.so.0 netbsd-rumpkernel-20140526_3 librumpclient.so.0 netbsd-rumpkernel-20140526_3 libdotconf.so.0 dotconf-1.3_1 libspeechd.so.2 speech-dispatcher-0.8_1 -libre2.so.10 re2-2023.03.01_1 +libre2.so.11 re2-2024.06.01_1 libminizip.so.1 minizip-1.2.7_1 libsrtp2.so.1 libsrtp-2.1.0_1 libjsoncpp.so.25 jsoncpp-1.9.5_1 diff --git a/srcpkgs/re2/patches/pkg-config.patch b/srcpkgs/re2/patches/pkg-config.patch new file mode 100644 index 00000000000..acbbd7f6974 --- /dev/null +++ b/srcpkgs/re2/patches/pkg-config.patch @@ -0,0 +1,41 @@ +--- a/re2.pc.in ++++ b/re2.pc.in +@@ -3,7 +3,7 @@ libdir=@CMAKE_INSTALL_FULL_LIBDIR@ + + Name: re2 + Description: RE2 is a fast, safe, thread-friendly regular expression engine. +-Requires: @REQUIRES@ ++Requires: absl_base absl_core_headers absl_strings + Version: @SONAME@.0.0 + Cflags: -pthread -I${includedir} + Libs: -pthread -L${libdir} -lre2 +--- a/re2Config.cmake.in ++++ b/re2Config.cmake.in +@@ -13,10 +13,6 @@ endif() + + find_dependency(absl REQUIRED) + +-if(@RE2_USE_ICU@) +- find_dependency(ICU REQUIRED COMPONENTS uc) +-endif() +- + check_required_components(re2) + + if(TARGET re2::re2) +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -156,11 +156,12 @@ foreach(dep ${ABSL_DEPS}) + # Work around https://gitlab.kitware.com/cmake/cmake/-/issues/16899. >:( + string(PREPEND dep "^") + string(REGEX REPLACE "\\^absl_" "absl::" dep ${dep}) +- target_link_libraries(re2 PUBLIC ${dep}) ++ target_link_libraries(re2 PRIVATE ${dep}) + endforeach() ++target_link_libraries(re2 PUBLIC absl::base absl::core_headers absl::strings) + + if(RE2_USE_ICU) +- target_link_libraries(re2 PUBLIC ICU::uc) ++ target_link_libraries(re2 PRIVATE ICU::uc) + endif() + + if(RE2_BUILD_TESTING) diff --git a/srcpkgs/re2/template b/srcpkgs/re2/template index ec6abba965a..47cad9639f4 100644 --- a/srcpkgs/re2/template +++ b/srcpkgs/re2/template @@ -1,14 +1,20 @@ # Template file for 're2' pkgname=re2 -version=2023.03.01 +version=2024.06.01 revision=1 -build_style=gnu-makefile +build_style=cmake +configure_args="-DBUILD_SHARED_LIBS=ON -DRE2_USE_ICU=ON" +hostmakedepends="pkg-config" +makedepends="abseil-cpp-devel icu-devel" +# This dependency to avoid rebuild electron with new re2 +# Drop whenever those packages are rebuilt or dropped +depends="libre2.10" short_desc="Efficient, principled regular expression library" maintainer="Orphaned " license="BSD-3-Clause" homepage="https://github.com/google/re2" distfiles="https://github.com/google/re2/archive/${version//./-}.tar.gz" -checksum=7a9a4824958586980926a300b4717202485c4b4115ac031822e29aa4ef207e48 +checksum=7326c74cddaa90b12090fcfc915fe7b4655723893c960ee3c2c66e85c5504b6c post_install() { vlicense LICENSE @@ -16,11 +22,11 @@ post_install() { re2-devel_package() { short_desc+=" - development files" - depends="${sourcepkg}-${version}_${revision}" + depends="${sourcepkg}-${version}_${revision} abseil-cpp-devel" pkg_install() { vmove usr/include - vmove "usr/lib/*.a" vmove "usr/lib/*.so" vmove usr/lib/pkgconfig + vmove usr/lib/cmake } }