summaryrefslogtreecommitdiff
path: root/dev-util/ccache
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-util/ccache
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-util/ccache')
-rw-r--r--dev-util/ccache/Manifest6
-rw-r--r--dev-util/ccache/ccache-4.6-r1.ebuild2
-rw-r--r--dev-util/ccache/ccache-4.6.1.ebuild93
-rw-r--r--dev-util/ccache/files/ccache-4.6.1-avoid-run-user.patch28
4 files changed, 127 insertions, 2 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 319410e926c4..5780bc5e57c8 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -2,10 +2,14 @@ AUX ccache-3.5-nvcc-test.patch 262 BLAKE2B b33b6372e8e6c597d7ed6c781f0a3ac22c435
AUX ccache-4.0-objdump.patch 271 BLAKE2B e641f1acef1e439660753c781d5760ab2a2530ce8dbcfacb1c3835523ec41ff35701536698827f11c39c1e06641fcf6b57d374944ecb44888a66c7860f97b813 SHA512 cc53f44b173c1ae66258aa573182ae936304dac9daf8489a20c45dbe3d554df207bd93b370da2c86b22fbc4edf5fd954f84fd18812d97d41a88ea4c7926f117c
AUX ccache-4.1-avoid-run-user.patch 823 BLAKE2B de70e7b3f687f099e8b6eafb069d725350bb32c1ca39e42223113a5cbd79d6be7edb0560d6f199b0d43d20f4c99a5a5d888d96b8ec74d678e9793011e2463613 SHA512 2f3351af3ee755ff44802239cddd16e5990edd067d44228707ba2cb96f44faf26ce220b2e9e9994a45baac11a54bf778ba48c27fdd526e59a889638a84cfd5c7
AUX ccache-4.6-avoid-run-user.patch 940 BLAKE2B 2d8e6f4ddef3ca407b9b2054c52ea5b2b2fa19d0ea8de3c88b632b2f3014d2764c8f36270589d8a2b26917be5a59e22107b2bbd75af7938d9d181f303ab1a1fc SHA512 b2c4643f94c6da34641b92b523879d05d0b1d07b2d01d49d3c8f13a8cd208b253eb91b6f1d916ab959c347e67101a3a18a0ef343c754614893999f6781b60ef5
+AUX ccache-4.6.1-avoid-run-user.patch 974 BLAKE2B d2f65369f9a482d2b208ba936a6f069e1efe5d06ef85cec16d9ff37897b2fd3e5d24844685b29f972eded93f966922b08979c20aae72dbeb69472ae1047cc11f SHA512 4ae16226d09259acd630071df5b33aaba9d4ba96b42d69a857603ad23bfad5dae707ad292cb416c94b65e7b3f46df52fe9b2ee216b4582bd8a7c5c8fe3c0f508
AUX ccache-config-3 2147 BLAKE2B 6e703e12b6a2f83b838f8b1d1e534de3366b6e2994990b30c381b0df28be9c0ae7c0f1d7325282e97ca54881171846c13945b264bd4a793785ff1a19d0941669 SHA512 05d512b001b6a2fdc947d10d810c89683144080a060c24a37422e9b587594e1ee42fa1d7607461571f196819dae92146d861e8ae116e9226e1ff97ea035b3003
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
EBUILD ccache-4.5.1.ebuild 2295 BLAKE2B 8b89808a850d5bb512a9672d719a800c9f17fd23dddc3bb5b1c0626b4160910bead0ca27137d734340ca9a60783349b97730376d5cb35473698b843203758d7c SHA512 96c0b4dbe479a0383fb28fda5f262e4490625e0ba137e5435ba8ee9702d14fe68c42a04a462792ff96aa176e3676a819602e2e50cb989d5061842c188d8fc5ba
-EBUILD ccache-4.6-r1.ebuild 2574 BLAKE2B a026e2ee397cdade55f377346ddefca9523b50a0a6f6ee8af5bc575fa073b40fdc8a74ed33cc84d3f01377ad2720342294a12f9e1fc5187ac4611217169e5a4c SHA512 adb38a463d5081606e25e21d1370b4ac5f6ff87dd0da051aa49be283d65109cc9253887fd3386271f6b984a9f3d2e8748c1a8d34e6021e0ac820e75851fac8b4
+EBUILD ccache-4.6-r1.ebuild 2581 BLAKE2B 76559b8e1f17ecadc22c35224e1c813d3d5b25d5faf13065c67bf0324a3f84dd5710afad9c9b35f6931ee6d1319a549c112b20622eaf0605ebd11e9ff7136805 SHA512 57f833c8073f7c05da3527db3f0d5cf036de72fb196407c4f19bdbc315b57817bb3b13af6d63c001a84d260bcedfd9438a86234b0a557b1fe304a685ad671a57
+EBUILD ccache-4.6.1.ebuild 2583 BLAKE2B 75ccd4e760f1cb6a6c8bfa25483de39f34de227fa7fd7c2ea1d3924e778262b1c70120836c47daf8b68fc1a46a8b55782827d549cccbbc35dd2c1bd832400138 SHA512 a774cdb3c65262bf298107484f9d9bf0caddf7164596247563056bb9dcb68450aa6406b5537b54e016edfd9b5b17e43e62407d6439bf5bc6df9a0bb34bfd228d
MISC metadata.xml 632 BLAKE2B 54a81f78ca7731afb01f2ca1d377d9aa722a368d4177c8cd34a505c1ceaec28539718da6665ffcb5a06af544d518d7806c8db4338b0ab473d56cfff39fbac9bb SHA512 bc9037810d55b532289cad47b2249efb9cb81a9acd48466461efba65487ffade1269ff00f271a4cf1ee8625906c1b3abca6e5244224c55a527aea75cc6eb5922
diff --git a/dev-util/ccache/ccache-4.6-r1.ebuild b/dev-util/ccache/ccache-4.6-r1.ebuild
index d3c7ceee833f..046476bcf614 100644
--- a/dev-util/ccache/ccache-4.6-r1.ebuild
+++ b/dev-util/ccache/ccache-4.6-r1.ebuild
@@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( https://github.com/ccache/ccache/releases/download/v${P
LICENSE="GPL-3 LGPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+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 )"
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";
+ }