summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorseb <seb>2001-12-04 09:14:41 +0000
committerseb <seb>2001-12-04 09:14:41 +0000
commit2df86ac6096c5e6dcd63b49331c733c66904ee73 (patch)
tree3aa1d3c8eb3427059784817f05d990cccf06b907 /devel
parentd3e73ed23eb74261546d98adbff739f2aadcb8dc (diff)
downloadpkgsrc-2df86ac6096c5e6dcd63b49331c733c66904ee73.tar.gz
Allow this package to be compiled and installed on any platform:
- prefix program and manpage by `g' if platform is NetBSD - "manual" patch for BSD systems (setmode() conflict)
Diffstat (limited to 'devel')
-rw-r--r--devel/patch/Makefile18
-rw-r--r--devel/patch/PLIST6
2 files changed, 18 insertions, 6 deletions
diff --git a/devel/patch/Makefile b/devel/patch/Makefile
index 9c7feb101c2..ebe9f9f9d71 100644
--- a/devel/patch/Makefile
+++ b/devel/patch/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2001/03/24 21:10:12 tron Exp $
+# $NetBSD: Makefile,v 1.8 2001/12/04 09:14:41 seb Exp $
#
DISTNAME= patch-2.5.4
@@ -14,10 +14,22 @@ GNU_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
-.if exists(/usr/bin/patch) && ${OPSYS} != "SunOS"
-IGNORE= "${PKGNAME} is part of your NetBSD distribution"
+.if ${OPSYS} == "NetBSD"
+CONFIGURE_ARGS+= --program-prefix=g
+PROGRAM_PREFIX= g
+.else
+PROGRAM_PREFIX=
.endif
+PLIST_SUBST+= PROGRAM_PREFIX=${PROGRAM_PREFIX}
+
+post-extract:
+ ${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))/' \
+ < ${WRKSRC}/pch.c.orig \
+ > ${WRKSRC}/pch.c
+
.include "../../mk/bsd.pkg.mk"
# Needed for bootstrapping pkgsrc!
diff --git a/devel/patch/PLIST b/devel/patch/PLIST
index 1a8149717c5..143dfc21091 100644
--- a/devel/patch/PLIST
+++ b/devel/patch/PLIST
@@ -1,3 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:25:46 zuntum Exp $
-bin/patch
-man/man1/patch.1
+@comment $NetBSD: PLIST,v 1.2 2001/12/04 09:14:41 seb Exp $
+bin/${PROGRAM_PREFIX}patch
+man/man1/${PROGRAM_PREFIX}patch.1