FreeBSD Bugzilla – Attachment 238046 Details for
Bug 260402
devel/re2: Update to 2023-06-02
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for CMake-ification
p (text/plain), 4.88 KB, created by
Adriaan de Groot
on 2022-11-12 23:12:00 UTC
(
hide
)
Description:
Patch for CMake-ification
Filename:
MIME Type:
Creator:
Adriaan de Groot
Created:
2022-11-12 23:12:00 UTC
Size:
4.88 KB
patch
obsolete
>diff --git devel/re2/Makefile devel/re2/Makefile >index afef5cea0035..10752bdff06d 100644 >--- devel/re2/Makefile >+++ devel/re2/Makefile >@@ -9,18 +9,16 @@ WWW= https://github.com/google/re2 > LICENSE= BSD3CLAUSE > LICENSE_FILE= ${WRKSRC}/LICENSE > >-USES= compiler:c++11-lang gmake pathfix >+USES= cmake:testing compiler:c++11-lang > >-MAKE_ARGS= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" SED_INPLACE="${SED} -i ''" prefix=${PREFIX} >-USE_LDCONFIG= yes >+CMAKE_ON= BUILD_SHARED_LIBS >+CMAKE_OFF= RE2_BUILD_TESTING USEPCRE >+CMAKE_TESTING_ON= RE2_BUILD_TESTING USEPCRE > >-PATHFIX_MAKEFILEIN= Makefile >+USE_LDCONFIG= yes > > GH_ACCOUNT= google > GH_TAGNAME= ${PORTVERSION:C|(....)(..)(..)|\1-\2-\3|} > USE_GITHUB= yes > >-post-install: >- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libre2.so >- > .include <bsd.port.mk> >diff --git devel/re2/files/patch-CMakeLists.txt devel/re2/files/patch-CMakeLists.txt >new file mode 100644 >index 000000000000..786ac77bf9aa >--- /dev/null >+++ devel/re2/files/patch-CMakeLists.txt >@@ -0,0 +1,76 @@ >+--- CMakeLists.txt.orig 2022-05-10 11:02:12 UTC >++++ CMakeLists.txt >+@@ -49,7 +49,9 @@ endif() >+ >+ if(USEPCRE) >+ add_definitions(-DUSEPCRE) >+- list(APPEND EXTRA_TARGET_LINK_LIBRARIES pcre) >++ find_package(PkgConfig REQUIRED) >++ pkg_check_modules(_pcre REQUIRED libpcre) >++ list(APPEND EXTRA_TARGET_LINK_LIBRARIES ${_pcre_LINK_LIBRARIES}) >+ endif() >+ >+ set(RE2_SOURCES >+@@ -78,9 +80,13 @@ set(RE2_SOURCES >+ ) >+ >+ add_library(re2 ${RE2_SOURCES}) >++add_library(re2_static STATIC ${RE2_SOURCES}) >+ target_compile_features(re2 PUBLIC cxx_std_11) >+ target_include_directories(re2 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) >++target_include_directories(re2 PRIVATE ${CMAKE_SOURCE_DIR}) >++target_include_directories(re2_static PRIVATE ${CMAKE_SOURCE_DIR}) >+ set_target_properties(re2 PROPERTIES SOVERSION ${SONAME} VERSION ${SONAME}.0.0) >++set_target_properties(re2_static PROPERTIES OUTPUT_NAME "re2") >+ add_library(re2::re2 ALIAS re2) >+ >+ if(UNIX) >+@@ -102,6 +108,7 @@ if(RE2_BUILD_TESTING) >+ add_library(testing STATIC ${TESTING_SOURCES}) >+ target_compile_features(testing PUBLIC cxx_std_11) >+ target_link_libraries(testing PUBLIC re2) >++ target_include_directories(testing PRIVATE ${_pcre_INCLUDE_DIRS}) >+ >+ set(TEST_TARGETS >+ charclass_test >+@@ -135,6 +142,7 @@ if(RE2_BUILD_TESTING) >+ add_executable(${target} re2/testing/${target}.cc util/test.cc) >+ target_compile_features(${target} PUBLIC cxx_std_11) >+ target_link_libraries(${target} testing ${EXTRA_TARGET_LINK_LIBRARIES}) >++ target_include_directories(${target} PRIVATE ${_pcre_INCLUDE_DIRS}) >+ add_test(NAME ${target} COMMAND ${target}) >+ endforeach() >+ >+@@ -142,6 +150,7 @@ if(RE2_BUILD_TESTING) >+ add_executable(${target} re2/testing/${target}.cc util/benchmark.cc) >+ target_compile_features(${target} PUBLIC cxx_std_11) >+ target_link_libraries(${target} testing ${EXTRA_TARGET_LINK_LIBRARIES}) >++ target_include_directories(${target} PRIVATE ${_pcre_INCLUDE_DIRS}) >+ endforeach() >+ endif() >+ >+@@ -152,6 +161,8 @@ set(RE2_HEADERS >+ re2/stringpiece.h >+ ) >+ >++configure_file(re2.pc re2.pc @ONLY) >++ >+ install(FILES ${RE2_HEADERS} >+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/re2) >+ install(TARGETS re2 EXPORT re2Targets >+@@ -159,6 +170,8 @@ install(TARGETS re2 EXPORT re2Targets >+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} >+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} >+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) >++install(TARGETS re2_static >++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) >+ install(EXPORT re2Targets >+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2 NAMESPACE re2::) >+ >+@@ -174,3 +187,6 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINAR >+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/re2Config.cmake >+ ${CMAKE_CURRENT_BINARY_DIR}/re2ConfigVersion.cmake >+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2) >++ >++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/re2.pc >++ DESTINATION ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig) >diff --git devel/re2/files/patch-re2.pc devel/re2/files/patch-re2.pc >new file mode 100644 >index 000000000000..bb812e89fb0d >--- /dev/null >+++ devel/re2/files/patch-re2.pc >@@ -0,0 +1,10 @@ >+--- re2.pc.orig 2022-05-10 11:02:12 UTC >++++ re2.pc >+@@ -1,5 +1,5 @@ >+-includedir=@includedir@ >+-libdir=@libdir@ >++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ >++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ >+ >+ Name: re2 >+ Description: RE2 is a fast, safe, thread-friendly regular expression engine. >diff --git devel/re2/pkg-plist devel/re2/pkg-plist >index 410f894cf70c..70d1fdf07443 100644 >--- devel/re2/pkg-plist >+++ devel/re2/pkg-plist >@@ -2,6 +2,10 @@ include/re2/filtered_re2.h > include/re2/re2.h > include/re2/set.h > include/re2/stringpiece.h >+lib/cmake/re2/re2Config.cmake >+lib/cmake/re2/re2ConfigVersion.cmake >+lib/cmake/re2/re2Targets-%%CMAKE_BUILD_TYPE%%.cmake >+lib/cmake/re2/re2Targets.cmake > lib/libre2.a > lib/libre2.so > lib/libre2.so.9
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 260402
:
230092
|
230093
|
233454
|
233482
|
233484
|
234102
| 238046 |
239890
|
242859