diff options
-rw-r--r-- | devel/pcre/Makefile | 106 | ||||
-rw-r--r-- | devel/pcre/distinfo | 4 | ||||
-rw-r--r-- | devel/pcre/files/extra-patch-libedit | 105 | ||||
-rw-r--r-- | devel/pcre/files/patch-pcre_compile.c | 34 | ||||
-rw-r--r-- | devel/pcre/pkg-plist | 2 |
5 files changed, 193 insertions, 58 deletions
diff --git a/devel/pcre/Makefile b/devel/pcre/Makefile index 074521ad03e5..1ba4a4151740 100644 --- a/devel/pcre/Makefile +++ b/devel/pcre/Makefile @@ -6,8 +6,7 @@ # PORTNAME= pcre -PORTVERSION= 8.21 -PORTREVISION= 1 +PORTVERSION= 8.30 CATEGORIES= devel MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/programming/%SUBDIR%/ \ ftp://ftp.fu-berlin.de/unix/misc/%SUBDIR%/ \ @@ -20,14 +19,21 @@ COMMENT= Perl Compatible Regular Expressions library LICENSE= BSD LICENSE_FILE= ${WRKSRC}/LICENCE -OPTIONS= JIT "Enable Just-In-Time compiling support" on +OPTIONS= JIT "Enable Just-In-Time compiling support" on \ + LIBEDIT "Link pcretest against libedit" off USE_BZIP2= yes GNU_CONFIGURE= yes USE_LDCONFIG= yes CONFIGURE_ARGS= --enable-utf8 --enable-unicode-properties -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> + +.if defined(WITH_LIBEDIT) +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libedit +CONFIGURE_ARGS+= --enable-pcretest-libedit +USE_AUTOTOOLS+= autoconf +.endif .if !defined(WITHOUT_JIT) && ${ARCH} != "sparc64" CONFIGURE_ARGS+= --enable-jit @@ -39,6 +45,8 @@ CONFIGURE_ARGS+= --disable-jit PORTDOCS= * .endif +.include <bsd.port.pre.mk> + .if ${ARCH} == "amd64" || ${ARCH} == "ia64" CFLAGS+= -fPIC .endif @@ -47,23 +55,79 @@ CFLAGS+= -fPIC CONFIGURE_ARGS+=--with-link-size=${WITH_LINK_SIZE} .endif -MAN1= pcre-config.1 pcregrep.1 pcretest.1 -MAN3= pcre.3 pcre_assign_jit_stack.3 pcre_compile.3 \ - pcre_compile2.3 pcre_config.3 pcre_copy_named_substring.3 \ - pcre_copy_substring.3 pcre_dfa_exec.3 pcre_exec.3 \ - pcre_free_study.3 pcre_free_substring.3 \ - pcre_free_substring_list.3 pcre_fullinfo.3 \ - pcre_get_named_substring.3 pcre_get_stringnumber.3 \ - pcre_get_stringtable_entries.3 pcre_get_substring.3 \ - pcre_get_substring_list.3 pcre_info.3 \ - pcre_jit_stack_alloc.3 pcre_jit_stack_free.3 \ - pcre_maketables.3 pcrepartial.3 pcreprecompile.3 \ - pcre_refcount.3 pcre_study.3 pcre_version.3 pcreapi.3 \ - pcrebuild.3 pcrecallout.3 pcrecompat.3 \ - pcrecpp.3 pcrejit.3 pcrelimits.3 pcrematching.3 \ - pcrepattern.3 pcreperform.3 pcreposix.3 pcresample.3 \ - pcrestack.3 pcresyntax.3 pcreunicode.3 - +MAN1= pcre-config.1 \ + pcregrep.1 \ + pcretest.1 +MAN3= pcre.3 \ + pcre16.3 \ + pcre_assign_jit_stack.3 \ + pcre_compile.3 \ + pcre_compile2.3 \ + pcre_config.3 \ + pcre_copy_named_substring.3 \ + pcre_copy_substring.3 \ + pcre_dfa_exec.3 \ + pcre_exec.3 \ + pcre_free_study.3 \ + pcre_free_substring.3 \ + pcre_free_substring_list.3 \ + pcre_fullinfo.3 \ + pcre_get_named_substring.3 \ + pcre_get_stringnumber.3 \ + pcre_get_stringtable_entries.3 \ + pcre_get_substring.3 \ + pcre_get_substring_list.3 \ + pcre_jit_stack_alloc.3 \ + pcre_jit_stack_free.3 \ + pcre_maketables.3 \ + pcre_pattern_to_host_byte_order.3 \ + pcre_refcount.3 \ + pcre_study.3 \ + pcre_version.3 \ + pcreapi.3 \ + pcrebuild.3 \ + pcrecallout.3 \ + pcrecompat.3 \ + pcrecpp.3 \ + pcrejit.3 \ + pcrelimits.3 \ + pcrematching.3 \ + pcrepartial.3 \ + pcrepattern.3 \ + pcreperform.3 \ + pcreposix.3 \ + pcreprecompile.3 \ + pcresample.3 \ + pcrestack.3 \ + pcresyntax.3 \ + pcre_utf16_to_host_byte_order.3 \ + pcreunicode.3 + +MLINKS+= pcre_assign_jit_stack.3 pcre16_assign_jit_stack.3 \ + pcre_compile.3 pcre16_compile.3 \ + pcre_compile2.3 pcre16_compile2.3 \ + pcre_config.3 pcre16_config.3 \ + pcre_copy_named_substring.3 pcre16_copy_named_substring.3 \ + pcre_copy_substring.3 pcre16_copy_substring.3 \ + pcre_dfa_exec.3 pcre16_dfa_exec.3 \ + pcre_exec.3 pcre16_exec.3 \ + pcre_free_study.3 pcre16_free_study.3 \ + pcre_free_substring.3 pcre16_free_substring.3 \ + pcre_free_substring_list.3 pcre16_free_substring_list.3 \ + pcre_fullinfo.3 pcre16_fullinfo.3 \ + pcre_get_named_substring.3 pcre16_get_named_substring.3 \ + pcre_get_stringnumber.3 pcre16_get_stringnumber.3 \ + pcre_get_stringtable_entries.3 pcre16_get_stringtable_entries.3 \ + pcre_get_substring.3 pcre16_get_substring.3 \ + pcre_get_substring_list.3 pcre16_get_substring_list.3 \ + pcre_jit_stack_alloc.3 pcre16_jit_stack_alloc.3 \ + pcre_jit_stack_free.3 pcre16_jit_stack_free.3 \ + pcre_maketables.3 pcre16_maketables.3 \ + pcre_pattern_to_host_byte_order.3 pcre16_pattern_to_host_byte_order.3 \ + pcre_refcount.3 pcre16_refcount.3 \ + pcre_study.3 pcre16_study.3 \ + pcre_utf16_to_host_byte_order.3 pcre16_utf16_to_host_byte_order.3 \ + pcre_version.3 pcre16_version.3 post-patch: .if defined(NOPORTDOCS) @${REINPLACE_CMD} -E -e '/^install-data-am/,/^$$/ s,install-(dist_doc|dist_html|html)DATA,,g' \ diff --git a/devel/pcre/distinfo b/devel/pcre/distinfo index c513b62b4feb..5a2720bef65a 100644 --- a/devel/pcre/distinfo +++ b/devel/pcre/distinfo @@ -1,2 +1,2 @@ -SHA256 (pcre-8.21.tar.bz2) = a4b8509d11fc2764fb4e1415b764ad2c214459edc011ce48aeeb6bbe1ac599e3 -SIZE (pcre-8.21.tar.bz2) = 1174037 +SHA256 (pcre-8.30.tar.bz2) = c1113fd7db934e97ad8b3917d432e5b642e9eb9afd127eb797804937c965f4ac +SIZE (pcre-8.30.tar.bz2) = 1248556 diff --git a/devel/pcre/files/extra-patch-libedit b/devel/pcre/files/extra-patch-libedit new file mode 100644 index 000000000000..e2678ec49987 --- /dev/null +++ b/devel/pcre/files/extra-patch-libedit @@ -0,0 +1,105 @@ +--- configure.ac.orig 2012-02-04 13:55:18.000000000 +0100 ++++ configure.ac 2012-02-13 23:39:18.830982041 +0100 +@@ -233,6 +233,12 @@ + [pcregrep buffer size (default=20480)]), + , with_pcregrep_bufsize=20480) + ++# Handle --enable-pcretest-libedit ++AC_ARG_ENABLE(pcretest-libedit, ++ AS_HELP_STRING([--enable-pcretest-libedit], ++ [link pcretest with libedit]), ++ , enable_pcretest_libedit=no) ++ + # Handle --enable-pcretest-libreadline + AC_ARG_ENABLE(pcretest-libreadline, + AS_HELP_STRING([--enable-pcretest-libreadline], +@@ -561,6 +567,9 @@ + fi + fi + ++# Check for the availabiity of libedit ++AC_CHECK_LIB([edit], [readline], [LIBEDIT="-ledit"]) ++ + # This facilitates -ansi builds under Linux + dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc]) + +@@ -646,7 +655,11 @@ + pcregrep is three times this number, because it allows for the buffering of + "before" and "after" lines.]) + +-if test "$enable_pcretest_libreadline" = "yes"; then ++if test "$enable_pcretest_libedit" = "yes"; then ++ AC_DEFINE([SUPPORT_LIBEDIT], [], [ ++ Define to allow pcretest to be linked with libedit.]) ++ LIBREADLINE="$LIBEDIT" ++elif test "$enable_pcretest_libreadline" = "yes"; then + AC_DEFINE([SUPPORT_LIBREADLINE], [], [ + Define to allow pcretest to be linked with libreadline.]) + fi +@@ -810,6 +823,21 @@ + + # Similarly for --enable-pcretest-readline + ++if test "$enable_pcretest_libedit" = "yes"; then ++ if test "$enable_pcretest_libreadline" = "yes"; then ++ echo "** Cannot use both --enable-pcretest-libedit and --enable-pcretest-readline" ++ exit 1 ++ fi ++ if test "$HAVE_READLINE_H" != "1"; then ++ echo "** Cannot --enable-pcretest-libedit because readline/readline.h was not found." ++ exit 1 ++ fi ++ if test -z "$LIBEDIT"; then ++ echo "** Cannot --enable-pcretest-libedit because libedit library was not found." ++ exit 1 ++ fi ++fi ++ + if test "$enable_pcretest_libreadline" = "yes"; then + if test "$HAVE_READLINE_H" != "1"; then + echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found." +@@ -887,6 +915,7 @@ + Buffer size for pcregrep ........ : ${with_pcregrep_bufsize} + Link pcregrep with libz ......... : ${enable_pcregrep_libz} + Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} ++ Link pcretest with libedit ...... : ${enable_pcretest_libedit} + Link pcretest with libreadline .. : ${enable_pcretest_libreadline} + + EOF +--- pcretest.c.orig 2012-02-13 22:23:04.086983835 +0100 ++++ pcretest.c 2012-02-13 22:32:10.960985908 +0100 +@@ -59,13 +59,15 @@ + #include <locale.h> + #include <errno.h> + +-#ifdef SUPPORT_LIBREADLINE ++#if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif + #include <readline/readline.h> ++#if defined(SUPPORT_LIBREADLINE) + #include <readline/history.h> + #endif ++#endif + + + /* A number of things vary for Windows builds. Originally, pcretest opened its +@@ -1280,7 +1282,7 @@ + input is a terminal. Note that readline() removes the trailing newline, so + we must put it back again, to be compatible with fgets(). */ + +-#ifdef SUPPORT_LIBREADLINE ++#if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) + if (isatty(fileno(f))) + { + size_t len; +@@ -2096,7 +2098,7 @@ + { + printf("Usage: pcretest [options] [<input file> [<output file>]]\n\n"); + printf("Input and output default to stdin and stdout.\n"); +-#ifdef SUPPORT_LIBREADLINE ++#if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) + printf("If input is a terminal, readline() is used to read from it.\n"); + #else + printf("This version of pcretest is not linked with readline().\n"); diff --git a/devel/pcre/files/patch-pcre_compile.c b/devel/pcre/files/patch-pcre_compile.c deleted file mode 100644 index 4634113df003..000000000000 --- a/devel/pcre/files/patch-pcre_compile.c +++ /dev/null @@ -1,34 +0,0 @@ ---- pcre_compile.c 2011/12/15 11:57:39 806 -+++ pcre_compile.c 2011/12/18 10:03:38 807 -@@ -1655,7 +1655,8 @@ - case OP_ASSERTBACK: - case OP_ASSERTBACK_NOT: - do cc += GET(cc, 1); while (*cc == OP_ALT); -- /* Fall through */ -+ cc += _pcre_OP_lengths[*cc]; -+ break; - - /* Skip over things that don't match chars */ - -@@ -6450,10 +6451,10 @@ - - if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS) - { -- BOOL isnumber = TRUE; -+ BOOL is_a_number = TRUE; - for (p = ptr + 1; *p != 0 && *p != terminator; p++) - { -- if ((cd->ctypes[*p] & ctype_digit) == 0) isnumber = FALSE; -+ if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE; - if ((cd->ctypes[*p] & ctype_word) == 0) break; - } - if (*p != terminator) -@@ -6461,7 +6462,7 @@ - *errorcodeptr = ERR57; - break; - } -- if (isnumber) -+ if (is_a_number) - { - ptr++; - goto HANDLE_NUMERICAL_RECURSION; diff --git a/devel/pcre/pkg-plist b/devel/pcre/pkg-plist index 8c828d5d62a1..bd522a17d6fa 100644 --- a/devel/pcre/pkg-plist +++ b/devel/pcre/pkg-plist @@ -10,7 +10,7 @@ include/pcrecpp.h lib/libpcre.a lib/libpcre.la lib/libpcre.so -lib/libpcre.so.0 +lib/libpcre.so.1 lib/libpcrecpp.a lib/libpcrecpp.la lib/libpcrecpp.so |