From fe6c8e624941cf61fce6e407db032fc1f98143e9 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Mon, 18 Apr 2016 21:58:48 +0000 Subject: [PATCH] ccache: bump to version 3.2.5 using Haiku-style directories. (#567) * Add PATCH() to use Haiku-style directories instead of the defaults: /usr/local/etc/ccache.conf => /boot/system/settings/ccache.conf $HOME/.ccache/ccache.conf => /home/config/cache/ccache/ccache.conf $HOME/.ccache/ => /home/config/cache/ccache/ /usr/local/bin/ => /boot/home/config/non-packaged/bin/ * Create [/boot/system/]settings/ccache.conf as the system-wide configuration file with the "keep-old" label. * Pass "`finddir B_SYSTEM_SETTINGS_DIRECTORY`" as sysconfdir in order to have the short path displayed instead of the long one, in case the system-wide configuration file contains errors. --- dev-util/ccache/ccache-3.2.5.recipe | 66 ++++++++++++++++++++++ dev-util/ccache/patches/ccache-3.0.1.patch | 12 ---- 2 files changed, 66 insertions(+), 12 deletions(-) create mode 100644 dev-util/ccache/ccache-3.2.5.recipe delete mode 100644 dev-util/ccache/patches/ccache-3.0.1.patch diff --git a/dev-util/ccache/ccache-3.2.5.recipe b/dev-util/ccache/ccache-3.2.5.recipe new file mode 100644 index 000000000..6c4434369 --- /dev/null +++ b/dev-util/ccache/ccache-3.2.5.recipe @@ -0,0 +1,66 @@ +SUMMARY="A fast compiler cache" +DESCRIPTION="ccache speeds up recompilation by caching previous \ +compilations and detecting when same compilation is being done again. \ +Supported languages are C, C++, Objective-C and Objective-C++." +HOMEPAGE="https://ccache.samba.org/" +COPYRIGHT="2002-2007 Andrew Tridgell + 2009-2016 Joel Rosdahl" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://samba.org/ftp/ccache/ccache-$portVersion.tar.bz2" +CHECKSUM_SHA256="7a553809e90faf9de3a23ee9c5b5f786cfd4836bf502744bedb824a24bee1097" + +ARCHITECTURES="x86 x86_gcc2 x86_64" + +GLOBAL_WRITABLE_FILES="settings/ccache.conf keep-old" +USER_SETTINGS_FILES="settings/ccache.conf" + +PROVIDES=" + ccache = $portVersion + cmd:ccache + " +REQUIRES=" + haiku + lib:libz >= 1 + " + +BUILD_REQUIRES=" + haiku_devel + devel:libz + " +BUILD_PREREQUIRES=" + cmd:awk + cmd:gcc + cmd:make + cmd:xargs + " + +PATCH() +{ + USER_CACHE_DIR="`finddir B_USER_CACHE_DIRECTORY`" + USER_NONPACKAGED_BIN_DIR="`finddir B_USER_NONPACKAGED_BIN_DIRECTORY`" + SYSTEM_SETTINGS_DIR="`finddir B_SYSTEM_SETTINGS_DIRECTORY`" + + sed -i -e "s|\(conf->cache_dir = format(\"%s/\).\(ccache\", \)get_home_directory()\();\)|\1\2\"$USER_CACHE_DIR\"\3|;" \ + conf.c + + sed -i \ + -e "s|cp ccache /usr/local/bin/|cd ${USER_NONPACKAGED_BIN_DIR//-/\\\\-}|;" \ + -e "s|\(\\-s \)\(ccache \)/usr/local/bin/|\1/bin/\2|;" \ + -e "s|/usr/local/etc/ccache|$SYSTEM_SETTINGS_DIR/ccache|;" \ + -e "s|\$HOME/\\\\&\\.ccache|$USER_CACHE_DIR/ccache|;" \ + ccache.1 +} + +BUILD() +{ + runConfigure --omit-dirs sysconfDir ./configure \ + --sysconfdir="`finddir B_SYSTEM_SETTINGS_DIRECTORY`" + make $jobArgs +} + +INSTALL() +{ + make install + echo "# System-wide configuration for ccache" > $settingsDir/ccache.conf +} diff --git a/dev-util/ccache/patches/ccache-3.0.1.patch b/dev-util/ccache/patches/ccache-3.0.1.patch deleted file mode 100644 index 3fe7574fa..000000000 --- a/dev-util/ccache/patches/ccache-3.0.1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN ccache-3.0.1/Makefile.in ccache-3.0.1-haiku/Makefile.in ---- ccache-3.0.1/Makefile.in 2010-07-15 15:52:30.051118080 +0000 -+++ ccache-3.0.1-haiku/Makefile.in 2010-08-26 04:36:22.722468864 +0000 -@@ -14,7 +14,7 @@ - LDFLAGS = @LDFLAGS@ - EXEEXT = @EXEEXT@ - --libs = @LIBS@ -lm -+libs = @LIBS@ - - sources = \ - ccache.c mdfour.c hash.c execute.c util.c args.c stats.c version.c \