aboutsummaryrefslogtreecommitdiff
path: root/devel/ccache
diff options
context:
space:
mode:
authorMichael Johnson <ahze@FreeBSD.org>2004-12-02 14:10:34 +0000
committerMichael Johnson <ahze@FreeBSD.org>2004-12-02 14:10:34 +0000
commite4be9b5679d868e8d0356c90a1defc74abac15e7 (patch)
treea6f7d95de20f76aa561fdf82eb8890ae80f865a2 /devel/ccache
parenteb1556a3dcf38333fdfb9584a05e38bfb5df61e8 (diff)
downloadports-e4be9b5679d868e8d0356c90a1defc74abac15e7.tar.gz
ports-e4be9b5679d868e8d0356c90a1defc74abac15e7.zip
- Add a link to gcc32 since it's still used in some ports (ie openoffice)
- Move pkg-message in to a file (ccache-howto-freebsd.txt) that is now installed in to DOCSDIR. ccache-howto-freebsd.txt is more informative than pkg-message was, now has better examples so ccache will not fail with some ports that don't like a full path to the compiler. - Add a note about using distcc - Bump PORTREVISION
Notes
Notes: svn path=/head/; revision=122988
Diffstat (limited to 'devel/ccache')
-rw-r--r--devel/ccache/Makefile29
-rw-r--r--devel/ccache/files/ccache-howto-freebsd.txt.in50
-rw-r--r--devel/ccache/files/pkg-message.in21
3 files changed, 71 insertions, 29 deletions
diff --git a/devel/ccache/Makefile b/devel/ccache/Makefile
index ab87814c8f30..159be12a1054 100644
--- a/devel/ccache/Makefile
+++ b/devel/ccache/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ccache
PORTVERSION= 2.4
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://ccache.samba.org/ftp/ccache/
@@ -20,18 +21,20 @@ MAN1= ccache.1
PLIST_FILES= bin/ccache
PORTDOCS= index.html \
- ccache-man.html
+ ccache-man.html \
+ ${HOWTO}
.if !defined(WITHOUT_COMPILER_LINKS)
+HOWTO= ccache-howto-freebsd.txt
PKGMESSAGE= ${WRKDIR}/pkg-message
-CCLINKDIR= libexec/ccache/
-PLIST_DIRS= libexec/ccache
+CCLINKDIR= libexec/ccache
+PLIST_DIRS= ${CCLINKDIR}
.endif
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_COMPILER_LINKS)
-GNU_COMPILERS= 295 33 34 35 40
+GNU_COMPILERS= 295 32 33 34 35 40
CCACHE_COMPILERS= cc c++ ${GNU_COMPILERS:S|^|gcc|} ${GNU_COMPILERS:S|^|g++|}
.if ${ARCH}=="i386"
CCACHE_COMPILERS+= icc icpc
@@ -39,8 +42,7 @@ CCACHE_COMPILERS+= icc icpc
.if defined(EXTRA_COMPILERS)
CCACHE_COMPILERS+= ${EXTRA_COMPILERS}
.endif
-PLIST_FILES+= ${CCACHE_COMPILERS:S|^|${CCLINKDIR}|}
-PLIST_DIRTS+= ${CCLINKDIR}
+PLIST_FILES+= ${CCACHE_COMPILERS:S|^|${CCLINKDIR}/|}
.endif
pre-everything::
@@ -61,22 +63,27 @@ post-extract:
@${SED} -e 's|%%CCACHE_COMPILERS%%|${CCACHE_COMPILERS}|; \
s|%%PREFIX%%|${PREFIX}|; s|%%CCLINKDIR%%|${CCLINKDIR}|; \
s|%%LOCALBASE%%|${LOCALBASE}|' \
+ ${FILESDIR}/${HOWTO}.in > ${WRKDIR}/${HOWTO}
+ @${SED} -e 's|%%HOWTO%%|${HOWTO}|; \
+ 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}
+ ${LN} -sf ${PREFIX}/bin/ccache ${PREFIX}/${CCLINKDIR}/${link}
.endfor
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
-.for i in ${PORTDOCS}
- @${INSTALL_DATA} ${WRKSRC}/web/${i} ${DOCSDIR}
+.for i in ${PORTDOCS:S/${HOWTO}//}
+ ${INSTALL_DATA} ${WRKSRC}/web/${i} ${DOCSDIR}
.endfor
+ ${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/devel/ccache/files/ccache-howto-freebsd.txt.in b/devel/ccache/files/ccache-howto-freebsd.txt.in
new file mode 100644
index 000000000000..80870035c3eb
--- /dev/null
+++ b/devel/ccache/files/ccache-howto-freebsd.txt.in
@@ -0,0 +1,50 @@
+#
+# $FreeBSD$
+#
+
+To use ccache add the following to /etc/make.conf
+
+.if !defined(NOCCACHE)
+.if ${.CURDIR:M/usr/src*}
+CC=%%LOCALBASE%%/libexec/ccache/cc
+CXX=%%LOCALBASE%%/libexec/ccache/c++
+.else
+CC=cc
+CXX=c++
+.endif
+.endif
+
+For Korn/Bourne shells Add the following to /etc/profile:
+ export PATH=%%LOCALBASE%%/libexec/ccache/:$PATH
+ export CCACHE_PATH=/usr/bin:%%LOCALBASE%%/bin
+
+For csh/tcsh Add the following to /etc/csh.cshrc:
+ setenv PATH %%LOCALBASE%%/libexec/ccache/:$PATH
+ setenv CCACHE_PATH /usr/bin:%%LOCALBASE%%/bin
+
+--
+
+To use distcc:
+
+For Korn/Bourne shells Add the following to /etc/profile:
+ export CCACHE_PREFIX=distcc
+ export DISTCC_HOSTS="localhost host1 host2"
+
+For csh/tcsh Add the following to /etc/csh.cshrc:
+ setenv CACHE_PREFIX distcc
+ setenv DISTCC_HOSTS "localhost host1 host2"
+
+--
+
+If you have a problem building a port
+define NOCCACHE and try again.
+
+--
+
+Ccache has installed links for the following compilers
+%%CCACHE_COMPILERS%%
+in %%PREFIX%%/%%CCLINKDIR%%
+
+!!! 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.
diff --git a/devel/ccache/files/pkg-message.in b/devel/ccache/files/pkg-message.in
index 175d6128bdc2..ee7aeac9926a 100644
--- a/devel/ccache/files/pkg-message.in
+++ b/devel/ccache/files/pkg-message.in
@@ -1,20 +1,5 @@
-To use ccache add the following to /etc/make.conf
-.if !defined(NOCCACHE)
-CC=%%PREFIX%%/%%CCLINKDIR%%cc
-CXX=%%PREFIX%%/%%CCLINKDIR%%c++
-.endif
+=== NOTE ===
+Please read %%LOCALBASE%%/%%HOWTO%% for information on using
+ccache with FreeBSD ports and src.
-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
-
-Ccache has installed links for the following compilers
-%%CCACHE_COMPILERS%%
-in %%PREFIX%%/%%CCLINKDIR%%
-
-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.