Lines 1-8
Link Here
|
1 |
PORTNAME= pcre2 |
1 |
PORTNAME= pcre2 |
2 |
DISTVERSION= 10.43 |
2 |
DISTVERSION= 10.44 |
3 |
CATEGORIES= devel |
3 |
CATEGORIES= devel |
4 |
MASTER_SITES= https://github.com/PCRE2Project/${PORTNAME}/releases/download/${PORTNAME}-${DISTVERSION}/ |
4 |
MASTER_SITES= https://github.com/PCRE2Project/${PORTNAME}/releases/download/${PORTNAME}-${DISTVERSION}/ |
5 |
|
5 |
|
|
|
6 |
PATCH_SITES= https://github.com/PCRE2Project/pcre2/commit/ |
7 |
PATCHFILES= fba4a6a5e8a7895db7e0efcbcdb7087a04a00322.patch:-p1 \ |
8 |
57906628d7babd27c01eb1c085d3e0cdd512189a.patch:-p1 \ |
9 |
bb8e7e0c728ca10fa21fbc306a7f2ae4205e8618.patch:-p1 \ |
10 |
a80920509e49865405477244c294fb3d8864375e.patch:-p1 \ |
11 |
3b90149f3c9aca9fe8c2aa623a18e18c089dc449.patch:-p1 \ |
12 |
c63d7c992ef1bbf64ef93e0e8e551ed29fd988e7.patch:-p1 \ |
13 |
7e141969b538917c9f4a85839031d066eec67ad2.patch:-p1 \ |
14 |
9a51f31da1c2d45e1f31d6a0d6b2f62975fed373.patch:-p1 |
15 |
|
6 |
MAINTAINER= krion@FreeBSD.org |
16 |
MAINTAINER= krion@FreeBSD.org |
7 |
COMMENT= Perl Compatible Regular Expressions library, version 2 |
17 |
COMMENT= Perl Compatible Regular Expressions library, version 2 |
8 |
WWW= https://www.pcre.org/ |
18 |
WWW= https://www.pcre.org/ |
Lines 10-50
WWW= https://www.pcre.org/
Link Here
|
10 |
LICENSE= BSD3CLAUSE |
20 |
LICENSE= BSD3CLAUSE |
11 |
LICENSE_FILE= ${WRKSRC}/LICENCE |
21 |
LICENSE_FILE= ${WRKSRC}/LICENCE |
12 |
|
22 |
|
13 |
USES= autoreconf cpe libtool pkgconfig tar:bz2 |
23 |
USES= cmake:testing cpe pathfix pkgconfig tar:bz2 |
14 |
CPE_VENDOR= pcre |
24 |
CPE_VENDOR= pcre |
15 |
|
|
|
16 |
USE_LDCONFIG= yes |
25 |
USE_LDCONFIG= yes |
17 |
|
26 |
|
18 |
GNU_CONFIGURE= yes |
27 |
PORTDOCS= * |
19 |
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share |
28 |
|
20 |
CONFIGURE_ARGS= --enable-pcre2-16 \ |
29 |
CMAKE_TESTING_ON= PCRE2_BUILD_TESTS |
21 |
--enable-pcre2-32 |
30 |
CMAKE_OFF= PCRE2_BUILD_TESTS |
22 |
INSTALL_TARGET= install-strip |
31 |
CMAKE_ON= BUILD_SHARED_LIBS \ |
|
|
32 |
PCRE2_BUILD_PCRE2_16 \ |
33 |
PCRE2_BUILD_PCRE2_32 |
23 |
|
34 |
|
24 |
OPTIONS_DEFINE= DOCS LIBBZ2 LIBZ |
35 |
OPTIONS_DEFINE= DOCS LIBBZ2 LIBZ STATIC |
25 |
OPTIONS_RADIO= CLI |
36 |
OPTIONS_RADIO= CLI |
26 |
OPTIONS_RADIO_CLI= LIBEDIT READLINE |
37 |
OPTIONS_RADIO_CLI= LIBEDIT READLINE |
|
|
38 |
OPTIONS_SUB= yes |
27 |
|
39 |
|
28 |
LIBBZ2_DESC= Using pcre2grep with .bz2 files |
40 |
LIBBZ2_DESC= Using pcre2grep with .bz2 files |
29 |
LIBZ_DESC= Using pcre2grep with .gz files |
41 |
LIBZ_DESC= Using pcre2grep with .gz files |
30 |
|
42 |
|
31 |
LIBBZ2_CONFIGURE_ON= --enable-pcre2grep-libbz2 |
43 |
LIBBZ2_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_BZip2:BOOL=True |
32 |
LIBEDIT_USES= libedit |
44 |
|
33 |
LIBEDIT_CONFIGURE_ENABLE= pcre2test-libedit |
45 |
LIBEDIT_USES= libedit |
34 |
LIBZ_CONFIGURE_ON= --enable-pcre2grep-libz |
46 |
LIBEDIT_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Editline:BOOL=True |
35 |
READLINE_USES= readline |
47 |
|
36 |
READLINE_CONFIGURE_ENABLE= pcre2test-libreadline |
48 |
LIBZ_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB:BOOL=True |
|
|
49 |
|
50 |
READLINE_USES= readline |
51 |
READLINE_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Readline:BOOL=True |
52 |
|
53 |
STATIC_CMAKE_BOOL= BUILD_STATIC_LIBS |
37 |
|
54 |
|
38 |
.include <bsd.port.options.mk> |
55 |
.include <bsd.port.options.mk> |
39 |
|
56 |
|
40 |
.if ${ARCH:Mmips64*} == "" && ${ARCH:Mriscv64*} == "" |
57 |
.if ${ARCH:Mmips64*} == "" && ${ARCH:Mriscv64*} == "" |
41 |
CONFIGURE_ARGS+= --enable-jit |
58 |
CMAKE_ON+= PCRE2_SUPPORT_JIT |
42 |
.else |
59 |
.else |
43 |
CONFIGURE_ARGS+= --disable-jit |
60 |
CMAKE_OFF+= PCRE2_SUPPORT_JIT |
44 |
.endif |
|
|
45 |
|
46 |
.if ${PORT_OPTIONS:MDOCS} |
47 |
PORTDOCS= * |
48 |
.endif |
61 |
.endif |
49 |
|
62 |
|
50 |
# Optional knobs that accept positive integer parameters (see pcrebuild(3)): |
63 |
# Optional knobs that accept positive integer parameters (see pcrebuild(3)): |
Lines 53-85
PORTDOCS= *
Link Here
|
53 |
# libraries, at the expense of longer load times (possible values: |
66 |
# libraries, at the expense of longer load times (possible values: |
54 |
# 2 (default), 3, and 4): |
67 |
# 2 (default), 3, and 4): |
55 |
.if defined(WITH_LINK_SIZE) |
68 |
.if defined(WITH_LINK_SIZE) |
56 |
CONFIGURE_ARGS+= --with-link-size=${WITH_LINK_SIZE} |
69 |
CMAKE_ARGS+= -DPCRE2_LINK_SIZE:STRING=${WITH_LINK_SIZE} |
57 |
.endif |
70 |
.endif |
58 |
|
71 |
|
59 |
# Control PCRE resource use by limiting the default number of times pcre_exec() |
72 |
# Control PCRE resource use by limiting the default number of times pcre_exec() |
60 |
# can call match() during a single operation (default: 10 million): |
73 |
# can call match() during a single operation (default: 10 million): |
61 |
.if defined(WITH_MATCH_LIMIT) |
74 |
.if defined(WITH_MATCH_LIMIT) |
62 |
CONFIGURE_ARGS+= --with-match-limit=${WITH_MATCH_LIMIT} |
75 |
CMAKE_ARGS+= -DPCRE2_MATCH_LIMIT:STRING=${WITH_MATCH_LIMIT} |
|
|
76 |
.endif |
77 |
|
78 |
# This limit applies to all backtracks, whether or not they are nested. In |
79 |
# some environments it is desirable to limit the nesting of backtracking (that |
80 |
# is, the depth of tree that is searched) more strictly, in order to restrict |
81 |
# the maximum amount of heap memory that is used (default: 10 million): |
82 |
.if defined(WITH_MATCH_LIMIT_DEPTH) |
83 |
CMAKE_ARGS+= -DPCRE2_MATCH_LIMIT_DEPTH:STRING=${WITH_MATCH_LIMIT_DEPTH} |
63 |
.endif |
84 |
.endif |
64 |
|
85 |
|
65 |
# Control PCRE resource use by limiting the nesting depth of parentheses in |
86 |
# Control PCRE resource use by limiting the nesting depth of parentheses in |
66 |
# patterns compiled with pcre_compile() (default: 250): |
87 |
# patterns compiled with pcre_compile() (default: 250): |
67 |
.if defined(WITH_PARENS_NEST_LIMIT) |
88 |
.if defined(WITH_PARENS_NEST_LIMIT) |
68 |
CONFIGURE_ARGS+= --with-parens-nest-limit=${WITH_PARENS_NEST_LIMIT} |
89 |
CMAKE_ARGS+= -DPCRE2_PARENS_NEST_LIMIT:STRING=${WITH_PARENS_NEST_LIMIT} |
69 |
.endif |
90 |
.endif |
70 |
|
91 |
|
71 |
#prevent regression test coredumps from causing failures on the |
92 |
post-patch: |
72 |
#package-building cluster: |
93 |
# Clean testdata dir from .orig patches after backports |
73 |
.ifndef (MAINTAINER_MODE) |
94 |
${RM} ${PATCH_WRKSRC}/testdata/*.orig |
74 |
CORELIMIT?= /usr/bin/limits -Sc 0 |
|
|
75 |
.endif |
76 |
TESTLOGS?= RunGrepTest RunTest pcre_jit_test pcre_scanner_unittest \ |
77 |
pcre_stringpiece_unittest pcrecpp_unittest |
78 |
|
79 |
do-test: |
80 |
@cd ${WRKSRC} ; \ |
81 |
${SETENV} ${MAKE_ENV} ${CORELIMIT} ${MAKE_CMD} ${MAKE_ARGS} check ; \ |
82 |
for _l in ${TESTLOGS} ; do if ${TEST} -f $${_l}.log ; then \ |
83 |
${PRINTF} "\n\n$${_l}.log\n\n\n" ; ${CAT} $${_l}.log ; fi ; done |
84 |
|
95 |
|
85 |
.include <bsd.port.mk> |
96 |
.include <bsd.port.mk> |