summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2015-02-20 19:55:43 +0000
committertron <tron>2015-02-20 19:55:43 +0000
commit216034098672cd9dab0b367fa67311d0f39d531e (patch)
tree2ba13f9646da32266133dde043c092d814342e95
parent94b572af302a2658ac6769da773e86474e676441 (diff)
downloadpkgsrc-216034098672cd9dab0b367fa67311d0f39d531e.tar.gz
Pullup ticket #4626 - requested by tnn
devel/patch: build fix Revisions pulled up: - devel/patch/Makefile 1.42 --- Module Name: pkgsrc Committed By: tnn Date: Fri Feb 20 07:09:19 UTC 2015 Modified Files: pkgsrc/devel/patch: Makefile Log Message: PR pkg/49672: OSX build fix (already reported and fixed upstream) While here simplify Interix fix by overriding autoconf test instead of manually patching the sources.
-rw-r--r--devel/patch/Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/devel/patch/Makefile b/devel/patch/Makefile
index 9cf75d86272..da361789a20 100644
--- a/devel/patch/Makefile
+++ b/devel/patch/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40.2.1 2015/02/18 17:57:12 tron Exp $
+# $NetBSD: Makefile,v 1.40.2.2 2015/02/20 19:55:43 tron Exp $
DISTNAME= patch-2.7.4
CATEGORIES= devel
@@ -16,17 +16,16 @@ USE_TOOLS+= awk
.include "../../mk/bsd.prefs.mk"
CONFIGURE_ARGS+= --program-prefix=g
+CONFIGURE_ENV+= ac_cv_func_setmode_dos=no # Fix for Interix (and old bsd?)
INSTALLATION_DIRS= ${PKGGNUDIR}bin ${PKGGNUDIR}${PKGMANDIR}/man1
do-patch:
- ${MV} ${WRKSRC}/src/pch.c ${WRKSRC}/src/pch.c.orig
- ${AWK} '/#include <pch.h>/{print $$0 "\n#include <sys/param.h>";next;}\
- /^#if HAVE_SETMODE_DOS/ \
- {gsub(/^#if HAVE_SETMODE_DOS/,"#if defined(HAVE_SETMODE_DOS) \\&\\& !(defined(BSD) \\&\\& BSD >= 199306) \\&\\& !defined(__INTERIX)");print $$0; next; } \
- {print $$0;}' \
- < ${WRKSRC}/src/pch.c.orig \
- > ${WRKSRC}/src/pch.c
+.for stdhdr in sys/param.h sys/stat.h string.h
+ echo "#ifdef HAVE_${stdhdr:tu:C,[/.],_,g}" >> ${WRKSRC}/config.hin
+ echo "#include <${stdhdr}>" >> ${WRKSRC}/config.hin
+ echo "#endif" >> ${WRKSRC}/config.hin
+.endfor
SYMLINKS = bin/gpatch ${PKGGNUDIR}bin/patch \
man/man1/gpatch.1 ${PKGGNUDIR}${PKGMANDIR}/man1/patch.1