summaryrefslogtreecommitdiff
path: root/lang/eperl
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-01-02 12:27:25 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-01-02 12:27:25 +0000
commit64761a0ec5b79b8a1fac3c39e5f4e3540f6cd9c0 (patch)
tree8f1d6fee7e4f7d2e93ce7a044c8e20d045f5759a /lang/eperl
parentAdd a port of `fonttools', an open-source library for manipulating (diff)
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
Notes
Notes: svn path=/head/; revision=52494
Diffstat (limited to 'lang/eperl')
-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);