Thu Mar 19 18:09:17 2015 UTC ()
Add workaround for bin/47757 on NetBSD < 7. Bump revision.


(tnn)
diff -r1.25 -r1.26 pkgsrc/devel/ccache/Makefile
diff -r1.15 -r1.16 pkgsrc/devel/ccache/distinfo
diff -r0 -r1.1 pkgsrc/devel/ccache/patches/patch-util.c

cvs diff -r1.25 -r1.26 pkgsrc/devel/ccache/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/ccache/Makefile 2014/12/15 05:33:26 1.25
+++ pkgsrc/devel/ccache/Makefile 2015/03/19 18:09:17 1.26
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: Makefile,v 1.25 2014/12/15 05:33:26 mef Exp $ 1# $NetBSD: Makefile,v 1.26 2015/03/19 18:09:17 tnn Exp $
2 2
3DISTNAME= ccache-3.2.1 3DISTNAME= ccache-3.2.1
 4PKGREVISION= 1
4CATEGORIES= devel 5CATEGORIES= devel
5MASTER_SITES= http://samba.org/ftp/ccache/ 6MASTER_SITES= http://samba.org/ftp/ccache/
6EXTRACT_SUFX= .tar.xz 7EXTRACT_SUFX= .tar.xz
7 8
8MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://ccache.samba.org/ 10HOMEPAGE= http://ccache.samba.org/
10COMMENT= Cache for C/C++ compilers 11COMMENT= Cache for C/C++ compilers
11LICENSE= gnu-gpl-v3 AND modified-bsd AND public-domain AND zlib 12LICENSE= gnu-gpl-v3 AND modified-bsd AND public-domain AND zlib
12 13
13GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
14 15
15INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 16INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
16 17

cvs diff -r1.15 -r1.16 pkgsrc/devel/ccache/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/ccache/distinfo 2014/12/15 05:33:26 1.15
+++ pkgsrc/devel/ccache/distinfo 2015/03/19 18:09:17 1.16
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
1$NetBSD: distinfo,v 1.15 2014/12/15 05:33:26 mef Exp $ 1$NetBSD: distinfo,v 1.16 2015/03/19 18:09:17 tnn Exp $
2 2
3SHA1 (ccache-3.2.1.tar.xz) = cc34aa89802461a9742c42767f14c3eace1aafe8 3SHA1 (ccache-3.2.1.tar.xz) = cc34aa89802461a9742c42767f14c3eace1aafe8
4RMD160 (ccache-3.2.1.tar.xz) = 48a00126bd7760505d78a35ab5d72d1a53bbe03c 4RMD160 (ccache-3.2.1.tar.xz) = 48a00126bd7760505d78a35ab5d72d1a53bbe03c
5Size (ccache-3.2.1.tar.xz) = 297868 bytes 5Size (ccache-3.2.1.tar.xz) = 297868 bytes
 6SHA1 (patch-util.c) = b56f7c348067bba472c4a9091f8d0f6b0a579263

File Added: pkgsrc/devel/ccache/patches/Attic/patch-util.c
$NetBSD: patch-util.c,v 1.1 2015/03/19 18:09:17 tnn Exp $

Workaround for bin/47757

--- util.c.orig	2014-12-10 19:40:54.000000000 +0000
+++ util.c
@@ -1063,6 +1063,9 @@ create_tmp_fd(char **fname)
 	char *template = format("%s.%s", *fname, tmp_string());
 	int fd = mkstemp(template);
 	if (fd == -1 && errno == ENOENT) {
+#if defined(__NetBSD__) && __NetBSD_Version__ < 700000000
+		reformat(&template, "%s.%s", *fname, tmp_string());
+#endif
 		if (create_parent_dirs(template) != 0) {
 			fatal("Failed to create directory %s: %s",
 			      dirname(template), strerror(errno));
@@ -1071,6 +1074,9 @@ create_tmp_fd(char **fname)
 		fd = mkstemp(template);
 	}
 	if (fd == -1) {
+#if defined(__NetBSD__) && __NetBSD_Version__ < 700000000
+		reformat(&template, "%s.%s", *fname, tmp_string());
+#endif
 		fatal("Failed to create file %s: %s", template, strerror(errno));
 	}