Update to. 4.10

This commit is contained in:
Orion Poplawski 2024-06-02 17:44:40 -06:00
parent 59331031eb
commit 3454728c01
4 changed files with 11 additions and 194 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@
/ccache-4.8.3.tar.gz
/ccache-4.9.tar.gz
/ccache-4.9.1.tar.gz
/ccache-4.10.tar.gz

View File

@ -1,182 +0,0 @@
diff -up ccache-4.9.1/CMakeLists.txt.unbundle ccache-4.9.1/CMakeLists.txt
--- ccache-4.9.1/CMakeLists.txt.unbundle 2024-02-05 12:29:52.000000000 -0700
+++ ccache-4.9.1/CMakeLists.txt 2024-02-08 08:24:25.196673454 -0700
@@ -86,6 +86,10 @@ include(GenerateVersionFile)
# Third party
#
+find_package(PkgConfig REQUIRED)
+
+pkg_check_modules(xxhash REQUIRED IMPORTED_TARGET libxxhash)
+
set(ZSTD_FROM_INTERNET AUTO CACHE STRING "Download and use libzstd from the Internet")
set_property(CACHE ZSTD_FROM_INTERNET PROPERTY STRINGS AUTO ON OFF)
diff -up ccache-4.9.1/src/CMakeLists.txt.unbundle ccache-4.9.1/src/CMakeLists.txt
--- ccache-4.9.1/src/CMakeLists.txt.unbundle 2024-02-05 12:29:52.000000000 -0700
+++ ccache-4.9.1/src/CMakeLists.txt 2024-02-08 08:27:10.324913588 -0700
@@ -14,6 +14,7 @@ set(
hashutil.cpp
language.cpp
version.cpp
+ third_party/url.cpp
)
if(INODE_CACHE_SUPPORTED)
@@ -45,10 +46,11 @@ if(CCACHE_EXTRA_LIBS)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(fmt REQUIRED)
find_package(Threads REQUIRED)
target_link_libraries(
ccache_framework
- PRIVATE standard_settings standard_warnings ZSTD::ZSTD Threads::Threads third_party
+ PRIVATE standard_settings standard_warnings blake3 fmt::fmt ZSTD::ZSTD Threads::Threads PkgConfig::xxhash
)
target_include_directories(ccache_framework PUBLIC ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
@@ -57,7 +59,7 @@ if(REDIS_STORAGE_BACKEND)
target_compile_definitions(ccache_framework PUBLIC -DHAVE_REDIS_STORAGE_BACKEND)
target_link_libraries(
ccache_framework
- PUBLIC standard_settings standard_warnings HIREDIS::HIREDIS third_party
+ PUBLIC standard_settings standard_warnings HIREDIS::HIREDIS
)
endif()
diff -up ccache-4.9.1/src/hashutil.cpp.unbundle ccache-4.9.1/src/hashutil.cpp
--- ccache-4.9.1/src/hashutil.cpp.unbundle 2024-02-05 12:29:52.000000000 -0700
+++ ccache-4.9.1/src/hashutil.cpp 2024-02-08 08:24:25.200673484 -0700
@@ -37,7 +37,9 @@
# include "InodeCache.hpp"
#endif
-#include "third_party/blake3/blake3_cpu_supports_avx2.h"
+#ifdef HAVE_AVX2
+# include "third_party/blake3/blake3_cpu_supports_avx2.h"
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
diff -up ccache-4.9.1/src/third_party/CMakeLists.txt.unbundle ccache-4.9.1/src/third_party/CMakeLists.txt
--- ccache-4.9.1/src/third_party/CMakeLists.txt.unbundle 2024-02-05 12:29:52.000000000 -0700
+++ ccache-4.9.1/src/third_party/CMakeLists.txt 2024-02-08 08:26:04.233417232 -0700
@@ -1,58 +1,59 @@
-add_library(third_party STATIC format.cpp httplib.cpp url.cpp xxhash.c)
-if(NOT MSVC)
- target_sources(third_party PRIVATE getopt_long.c)
-else()
- target_sources(third_party PRIVATE win32/getopt.c)
- target_compile_definitions(third_party PUBLIC -DSTATIC_GETOPT)
-endif()
+if(0)
+ add_library(third_party STATIC format.cpp httplib.cpp url.cpp xxhash.c)
+ if(NOT MSVC)
+ target_sources(third_party PRIVATE getopt_long.c)
+ else()
+ target_sources(third_party PRIVATE win32/getopt.c)
+ target_compile_definitions(third_party PUBLIC -DSTATIC_GETOPT)
+ endif()
+ file(GLOB headers *.h fmt/*.h nonstd/*.hpp)
+ target_sources(third_party PRIVATE ${headers})
+
+ set(xxhdispatchtest [=[
+ #include "xxh_x86dispatch.c"
+
+ int main()
+ {
+ XXH3_64bits_dispatch("foo", 3);
+ return 1;
+ }
+ ]=])
+
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/xxhdispatchtest.c" "${xxhdispatchtest}")
+
+ try_compile(USE_XXH_DISPATCH ${CMAKE_CURRENT_BINARY_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/xxhdispatchtest.c"
+ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${CMAKE_CURRENT_SOURCE_DIR}"
+ COMPILE_DEFINITIONS "-DXXH_STATIC_LINKING_ONLY")
+
+ target_compile_definitions(third_party INTERFACE "-DXXH_STATIC_LINKING_ONLY")
+ if(USE_XXH_DISPATCH)
+ target_sources(third_party PRIVATE xxh_x86dispatch.c)
+ target_compile_definitions(third_party INTERFACE "-DUSE_XXH_DISPATCH")
+ endif()
+
+ # Treat third party headers as system files (no warning for those headers).
+ target_include_directories(
+ third_party
+ PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} SYSTEM
+ )
+
+ target_link_libraries(third_party PRIVATE standard_settings)
+endif ()
+
if(WIN32)
target_sources(third_party PRIVATE win32/mktemp.c)
+ file(GLOB headers win32/*.h)
+ target_sources(third_party PRIVATE ${headers})
+
+ target_link_libraries(third_party PRIVATE ws2_32)
endif ()
if(ENABLE_TRACING)
target_sources(third_party PRIVATE minitrace.c)
endif()
-file(GLOB headers *.h fmt/*.h nonstd/*.hpp win32/*.h)
-target_sources(third_party PRIVATE ${headers})
-
-set(xxhdispatchtest [=[
-#include "xxh_x86dispatch.c"
-
-int main()
-{
- XXH3_64bits_dispatch("foo", 3);
- return 1;
-}
-]=])
-
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/xxhdispatchtest.c" "${xxhdispatchtest}")
-
-try_compile(USE_XXH_DISPATCH ${CMAKE_CURRENT_BINARY_DIR}
- "${CMAKE_CURRENT_BINARY_DIR}/xxhdispatchtest.c"
- CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${CMAKE_CURRENT_SOURCE_DIR}"
- COMPILE_DEFINITIONS "-DXXH_STATIC_LINKING_ONLY")
-
-target_compile_definitions(third_party INTERFACE "-DXXH_STATIC_LINKING_ONLY")
-if(USE_XXH_DISPATCH)
- target_sources(third_party PRIVATE xxh_x86dispatch.c)
- target_compile_definitions(third_party INTERFACE "-DUSE_XXH_DISPATCH")
-endif()
-
-# Treat third party headers as system files (no warning for those headers).
-target_include_directories(
- third_party
- PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} SYSTEM
-)
-
-target_link_libraries(third_party PRIVATE standard_settings)
-target_link_libraries(third_party INTERFACE blake3)
-
-if(WIN32)
- target_link_libraries(third_party PRIVATE ws2_32)
-endif()
-
# Silence warning from winbase.h due to /Zc:preprocessor.
if(MSVC)
target_compile_options(third_party PRIVATE /wd5105)
diff -up ccache-4.9.1/unittest/CMakeLists.txt.unbundle ccache-4.9.1/unittest/CMakeLists.txt
--- ccache-4.9.1/unittest/CMakeLists.txt.unbundle 2024-02-05 12:29:52.000000000 -0700
+++ ccache-4.9.1/unittest/CMakeLists.txt 2024-02-08 08:24:25.196673454 -0700
@@ -59,7 +59,7 @@ endif()
target_link_libraries(
unittest
- PRIVATE standard_settings standard_warnings ccache_framework third_party)
+ PRIVATE standard_settings standard_warnings ccache_framework PkgConfig::xxhash)
target_include_directories(unittest PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ccache_SOURCE_DIR}/src)

View File

@ -12,13 +12,12 @@
%global relccache %(%abs2rel %{_bindir}/ccache %{_libdir}/ccache)
Name: ccache
Version: 4.9.1
Release: 2%{?dist}
Version: 4.10
Release: 1%{?dist}
Summary: C/C++ compiler cache
# See LICENSE.adoc for licenses of bundled codes
# blake3 is Apache-2.0
# minitrace.h is MIT
# span.hpp is BSL-1.0
# url.cpp/hpp is MIT
License: GPL-3.0-or-later AND Apache-2.0 AND BSL-1.0 AND MIT
@ -26,7 +25,6 @@ URL: http://ccache.dev/
Source0: https://github.com/ccache/ccache/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.sh.in
Source2: %{name}.csh.in
Patch1: ccache-unbundle.patch
BuildRequires: /usr/bin/asciidoctor
BuildRequires: cmake
@ -46,8 +44,8 @@ BuildRequires: clang clang-tools-extra
Requires: coreutils
# For groupadd
Requires(pre): shadow-utils
Provides: bundled(blake3) = 1.5.0
Provides: bundled(span-lite) = 0.10.3
Provides: bundled(blake3) = 1.5.1
Provides: bundled(span-lite) = 0.11.0
Provides: bundled(cxxurl)
%description
@ -59,11 +57,8 @@ being done again. The main focus is to handle the GNU C/C++ compiler
%prep
%setup -q
%patch -P1 -p1 -b .unbundle
find -name \*.[hc]pp \
-exec sed -i -E -e 's,third_party/(fmt/|httplib.h|tl/expected.hpp|xxhash.h),\1,' \
-e 's,third_party/doctest.h,doctest/doctest.h,' {} +
rm -r src/third_party/[ac-lo-tv-z]* src/third_party/minitrace.c
# win32-compat gets imported, but not used
rm -r src/third_party/{[ad-lo-tvy-z]*,cpp-httplib}
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
%{SOURCE1} > %{name}.sh
sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \
@ -236,6 +231,9 @@ getent group ccache >/dev/null || groupadd -r ccache || :
%changelog
* Sun Jun 02 2024 Orion Poplawski <orion@nwra.com> - 4.10-1
- Update to 4.10
* Sat May 11 2024 Kevin Fenzi <kevin@scrye.com> - 4.9.1-2
- rebuild for hiredis soname bump

View File

@ -1 +1 @@
SHA512 (ccache-4.9.1.tar.gz) = 0945d46aaa8f76098356bed0a1258d1c8b19564247acc34ca3d71e0bd12e7edf095ad43e23c7459c8174be8ca6569c671da09a864edc57b77113bc1d5602cd28
SHA512 (ccache-4.10.tar.gz) = 3bc57436483e789fdbb12f7c1ca0e7fe2c3437cebff9450b34f4584786d18fa6cb5906aac1cb1530a7bf3bf01198dcf088696a1e6dcba5cf56ba529d9fd3af4c