mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
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.
This commit is contained in:
66
dev-util/ccache/ccache-3.2.5.recipe
Normal file
66
dev-util/ccache/ccache-3.2.5.recipe
Normal file
@@ -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
|
||||
}
|
||||
@@ -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 \
|
||||
Reference in New Issue
Block a user