@@ -1,4 +1,4 @@
# sha256 computed locally
-sha256 a02f4e8360dc6618bc494ca35b0ae21cea080f804a4898eab1ad3fcd108eb400 ccache-3.7.12.tar.xz
-sha256 ec6b1a326ff93b2cc21df88a697ae470ff6927a55b8929e7e491b315e1563361 GPL-3.0.txt
-sha256 4f63223bcdee822d55a6768cc8399ffe06401d7a03cfe79e1dc305f50dc22c59 LICENSE.adoc
+sha256 df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36 ccache-4.7.4.tar.xz
+sha256 80b5112739a423dfac7bed1ca8a1df3cccda3d794425441997d4462b83db4dd5 GPL-3.0.txt
+sha256 56cf64f68b7b8150300acd79899941615523ea5c56c120e92f5b175b7cc78e3c LICENSE.adoc
@@ -4,27 +4,19 @@
#
################################################################################
-CCACHE_VERSION = 3.7.12
+CCACHE_VERSION = 4.7.4
CCACHE_SITE = https://github.com/ccache/ccache/releases/download/v$(CCACHE_VERSION)
CCACHE_SOURCE = ccache-$(CCACHE_VERSION).tar.xz
CCACHE_LICENSE = GPL-3.0+, others
CCACHE_LICENSE_FILES = LICENSE.adoc GPL-3.0.txt
-
-# Force ccache to use its internal zlib. The problem is that without
-# this, ccache would link against the zlib of the build system, but we
-# might build and install a different version of zlib in $(O)/host
-# afterwards, which ccache will pick up. This might break if there is
-# a version mismatch. A solution would be to add host-zlib has a
-# dependency of ccache, but it would require tuning the zlib .mk file
-# to use HOSTCC_NOCCACHE as the compiler. Instead, we take the easy
-# path: tell ccache to use its internal copy of zlib, so that ccache
-# has zero dependency besides the C library.
-HOST_CCACHE_CONF_OPTS += --with-bundled-zlib
+HOST_CCACHE_DEPENDENCIES = host-hiredis host-zstd
# We are ccache, so we can't use ccache
-HOST_CCACHE_CONF_ENV = \
- CC="$(HOSTCC_NOCCACHE)" \
- CXX="$(HOSTCXX_NOCCACHE)"
+HOST_CCACHE_CONF_OPTS += \
+ -UCMAKE_C_COMPILER_LAUNCHER \
+ -UCMAKE_CXX_COMPILER_LAUNCHER \
+ -DZSTD_FROM_INTERNET=OFF \
+ -DHIREDIS_FROM_INTERNET=OFF
# Patch host-ccache as follows:
# - Use BR_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR
@@ -33,13 +25,17 @@ HOST_CCACHE_CONF_ENV = \
# BR2_CCACHE_DIR.
# - Change hard-coded last-ditch default to match path in .config, to avoid
# the need to specify BR_CACHE_DIR when invoking ccache directly.
-# CCache replaces "%s" with the home directory of the current user,
-# So rewrite BR_CACHE_DIR to take that into consideration for SDK purpose
-HOST_CCACHE_DEFAULT_CCACHE_DIR = $(patsubst $(HOME)/%,\%s/%,$(BR_CACHE_DIR))
+# CCache replaces "home_dir" with the home directory of the current user,
+# so rewrite BR_CACHE_DIR to take that into consideration for SDK purpose
+HOST_CCACHE_DEFAULT_CCACHE_DIR = $(patsubst $(HOME)/%,%,$(BR_CACHE_DIR))
define HOST_CCACHE_PATCH_CONFIGURATION
- sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/src/ccache.c
- sed -i 's,"%s/.ccache","$(HOST_CCACHE_DEFAULT_CCACHE_DIR)",' $(@D)/src/conf.c
+ sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/src/Config.cpp
+ sed -i 's,".ccache","$(HOST_CCACHE_DEFAULT_CCACHE_DIR)",' $(@D)/src/Config.cpp
+ sed -i 's,"/.cache/ccache","/$(HOST_CCACHE_DEFAULT_CCACHE_DIR)",' $(@D)/src/Config.cpp
+ sed -i 's,"/.config/ccache","/$(HOST_CCACHE_DEFAULT_CCACHE_DIR)",' $(@D)/src/Config.cpp
+ sed -i 's,getenv("XDG_CACHE_HOME"),nullptr,' $(@D)/src/Config.cpp
+ sed -i 's,getenv("XDG_CONFIG_HOME"),nullptr,' $(@D)/src/Config.cpp
endef
HOST_CCACHE_POST_PATCH_HOOKS += HOST_CCACHE_PATCH_CONFIGURATION
@@ -62,7 +58,7 @@ endef
HOST_CCACHE_POST_INSTALL_HOOKS += HOST_CCACHE_DO_INITIAL_SETUP
endif
-$(eval $(host-autotools-package))
+$(eval $(host-cmake-package))
ifeq ($(BR2_CCACHE),y)
ccache-stats: host-ccache
@@ -792,7 +792,7 @@ $(2)_EXTRACT_DEPENDENCIES += \
endif
ifeq ($$(BR2_CCACHE),y)
-ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache host-hiredis host-pkgconf host-zstd,$(1)),)
+ifeq ($$(filter host-tar host-skeleton host-xz host-lzip host-fakedate host-ccache host-cmake host-hiredis host-pkgconf host-zstd,$(1)),)
$(2)_DEPENDENCIES += host-ccache
endif
endif
Migrate to cmake package infrastructure. Add new host-hiredis host-zstd dependencies. Add new ccache dependency exclusions to pkg-generic. Migrate HOST_CCACHE_PATCH_CONFIGURATION to handle updated source files/format. License hashes changed due to migrating urls to https: https://github.com/ccache/ccache/commit/a0f32f161f1b8b9c5d287ca8abe88e3fd1e940a2 Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- Changes v2 -> v3: - use UCMAKE_C_COMPILER_LAUNCHER/UCMAKE_CXX_COMPILER_LAUNCHER to disable ccache Changes v1 -> v2: - add some additional ccache path overrides --- package/ccache/ccache.hash | 6 +++--- package/ccache/ccache.mk | 38 +++++++++++++++++--------------------- package/pkg-generic.mk | 2 +- 3 files changed, 21 insertions(+), 25 deletions(-)