Lines 2-10
Link Here
|
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= pcre2 |
4 |
PORTNAME= pcre2 |
5 |
PORTVERSION= 10.35 |
5 |
DISTVERSION= 10.36 |
6 |
CATEGORIES= devel |
6 |
CATEGORIES= devel |
7 |
MASTER_SITES= SF/pcre/${PORTNAME}/${PORTVERSION} |
7 |
MASTER_SITES= SF/pcre/${PORTNAME}/${DISTVERSION} \ |
|
|
8 |
https://ftp.pcre.org/pub/pcre/ \ |
9 |
ftp://ftp.pcre.org/pub/pcre/ |
8 |
|
10 |
|
9 |
MAINTAINER= krion@FreeBSD.org |
11 |
MAINTAINER= krion@FreeBSD.org |
10 |
COMMENT= Perl Compatible Regular Expressions library, version 2 |
12 |
COMMENT= Perl Compatible Regular Expressions library, version 2 |
Lines 12-65
COMMENT= Perl Compatible Regular Expressions library, version 2
Link Here
|
12 |
LICENSE= BSD3CLAUSE |
14 |
LICENSE= BSD3CLAUSE |
13 |
LICENSE_FILE= ${WRKSRC}/LICENCE |
15 |
LICENSE_FILE= ${WRKSRC}/LICENCE |
14 |
|
16 |
|
15 |
USES= autoreconf libtool pkgconfig |
17 |
USES= cmake tar:bzip2 |
16 |
|
18 |
|
17 |
GNU_CONFIGURE= yes |
19 |
TEST_TARGET= test |
18 |
USE_LDCONFIG= yes |
20 |
|
19 |
INSTALL_TARGET= install-strip |
21 |
CMAKE_ARGS= -DPCRE2_BUILD_PCRE2_16:BOOL=ON -DPCRE2_BUILD_PCRE2_32:BOOL=ON |
20 |
CONFIGURE_ARGS= --enable-pcre2-16 --enable-pcre2-32 |
|
|
21 |
|
22 |
|
22 |
OPTIONS_DEFINE= DOCS |
23 |
OPTIONS_DEFINE= DOCS STATIC TEST |
|
|
24 |
OPTIONS_SUB= yes |
23 |
OPTIONS_RADIO= CLI |
25 |
OPTIONS_RADIO= CLI |
24 |
OPTIONS_RADIO_CLI= LIBEDIT READLINE |
26 |
OPTIONS_RADIO_CLI= LIBEDIT READLINE |
25 |
|
27 |
|
26 |
LIBEDIT_CONFIGURE_ENABLE= pcre2test-libedit |
28 |
LIBEDIT_USES= libedit |
27 |
LIBEDIT_USES= libedit |
29 |
LIBEDIT_CMAKE_BOOL= PCRE2_SUPPORT_LIBEDIT |
28 |
|
30 |
READLINE_USES= readline |
29 |
READLINE_USES= readline |
31 |
READLINE_CMAKE_BOOL= PCRE2_SUPPORT_LIBREADLINE |
30 |
READLINE_CONFIGURE_ENABLE= pcre2test-libreadline |
32 |
STATIC_CMAKE_BOOL_OFF= BUILD_SHARED_LIBS |
|
|
33 |
TEST_CMAKE_BOOL= PCRE2_BUILD_TESTS |
31 |
|
34 |
|
32 |
.include <bsd.port.options.mk> |
35 |
.include <bsd.port.options.mk> |
33 |
|
36 |
|
34 |
.if ${ARCH} != "sparc64" && ${ARCH:Mmips64*} == "" && ${ARCH:Mriscv64*} == "" |
37 |
.if ${ARCH} != "sparc64" && ${ARCH:Mmips64*} == "" && ${ARCH:Mriscv64*} == "" |
35 |
CONFIGURE_ARGS+= --enable-jit |
38 |
CMAKE_ARGS+= -DPCRE2_SUPPORT_JIT:BOOL=ON |
36 |
.else |
39 |
.else |
37 |
CONFIGURE_ARGS+= --disable-jit |
40 |
CMAKE_ARGS+= -DPCRE2_SUPPORT_JIT:BOOL=OFF |
38 |
.endif |
41 |
.endif |
39 |
|
42 |
|
40 |
.if ${PORT_OPTIONS:MDOCS} |
43 |
.if ${PORT_OPTIONS:MDOCS} |
41 |
PORTDOCS= * |
44 |
PORTDOCS= * |
42 |
.endif |
45 |
.endif |
43 |
|
46 |
|
|
|
47 |
.if ! ${PORT_OPTIONS:MSTATIC} |
48 |
USE_LDCONFIG= yes |
49 |
.endif |
50 |
|
44 |
# Optional knobs that accept positive integer parameters (see pcrebuild(3)): |
51 |
# Optional knobs that accept positive integer parameters (see pcrebuild(3)): |
45 |
|
52 |
|
46 |
# Allow the use of very large patterns (> 64K) with the 8- and 16-bit |
53 |
# Allow the use of very large patterns (> 64K) with the 8- and 16-bit |
47 |
# libraries, at the expense of longer load times (possible values: |
54 |
# libraries, at the expense of longer load times (possible values: |
48 |
# 2 (default), 3, and 4): |
55 |
# 2 (default), 3, and 4): |
49 |
.if defined(WITH_LINK_SIZE) |
56 |
.if defined(WITH_LINK_SIZE) |
50 |
CONFIGURE_ARGS+= --with-link-size=${WITH_LINK_SIZE} |
57 |
CMAKE_ARGS+= -DPCRE2_LINK_SIZE:STRING=${WITH_LINK_SIZE} |
51 |
.endif |
58 |
.endif |
52 |
|
59 |
|
53 |
# Control PCRE resource use by limiting the default number of times pcre_exec() |
60 |
# Control PCRE resource use by limiting the default number of times pcre_exec() |
54 |
# can call match() during a single operation (default: 10 million): |
61 |
# can call match() during a single operation (default: 10 million): |
55 |
.if defined(WITH_MATCH_LIMIT) |
62 |
.if defined(WITH_MATCH_LIMIT) |
56 |
CONFIGURE_ARGS+= --with-match-limit=${WITH_MATCH_LIMIT} |
63 |
CMAKE_ARGS+= -DPCRE2_MATCH_LIMIT:STRING=${WITH_MATCH_LIMIT} |
|
|
64 |
.endif |
65 |
|
66 |
# This limit applies to all backtracks, whether or not they are nested. In |
67 |
# some environments it is desirable to limit the nesting of backtracking (that |
68 |
# is, the depth of tree that is searched) more strictly, in order to restrict |
69 |
# the maximum amount of heap memory that is used (default: 10 million): |
70 |
.if defined(WITH_MATCH_LIMIT_DEPTH) |
71 |
CMAKE_ARGS+= -DPCRE2_MATCH_LIMIT_DEPTH:STRING=${WITH_MATCH_LIMIT_DEPTH} |
57 |
.endif |
72 |
.endif |
58 |
|
73 |
|
59 |
# Control PCRE resource use by limiting the nesting depth of parentheses in |
74 |
# Control PCRE resource use by limiting the nesting depth of parentheses in |
60 |
# patterns compiled with pcre_compile() (default: 250): |
75 |
# patterns compiled with pcre_compile() (default: 250): |
61 |
.if defined(WITH_PARENS_NEST_LIMIT) |
76 |
.if defined(WITH_PARENS_NEST_LIMIT) |
62 |
CONFIGURE_ARGS+= --with-parens-nest-limit=${WITH_PARENS_NEST_LIMIT} |
77 |
CMAKE_ARGS+= -DPCRE2_PARENS_NEST_LIMIT:STRING=${WITH_PARENS_NEST_LIMIT} |
63 |
.endif |
78 |
.endif |
64 |
|
79 |
|
65 |
#prevent regression test coredumps from causing failures on the |
80 |
#prevent regression test coredumps from causing failures on the |
Lines 67-79
CONFIGURE_ARGS+= --with-parens-nest-limit=${WITH_PARENS_NEST_LIMIT}
Link Here
|
67 |
.ifndef(MAINTAINER_MODE) |
82 |
.ifndef(MAINTAINER_MODE) |
68 |
CORELIMIT?= /usr/bin/limits -Sc 0 |
83 |
CORELIMIT?= /usr/bin/limits -Sc 0 |
69 |
.endif |
84 |
.endif |
70 |
TESTLOGS?= RunGrepTest RunTest pcre_jit_test pcre_scanner_unittest \ |
|
|
71 |
pcre_stringpiece_unittest pcrecpp_unittest |
72 |
|
85 |
|
73 |
do-test: |
86 |
do-test: |
74 |
@cd ${WRKSRC} ; \ |
87 |
@${CP} -Rp ${WRKSRC}/test-driver ${WRKDIR}/.build |
75 |
${SETENV} ${MAKE_ENV} ${CORELIMIT} ${MAKE_CMD} ${MAKE_ARGS} check ; \ |
88 |
@${CP} -Rp ${WRKSRC}/testdata ${WRKDIR}/.build |
76 |
for _l in ${TESTLOGS} ; do if ${TEST} -f $${_l}.log ; then \ |
89 |
@${CP} -p ${WRKSRC}/RunGrepTest ${WRKDIR}/.build |
77 |
${PRINTF} "\n\n$${_l}.log\n\n\n" ; ${CAT} $${_l}.log ; fi ; done |
90 |
@${CP} -p ${WRKSRC}/RunTest ${WRKDIR}/.build |
|
|
91 |
@cd ${WRKDIR}/.build ; \ |
92 |
${SETENV} ${MAKE_ENV} ${CORELIMIT} ${MAKE_CMD} ${MAKE_ARGS} \ |
93 |
${TEST_TARGET} ; \ |
94 |
${CAT} Testing/Temporary/LastTest.log |
78 |
|
95 |
|
79 |
.include <bsd.port.mk> |
96 |
.include <bsd.port.mk> |