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