Hi, [cc namn@ as maitainer]
update of devel/pcre2 library to the latest version 10.44. The main repository is now on GitHub https://github.com/PCRE2Project/pcre2 and build uses CMake instead of GNU configure/make. Update Makefile: - use GH_* to download sources - bump minor versions for pcre2-8, pcre2-16 and pcre2-32 libraries (new functions added) - use "devel/cmake" as module for build - add configure args for cmake to build shared libs and 16/32 bits versions (off by default) - patch tests to fix them on OpenBSD, see commit https://github.com/PCRE2Project/pcre2/commit/7e141969b538917c9f4a85839031d066eec67ad2 Regen pkg/PLIST after fake install Build and tests OK on current/amd64. Comments/tests welcome and please commit if OK. Laurent
Index: Makefile =================================================================== RCS file: /cvs/ports/devel/pcre2/Makefile,v diff -u -p -r1.20 Makefile --- Makefile 8 Feb 2024 00:57:55 -0000 1.20 +++ Makefile 2 Jul 2024 08:21:46 -0000 @@ -1,41 +1,42 @@ COMMENT = perl-compatible regular expression library, version 2 -DISTNAME = pcre2-10.37 +VERSION = 10.44 -SHARED_LIBS += pcre2-16 0.5 # 10.37 -SHARED_LIBS += pcre2-32 0.5 # 10.37 -SHARED_LIBS += pcre2-8 0.6 # 10.37 -SHARED_LIBS += pcre2-posix 1.0 # 2.3 +GH_ACCOUNT = PCRE2Project +GH_PROJECT = pcre2 +GH_TAGNAME = pcre2-${VERSION} -CATEGORIES = devel +DISTNAME = pcre2-${VERSION} -REVISION = 2 +SHARED_LIBS += pcre2-16 0.6 # 10.44 +SHARED_LIBS += pcre2-32 0.6 # 10.44 +SHARED_LIBS += pcre2-8 0.7 # 10.44 +SHARED_LIBS += pcre2-posix 1.0 # 2.3 -SITES = https://github.com/PCRE2Project/pcre2/releases/download/${DISTNAME}/ \ - https://ftp.pcre.org/pub/pcre/ \ - ${SITE_SOURCEFORGE:=pcre/} \ - http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \ - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ +CATEGORIES = devel -HOMEPAGE = https://www.pcre.org/ MAINTAINER = Nam Nguyen <n...@openbsd.org> # BSD PERMIT_PACKAGE = Yes -WANTLIB += bz2 c curses readline z +WANTLIB += bz2 c readline z + +BUILD_DEPENDS = archivers/bzip2 +LIB_DEPENDS = ${BUILD_DEPENDS} + +MODULES = devel/cmake + +CONFIGURE_ARGS += -DBUILD_SHARED_LIBS=ON \ + -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -LIB_DEPENDS = archivers/bzip2 +# Patch tests output +# See commit 7e141969b538917c9f4a85839031d066eec67ad2 +post-patch: + sed -i 's/badlocale/locale.bad/' ${WRKSRC}/RunGrepTest + sed -i 's/badlocale/locale.bad/' ${WRKSRC}/testdata/grepoutput -CONFIGURE_STYLE = gnu -CONFIGURE_ARGS = --enable-pcre2-16 \ - --enable-pcre2-32 \ - --enable-pcre2grep-libz \ - --enable-pcre2grep-libbz2 \ - --enable-pcre2test-libreadline -# explicitly disable JIT that would require WXNEEDED -CONFIGURE_ARGS += --disable-jit -CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" +post-install: + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/pcre2/ .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/devel/pcre2/distinfo,v diff -u -p -r1.9 distinfo --- distinfo 5 Nov 2021 22:18:23 -0000 1.9 +++ distinfo 2 Jul 2024 08:21:46 -0000 @@ -1,2 +1,2 @@ -SHA256 (pcre2-10.37.tar.gz) = BOIUwMQKl7ilwrSuiKOqipPm8uRcazU03aw1HyZUhXc= -SIZE (pcre2-10.37.tar.gz) = 2299767 +SHA256 (pcre2-10.44.tar.gz) = B6AC6CFjgqlvcivEqDHz13RX/j6eYqbf8lCi3Q6cXm0= +SIZE (pcre2-10.44.tar.gz) = 2930559 Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/pcre2/pkg/PLIST,v diff -u -p -r1.6 PLIST --- pkg/PLIST 11 Mar 2022 18:52:29 -0000 1.6 +++ pkg/PLIST 2 Jul 2024 08:21:46 -0000 @@ -1,19 +1,18 @@ bin/pcre2-config @bin bin/pcre2grep @bin bin/pcre2test +@comment cmake/ +@comment cmake/pcre2-config-version.cmake +@comment cmake/pcre2-config.cmake include/pcre2.h include/pcre2posix.h @static-lib lib/libpcre2-16.a -lib/libpcre2-16.la @lib lib/libpcre2-16.so.${LIBpcre2-16_VERSION} @static-lib lib/libpcre2-32.a -lib/libpcre2-32.la @lib lib/libpcre2-32.so.${LIBpcre2-32_VERSION} @static-lib lib/libpcre2-8.a -lib/libpcre2-8.la @lib lib/libpcre2-8.so.${LIBpcre2-8_VERSION} @static-lib lib/libpcre2-posix.a -lib/libpcre2-posix.la @lib lib/libpcre2-posix.so.${LIBpcre2-posix_VERSION} lib/pkgconfig/libpcre2-16.pc lib/pkgconfig/libpcre2-32.pc @@ -42,6 +41,7 @@ lib/pkgconfig/libpcre2-posix.pc @man man/man3/pcre2_general_context_free.3 @man man/man3/pcre2_get_error_message.3 @man man/man3/pcre2_get_mark.3 +@man man/man3/pcre2_get_match_data_heapframes_size.3 @man man/man3/pcre2_get_match_data_size.3 @man man/man3/pcre2_get_ovector_count.3 @man man/man3/pcre2_get_ovector_pointer.3 @@ -77,7 +77,9 @@ lib/pkgconfig/libpcre2-posix.pc @man man/man3/pcre2_set_glob_separator.3 @man man/man3/pcre2_set_heap_limit.3 @man man/man3/pcre2_set_match_limit.3 +@man man/man3/pcre2_set_max_pattern_compiled_length.3 @man man/man3/pcre2_set_max_pattern_length.3 +@man man/man3/pcre2_set_max_varlookbehind.3 @man man/man3/pcre2_set_newline.3 @man man/man3/pcre2_set_offset_limit.3 @man man/man3/pcre2_set_parens_nest_limit.3 @@ -114,15 +116,7 @@ lib/pkgconfig/libpcre2-posix.pc @man man/man3/pcre2syntax.3 @man man/man3/pcre2unicode.3 share/doc/pcre2/ -share/doc/pcre2/AUTHORS -share/doc/pcre2/COPYING -share/doc/pcre2/ChangeLog -share/doc/pcre2/LICENCE -share/doc/pcre2/NEWS -share/doc/pcre2/README share/doc/pcre2/html/ -share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -share/doc/pcre2/html/README.txt share/doc/pcre2/html/index.html share/doc/pcre2/html/pcre2-config.html share/doc/pcre2/html/pcre2.html @@ -145,6 +139,7 @@ share/doc/pcre2/html/pcre2_general_conte share/doc/pcre2/html/pcre2_general_context_free.html share/doc/pcre2/html/pcre2_get_error_message.html share/doc/pcre2/html/pcre2_get_mark.html +share/doc/pcre2/html/pcre2_get_match_data_heapframes_size.html share/doc/pcre2/html/pcre2_get_match_data_size.html share/doc/pcre2/html/pcre2_get_ovector_count.html share/doc/pcre2/html/pcre2_get_ovector_pointer.html @@ -180,7 +175,9 @@ share/doc/pcre2/html/pcre2_set_glob_esca share/doc/pcre2/html/pcre2_set_glob_separator.html share/doc/pcre2/html/pcre2_set_heap_limit.html share/doc/pcre2/html/pcre2_set_match_limit.html +share/doc/pcre2/html/pcre2_set_max_pattern_compiled_length.html share/doc/pcre2/html/pcre2_set_max_pattern_length.html +share/doc/pcre2/html/pcre2_set_max_varlookbehind.html share/doc/pcre2/html/pcre2_set_newline.html share/doc/pcre2/html/pcre2_set_offset_limit.html share/doc/pcre2/html/pcre2_set_parens_nest_limit.html