svn commit: r567086 - in head/devel/re2: . files
Chris Rees
crees at FreeBSD.org
Wed Mar 3 14:13:21 UTC 2021
Author: crees
Date: Wed Mar 3 14:13:20 2021
New Revision: 567086
URL: https://svnweb.freebsd.org/changeset/ports/567086
Log:
devel/re2: update to 20210202
Switch to CMake
Revert upstream commit 5bd6137 and slightly improve support
PR: ports/253255
Submitted by: daniel.engberg.lists at pyret.net
Approved by: maintainer timeout (sunpoet, 3w6d)
Tested: https://gitlab.com/swills/freebsd-ports/-/pipelines/259017091
Added:
head/devel/re2/files/
head/devel/re2/files/patch-CMakeLists.txt (contents, props changed)
Modified:
head/devel/re2/Makefile
head/devel/re2/distinfo
head/devel/re2/pkg-plist
Modified: head/devel/re2/Makefile
==============================================================================
--- head/devel/re2/Makefile Wed Mar 3 14:11:51 2021 (r567085)
+++ head/devel/re2/Makefile Wed Mar 3 14:13:20 2021 (r567086)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= re2
-PORTVERSION= 20210201
+DISTVERSION= 20210202
CATEGORIES= devel
MAINTAINER= sunpoet at FreeBSD.org
@@ -11,18 +11,17 @@ COMMENT= Fast C++ regex library
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= compiler:c++11-lang gmake pathfix
-
-MAKE_ARGS= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" SED_INPLACE="${SED} -i ''" prefix=${PREFIX}
+USES= cmake compiler:c++11-lang pkgconfig
USE_LDCONFIG= yes
-PATHFIX_MAKEFILEIN= Makefile
-
GH_ACCOUNT= google
-GH_TAGNAME= ${PORTVERSION:C|(....)(..)(..)|\1-\2-\3|}
+GH_TAGNAME= ${DISTVERSION:C|(....)(..)(..)|\1-\2-\3|}
USE_GITHUB= yes
+CMAKE_ON= BUILD_SHARED_LIBS
+CMAKE_OFF= RE2_BUILD_TESTING
+
post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libre2.so
+ @${CP} -a ${INSTALL_WRKSRC}/libre2.so.* ${STAGEDIR}${PREFIX}/lib/
.include <bsd.port.mk>
Modified: head/devel/re2/distinfo
==============================================================================
--- head/devel/re2/distinfo Wed Mar 3 14:11:51 2021 (r567085)
+++ head/devel/re2/distinfo Wed Mar 3 14:13:20 2021 (r567086)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1612296107
-SHA256 (google-re2-20210201-2021-02-01_GH0.tar.gz) = d3e15031ced791b39f11964816ca2d4213f25d3b67fbbe82972c7b7666c456ba
-SIZE (google-re2-20210201-2021-02-01_GH0.tar.gz) = 403036
+TIMESTAMP = 1612466789
+SHA256 (google-re2-20210202-2021-02-02_GH0.tar.gz) = 1396ab50c06c1a8885fb68bf49a5ecfd989163015fd96699a180d6414937f33f
+SIZE (google-re2-20210202-2021-02-02_GH0.tar.gz) = 402958
Added: head/devel/re2/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/re2/files/patch-CMakeLists.txt Wed Mar 3 14:13:20 2021 (r567086)
@@ -0,0 +1,39 @@
+--- CMakeLists.txt.orig 2021-02-02 00:24:20 UTC
++++ CMakeLists.txt
+@@ -1,3 +1,4 @@
++
+ # Copyright 2015 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.
+@@ -147,12 +148,29 @@ set(RE2_HEADERS
+ re2/stringpiece.h
+ )
+
++macro(extract_version file setting_name)
++ file(STRINGS ${file} VERSION_NUMBER REGEX "^${setting_name}")
++ string(REPLACE "=" ";" VERSION_NUMBER_LIST ${VERSION_NUMBER})
++ list(GET VERSION_NUMBER_LIST 1 ${setting_name})
++endmacro(extract_version)
++
++extract_version(Makefile SONAME)
++
++set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
++set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/re2.pc ${CMAKE_CURRENT_BINARY_DIR}/re2.pc @ONLY)
++
+ install(FILES ${RE2_HEADERS}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/re2)
+-install(TARGETS re2 EXPORT re2Config
++install(TARGETS re2 EXPORT re2-config
+ 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 re2-config
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/re2 NAMESPACE re2::)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/re2.pc
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
++ADD_CUSTOM_TARGET(install_files ALL
++ COMMAND ${CMAKE_COMMAND} -E create_symlink libre2.so libre2.so.${SONAME}
++ COMMAND ${CMAKE_COMMAND} -E create_symlink libre2.so libre2.so.${SONAME}.0.0)
Modified: head/devel/re2/pkg-plist
==============================================================================
--- head/devel/re2/pkg-plist Wed Mar 3 14:11:51 2021 (r567085)
+++ head/devel/re2/pkg-plist Wed Mar 3 14:13:20 2021 (r567086)
@@ -2,8 +2,9 @@ include/re2/filtered_re2.h
include/re2/re2.h
include/re2/set.h
include/re2/stringpiece.h
-lib/libre2.a
+lib/cmake/re2/re2-config-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/re2/re2-config.cmake
lib/libre2.so
-lib/libre2.so.10
-lib/libre2.so.10.0.0
+lib/libre2.so.9
+lib/libre2.so.9.0.0
libdata/pkgconfig/re2.pc
More information about the svn-ports-head
mailing list