Lines 1-5
Link Here
|
1 |
PORTNAME= pcre2 |
1 |
PORTNAME= pcre2 |
2 |
DISTVERSION= 10.43 |
2 |
DISTVERSION= 10.45-RC1 |
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 |
|
Lines 8-50
COMMENT= Perl Compatible Regular Expressions library, version 2
Link Here
|
8 |
WWW= https://www.pcre.org/ |
8 |
WWW= https://www.pcre.org/ |
9 |
|
9 |
|
10 |
LICENSE= BSD3CLAUSE |
10 |
LICENSE= BSD3CLAUSE |
11 |
LICENSE_FILE= ${WRKSRC}/LICENCE |
11 |
LICENSE_FILE= ${WRKSRC}/LICENCE.md |
12 |
|
12 |
|
13 |
USES= autoreconf cpe libtool pkgconfig tar:bz2 |
13 |
USES= cmake:testing cpe pathfix pkgconfig tar:bz2 |
14 |
CPE_VENDOR= pcre |
14 |
CPE_VENDOR= pcre |
15 |
|
|
|
16 |
USE_LDCONFIG= yes |
15 |
USE_LDCONFIG= yes |
17 |
|
16 |
|
18 |
GNU_CONFIGURE= yes |
17 |
PORTDOCS= * |
19 |
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share |
18 |
|
20 |
CONFIGURE_ARGS= --enable-pcre2-16 \ |
19 |
CMAKE_TESTING_ON= PCRE2_BUILD_TESTS |
21 |
--enable-pcre2-32 |
20 |
CMAKE_OFF= PCRE2_BUILD_TESTS |
22 |
INSTALL_TARGET= install-strip |
21 |
CMAKE_ON= BUILD_SHARED_LIBS \ |
|
|
22 |
PCRE2_BUILD_PCRE2_16 \ |
23 |
PCRE2_BUILD_PCRE2_32 |
23 |
|
24 |
|
24 |
OPTIONS_DEFINE= DOCS LIBBZ2 LIBZ |
25 |
OPTIONS_DEFINE= DOCS LIBBZ2 LIBZ STATIC |
25 |
OPTIONS_RADIO= CLI |
26 |
OPTIONS_RADIO= CLI |
26 |
OPTIONS_RADIO_CLI= LIBEDIT READLINE |
27 |
OPTIONS_RADIO_CLI= LIBEDIT READLINE |
|
|
28 |
OPTIONS_SUB= yes |
27 |
|
29 |
|
28 |
LIBBZ2_DESC= Using pcre2grep with .bz2 files |
30 |
LIBBZ2_DESC= Using pcre2grep with .bz2 files |
29 |
LIBZ_DESC= Using pcre2grep with .gz files |
31 |
LIBZ_DESC= Using pcre2grep with .gz files |
30 |
|
32 |
|
31 |
LIBBZ2_CONFIGURE_ON= --enable-pcre2grep-libbz2 |
33 |
LIBBZ2_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_BZip2:BOOL=True |
32 |
LIBEDIT_USES= libedit |
34 |
|
33 |
LIBEDIT_CONFIGURE_ENABLE= pcre2test-libedit |
35 |
LIBEDIT_USES= libedit |
34 |
LIBZ_CONFIGURE_ON= --enable-pcre2grep-libz |
36 |
LIBEDIT_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Editline:BOOL=True |
35 |
READLINE_USES= readline |
37 |
|
36 |
READLINE_CONFIGURE_ENABLE= pcre2test-libreadline |
38 |
LIBZ_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB:BOOL=True |
|
|
39 |
|
40 |
READLINE_USES= readline |
41 |
READLINE_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Readline:BOOL=True |
42 |
|
43 |
STATIC_CMAKE_BOOL= BUILD_STATIC_LIBS |
37 |
|
44 |
|
38 |
.include <bsd.port.options.mk> |
45 |
.include <bsd.port.options.mk> |
39 |
|
46 |
|
40 |
.if ${ARCH:Mmips64*} == "" && ${ARCH:Mriscv64*} == "" |
47 |
.if ${ARCH:Mmips64*} == "" && ${ARCH:Mriscv64*} == "" |
41 |
CONFIGURE_ARGS+= --enable-jit |
48 |
CMAKE_ON+= PCRE2_SUPPORT_JIT |
42 |
.else |
49 |
.else |
43 |
CONFIGURE_ARGS+= --disable-jit |
50 |
CMAKE_OFF+= PCRE2_SUPPORT_JIT |
44 |
.endif |
|
|
45 |
|
46 |
.if ${PORT_OPTIONS:MDOCS} |
47 |
PORTDOCS= * |
48 |
.endif |
51 |
.endif |
49 |
|
52 |
|
50 |
# Optional knobs that accept positive integer parameters (see pcrebuild(3)): |
53 |
# 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: |
56 |
# libraries, at the expense of longer load times (possible values: |
54 |
# 2 (default), 3, and 4): |
57 |
# 2 (default), 3, and 4): |
55 |
.if defined(WITH_LINK_SIZE) |
58 |
.if defined(WITH_LINK_SIZE) |
56 |
CONFIGURE_ARGS+= --with-link-size=${WITH_LINK_SIZE} |
59 |
CMAKE_ARGS+= -DPCRE2_LINK_SIZE:STRING=${WITH_LINK_SIZE} |
57 |
.endif |
60 |
.endif |
58 |
|
61 |
|
59 |
# Control PCRE resource use by limiting the default number of times pcre_exec() |
62 |
# Control PCRE resource use by limiting the default number of times pcre_exec() |
60 |
# can call match() during a single operation (default: 10 million): |
63 |
# can call match() during a single operation (default: 10 million): |
61 |
.if defined(WITH_MATCH_LIMIT) |
64 |
.if defined(WITH_MATCH_LIMIT) |
62 |
CONFIGURE_ARGS+= --with-match-limit=${WITH_MATCH_LIMIT} |
65 |
CMAKE_ARGS+= -DPCRE2_MATCH_LIMIT:STRING=${WITH_MATCH_LIMIT} |
|
|
66 |
.endif |
67 |
|
68 |
# This limit applies to all backtracks, whether or not they are nested. In |
69 |
# some environments it is desirable to limit the nesting of backtracking (that |
70 |
# is, the depth of tree that is searched) more strictly, in order to restrict |
71 |
# the maximum amount of heap memory that is used (default: 10 million): |
72 |
.if defined(WITH_MATCH_LIMIT_DEPTH) |
73 |
CMAKE_ARGS+= -DPCRE2_MATCH_LIMIT_DEPTH:STRING=${WITH_MATCH_LIMIT_DEPTH} |
63 |
.endif |
74 |
.endif |
64 |
|
75 |
|
65 |
# Control PCRE resource use by limiting the nesting depth of parentheses in |
76 |
# Control PCRE resource use by limiting the nesting depth of parentheses in |
66 |
# patterns compiled with pcre_compile() (default: 250): |
77 |
# patterns compiled with pcre_compile() (default: 250): |
67 |
.if defined(WITH_PARENS_NEST_LIMIT) |
78 |
.if defined(WITH_PARENS_NEST_LIMIT) |
68 |
CONFIGURE_ARGS+= --with-parens-nest-limit=${WITH_PARENS_NEST_LIMIT} |
79 |
CMAKE_ARGS+= -DPCRE2_PARENS_NEST_LIMIT:STRING=${WITH_PARENS_NEST_LIMIT} |
69 |
.endif |
|
|
70 |
|
71 |
#prevent regression test coredumps from causing failures on the |
72 |
#package-building cluster: |
73 |
.ifndef (MAINTAINER_MODE) |
74 |
CORELIMIT?= /usr/bin/limits -Sc 0 |
75 |
.endif |
80 |
.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 |
|
81 |
|
85 |
.include <bsd.port.mk> |
82 |
.include <bsd.port.mk> |