diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-12 07:11:38 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-12 07:11:38 +0000 |
commit | 9a001ab2405e302042593642a3e835d3cd735547 (patch) | |
tree | 9906cfbd0971279692272e5afde10d6a93cb4e03 | |
parent | 4f845d30adeee965a760941b791a6fd9714b0d80 (diff) | |
download | pkgsrc-9a001ab2405e302042593642a3e835d3cd735547.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.
-rw-r--r-- | devel/ccache/Makefile | 3 | ||||
-rw-r--r-- | devel/ccache/distinfo | 4 | ||||
-rw-r--r-- | devel/ccache/patches/patch-aa | 19 | ||||
-rw-r--r-- | devel/ccache/patches/patch-ab | 42 | ||||
-rw-r--r-- | doc/CHANGES | 3 |
5 files changed, 68 insertions, 3 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")) { diff --git a/doc/CHANGES b/doc/CHANGES index 917e1f3594d..60ee64f5b98 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,4 +1,4 @@ -$NetBSD: CHANGES,v 1.4799 2004/02/12 05:50:26 ben Exp $ +$NetBSD: CHANGES,v 1.4800 2004/02/12 07:11:38 jlam Exp $ Changes to the packages collection and infrastructure in 2004: @@ -794,3 +794,4 @@ Changes to the packages collection and infrastructure in 2004: Added libpathan-1.2.2 [minskim 2004-02-12] Added llnlxdir-2.1.2 [ben 2004-02-12] Added llnlxftp-2.1 [ben 2004-02-12] + Updated ccache to 2.3nb1 [jlam 2004-02-12] |