File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # $NetBSD: Makefile,v 1.41 2015/02/08 09:29:43 mef Exp $
1+ # $NetBSD: Makefile,v 1.42 2015/02/20 07: 09:19 tnn Exp $
22
33DISTNAME = patch-2.7.4
44CATEGORIES = devel
@@ -16,17 +16,16 @@ USE_TOOLS+= awk
1616.include "../../mk/bsd.prefs.mk"
1717
1818CONFIGURE_ARGS+ = --program-prefix=g
19+ CONFIGURE_ENV+ = ac_cv_func_setmode_dos=no # Fix for Interix (and old bsd?)
1920
2021INSTALLATION_DIRS = ${PKGGNUDIR}bin ${PKGGNUDIR}${PKGMANDIR}/man1
2122
2223do-patch :
23- ${MV} ${WRKSRC} /src/pch.c ${WRKSRC} /src/pch.c.orig
24- ${AWK} ' /#include <pch.h>/{print $$0 "\n#include <sys/param.h>";next;}\
25- /^# if HAVE_SETMODE_DOS/ \
26- {gsub(/^# if HAVE_SETMODE_DOS/,"#if defined(HAVE_SETMODE_DOS) \\&\\& !(defined(BSD) \\&\\& BSD >= 199306) \\&\\& !defined(__INTERIX)");print $$0; next; } \
27- {print $$ 0; }' \
28- < ${WRKSRC} /src/pch.c.orig \
29- > ${WRKSRC} /src/pch.c
24+ .for stdhdr in sys/param.h sys/stat.h string.h
25+ echo "# ifdef HAVE_${stdhdr:tu:C,[/.],_,g}" >> ${WRKSRC}/config.hin
26+ echo "# include <${stdhdr}>" >> ${WRKSRC}/config.hin
27+ echo "# endif" >> ${WRKSRC}/config.hin
28+ .endfor
3029
3130SYMLINKS = bin/gpatch ${PKGGNUDIR}bin/patch \
3231 man/man1/gpatch.1 ${PKGGNUDIR}${PKGMANDIR}/man1/patch.1
You can’t perform that action at this time.
0 commit comments