pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/49672: Patch for devel/patch no Mac OS X (with fix)



>Number:         49672
>Category:       pkg
>Synopsis:       Patch for devel/patch no Mac OS X (with fix)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 17 21:20:00 +0000 2015
>Originator:     Youri Mouton
>Release:        current
>Organization:
>Environment:
Darwin mac.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64

>Description:
Fails to build because symlinkat.c requires sys/stat.h.
I also added string.h to remove a warning about implicitly calling strlen.
>How-To-Repeat:

>Fix:
diff --git a/devel/patch/Makefile b/devel/patch/Makefile
index f643a05..78564d8 100644
--- a/devel/patch/Makefile
+++ b/devel/patch/Makefile
@@ -20,6 +20,10 @@ CONFIGURE_ARGS+=	--program-prefix=g
 INSTALLATION_DIRS=	${PKGGNUDIR}bin ${PKGGNUDIR}${PKGMANDIR}/man1
 
 do-patch:
+	${MV} ${WRKSRC}/lib/symlinkat.c ${WRKSRC}/lib/symlinkat.c.orig
+	${AWK} '{gsub(/errno\.h\>/, "errno\.h>\n#include <string.h>\n#include <sys/stat.h>");print}'	\
+		< ${WRKSRC}/lib/symlinkat.c.orig	\
+		> ${WRKSRC}/lib/symlinkat.c
 	${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/					\



Home | Main Index | Thread Index | Old Index