1SUMMARY="A fast compiler cache" 2DESCRIPTION="ccache speeds up recompilation by caching previous \ 3compilations and detecting when same compilation is being done again. \ 4Supported languages are C, C++, Objective-C and Objective-C++." 5HOMEPAGE="https://ccache.samba.org/" 6COPYRIGHT="2002-2007 Andrew Tridgell 7 2009-2022 Joel Rosdahl and other contributors" 8LICENSE="GNU GPL v3 9 GNU LGPL v3" 10REVISION="1" 11SOURCE_URI="https://github.com/ccache/ccache/releases/download/v$portVersion/ccache-$portVersion.tar.xz" 12CHECKSUM_SHA256="9200cafbaa5fd62c2600fccb40a18214e57747825e6cdcd76688b4b61c2dcba0" 13PATCHES="ccache-$portVersion.patchset" 14 15ARCHITECTURES="?all !x86_gcc2" 16SECONDARY_ARCHITECTURES="?x86" 17 18GLOBAL_WRITABLE_FILES="settings/ccache.conf keep-old" 19USER_SETTINGS_FILES="settings/ccache.conf" 20 21# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/. 22commandSuffix=$secondaryArchSuffix 23commandBinDir=$binDir 24if [ "$targetArchitecture" = x86_gcc2 ]; then 25 commandSuffix= 26 commandBinDir=$prefix/bin 27fi 28 29PROVIDES=" 30 ccache$secondaryArchSuffix = $portVersion 31 cmd:ccache$commandSuffix 32 " 33REQUIRES=" 34 haiku$secondaryArchSuffix 35 lib:libhiredis$secondaryArchSuffix 36 lib:libz$secondaryArchSuffix 37 lib:libzstd$secondaryArchSuffix 38 " 39 40BUILD_REQUIRES=" 41 haiku${secondaryArchSuffix}_devel 42 devel:libhiredis$secondaryArchSuffix 43 devel:libz$secondaryArchSuffix 44 devel:libzstd$secondaryArchSuffix 45 " 46BUILD_PREREQUIRES=" 47 cmd:cmake 48 cmd:gcc$secondaryArchSuffix 49 cmd:make 50 cmd:pkg_config$secondaryArchSuffix 51 cmd:xargs 52 " 53 54TEST_REQUIRES=" 55 cmd:awk 56 cmd:cmp 57 cmd:dirname 58 cmd:head 59 cmd:perl 60 cmd:sed 61 " 62 63BUILD() 64{ 65 cmake -B build -S . \ 66 $cmakeDirArgs \ 67 -DCMAKE_BUILD_TYPE=Release \ 68 -DCMAKE_INSTALL_BINDIR=$commandBinDir 69 make -C build $jobArgs 70} 71 72INSTALL() 73{ 74 make -C build install 75 echo "# System-wide configuration for ccache" > $settingsDir/ccache.conf 76} 77 78TEST() 79{ 80 make -C build check 81} 82