mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-29 10:18:30 +00:00
Update to 8.31
Switch to new options framework Link pcretest against libedit on FreeBSD 8.x and higher
This commit is contained in:
parent
8f7cc46f36
commit
87cf9c6424
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=301016
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= pcre
|
||||
PORTVERSION= 8.30
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 8.31
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/programming/%SUBDIR%/ \
|
||||
ftp://ftp.fu-berlin.de/unix/misc/%SUBDIR%/ \
|
||||
@ -20,8 +19,9 @@ COMMENT= Perl Compatible Regular Expressions library
|
||||
LICENSE= BSD
|
||||
LICENSE_FILE= ${WRKSRC}/LICENCE
|
||||
|
||||
OPTIONS= JIT "Enable Just-In-Time compiling support" on \
|
||||
LIBEDIT "Link pcretest against libedit" off
|
||||
OPTIONS_DEFINE= JIT
|
||||
OPTIONS_DEFAULT= JIT
|
||||
JIT_DESC= Enable Just-In-Time compiling support
|
||||
|
||||
USE_BZIP2= yes
|
||||
GNU_CONFIGURE= yes
|
||||
@ -32,26 +32,23 @@ CONFIGURE_ARGS= --enable-utf --enable-unicode-properties \
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if defined(WITH_LIBEDIT)
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libedit
|
||||
CONFIGURE_ARGS+= --enable-pcretest-libedit
|
||||
GNOME_MAKEFILEIN+= Makefile.am
|
||||
USE_AUTOTOOLS+= aclocal autoconf autoheader automake libtool libtoolize
|
||||
ACLOCAL_ARGS+= #undefined
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_JIT) && ${ARCH} != "sparc64"
|
||||
.if ${PORT_OPTIONS:MJIT} && ${ARCH} != "sparc64"
|
||||
CONFIGURE_ARGS+= --enable-jit
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-jit
|
||||
.endif
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
PORTDOCS= *
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# For FreeBSD 8.x and above link pcretest against libedit
|
||||
.if ${OSVERSION} > 800000
|
||||
CONFIGURE_ARGS+= --enable-pcretest-libedit
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
|
||||
CFLAGS+= -fPIC
|
||||
.endif
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (pcre-8.30.tar.bz2) = c1113fd7db934e97ad8b3917d432e5b642e9eb9afd127eb797804937c965f4ac
|
||||
SIZE (pcre-8.30.tar.bz2) = 1248556
|
||||
SHA256 (pcre-8.31.tar.bz2) = 5778a02535473c7ee7838ea598c19f451e63cf5eec0bf0307a688301c9078c3c
|
||||
SIZE (pcre-8.31.tar.bz2) = 1257162
|
||||
|
@ -1,105 +0,0 @@
|
||||
--- 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");
|
@ -1,25 +0,0 @@
|
||||
Index: pcre_exec.c
|
||||
===================================================================
|
||||
--- pcre_exec.c (revision 962)
|
||||
+++ pcre_exec.c (revision 963)
|
||||
@@ -7070,7 +7070,7 @@
|
||||
{
|
||||
register int *iptr, *iend;
|
||||
int resetcount = 2 + re->top_bracket * 2;
|
||||
- if (resetcount > offsetcount) resetcount = ocount;
|
||||
+ if (resetcount > offsetcount) resetcount = offsetcount;
|
||||
iptr = offsets + md->end_offset_top;
|
||||
iend = offsets + resetcount;
|
||||
while (iptr < iend) *iptr++ = -1;
|
||||
Index: pcretest.c
|
||||
===================================================================
|
||||
--- pcretest.c (revision 962)
|
||||
+++ pcretest.c (revision 963)
|
||||
@@ -3719,6 +3719,7 @@
|
||||
}
|
||||
use_size_offsets = n;
|
||||
if (n == 0) use_offsets = NULL; /* Ensures it can't write to it */
|
||||
+ else use_offsets = offsets + size_offsets_max - n; /* To catch overruns */
|
||||
continue;
|
||||
|
||||
case 'P':
|
Loading…
Reference in New Issue
Block a user