On 2021/09/08 23:09, Omar Polo wrote: > > Stuart Henderson <[email protected]> writes: > > > On 2021/09/08 22:07, Omar Polo wrote: > >> > >> Denis Fondras <[email protected]> writes: > >> > >> > RE2 is a fast, safe, thread-friendly C++ library alternative to > >> > backtracking regular expression engines like those used in PCRE, > >> > Perl, and Python. > >> > > >> > https://github.com/google/re2 > >> > > >> > [2. application/x-tar-gz; re2-20210901.tgz]... > >> > >> Hello, > >> > >> I had a local port for an earlier version of re2 because it was a > >> dependency of something I was working on (that rotted on mystuff > >> probably) > >> > >> Anyway, the ports needs some adjustments: > >> > >> - make port-lib-depends-check complains about missing WANTLIB on > >> ``${COMPILER_LIBCXX} m'' > >> - since it's a c++ library it's probably more useful to install also > >> the re2Config.cmake file probably > >> - it installs the library as lib/libre2.so.9 and libre2.so.9.0.0: in > >> ports we usually override upstream version with a sensible one > >> (starting at 0 for new ports) > >> - it's missing the COMPILER line: it needs C++11 so `base-clang > >> ports-gcc' should be enough > > > > all correct > > > >> - the patch for the makefile isn't needed, we can override CXX with > >> > >> MAKE_ENV += CXX=${CXX} > > > > It uses = in the Makefile so it needs MAKE_FLAGS rather than MAKE_ENV > > (flags overrides variables set in the makefile, but isn't typically > > propagated to submakes. env does not override but is propagated. so > > both are needed sometimes, but usually flags is best). > > > >> Attaching a tarball with the mentioned stuff fixed and the build > >> switched from the provided makefile to cmake (that installs the > >> re2Config.cmake file and picks the correct C++ compiler). > >> > >> (The CMakefile needed some massaging to avoid hardcoding the soname) > > > > As-is the version number is not set in the filename of the produced > > library. This is because the name in SHARED_LIBS has a "lib" prefix which > > shouldn't be there. Remove the patch and set the correct SHARED_LIBS > > then the cmake module will take care of it. > > that's correct, I didn't noticed the lib prefix, apologies. Attaching > an updated tarball.
This one is OK sthen@ to import. > P.S.: I see that there was already a devel/re2 port in openbsd-wip by > bcallah@ > ah the write-only repo ;) I prefer the DISTNAME construction in your version fwiw.
