mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #7202 from HiassofT/le11-ccache4
update to ccache 4 and support building early package with local ccache
This commit is contained in:
commit
34b216c6e2
@ -103,6 +103,15 @@ VERBOSE="${VERBOSE:-yes}"
|
||||
# directory.
|
||||
CCACHE_CACHE_SIZE="10G"
|
||||
|
||||
# compression level for ccache
|
||||
# This option determines the level at which ccache will compress object files
|
||||
# using the real-time compression algorithm Zstandard. It only has effect if
|
||||
# compression is enabled (which it is by default). Zstandard is extremely fast
|
||||
# for decompression and very fast for compression for lower compression
|
||||
# levels. The default is 0. The value 0 means that ccache will choose a
|
||||
# suitable zstd level, currently 1.
|
||||
CCACHE_COMPRESSLEVEL="0"
|
||||
|
||||
# set addon paths
|
||||
if [ -z "$ADDON_PATH" ]; then
|
||||
if [ -n "$ADDON_PROJECT" ]; then
|
||||
|
@ -7,7 +7,7 @@ PKG_SHA256="b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.zlib.net"
|
||||
PKG_URL="https://zlib.net/fossils/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="cmake:host"
|
||||
PKG_DEPENDS_HOST="ccache:host cmake:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="A general purpose (ZIP) data compression library."
|
||||
PKG_TOOLCHAIN="cmake-make"
|
||||
|
@ -7,16 +7,29 @@ PKG_SHA256="3ea06164971edec7caa2045a1932d757c1815858e4c2b68c7ef812647535c23f"
|
||||
PKG_LICENSE="BSD/GPLv2"
|
||||
PKG_SITE="http://www.zstd.net"
|
||||
PKG_URL="https://github.com/facebook/zstd/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.zst"
|
||||
PKG_DEPENDS_HOST="ccache:host meson:host ninja:host"
|
||||
PKG_DEPENDS_HOST="cmake:host make:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="A fast real-time compression algorithm."
|
||||
# Override toolchain as meson and ninja are not built yet
|
||||
# and zstd is a dependency of ccache
|
||||
PKG_TOOLCHAIN="cmake-make"
|
||||
PKG_BUILD_FLAGS="+local-cc"
|
||||
|
||||
configure_package() {
|
||||
PKG_MESON_SCRIPT="${PKG_BUILD}/build/meson/meson.build"
|
||||
PKG_CMAKE_SCRIPT="${PKG_BUILD}/build/cmake/CMakeLists.txt"
|
||||
}
|
||||
|
||||
PKG_MESON_OPTS_HOST="-Dlegacy_level=0 \
|
||||
-Dbin_programs=false \
|
||||
-Dzlib=disabled \
|
||||
-Dlzma=disabled \
|
||||
-Dlz4=disabled"
|
||||
configure_host() {
|
||||
# custom cmake build to override the LOCAL_CC/CXX
|
||||
cp ${CMAKE_CONF} cmake-zstd.conf
|
||||
|
||||
echo "SET(CMAKE_C_COMPILER $CC)" >> cmake-zstd.conf
|
||||
echo "SET(CMAKE_CXX_COMPILER $CXX)" >> cmake-zstd.conf
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=cmake-zstd.conf \
|
||||
-DCMAKE_INSTALL_PREFIX=${TOOLCHAIN} \
|
||||
-DZSTD_LEGACY_SUPPORT=0 \
|
||||
-DZSTD_BUILD_PROGRAMS=OFF \
|
||||
-DZSTD_BUILD_TESTS=OFF \
|
||||
${PKG_CMAKE_SCRIPT%/*}
|
||||
}
|
||||
|
@ -3,21 +3,38 @@
|
||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="ccache"
|
||||
PKG_VERSION="3.7.12"
|
||||
PKG_SHA256="a02f4e8360dc6618bc494ca35b0ae21cea080f804a4898eab1ad3fcd108eb400"
|
||||
PKG_VERSION="4.7.4"
|
||||
PKG_SHA256="df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://ccache.dev/download.html"
|
||||
PKG_URL="https://github.com/ccache/ccache/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_HOST="make:host"
|
||||
PKG_DEPENDS_HOST="cmake:host make:host zstd:host"
|
||||
PKG_LONGDESC="A compiler cache to speed up re-compilation of C/C++ code by caching."
|
||||
# Override toolchain as ninja is not built yet
|
||||
PKG_TOOLCHAIN="cmake-make"
|
||||
PKG_BUILD_FLAGS="+local-cc"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="--with-bundled-zlib"
|
||||
configure_host() {
|
||||
# custom cmake build to override the LOCAL_CC/CXX
|
||||
cp ${CMAKE_CONF} cmake-ccache.conf
|
||||
|
||||
echo "SET(CMAKE_C_COMPILER $CC)" >> cmake-ccache.conf
|
||||
echo "SET(CMAKE_CXX_COMPILER $CXX)" >> cmake-ccache.conf
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=cmake-ccache.conf \
|
||||
-DCMAKE_INSTALL_PREFIX=${TOOLCHAIN} \
|
||||
-DENABLE_DOCUMENTATION=OFF \
|
||||
-DREDIS_STORAGE_BACKEND=OFF \
|
||||
-DZSTD_FROM_INTERNET=OFF \
|
||||
-DENABLE_TESTING=OFF \
|
||||
..
|
||||
}
|
||||
|
||||
post_makeinstall_host() {
|
||||
# setup ccache
|
||||
if [ -z "${CCACHE_DISABLE}" ]; then
|
||||
CCACHE_DIR="${BUILD_CCACHE_DIR}" ${TOOLCHAIN}/bin/ccache --max-size=${CCACHE_CACHE_SIZE}
|
||||
CCACHE_DIR="${BUILD_CCACHE_DIR}" ${TOOLCHAIN}/bin/ccache --set-config compression_level=${CCACHE_COMPRESSLEVEL}
|
||||
fi
|
||||
|
||||
cat > ${TOOLCHAIN}/bin/host-gcc <<EOF
|
||||
|
@ -8,9 +8,10 @@ PKG_SHA256="1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="https://cmake.org/"
|
||||
PKG_URL="https://cmake.org/files/v$(get_pkg_version_maj_min)/cmake-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="ccache:host pkg-config:host"
|
||||
PKG_DEPENDS_HOST="pkg-config:host"
|
||||
PKG_LONGDESC="A cross-platform, open-source make system."
|
||||
PKG_TOOLCHAIN="configure"
|
||||
PKG_BUILD_FLAGS="+local-cc"
|
||||
|
||||
configure_host() {
|
||||
../configure --prefix=${TOOLCHAIN} \
|
||||
|
@ -8,9 +8,10 @@ PKG_SHA256="50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://www.gnu.org/s/gettext/"
|
||||
PKG_URL="https://ftp.gnu.org/pub/gnu/gettext/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_HOST="ccache:host"
|
||||
PKG_DEPENDS_HOST="make:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="A program internationalization library and tools."
|
||||
PKG_BUILD_FLAGS="+local-cc"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="--disable-static --enable-shared \
|
||||
--disable-rpath \
|
||||
|
@ -7,8 +7,9 @@ PKG_SHA256="6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.freedesktop.org/software/pkgconfig/"
|
||||
PKG_URL="http://pkg-config.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="ccache:host gettext:host"
|
||||
PKG_DEPENDS_HOST="gettext:host"
|
||||
PKG_LONGDESC="A system for managing library compile/link flags that works with automake and autoconf."
|
||||
PKG_BUILD_FLAGS="+local-cc"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="--disable-silent-rules \
|
||||
--with-internal-glib --disable-dtrace \
|
||||
|
Loading…
x
Reference in New Issue
Block a user