diff options
author | seb <seb> | 2002-03-24 19:47:28 +0000 |
---|---|---|
committer | seb <seb> | 2002-03-24 19:47:28 +0000 |
commit | 6a2b689fb3b90cbec0c0714bec4d87a1159f9dec (patch) | |
tree | dfec2da3b0daeeafe5a4cbca2e8c7ba98a93d74b /devel | |
parent | 44eedaf4144642692a80c497b4bc35883a2bce88 (diff) | |
download | pkgsrc-6a2b689fb3b90cbec0c0714bec4d87a1159f9dec.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/Makefile | 11 |
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 |