aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2002-01-02 20:27:25 +0800
committersobomax <sobomax@FreeBSD.org>2002-01-02 20:27:25 +0800
commit89601772b8f1024b8bb14b613e07f4c8f36f251d (patch)
treeabe5fc454ff6e64d59205f4052e8a03b6ac39454 /lang
parent3eba2fce760cfc2644bb77dd2f19f9111e4e5c97 (diff)
downloadfreebsd-ports-gnome-89601772b8f1024b8bb14b613e07f4c8f36f251d.tar.gz
freebsd-ports-gnome-89601772b8f1024b8bb14b613e07f4c8f36f251d.tar.zst
freebsd-ports-gnome-89601772b8f1024b8bb14b613e07f4c8f36f251d.zip
Don't assume that strnstr(3) exists in the system libc. This should fix the
build on slightly outdated (3 weeks and more) 4-STABLE systems. Submitted by: bento
Diffstat (limited to 'lang')
-rw-r--r--lang/eperl/Makefile4
-rw-r--r--lang/eperl/files/patch-ab25
-rw-r--r--lang/eperl/files/patch-eperl_parse.c26
-rw-r--r--lang/eperl/files/patch-eperl_proto.h13
4 files changed, 27 insertions, 41 deletions
diff --git a/lang/eperl/Makefile b/lang/eperl/Makefile
index faf1ac7cfcce..3a5066044ed7 100644
--- a/lang/eperl/Makefile
+++ b/lang/eperl/Makefile
@@ -35,6 +35,10 @@ MAN1= eperl.1
test:
@(cd ${WRKSRC}; make test)
+post-patch:
+ @find ${WRKSRC} -type f -name "*.[ch]" | xargs ${GREP} -l strnstr | \
+ xargs ${PERL} -pi -e 's|strnstr|ePerl_strnstr|g'
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/eperl ${PREFIX}/bin/eperl
${INSTALL_MAN} ${WRKSRC}/eperl.1 ${PREFIX}/man/man1/eperl.1
diff --git a/lang/eperl/files/patch-ab b/lang/eperl/files/patch-ab
index c8e057578b6d..4217ad65ea6f 100644
--- a/lang/eperl/files/patch-ab
+++ b/lang/eperl/files/patch-ab
@@ -1,5 +1,8 @@
---- configure.orig Sun Aug 2 06:48:40 1998
-+++ configure Fri Sep 8 00:13:50 2000
+
+$FreeBSD$
+
+--- configure.orig Sun Aug 2 16:48:40 1998
++++ configure Wed Jan 2 14:14:55 2002
@@ -571,7 +571,7 @@
if test "${with_perl+set}" = set; then
withval="$with_perl"
@@ -27,3 +30,21 @@
* )
perlvnum=`echo $perlvers | sed -e 's/\.//' -e 's/_//'` ;;
esac
+@@ -1028,7 +1030,7 @@
+ CFLAGS="-Wall -g -ggdb3"
+ LDFLAGS="-g -ggdb3"
+ else
+- CFLAGS="-g"
++# CFLAGS="-g"
+ LDFLAGS="-g"
+ fi
+ x="enabled"
+@@ -1039,7 +1041,7 @@
+
+
+ else
+- CFLAGS=""
++# CFLAGS=""
+ LDFLAGS=""
+ x=disabled
+ debug=off
diff --git a/lang/eperl/files/patch-eperl_parse.c b/lang/eperl/files/patch-eperl_parse.c
deleted file mode 100644
index fe0ee26898cc..000000000000
--- a/lang/eperl/files/patch-eperl_parse.c
+++ /dev/null
@@ -1,26 +0,0 @@
-
-$FreeBSD$
-
---- eperl_parse.c 2001/12/19 14:40:20 1.1
-+++ eperl_parse.c 2001/12/19 14:40:33
-@@ -298,20 +298,6 @@
- return NULL;
- }
-
--char *strnstr(char *buf, char *str, int n)
--{
-- char *cp;
-- char *cpe;
-- int len;
--
-- len = strlen(str);
-- for (cp = buf, cpe = buf+n-len; cp <= cpe; cp++) {
-- if (strncmp(cp, str, len) == 0)
-- return cp;
-- }
-- return NULL;
--}
--
- char *strncasestr(char *buf, char *str, int n)
- {
- char *cp;
diff --git a/lang/eperl/files/patch-eperl_proto.h b/lang/eperl/files/patch-eperl_proto.h
deleted file mode 100644
index 4038c60b440f..000000000000
--- a/lang/eperl/files/patch-eperl_proto.h
+++ /dev/null
@@ -1,13 +0,0 @@
-
-$FreeBSD$
-
---- eperl_proto.h 2001/12/19 14:37:46 1.1
-+++ eperl_proto.h 2001/12/19 14:39:24
-@@ -79,7 +79,6 @@
- extern char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut);
- extern char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut);
- extern char *strnchr(char *buf, char chr, int n);
--extern char *strnstr(char *buf, char *str, int n);
- extern char *strncasestr(char *buf, char *str, int n);
- extern char *strndup(char *buf, int n);
- extern char *ePerl_Bristled2Plain(char *cpBuf);