summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2002-03-24 19:47:28 +0000
committerseb <seb@pkgsrc.org>2002-03-24 19:47:28 +0000
commit4b41b4ff4f1db6e4f33fab925ac24c1ceac84271 (patch)
treedfec2da3b0daeeafe5a4cbca2e8c7ba98a93d74b /devel
parent5fb5f2858735a210c80e1e39c5ccae5e3607eb82 (diff)
downloadpkgsrc-4b41b4ff4f1db6e4f33fab925ac24c1ceac84271.tar.gz
Use AWK instead of SED to do the patching, now it works on Solaris.
While here put the patching in target do-patch an remove NO_PATCH. This should fix PR 16035.
Diffstat (limited to 'devel')
-rw-r--r--devel/patch/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/devel/patch/Makefile b/devel/patch/Makefile
index ebe9f9f9d71..3bd27b89ac3 100644
--- a/devel/patch/Makefile
+++ b/devel/patch/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2001/12/04 09:14:41 seb Exp $
+# $NetBSD: Makefile,v 1.9 2002/03/24 19:47:28 seb Exp $
#
DISTNAME= patch-2.5.4
@@ -9,7 +9,6 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.gnu.org/software/patch/patch.html
COMMENT= Patch files using diff output
-NO_PATCH= yes
GNU_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
@@ -23,10 +22,12 @@ PROGRAM_PREFIX=
PLIST_SUBST+= PROGRAM_PREFIX=${PROGRAM_PREFIX}
-post-extract:
+do-patch:
${MV} ${WRKSRC}/pch.c ${WRKSRC}/pch.c.orig
- ${SED} -e '/#include <pch.h>/a\' -e '#include <sys/param.h>' \
- -e 's/^#if HAVE_SETMODE/#if defined(HAVE_SETMODE) \&\& (!(defined(BSD) \&\& BSD >= 199306))/' \
+ ${AWK} '/#include <pch.h>/{print $$0 "\n#include <sys/param.h>";next;}\
+ /^#if HAVE_SETMODE/ \
+ {gsub(/^#if HAVE_SETMODE/,"#if defined(HAVE_SETMODE) \\&\\& (!(defined(BSD) \\&\\& BSD >= 199306))");print $$0; next; } \
+ {print $$0;}' \
< ${WRKSRC}/pch.c.orig \
> ${WRKSRC}/pch.c