svn commit: r329952 - in head/devel/ccache: . files

Bryan Drewery bdrewery at FreeBSD.org
Thu Oct 10 00:32:12 UTC 2013


Author: bdrewery
Date: Thu Oct 10 00:32:10 2013
New Revision: 329952
URL: http://svnweb.freebsd.org/changeset/ports/329952

Log:
  - Convert to staging
  - Update howto with a safer example
  - Update howto with note on using WITH_CCACHE_BUILD for ports
  - Add TINDERBOX option and fix install/plist for when it is not enabled

Modified:
  head/devel/ccache/Makefile
  head/devel/ccache/files/ccache-howto-freebsd.txt.in
  head/devel/ccache/pkg-plist

Modified: head/devel/ccache/Makefile
==============================================================================
--- head/devel/ccache/Makefile	Thu Oct 10 00:31:52 2013	(r329951)
+++ head/devel/ccache/Makefile	Thu Oct 10 00:32:10 2013	(r329952)
@@ -3,7 +3,7 @@
 
 PORTNAME=	ccache
 PORTVERSION=	3.1.9
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 MASTER_SITES=	http://www.samba.org/ftp/ccache/ \
 		CRITICAL
@@ -14,20 +14,20 @@ COMMENT=	Tool to minimize the compile ti
 LICENSE=	GPLv3
 
 GNU_CONFIGURE=	yes
-NO_STAGE=	yes
 
 HOWTO=		ccache-howto-freebsd.txt
 CCLINKDIR=	libexec/ccache
 SUB_FILES=	${HOWTO} world-ccache pkg-message ccache-update-links.sh
 
-MAN1=		ccache.1
-
 PORTDOCS=	ccache-howto-freebsd.txt MANUAL.html
 
-OPTIONS_DEFINE=	CLANGLINK LLVMLINK STATIC DOCS
+OPTIONS_DEFINE=	CLANGLINK LLVMLINK STATIC DOCS TINDERBOX
 
 CLANGLINK_DESC=	Create clang compiler links if clang is installed
 LLVMLINK_DESC=	Create llvm compiler links if llvm is installed
+TINDERBOX_DESC=	Create tarball for tinderbox usage
+
+OPTIONS_SUB=	yes
 
 STATIC_LDFLAGS=	-static
 
@@ -57,7 +57,7 @@ SUB_LIST+=	CCACHE_COMPILERS="${CCACHE_CO
 		HOWTO="${HOWTO}"
 
 post-build:
-.if !defined(TINDERBOX)
+.if ${PORT_OPTIONS:MTINDERBOX}
 	@${MKDIR} ${WRKDIR}/tb/opt
 	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKDIR}/tb/opt
 .for l in ${CCACHE_COMPILERS}
@@ -67,27 +67,26 @@ post-build:
 .endif
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/ccache ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1
-	@${MKDIR} ${PREFIX}/${CCLINKDIR}/world
+	${INSTALL_PROGRAM} ${WRKSRC}/ccache ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/ccache.1 ${STAGEDIR}${PREFIX}/man/man1
+	${MKDIR} ${STAGEDIR}${PREFIX}/${CCLINKDIR}/world
 	${INSTALL_SCRIPT} ${WRKDIR}/world-ccache \
-		${PREFIX}/${CCLINKDIR}/world/ccache
+		${STAGEDIR}${PREFIX}/${CCLINKDIR}/world/ccache
 	${INSTALL_SCRIPT} ${WRKDIR}/ccache-update-links.sh \
-		${PREFIX}/bin/ccache-update-links
-	${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.tar ${DATADIR}
+		${STAGEDIR}${PREFIX}/bin/ccache-update-links
+.if ${PORT_OPTIONS:MTINDERBOX}
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.tar ${STAGEDIR}${DATADIR}
+.endif
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/MANUAL.html ${DOCSDIR}
-	${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/MANUAL.html ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${STAGEDIR}${DOCSDIR}
 .endif
 
 post-install:
-	@${ECHO_CMD} "Creating compiler links..."
-	@${PREFIX}/bin/ccache-update-links -v
-	@${CAT} ${PKGMESSAGE}
 .if ${PORT_OPTIONS:MCLANGLINK}
-	@${CAT} ${FILESDIR}/pkg-message-clang
+	@${CAT} ${FILESDIR}/pkg-message-clang >> ${PKGMESSAGE}
 .endif
 
 .include <bsd.port.mk>

Modified: head/devel/ccache/files/ccache-howto-freebsd.txt.in
==============================================================================
--- head/devel/ccache/files/ccache-howto-freebsd.txt.in	Thu Oct 10 00:31:52 2013	(r329951)
+++ head/devel/ccache/files/ccache-howto-freebsd.txt.in	Thu Oct 10 00:32:10 2013	(r329952)
@@ -2,12 +2,16 @@
 # $FreeBSD$
 #
 
-To use ccache add the following to /etc/make.conf.
+To use ccache for ports, just add WITH_CCACHE_BUILD=yes to
+/etc/make.conf. The rest of this guide is for building
+/usr/src and other checkouts.
+
+To use ccache for base add the following to /etc/make.conf.
 You can replace cc and c++ with the compilers of your choice.
 (remember that only GCC and Clang can build world and kernel)
 
 .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
-.if !defined(NOCCACHE)
+.if !defined(NOCCACHE) && exists(%%PREFIX%%/%%CCLINKDIR%%/world/cc)
 CC:=${CC:C,^cc,%%PREFIX%%/%%CCLINKDIR%%/world/cc,1}
 CXX:=${CXX:C,^c\+\+,%%PREFIX%%/%%CCLINKDIR%%/world/c++,1}
 .endif
@@ -55,10 +59,6 @@ Just add this to /etc/make.conf if you w
 CFLAGS+=	-Qunused-arguments
 .endif
 
-!!! WARNING !!!
-Please make sure you have the compiler installed before you do this or your
-build will fail because it will not be able to find the compiler.
-
 Any time you change CC/CXX you need to reinstall devel/libtool or you
 will run in to problems.
 

Modified: head/devel/ccache/pkg-plist
==============================================================================
--- head/devel/ccache/pkg-plist	Thu Oct 10 00:31:52 2013	(r329951)
+++ head/devel/ccache/pkg-plist	Thu Oct 10 00:32:10 2013	(r329952)
@@ -1,8 +1,9 @@
 bin/ccache
 bin/ccache-update-links
-%%DATADIR%%/ccache.tar
+man/man1/ccache.1.gz
 %%CCLINKDIR%%/world/ccache
- at dirrm %%DATADIR%%
+%%TINDERBOX%%%%DATADIR%%/ccache.tar
+%%TINDERBOX%%@dirrm %%DATADIR%%
 @exec echo "Create compiler links..."
 @exec %D/bin/ccache-update-links -v
 @unexec find %D/%%CCLINKDIR%% -type l -exec rm -f {} \;


More information about the svn-ports-head mailing list