diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-10-19 19:29:29 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-10-19 19:49:27 +0100 |
commit | b56cb58add4cebf0e0a8828a253fd193a9be262c (patch) | |
tree | 86aac57d7a1b4b77f5b97db6c671745781f82441 | |
parent | net-p2p/qbittorrent: Version bum (v4.3.0) (diff) | |
download | gentoo-b56cb58add4cebf0e0a8828a253fd193a9be262c.tar.gz gentoo-b56cb58add4cebf0e0a8828a253fd193a9be262c.tar.bz2 gentoo-b56cb58add4cebf0e0a8828a253fd193a9be262c.zip |
dev-util/ccache: bump up to 4.0
A few major changes:
- move from zlib to zstdd compression
- move from md4 to xxhash hash
- expanded license from GPL-3 to LGPL-3
- man page disappeared
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r-- | dev-util/ccache/Manifest | 1 | ||||
-rw-r--r-- | dev-util/ccache/ccache-4.0.ebuild | 66 | ||||
-rw-r--r-- | dev-util/ccache/files/ccache-4.0-avoid-run-user.patch | 18 | ||||
-rw-r--r-- | dev-util/ccache/files/ccache-4.0-objdump.patch | 12 |
4 files changed, 97 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index eb12073ed681..d86d278e7554 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -1,2 +1,3 @@ DIST ccache-3.7.11.tar.xz 354160 BLAKE2B 46fc5d65d6224bb796db7632b35ccca1089e5fed36eeb2ba231cf4c1aaa94be10bf0504f6ef565ce11673e527e09dee64583a764062ca7fea38364d790dd8cc1 SHA512 47b71b3ab4b89bf9b6f6d15941c22d2207b369922f51f9a8fbf4e86554325053dccce669e1c1ed3c0019a7e0a3d610f399e52d3fee68b56111aa7c1b24132c11 DIST ccache-3.7.12.tar.xz 354684 BLAKE2B b0b1028ede8206622c4b563cdc1351bdbe49ac11aa92d405c778af91db5bac029f7331371ef0a55bc3b1c7a0b60fbc5711277e048481bf0f4ad4b1be8acd3495 SHA512 0eb47869f86d36b3e5fad0d5073973f0444f3efe23fd14469a9e05154ea219228443098b1c5e4a8a0c5c78b4bfa7623735b50ebd6b8b4d0626766061850d6a62 +DIST ccache-4.0.tar.xz 383264 BLAKE2B ef4ca19860e2a0d313354cbd59a9eff441e86663820e8233dcf4b45a008ffa330b4a4c22eb11f3c6a7a98950d7d247034e60eb71c84ec4471f60fa19591651bd SHA512 1e55767bc2919109ae3c9b74f0adcd518e7e11df45c3981b2e9f8b04a780f9730457eeef1df137c65ab20e0959600c5317f06b58ffb82f5806c7c9f6cc305715 diff --git a/dev-util/ccache/ccache-4.0.ebuild b/dev-util/ccache/ccache-4.0.ebuild new file mode 100644 index 000000000000..66c0f19279a3 --- /dev/null +++ b/dev-util/ccache/ccache-4.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="fast compiler cache" +HOMEPAGE="https://ccache.dev/" +SRC_URI="https://github.com/ccache/ccache/releases/download/v${PV}/ccache-${PV}.tar.xz" + +LICENSE="GPL-3 LGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="test" + +DEPEND="" +RDEPEND="${DEPEND} + dev-util/shadowman + sys-apps/gentoo-functions" +# clang-specific tests use dev-libs/elfutils to compare objects for equality. +# Let's pull in the dependency unconditionally. +DEPEND+=" + test? ( dev-libs/elfutils )" + +RESTRICT="!test? ( test )" + +DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-3.5-nvcc-test.patch + "${FILESDIR}"/${PN}-4.0-objdump.patch + "${FILESDIR}"/${PN}-4.0-avoid-run-user.patch +) + +src_prepare() { + cmake_src_prepare + + sed \ + -e "/^EPREFIX=/s:'':'${EPREFIX}':" \ + "${FILESDIR}"/ccache-config-3 > ccache-config || die + + # mainly used in tests + tc-export CC OBJDUMP +} + +src_install() { + # TODO: install manpage: https://github.com/ccache/ccache/issues/684 + cmake_src_install + + dobin ccache-config + insinto /usr/share/shadowman/tools + newins - ccache <<<"${EPREFIX}/usr/lib/ccache/bin" +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} && ${ROOT:-/} == / ]] ; then + eselect compiler-shadow remove ccache + fi +} + +pkg_postinst() { + if [[ ${ROOT:-/} == / ]]; then + eselect compiler-shadow update ccache + fi +} diff --git a/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch new file mode 100644 index 000000000000..07da25c6c341 --- /dev/null +++ b/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch @@ -0,0 +1,18 @@ +Gentoo's sandbox does not whitelist this path by default yet. +TODO: bug link. + +Until we have a sandbox whitelisting the path let's rely on ccache's default. +--- a/src/Config.cpp ++++ b/src/Config.cpp +@@ -833,11 +833,5 @@ Config::check_key_tables_consistency() + std::string + Config::default_temporary_dir(const std::string& cache_dir) + { +-#ifdef HAVE_GETEUID +- std::string user_tmp_dir = fmt::format("/run/user/{}", geteuid()); +- if (Stat::stat(user_tmp_dir).is_directory()) { +- return user_tmp_dir + "/ccache-tmp"; +- } +-#endif + return cache_dir + "/tmp"; + } diff --git a/dev-util/ccache/files/ccache-4.0-objdump.patch b/dev-util/ccache/files/ccache-4.0-objdump.patch new file mode 100644 index 000000000000..af48e997f50b --- /dev/null +++ b/dev-util/ccache/files/ccache-4.0-objdump.patch @@ -0,0 +1,12 @@ +Allow ${CHOST}-objdump (or any other override) +--- a/test/run ++++ b/test/run +@@ -133,7 +133,7 @@ objdump_cmd() { + # back to brute force and ignorance. + strings "$1" + else +- objdump -W "$file" ++ ${OBJDUMP-objdump} -W "$file" + fi + } + |