From 367f30e8e077e26c8c64ed0c4bac624694c822db Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 23 Nov 2021 06:32:27 +0100 Subject: [PATCH] ccache, bump version (#6401) --- dev-util/ccache/ccache-4.4.2.recipe | 81 +++++++++++++++++++ dev-util/ccache/patches/ccache-4.4.2.patchset | 65 +++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 dev-util/ccache/ccache-4.4.2.recipe create mode 100644 dev-util/ccache/patches/ccache-4.4.2.patchset diff --git a/dev-util/ccache/ccache-4.4.2.recipe b/dev-util/ccache/ccache-4.4.2.recipe new file mode 100644 index 000000000..d238adfa1 --- /dev/null +++ b/dev-util/ccache/ccache-4.4.2.recipe @@ -0,0 +1,81 @@ +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-2021 Joel Rosdahl and other contributors" +LICENSE="GNU GPL v3 + GNU LGPL v3" +REVISION="1" +SOURCE_URI="https://github.com/ccache/ccache/releases/download/v$portVersion/ccache-$portVersion.tar.xz" +CHECKSUM_SHA256="9200cafbaa5fd62c2600fccb40a18214e57747825e6cdcd76688b4b61c2dcba0" +PATCHES="ccache-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +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:libhiredis$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libzstd$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libhiredis$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libzstd$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:xargs + " + +TEST_REQUIRES=" + cmd:awk + cmd:cmp + cmd:dirname + cmd:head + cmd:perl + cmd:sed + " + +BUILD() +{ + cmake -B build -S . \ + $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_BINDIR=$commandBinDir + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + echo "# System-wide configuration for ccache" > $settingsDir/ccache.conf +} + +TEST() +{ + make -C build check +} diff --git a/dev-util/ccache/patches/ccache-4.4.2.patchset b/dev-util/ccache/patches/ccache-4.4.2.patchset new file mode 100644 index 000000000..f8fd52cc6 --- /dev/null +++ b/dev-util/ccache/patches/ccache-4.4.2.patchset @@ -0,0 +1,65 @@ +From 4de53076c82f6799271825d1660d822443ed6f3e Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 13 Nov 2021 08:28:23 +0000 +Subject: Haiku doesn't support hard links + + +diff --git a/test/suites/base.bash b/test/suites/base.bash +index 8cc2e6c..cd8effb 100644 +--- a/test/suites/base.bash ++++ b/test/suites/base.bash +@@ -164,7 +164,7 @@ base_tests() { + # ------------------------------------------------------------------------- + TEST "Unsupported source language" + +- ln -f test1.c test1.ccc ++ ln -fs test1.c test1.ccc + $CCACHE_COMPILE -c test1.ccc 2>/dev/null + expect_stat unsupported_source_language 1 + +@@ -690,7 +690,7 @@ b" + # ------------------------------------------------------------------------- + TEST "-x c" + +- ln -f test1.c test1.ccc ++ ln -fs test1.c test1.ccc + + $CCACHE_COMPILE -x c -c test1.ccc + expect_stat preprocessed_cache_hit 0 +@@ -703,7 +703,7 @@ b" + # ------------------------------------------------------------------------- + TEST "-xc" + +- ln -f test1.c test1.ccc ++ ln -fs test1.c test1.ccc + + $CCACHE_COMPILE -xc -c test1.ccc + expect_stat preprocessed_cache_hit 0 +-- +2.30.2 + + +From 95c710a986a422aa8bed385a4669b0969e18d0ec Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 13 Nov 2021 12:28:11 +0000 +Subject: Link against libnetwork + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fcc2134..11e6259 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,6 +137,10 @@ if(ENABLE_DOCUMENTATION) + add_subdirectory(doc) + endif() + ++if(HAIKU) ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lnetwork") ++endif(HAIKU) ++ + # + # Installation + # +-- +2.30.2 +