summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-12 07:11:38 +0000
committerjlam <jlam@pkgsrc.org>2004-02-12 07:11:38 +0000
commit0ee5bb2fba2b22552725e2b45f3e566790360cf6 (patch)
tree9906cfbd0971279692272e5afde10d6a93cb4e03 /devel
parent4a4498a10ca21e218b01c536fee8ea356df8898e (diff)
downloadpkgsrc-0ee5bb2fba2b22552725e2b45f3e566790360cf6.tar.gz
Update devel/ccache to 2.3nb1. Changes from version 2.3 include adding
a new environment variable CCACHE_HASHCC whose value may be used to override the compiler-specific addition to the hash value used to distinguish between two compiles. This is useful where the compiler is a shell script generated on-the-fly that executes the real compiler. This allows ccache to function correctly within the pkgsrc infrastructure.
Diffstat (limited to 'devel')
-rw-r--r--devel/ccache/Makefile3
-rw-r--r--devel/ccache/distinfo4
-rw-r--r--devel/ccache/patches/patch-aa19
-rw-r--r--devel/ccache/patches/patch-ab42
4 files changed, 66 insertions, 2 deletions
diff --git a/devel/ccache/Makefile b/devel/ccache/Makefile
index 2abee4beada..09ac695dbe2 100644
--- a/devel/ccache/Makefile
+++ b/devel/ccache/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2004/01/31 21:36:54 jlam Exp $
+# $NetBSD: Makefile,v 1.7 2004/02/12 07:11:43 jlam Exp $
DISTNAME= ccache-2.3
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://ccache.samba.org/ftp/ccache/
diff --git a/devel/ccache/distinfo b/devel/ccache/distinfo
index 547d64093d4..4cade4b5264 100644
--- a/devel/ccache/distinfo
+++ b/devel/ccache/distinfo
@@ -1,4 +1,6 @@
-$NetBSD: distinfo,v 1.5 2004/01/31 21:36:54 jlam Exp $
+$NetBSD: distinfo,v 1.6 2004/02/12 07:11:43 jlam Exp $
SHA1 (ccache-2.3.tar.gz) = eb8ece3cd1b57752b5503b1e65d9bbe302533407
Size (ccache-2.3.tar.gz) = 84386 bytes
+SHA1 (patch-aa) = f2932ccc9166f94eee56da382f7a51f23088bc69
+SHA1 (patch-ab) = b117e0fc73d5fe6cbe4c584421c456cf803177bc
diff --git a/devel/ccache/patches/patch-aa b/devel/ccache/patches/patch-aa
new file mode 100644
index 00000000000..744729a1284
--- /dev/null
+++ b/devel/ccache/patches/patch-aa
@@ -0,0 +1,19 @@
+$NetBSD: patch-aa,v 1.3 2004/02/12 07:11:43 jlam Exp $
+
+--- ccache.1.orig Sat Sep 27 21:48:17 2003
++++ ccache.1
+@@ -208,6 +208,14 @@ to share your cache with other users\&.
+ file permissions set on the object files created from your
+ compilations\&.
+ .IP
++.IP "\fBCCACHE_HASHCC\fP"
++Normally, ccache adds the compiler size and modification time when
++calculating the hash that is used to distinguish two compiles\&. You
++can use CCACHE_HASHCC to override this default with a unique string\&.
++This is useful when the compiler is actually a shell script generated
++on-the-fly that executes the real compiler\&. A reasonable value for
++CCACHE_HASHCC for \&'gcc\&' is the output of \&'gcc -v\&'\&.
++.IP
+ .IP "\fBCCACHE_HASHDIR\fP"
+ This tells ccache to hash the current working
+ directory when calculating the hash that is used to distinguish two
diff --git a/devel/ccache/patches/patch-ab b/devel/ccache/patches/patch-ab
new file mode 100644
index 00000000000..20efa8dd666
--- /dev/null
+++ b/devel/ccache/patches/patch-ab
@@ -0,0 +1,42 @@
+$NetBSD: patch-ab,v 1.1 2004/02/12 07:11:43 jlam Exp $
+
+--- ccache.c.orig Sat Sep 27 21:48:17 2003
++++ ccache.c
+@@ -252,6 +252,7 @@ static void find_hash(ARGS *args)
+ int i;
+ char *path_stdout, *path_stderr;
+ char *hash_dir;
++ const char *hash_cc;
+ char *s;
+ struct stat st;
+ int status;
+@@ -314,15 +315,21 @@ static void find_hash(ARGS *args)
+ hash_string(args->argv[i]);
+ }
+
+- /* the compiler driver size and date. This is a simple minded way
+- to try and detect compiler upgrades. It is not 100% reliable */
+- if (stat(args->argv[0], &st) != 0) {
+- cc_log("Couldn't stat the compiler!? (argv[0]='%s')\n", args->argv[0]);
+- stats_update(STATS_COMPILER);
+- failed();
++ /* If CCACHE_HASHCC is defined, then hash that string, otherwise, hash
++ the compiler driver size and date. This is a simple minded way to
++ try and detect compiler upgrades. It is not 100% reliable */
++ hash_cc = getenv("CCACHE_HASHCC");
++ if (hash_cc) {
++ hash_string(hash_cc);
++ } else {
++ if (stat(args->argv[0], &st) != 0) {
++ cc_log("Couldn't stat the compiler!? (argv[0]='%s')\n", args->argv[0]);
++ stats_update(STATS_COMPILER);
++ failed();
++ }
++ hash_int(st.st_size);
++ hash_int(st.st_mtime);
+ }
+- hash_int(st.st_size);
+- hash_int(st.st_mtime);
+
+ /* possibly hash the current working directory */
+ if (getenv("CCACHE_HASHDIR")) {