diff options
author | Matt Turner <mattst88@gentoo.org> | 2022-05-20 14:59:57 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2022-05-20 15:25:19 -0400 |
commit | fe611282019feabd47b3bf0cca5e7630225666bb (patch) | |
tree | bcadfaa240038b36abf1374ca636f05ec22ebc52 | |
parent | net-wireless/gnome-bluetooth: enable py3.10 and disable py3.7 (diff) | |
download | gentoo-fe611282019feabd47b3bf0cca5e7630225666bb.tar.gz gentoo-fe611282019feabd47b3bf0cca5e7630225666bb.tar.bz2 gentoo-fe611282019feabd47b3bf0cca5e7630225666bb.zip |
dev-util/ccache: Version bump to 4.6.1
Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r-- | dev-util/ccache/Manifest | 2 | ||||
-rw-r--r-- | dev-util/ccache/ccache-4.6.1.ebuild | 93 | ||||
-rw-r--r-- | dev-util/ccache/files/ccache-4.6.1-avoid-run-user.patch | 28 |
3 files changed, 123 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index ddf19bb26242..7a1b44c369a5 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -1,3 +1,5 @@ DIST ccache-4.5.1.tar.xz 513008 BLAKE2B 637b6d36c169bc742efd165569879a47405c2884918ed3731186e8176c926fa0e8e9cd648756d501ae3b741c671e2399cfdb0bc216410bc64826d4fe00d69498 SHA512 267dcc6b41270eeffe029d13e58eca3399540037cc19dc58bb5ebeb7dcc51b201fbde91c9824eaee5b14fbf28bb7304b78d1340118bc72e56b80ff148575bc56 +DIST ccache-4.6.1.tar.xz 529040 BLAKE2B b4c1cae8b0c836c9e562488c79524ddbba4c995946e16f87c9b856e32961b454dd205bacdb030c283477be66d357b0fb5e67c9ad38715359b73f714aa73baee9 SHA512 361427ccecd74e8c25ca6a98ef3d3c125d81862196767eb383f6f8159fed8e1695cd5bc8731cb591c23c55352f0114a088b32a673717711efbfbb178a6c08c82 +DIST ccache-4.6.1.tar.xz.asc 833 BLAKE2B 2f9ca555a014cfc9dbc354f43d4db0d79f89a6f84c57a7b9452324854abb39cd21af1071404278c694212f38c3975c7fa702f7cc475e44f75e9b132e53088d5d SHA512 5494844f99232c5bc21f52db461f2a03d706e38bd73e147ebda89a4ce57fc2b80a920e42f7de539b9a5837ac8b515b309a29e045e479910c95a95d3c839b837d DIST ccache-4.6.tar.xz 526084 BLAKE2B 2e43d0a3a004117e8c535ecb2f09c1273f5bec2b3704710abbc3034749438df33ef27db37d5bfbd48d83d60bdd3f738d3dbf356eff21166fee03780969dd1f24 SHA512 3a53fedfa91034ee876e1a4a672de25498fe53c6c80901bd4976049eb35e0479275ceb6627f0e8cf76d677d041d216f731daf4bad142e454e775b5e7f05e3e4e DIST ccache-4.6.tar.xz.asc 833 BLAKE2B e0fc7677087006e3c6ac2bb7285915a56f233b4058c738c9d5967d29baf62b1b072ad2da4bf12f076440c68f39be77333d001d68703c32e26bd88a42b9e3ce71 SHA512 af09ffcdbba5e1e26047c7692dd0cf61f07869720d5849f59cbc0fe0f61c11aa419226d4d05061d23b5a03e8ec995e4d0e5af398af096bd19dbe35bf460eee0c diff --git a/dev-util/ccache/ccache-4.6.1.ebuild b/dev-util/ccache/ccache-4.6.1.ebuild new file mode 100644 index 000000000000..95ae40faf2de --- /dev/null +++ b/dev-util/ccache/ccache-4.6.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/joelrosdahl.asc +inherit cmake toolchain-funcs flag-o-matic verify-sig + +DESCRIPTION="Fast compiler cache" +HOMEPAGE="https://ccache.dev/" +SRC_URI="https://github.com/ccache/ccache/releases/download/v${PV}/${P}.tar.xz" +SRC_URI+=" verify-sig? ( https://github.com/ccache/ccache/releases/download/v${PV}/${P}.tar.xz.asc )" + +LICENSE="GPL-3 LGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +# Enable 'static-c++' by default to make 'gcc' ebuild Just Work: bug #761220 +IUSE="doc redis +static-c++ test" +RESTRICT="!test? ( test )" + +DEPEND="app-arch/zstd:= + redis? ( dev-libs/hiredis:= )" +RDEPEND="${DEPEND} + dev-util/shadowman + sys-apps/gentoo-functions" +# Needed for eselect calls in pkg_* +IDEPEND="dev-util/shadowman" + +# clang-specific tests use dev-libs/elfutils to compare objects for equality. +# Let's pull in the dependency unconditionally. +DEPEND+=" test? ( dev-libs/elfutils )" +BDEPEND=" doc? ( dev-ruby/asciidoctor ) + verify-sig? ( sec-keys/openpgp-keys-joelrosdahl )" + +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.6.1-avoid-run-user.patch +) + +src_prepare() { + cmake_src_prepare + + sed \ + -e "/^EPREFIX=/s:'':'${EPREFIX}':" \ + "${FILESDIR}"/ccache-config-3 > ccache-config || die +} + +src_configure() { + # Mainly used in tests + tc-export CC OBJDUMP + + # Avoid dependency on libstdc++.so. Useful for cases when + # we would like to use ccache to build older gcc which injects + # into ccache locally built (possibly outdated) libstdc++ + # See bug #761220 for examples. + # + # Ideally gcc should not use LD_PRELOAD to avoid this type of failure. + use static-c++ && append-ldflags -static-libstdc++ + + local mycmakeargs=( + -DENABLE_DOCUMENTATION=$(usex doc) + -DENABLE_TESTING=$(usex test) + -DZSTD_FROM_INTERNET=OFF + -DREDIS_STORAGE_BACKEND=$(usex redis) + ) + + use redis && mycmakeargs+=( -DHIREDIS_FROM_INTERNET_DEFAULT=OFF ) + + cmake_src_configure +} + +src_install() { + 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} && -z ${ROOT} ]] ; then + eselect compiler-shadow remove ccache + fi +} + +pkg_postinst() { + if [[ -z ${ROOT} ]] ; then + eselect compiler-shadow update ccache + fi +} diff --git a/dev-util/ccache/files/ccache-4.6.1-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.6.1-avoid-run-user.patch new file mode 100644 index 000000000000..9dce69c63518 --- /dev/null +++ b/dev-util/ccache/files/ccache-4.6.1-avoid-run-user.patch @@ -0,0 +1,28 @@ +Gentoo's sandbox does not whitelist this path by default yet. + +(4.1 update: +https://github.com/ccache/ccache/issues/984 +https://github.com/ccache/ccache/issues/1044 +https://github.com/ccache/ccache/commit/a0edd4294f6a5a2d3f0c7b01273736f975f250e1 +https://github.com/ccache/ccache/commit/ef2e922f9642f943199138447b29ec53fa63ea68 +... gets us closer, but not there yet.) + +https://bugs.gentoo.org/837362 for 4.6 issue. +--- a/src/Config.cpp ++++ b/src/Config.cpp +@@ -1039,14 +1039,5 @@ Config::check_key_tables_consistency() + std::string + Config::default_temporary_dir(const std::string& cache_dir) + { +- static const std::string run_user_tmp_dir = [] { +-#ifdef HAVE_GETEUID +- auto dir = FMT("/run/user/{}/ccache-tmp", geteuid()); +- if (Util::create_dir(dir) && access(dir.c_str(), W_OK) == 0) { +- return dir; +- } +-#endif +- return std::string(); +- }(); +- return !run_user_tmp_dir.empty() ? run_user_tmp_dir : cache_dir + "/tmp"; ++ return cache_dir + "/tmp"; + } |