From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 14 05:00:43 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AEEA116A4E7 for ; Tue, 14 Sep 2004 05:00:43 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 840A843D41 for ; Tue, 14 Sep 2004 05:00:43 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i8E50hGN076833 for ; Tue, 14 Sep 2004 05:00:43 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8E50hi2076793; Tue, 14 Sep 2004 05:00:43 GMT (envelope-from gnats) Resent-Date: Tue, 14 Sep 2004 05:00:43 GMT Resent-Message-Id: <200409140500.i8E50hi2076793@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Johnson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E88316A4CE for ; Tue, 14 Sep 2004 04:51:19 +0000 (GMT) Received: from imf20aec.mail.bellsouth.net (imf20aec.mail.bellsouth.net [205.152.59.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id C332543D55 for ; Tue, 14 Sep 2004 04:51:18 +0000 (GMT) (envelope-from ahze@blueheron.ahze.net) Received: from blueheron.ahze.net ([68.209.163.3]) by imf20aec.mail.bellsouth.netESMTP <20040914045117.CWCX11436.imf20aec.mail.bellsouth.net@blueheron.ahze.net> for ; Tue, 14 Sep 2004 00:51:17 -0400 Received: (from root@localhost) by blueheron.ahze.net (8.13.1/8.13.1/Submit) id i8E4pHRS087365; Tue, 14 Sep 2004 00:51:17 -0400 (EDT) (envelope-from ahze) Message-Id: <200409140451.i8E4pHRS087365@blueheron.ahze.net> Date: Tue, 14 Sep 2004 00:51:17 -0400 (EDT) From: Michael Johnson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/71717: [MAINTAINER] devel/ccache: update to 2.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 05:00:43 -0000 >Number: 71717 >Category: ports >Synopsis: [MAINTAINER] devel/ccache: update to 2.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Sep 14 05:00:42 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Michael Johnson >Release: FreeBSD 5.3-BETA3 i386 >Organization: >Environment: System: FreeBSD blueheron.ahze.net 5.3-BETA3 FreeBSD 5.3-BETA3 #66: Tue Sep 7 12:56:04 EDT >Description: - Update to 2.4 - Add workaround to use ccache when USE_GCC is used in a port Please close pr-71705 and do not commit. this patch is not against pr-71705 Added file(s): - files/pkg-message.in Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- ccache-2.4.patch begins here --- diff -ruN --exclude=CVS /usr/ports/devel/ccache.orig/Makefile /usr/ports/devel/ccache/Makefile --- /usr/ports/devel/ccache.orig/Makefile Tue Sep 14 00:42:39 2004 +++ /usr/ports/devel/ccache/Makefile Tue Sep 14 00:40:32 2004 @@ -6,8 +6,7 @@ # PORTNAME= ccache -PORTVERSION= 2.3 -PORTREVISION= 1 +PORTVERSION= 2.4 CATEGORIES= devel MASTER_SITES= http://ccache.samba.org/ftp/ccache/ @@ -23,14 +22,61 @@ PORTDOCS= index.html \ ccache-man.html +.if !defined(WITHOUT_COMPILER_LINKS) +PKGMESSAGE= ${WRKDIR}/pkg-message +CCLINKDIR= libexec/ccache/ +.endif + +.include + +.if !defined(WITHOUT_COMPILER_LINKS) +GNU_COMPILERS= 295 33 34 35 +CCACHE_COMPILERS= cc c++ ${GNU_COMPILERS:S|^|gcc|} ${GNU_COMPILERS:S|^|g++|} +.if ${ARCH}=="i386" +CCACHE_COMPILERS+= icc icpc +.endif +.if defined(EXTRA_COMPILERS) +CCACHE_COMPILERS+= ${EXTRA_COMPILERS} +.endif +PLIST_FILES+= ${CCACHE_COMPILERS:S|^|${CCLINKDIR}|} +PLIST_DIRTS+= ${CCLINKDIR} +.endif + +pre-everything:: +.if !defined(WITHOUT_COMPILER_LINKS) + @${ECHO_MSG} "===> Ccache will install compiler links in ${PREFIX}/libexec/ccache" + @${ECHO_MSG} "===> Links that will be created are" + @${ECHO_MSG} "===> ${CCACHE_COMPILERS}" + @${ECHO_MSG} "===>" + @${ECHO_MSG} "===> You may add more by EXTRA_COMPILERS=\"Ccompiler1 C++compiler1 etc..\"" + @${ECHO_MSG} "===>" + @${ECHO_MSG} "===> You can disable compiler links by defining" + @${ECHO_MSG} "===> WITHOUT_COMPILER_LINKS" + @${ECHO_MSG} "===>" +.endif + +post-extract: +.if !defined(WITHOUT_COMPILER_LINKS) + @${SED} -e 's|%%CCACHE_COMPILERS%%|${CCACHE_COMPILERS}|; \ + s|%%PREFIX%%|${PREFIX}|; s|%%CCLINKDIR%%|${CCLINKDIR}|; \ + s|%%LOCALBASE%%|${LOCALBASE}|' \ + ${FILESDIR}/pkg-message.in >${PKGMESSAGE} +.endif do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/ccache ${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 + @${INSTALL_PROGRAM} ${WRKSRC}/ccache ${PREFIX}/bin + @${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 +.if !defined(WITHOUT_COMPILER_LINKS) + @${MKDIR} ${PREFIX}/${CCLINKDIR} +.for link in ${CCACHE_COMPILERS} + @${LN} -sf ${PREFIX}/bin/ccache ${PREFIX}/${CCLINKDIR}/${link} +.endfor +.endif .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} + @${MKDIR} ${DOCSDIR} .for i in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/web/${i} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/web/${i} ${DOCSDIR} .endfor .endif + @${CAT} ${PKGMESSAGE} -.include +.include diff -ruN --exclude=CVS /usr/ports/devel/ccache.orig/distinfo /usr/ports/devel/ccache/distinfo --- /usr/ports/devel/ccache.orig/distinfo Tue Sep 14 00:42:39 2004 +++ /usr/ports/devel/ccache/distinfo Mon Sep 13 11:25:25 2004 @@ -1,2 +1,2 @@ -MD5 (ccache-2.3.tar.gz) = 5e4afc0b170bf282d1813aeaf3d577d2 -SIZE (ccache-2.3.tar.gz) = 84386 +MD5 (ccache-2.4.tar.gz) = 73c1ed1e767c1752dd0f548ec1e66ce7 +SIZE (ccache-2.4.tar.gz) = 86363 diff -ruN --exclude=CVS /usr/ports/devel/ccache.orig/files/patch-md4 /usr/ports/devel/ccache/files/patch-md4 --- /usr/ports/devel/ccache.orig/files/patch-md4 Tue Sep 14 00:42:39 2004 +++ /usr/ports/devel/ccache/files/patch-md4 Tue Sep 14 00:42:18 2004 @@ -1,41 +1,26 @@ ---- Makefile.in Mon Apr 29 05:14:11 2002 -+++ Makefile.in Fri May 3 14:48:08 2002 -@@ -11,7 +11,7 @@ - CFLAGS=@CFLAGS@ -I. - --OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \ -+OBJS= ccache.o hash.o execute.o util.o args.o stats.o \ - cleanup.o snprintf.o unify.o --HEADERS = ccache.h mdfour.h -+HEADERS = ccache.h - - all: ccache -@@ -20,5 +20,5 @@ - - ccache: $(OBJS) $(HEADERS) -- $(CC) $(CFLAGS) -o $@ $(OBJS) -+ $(CC) $(CFLAGS) -o $@ $(OBJS) -lmd +--- ccache.h.orig Wed Sep 8 21:30:40 2004 ++++ ccache.h Wed Sep 8 21:31:53 2004 +@@ -65,14 +65,14 @@ - ccache.1: ccache.yo ---- ccache.h Mon Apr 29 05:14:12 2002 -+++ ccache.h Fri May 3 14:47:05 2002 -@@ -57,5 +57,5 @@ typedef unsigned uint32; -#include "mdfour.h" -+#include ++#include void hash_start(void); -@@ -64,5 +64,5 @@ + void hash_string(const char *s); + void hash_int(int x); void hash_file(const char *fname); char *hash_result(void); -void hash_buffer(const char *s, int len); +void hash_buffer(const unsigned char *s, unsigned int len); void cc_log(const char *format, ...); ---- hash.c Mon Apr 29 05:14:12 2002 -+++ hash.c Fri May 3 15:18:08 2002 -@@ -21,15 +21,20 @@ + void fatal(const char *msg); +--- hash.c.orig Wed Sep 8 21:36:22 2004 ++++ hash.c Wed Sep 8 21:36:25 2004 +@@ -20,17 +20,22 @@ + */ #include "ccache.h" +#include @@ -44,14 +29,14 @@ -static struct mdfour md; +static MD4_CTX md; -+static off_t totalN; ++static off_t totalN; -void hash_buffer(const char *s, int len) +void hash_buffer(const unsigned char *s, unsigned int len) { - mdfour_update(&md, (unsigned char *)s, len); -+ totalN += len; -+ MD4Update(&md, s, len); ++ totalN += len; ++ MD4Update(&md, s, len); } void hash_start(void) @@ -60,41 +45,45 @@ + MD4Init(&md); } -@@ -47,16 +52,27 @@ + void hash_string(const char *s) +@@ -46,35 +51,40 @@ + /* add contents of a file to the hash */ void hash_file(const char *fname) { - char buf[1024]; - int fd, n; -+ char *buf; -+ int fd; -+ struct stat stats; ++ char *buf; ++ int fd; ++ struct stat stats; - fd = open(fname, O_RDONLY); + fd = open(fname, O_RDONLY|O_BINARY); if (fd == -1) { cc_log("Failed to open %s\n", fname); - fatal("hash_file"); -+ fatal(__FUNCTION__); ++ fatal(__FUNCTION__); } -- + - while ((n = read(fd, buf, sizeof(buf))) > 0) { - hash_buffer(buf, n); -+ if (fstat(fd, &stats) != 0) { -+ cc_log("Failed to fstat the opened %s (descriptor %d)\n", -+ fname, fd); -+ close(fd); -+ fatal(__FUNCTION__); -+ } -+ buf = mmap(NULL, stats.st_size, PROT_READ, MAP_PRIVATE, fd, 0); -+ if (buf == MAP_FAILED) { -+ cc_log("Failed to mmap %s\n", fname); -+ close(fd); -+ fatal(__FUNCTION__); - } +- } ++ if (fstat(fd, &stats) != 0) { ++ cc_log("Failed to fstat the opened %s (descriptor %d)\n", ++ fname, fd); ++ close(fd); ++ fatal(__FUNCTION__); ++ } ++ buf = mmap(NULL, stats.st_size, PROT_READ, MAP_PRIVATE, fd, 0); ++ if (buf == MAP_FAILED) { ++ cc_log("Failed to mmap %s\n", fname); ++ close(fd); ++ fatal(__FUNCTION__); ++ } + -+ hash_buffer(buf, stats.st_size); ++ hash_buffer(buf, stats.st_size); close(fd); } -@@ -65,15 +81,9 @@ + + /* return the hash result as a static string */ char *hash_result(void) { - unsigned char sum[16]; @@ -103,18 +92,20 @@ - hash_buffer(NULL, 0); - mdfour_result(&md, sum); -+ MD4End(&md, ret); ++ MD4End(&md, ret); - for (i=0;i<16;i++) { - sprintf(&ret[i*2], "%02x", (unsigned)sum[i]); - } - sprintf(&ret[i*2], "-%u", (unsigned)md.totalN); -+ snprintf(ret + 32, sizeof ret - 32, "-%lu", (unsigned long)totalN); - +- ++ snprintf(ret + 32, sizeof ret - 32, "-%lu", (unsigned long)totalN); return ret; ---- unify.c Sun Mar 31 23:00:31 2002 -+++ unify.c Fri May 3 15:53:13 2002 -@@ -105,11 +105,10 @@ + } +--- unify.c.orig Wed Sep 8 21:36:41 2004 ++++ unify.c Wed Sep 8 21:37:20 2004 +@@ -104,13 +104,12 @@ + hash_buffer((char *)buf, len); len = 0; } - hash_buffer(NULL, 0); @@ -124,7 +115,30 @@ buf[len++] = c; - if (len == 64) { - hash_buffer((char *)buf, len); -+ if (len == sizeof buf) { -+ hash_buffer((char *)buf, sizeof buf); ++ if (len == sizeof buf) { ++ hash_buffer((char *)buf, sizeof buf); len = 0; } + } +--- Makefile.in.orig Mon Sep 6 09:04:22 2004 ++++ Makefile.in Wed Sep 8 21:41:00 2004 +@@ -11,16 +11,16 @@ + CFLAGS=@CFLAGS@ -I. + EXEEXT=@EXEEXT@ + +-OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \ ++OBJS= ccache.o hash.o execute.o util.o args.o stats.o \ + cleanup.o snprintf.o unify.o +-HEADERS = ccache.h mdfour.h ++HEADERS = ccache.h + + all: ccache$(EXEEXT) + + docs: ccache.1 web/ccache-man.html + + ccache$(EXEEXT): $(OBJS) $(HEADERS) +- $(CC) $(CFLAGS) -o $@ $(OBJS) ++ $(CC) $(CFLAGS) -o $@ $(OBJS) -lmd + + ccache.1: ccache.yo + -yodl2man -o ccache.1 ccache.yo diff -ruN --exclude=CVS /usr/ports/devel/ccache.orig/files/pkg-message.in /usr/ports/devel/ccache/files/pkg-message.in --- /usr/ports/devel/ccache.orig/files/pkg-message.in Wed Dec 31 19:00:00 1969 +++ /usr/ports/devel/ccache/files/pkg-message.in Tue Sep 14 00:49:41 2004 @@ -0,0 +1,20 @@ +Ccache has installed links for the following compilers +%%CCACHE_COMPILERS%% +in %%PREFIX%%/%%CCLINKDIR%% + +To use ccache add the following to /etc/make.conf + +.if !defined(NOCCACHE) +CC=%%PREFIX%%/%%CCLINKDIR%%cc +CXX=%%PREFIX%%/%%CCLINKDIR%%c++ +.endif + +If you have a problem building a port +define NOCCACHE and try again. + +To use ccache with ports that use USE_GCC +add %%PREFIX%%/%%CCLINKDIR%% to your PATH +and make sure it is before %%LOCALBASE%%/bin + +Please make sure you have the compiler installed +before you do this or it will not work!! --- ccache-2.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: