/[ports]/head/devel/pcre/Makefile
ViewVC logotype

Contents of /head/devel/pcre/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 395178 - (show annotations) (download)
Mon Aug 24 16:25:22 2015 UTC (9 years, 3 months ago) by feld
File MIME type: text/plain
File size: 3725 byte(s)
devel/pcre: Add patch to resolve heap overflow vulnerability

Obtained from:	http://vcs.pcre.org/pcre?view=revision&revision=1594
Security:	6900e6f1-4a79-11e5-9ad8-14dae9d210b8

1 # Created by: dom
2 # $FreeBSD$
3
4 PORTNAME= pcre
5 PORTVERSION= 8.37
6 PORTREVISION= 4
7 CATEGORIES= devel
8 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION} \
9 ftp://ftp.csx.cam.ac.uk/pub/software/programming/${PORTNAME}/ \
10 ftp://ftp.fu-berlin.de/unix/misc/${PORTNAME}/ \
11 ftp://ftp.tin.org/pub/libs/${PORTNAME}/
12
13 MAINTAINER= bf@FreeBSD.org
14 COMMENT= Perl Compatible Regular Expressions library
15
16 LICENSE= BSD3CLAUSE
17 LICENSE_FILE= ${WRKSRC}/LICENCE
18
19 GNU_CONFIGURE= yes
20 USES= libtool pathfix tar:bzip2
21 USE_LDCONFIG= yes
22 CONFIGURE_ARGS= --enable-utf --enable-unicode-properties \
23 --enable-pcre8 --enable-pcre16 --enable-pcre32
24 INSTALL_TARGET= install-strip
25
26 OPTIONS_DEFINE= DOCS LIBEDIT READLINE STACK_RECURSION
27 OPTIONS_DEFAULT= STACK_RECURSION
28
29 STACK_RECURSION_DESC= Use the stack for recursion during matching
30
31 LIBEDIT_CONFIGURE_ENABLE= pcretest-libedit
32 LIBEDIT_USES= libedit
33
34 READLINE_USES= readline
35 READLINE_CONFIGURE_ENABLE= pcretest-libreadline
36
37 .include <bsd.port.options.mk>
38
39 .if ${ARCH} != "sparc64" && ${ARCH} != "ia64" && ${ARCH:Mmips64*} == ""
40 CONFIGURE_ARGS+= --enable-jit
41 .else
42 CONFIGURE_ARGS+= --disable-jit
43 .endif
44
45 .if ${PORT_OPTIONS:MDOCS}
46 PORTDOCS= *
47 .endif
48
49 # Using the heap rather than the stack for recursion is slower but less
50 # prone to segfaults from stack exhaustion when matching certain patterns
51 .if !${PORT_OPTIONS:MSTACK_RECURSION}
52 CONFIGURE_ARGS+= --disable-stack-for-recursion
53 .endif
54
55 # Optional knobs that accept positive integer parameters (see pcrebuild(3)):
56
57 # Allow the use of very large patterns (> 64K) with the 8- and 16-bit
58 # libraries, at the expense of longer load times (possible values:
59 # 2 (default), 3, and 4):
60 .if defined(WITH_LINK_SIZE)
61 CONFIGURE_ARGS+= --with-link-size=${WITH_LINK_SIZE}
62 .endif
63
64 # Control PCRE resource use by limiting the default number of times pcre_exec()
65 # can call match() during a single operation (default: 10 million):
66 .if defined(WITH_MATCH_LIMIT)
67 CONFIGURE_ARGS+= --with-match-limit=${WITH_MATCH_LIMIT}
68 .endif
69
70 # Control PCRE resource use by limiting the default number of times pcre_exec()
71 # can call match() recursively during a single operation (default: 10 million):
72 .if defined(WITH_MATCH_LIMIT_RECURSION)
73 CONFIGURE_ARGS+= --with-match-limit-recursion=${WITH_MATCH_LIMIT_RECURSION}
74 .endif
75
76 # Control PCRE resource use by limiting the nesting depth of parentheses in
77 # patterns compiled with pcre_compile() (default: 250):
78 .if defined(WITH_PARENS_NEST_LIMIT)
79 CONFIGURE_ARGS+= --with-parens-nest-limit=${WITH_PARENS_NEST_LIMIT}
80 .endif
81
82 # Adjust the default maximum number of substrings that will be stored on the stack
83 # when the 8-bit library is called via the POSIX interface (default: 10):
84 .if defined(WITH_POSIX_MALLOC_THRESHOLD)
85 CONFIGURE_ARGS+= --with-posix-malloc-threshold=${WITH_POSIX_MALLOC_THRESHOLD}
86 .endif
87
88 post-patch:
89 @${REINPLACE_CMD} -e "/^\.rs/d" ${WRKSRC}/doc/*.3 ${WRKSRC}/doc/*.1
90 @${REINPLACE_CMD} -e "s/£//g" ${WRKSRC}/doc/pcre_compile2.3
91 .if !${PORT_OPTIONS:MDOCS}
92 @${REINPLACE_CMD} -E -e '/^install-data-am/,/^$$/ s,install-(dist_doc|dist_html|html)DATA,,g' \
93 ${WRKSRC}/Makefile.in
94 .endif
95
96 #prevent regression test coredumps from causing failures on the
97 #package-building cluster:
98 .ifndef(MAINTAINER_MODE)
99 CORELIMIT?= /usr/bin/limits -Sc 0
100 .endif
101 TESTLOGS?= RunGrepTest RunTest pcre_jit_test pcre_scanner_unittest \
102 pcre_stringpiece_unittest pcrecpp_unittest
103
104 post-stage:
105 ${LN} -s libpcre.so.1 ${STAGEDIR}${PREFIX}/lib/libpcre.so.3
106
107 check regression-test test: build
108 @cd ${WRKSRC} ; \
109 ${SETENV} ${MAKE_ENV} ${CORELIMIT} ${MAKE_CMD} ${MAKE_ARGS} check ; \
110 for _l in ${TESTLOGS} ; do if ${TEST} -f $${_l}.log ; then \
111 ${PRINTF} "\n\n$${_l}.log\n\n\n" ; ${CAT} $${_l}.log ; fi ; done
112
113 .include <bsd.port.mk>

Properties

Name Value
svn:eol-style native
svn:keywords FreeBSD=%H
svn:mime-type text/plain

  ViewVC Help
Powered by ViewVC 1.1.27