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="2" SOURCE_URI="https://samba.org/ftp/ccache/ccache-$portVersion.tar.bz2" CHECKSUM_SHA256="fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567" ARCHITECTURES="!x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86" GLOBAL_WRITABLE_FILES="settings/ccache.conf keep-old" USER_SETTINGS_FILES="settings/ccache.conf" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. commandSuffix=$secondaryArchSuffix commandBinDir=$binDir if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= commandBinDir=$prefix/bin fi PROVIDES=" ccache$secondaryArchSuffix = $portVersion cmd:ccache$commandSuffix " REQUIRES=" haiku$secondaryArchSuffix lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:awk cmd:gcc$secondaryArchSuffix 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 } TEST() { make check }