svn commit: r319821 - head/devel/pcre

Brendan Fabeny bf at FreeBSD.org
Tue Jun 4 02:48:28 UTC 2013


Author: bf
Date: Tue Jun  4 02:48:27 2013
New Revision: 319821
URL: http://svnweb.freebsd.org/changeset/ports/319821

Log:
  update to 8.33; add an option and some knobs to help users
  in environments with limited resources, and to fail more
  gracefully when encountering runaway recursions

Modified:
  head/devel/pcre/Makefile
  head/devel/pcre/distinfo   (contents, props changed)

Modified: head/devel/pcre/Makefile
==============================================================================
--- head/devel/pcre/Makefile	Tue Jun  4 02:42:05 2013	(r319820)
+++ head/devel/pcre/Makefile	Tue Jun  4 02:48:27 2013	(r319821)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	pcre
-PORTVERSION=	8.32
+PORTVERSION=	8.33
 CATEGORIES=	devel
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION} \
 		ftp://ftp.csx.cam.ac.uk/pub/software/programming/%SUBDIR%/ \
@@ -23,6 +23,11 @@ USES=	pathfix
 CONFIGURE_ARGS=	--enable-utf --enable-unicode-properties \
 		--enable-pcre8 --enable-pcre16 --enable-pcre32
 
+OPTIONS_DEFINE=		STACK_RECURSION
+OPTIONS_DEFAULT=	STACK_RECURSION
+
+STACK_RECURSION_DESC=	Use the stack for recursion during matching
+
 .include <bsd.port.options.mk>
 
 .if ${ARCH} != "sparc64" && ${ARCH} != "ia64"
@@ -35,7 +40,11 @@ CONFIGURE_ARGS+=	--disable-jit
 PORTDOCS=	*
 .endif
 
-.include <bsd.port.pre.mk>
+# Using the heap rather than the stack for recursion is slower but less
+# prone to segfaults from stack exhaustion when matching certain patterns
+.if !${PORT_OPTIONS:MSTACK_RECURSION}
+CONFIGURE_ARGS+=	--disable-stack-for-recursion
+.endif
 
 # For FreeBSD 8.3 and above link pcretest against libedit
 .if ${OSVERSION} >= 803000
@@ -46,8 +55,31 @@ CONFIGURE_ARGS+=	--enable-pcretest-libed
 CFLAGS+=	-fPIC
 .endif
 
+# Optional knobs that accept positive integer parameters (see pcrebuild(3)):
+
+# Allow the use of very large patterns (> 64K) with the 8- and 16-bit
+# libraries, at the expense of longer load times (possible values:
+# 2 (default), 3, and 4):
 .if defined(WITH_LINK_SIZE)
-CONFIGURE_ARGS+=--with-link-size=${WITH_LINK_SIZE}
+CONFIGURE_ARGS+=	--with-link-size=${WITH_LINK_SIZE}
+.endif
+
+# Control PCRE resource use by limiting the default number of times pcre_exec()
+# can call match() during a single operation (default: 10 million):
+.if defined(WITH_MATCH_LIMIT)
+CONFIGURE_ARGS+=	--with-match-limit=${WITH_MATCH_LIMIT}
+.endif
+
+# Control PCRE resource use by limiting the default number of times pcre_exec()
+# can call match() recursively during a single operation (default: 10 million):
+.if defined(WITH_MATCH_LIMIT_RECURSION)
+CONFIGURE_ARGS+=	--with-match-limit-recursion=${WITH_MATCH_LIMIT_RECURSION}
+.endif
+
+# Adjust the default maximum number of substrings that will be stored on the stack
+# when the 8-bit library is called via the POSIX interface (default: 10):
+.if defined(WITH_POSIX_MALLOC_THRESHOLD)
+CONFIGURE_ARGS+=	--with-posix-malloc-threshold=${WITH_POSIX_MALLOC_THRESHOLD}
 .endif
 
 MAN1=		pcre-config.1 \
@@ -86,6 +118,7 @@ MAN3=		pcre.3 \
 		pcrecallout.3 \
 		pcrecompat.3 \
 		pcrecpp.3 \
+		pcredemo.3 \
 		pcrejit.3 \
 		pcrelimits.3 \
 		pcrematching.3 \
@@ -154,6 +187,7 @@ MLINKS+=	pcre_assign_jit_stack.3 pcre16_
 		pcre_utf32_to_host_byte_order.3 pcre32_utf32_to_host_byte_order.3 \
 		pcre_version.3 pcre16_version.3 \
 		pcre_version.3 pcre32_version.3
+
 post-patch:
 .if !${PORT_OPTIONS:MDOCS}
 	@${REINPLACE_CMD} -E -e '/^install-data-am/,/^$$/ s,install-(dist_doc|dist_html|html)DATA,,g' \
@@ -172,10 +206,13 @@ post-install:
 .ifndef(MAINTAINER_MODE)
 CORELIMIT?=	/usr/bin/limits -Sc 0
 .endif
+TESTLOGS?=	RunGrepTest RunTest pcre_jit_test pcre_scanner_unittest \
+		pcre_stringpiece_unittest pcrecpp_unittest
 
-check test: build
-	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CORELIMIT} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} test
-
-regression-test: test
+check regression-test test: build
+	@cd ${WRKSRC} ; \
+	${SETENV} ${MAKE_ENV} ${CORELIMIT} ${MAKE} ${MAKE_ARGS} check ; \
+	for _l in ${TESTLOGS} ; do if ${TEST} -f $${_l}.log ; then \
+	${PRINTF} "\n\n$${_l}.log\n\n\n" ; ${CAT} $${_l}.log ; fi ; done
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/pcre/distinfo
==============================================================================
--- head/devel/pcre/distinfo	Tue Jun  4 02:42:05 2013	(r319820)
+++ head/devel/pcre/distinfo	Tue Jun  4 02:48:27 2013	(r319821)
@@ -1,2 +1,2 @@
-SHA256 (pcre-8.32.tar.bz2) = a913fb9bd058ef380a2d91847c3c23fcf98e92dc3b47cd08a53c021c5cde0f55
-SIZE (pcre-8.32.tar.bz2) = 1361156
+SHA256 (pcre-8.33.tar.bz2) = c603957a4966811c04af5f6048c71cfb4966ec93312d7b3118116ed9f3bc0478
+SIZE (pcre-8.33.tar.bz2) = 1440869


More information about the svn-ports-all mailing list