View | Details | Raw Unified | Return to bug 260402 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/re2/Makefile (-9 / +12 lines)
Lines 1-5 Link Here
1
PORTNAME=	re2
1
PORTNAME=	re2
2
PORTVERSION=	20220601
2
DISTVERSION=	20230201
3
CATEGORIES=	devel
3
CATEGORIES=	devel
4
4
5
MAINTAINER=	sunpoet@FreeBSD.org
5
MAINTAINER=	sunpoet@FreeBSD.org
Lines 9-26 WWW= https://github.com/google/re2 Link Here
9
LICENSE=	BSD3CLAUSE
9
LICENSE=	BSD3CLAUSE
10
LICENSE_FILE=	${WRKSRC}/LICENSE
10
LICENSE_FILE=	${WRKSRC}/LICENSE
11
11
12
USES=		compiler:c++11-lang gmake pathfix
12
USES=		cmake compiler:c++11-lang pathfix
13
14
MAKE_ARGS=	CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" SED_INPLACE="${SED} -i ''" prefix=${PREFIX}
15
USE_LDCONFIG=	yes
13
USE_LDCONFIG=	yes
16
14
17
PATHFIX_MAKEFILEIN=	Makefile
18
19
GH_ACCOUNT=	google
15
GH_ACCOUNT=	google
20
GH_TAGNAME=	${PORTVERSION:C|(....)(..)(..)|\1-\2-\3|}
16
GH_TAGNAME=	${DISTVERSION:C|(....)(..)(..)|\1-\2-\3|}
21
USE_GITHUB=	yes
17
USE_GITHUB=	yes
22
18
23
post-install:
19
TEST_TARGET=	test
24
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libre2.so
20
21
CMAKE_ON=	BUILD_SHARED_LIBS
22
23
OPTIONS_DEFINE=	TEST
24
25
TEST_LIB_DEPENDS=	libpcre.so:devel/pcre
26
TEST_USES=		pkgconfig
27
TEST_CMAKE_BOOL=	RE2_BUILD_TESTING USEPCRE
25
28
26
.include <bsd.port.mk>
29
.include <bsd.port.mk>
(-)b/devel/re2/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1654275845
1
TIMESTAMP = 1675458030
2
SHA256 (google-re2-20220601-2022-06-01_GH0.tar.gz) = f89c61410a072e5cbcf8c27e3a778da7d6fd2f2b5b1445cd4f4508bee946ab0f
2
SHA256 (google-re2-20230201-2023-02-01_GH0.tar.gz) = cbce8b7803e856827201a132862e41af386e7afd9cc6d9a9bc7a4fa4d8ddbdde
3
SIZE (google-re2-20220601-2022-06-01_GH0.tar.gz) = 381032
3
SIZE (google-re2-20230201-2023-02-01_GH0.tar.gz) = 382814
(-)b/devel/re2/files/patch-CMakeLists.txt (+60 lines)
Added Link Here
1
--- CMakeLists.txt.orig	2023-02-03 21:24:21 UTC
2
+++ CMakeLists.txt
3
@@ -64,7 +64,9 @@ endif()
4
 
5
 if(USEPCRE)
6
   add_definitions(-DUSEPCRE)
7
-  list(APPEND EXTRA_TARGET_LINK_LIBRARIES pcre)
8
+  find_package(PkgConfig REQUIRED)
9
+  pkg_check_modules(_pcre REQUIRED libpcre)
10
+  list(APPEND EXTRA_TARGET_LINK_LIBRARIES ${_pcre_LINK_LIBRARIES})
11
 endif()
12
 
13
 set(RE2_SOURCES
14
@@ -94,9 +96,13 @@ set(RE2_SOURCES
15
     )
16
 
17
 add_library(re2 ${RE2_SOURCES})
18
+add_library(re2_static STATIC ${RE2_SOURCES})
19
 target_compile_features(re2 PUBLIC cxx_std_11)
20
 target_include_directories(re2 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
21
+target_include_directories(re2 PRIVATE ${CMAKE_SOURCE_DIR})
22
+target_include_directories(re2_static PRIVATE ${CMAKE_SOURCE_DIR})
23
 set_target_properties(re2 PROPERTIES SOVERSION ${SONAME} VERSION ${SONAME}.0.0)
24
+set_target_properties(re2_static PROPERTIES OUTPUT_NAME "re2")
25
 add_library(re2::re2 ALIAS re2)
26
 
27
 if(UNIX)
28
@@ -122,6 +128,7 @@ if(RE2_BUILD_TESTING)
29
   add_library(testing STATIC ${TESTING_SOURCES})
30
   target_compile_features(testing PUBLIC cxx_std_11)
31
   target_link_libraries(testing PUBLIC re2)
32
+  target_include_directories(testing PRIVATE ${_pcre_INCLUDE_DIRS})
33
 
34
   set(TEST_TARGETS
35
       charclass_test
36
@@ -155,6 +162,7 @@ if(RE2_BUILD_TESTING)
37
     add_executable(${target} re2/testing/${target}.cc util/test.cc)
38
     target_compile_features(${target} PUBLIC cxx_std_11)
39
     target_link_libraries(${target} testing ${EXTRA_TARGET_LINK_LIBRARIES})
40
+    target_include_directories(${target} PRIVATE ${_pcre_INCLUDE_DIRS})
41
     add_test(NAME ${target} COMMAND ${target})
42
   endforeach()
43
 
44
@@ -162,6 +170,7 @@ if(RE2_BUILD_TESTING)
45
     add_executable(${target} re2/testing/${target}.cc util/benchmark.cc)
46
     target_compile_features(${target} PUBLIC cxx_std_11)
47
     target_link_libraries(${target} testing ${EXTRA_TARGET_LINK_LIBRARIES})
48
+    target_include_directories(${target} PRIVATE ${_pcre_INCLUDE_DIRS})
49
   endforeach()
50
 endif()
51
 
52
@@ -180,6 +189,8 @@ install(TARGETS re2
53
         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
54
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
55
         INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
56
+install(TARGETS re2_static
57
+        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
58
 install(EXPORT re2Targets
59
         DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2
60
         NAMESPACE re2::)
(-)b/devel/re2/pkg-plist (-2 / +6 lines)
Lines 2-9 include/re2/filtered_re2.h Link Here
2
include/re2/re2.h
2
include/re2/re2.h
3
include/re2/set.h
3
include/re2/set.h
4
include/re2/stringpiece.h
4
include/re2/stringpiece.h
5
lib/cmake/re2/re2Config.cmake
6
lib/cmake/re2/re2ConfigVersion.cmake
7
lib/cmake/re2/re2Targets-%%CMAKE_BUILD_TYPE%%.cmake
8
lib/cmake/re2/re2Targets.cmake
5
lib/libre2.a
9
lib/libre2.a
6
lib/libre2.so
10
lib/libre2.so
7
lib/libre2.so.9
11
lib/libre2.so.10
8
lib/libre2.so.9.0.0
12
lib/libre2.so.10.0.0
9
libdata/pkgconfig/re2.pc
13
libdata/pkgconfig/re2.pc

Return to bug 260402