summaryrefslogtreecommitdiff
path: root/dev-util/ccache
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-17 10:09:17 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-17 10:09:17 +0100
commitcef073efdce758fc34155284a2f489d79cdcafa9 (patch)
tree4c027ea9ce1cc79a4548cb82320ea904ab4858b1 /dev-util/ccache
parent43f85394ba834267589a4e6478ef419d40e22503 (diff)
gentoo auto-resync : 17:05:2023 - 10:09:17
Diffstat (limited to 'dev-util/ccache')
-rw-r--r--dev-util/ccache/Manifest2
-rw-r--r--dev-util/ccache/ccache-4.8-r2.ebuild130
-rw-r--r--dev-util/ccache/files/ccache-4.8-avoid-run-user.patch34
3 files changed, 166 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 0a2888adb7c1..209ed3f85dc5 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -2,6 +2,7 @@ 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.2-avoid-run-user.patch 1042 BLAKE2B 192a0c0fa957b8c1e9c12984a898953f84b2ff14b38206e92cf33e6f80d5c25cf4800add72a3e1d38ff0d6a6c22d071bc7e46ca324662e478f2ec75df632f1f2 SHA512 2d2269021e5eab22d144e81318e620ef0191a34e2de15ff78e2019ac13fddc277802df1387b4aa673649662244c0c2c8c76003af7247f00287dafa6c460aa18f
+AUX ccache-4.8-avoid-run-user.patch 1270 BLAKE2B 2ecdef4b319a2d3c2fd4740667ae22b6134d977b252d9d022acfab723cc9c2cd7f11ea4f2674d5461fba5e3cf5574de39a3df840451670b68689569b819f2cb3 SHA512 898b0d7041af9765ac2a5f26099256e96c881d39452eb0cc90d859f9f64dab2d31d673d6b538958337a6f7848eb2ebf309064e96c37567e271a42e46c948b0ea
AUX ccache-config-3 2147 BLAKE2B 6e703e12b6a2f83b838f8b1d1e534de3366b6e2994990b30c381b0df28be9c0ae7c0f1d7325282e97ca54881171846c13945b264bd4a793785ff1a19d0941669 SHA512 05d512b001b6a2fdc947d10d810c89683144080a060c24a37422e9b587594e1ee42fa1d7607461571f196819dae92146d861e8ae116e9226e1ff97ea035b3003
DIST ccache-4.6.3.tar.xz 531184 BLAKE2B b23c22876cd3f31bcd67b9120fd5e605441508478f40267d654a281c00e28e3021b135cda04ace6da9fb39d3c144c92a259e69287be73043730240f32982b6a9 SHA512 b8cee0a466e76d5551c9785836c66ac5a98b51624e9f919adf820265ec19c3429c99ed332aecdafcd03cf32c71074121c63ec56762259921c3762a011be24966
DIST ccache-4.6.3.tar.xz.asc 833 BLAKE2B 064d7bdf474540992180372c4c011b5bdeb98834803abcdec474f0988cac0339281c388545f9d28ae22b740268c338e092d618c0a4664c62c307d9a9ec1dff5e SHA512 ecba59c8089848737f37ef9bae4f631fae7eb2fedfc62879cd181ce37d412fbd883cc9dee52850757258009d75ef06477441cbf17d39db7b9d955300737e7f89
@@ -13,4 +14,5 @@ DIST ccache-4.8.tar.xz.asc 833 BLAKE2B 4a646db5b7a220a21ad93a02ea4bad23a666ad116
EBUILD ccache-4.6.3.ebuild 2575 BLAKE2B c8b4113239bf1ea5d2b394f68e0f2dc623a602bf082c72cb4e5c38640b83e9909e69324a894a9a79bd88610a36451cee2ea35ddfce7060794b52fb8923b8fa95 SHA512 37fb4a65048e332d928279eccb5bcebeb20ab61379898aa548eb5ced5a858b680cd844f2f679d4ea528af54f21ca663614112dc45b937b8da38b1718fa919f2e
EBUILD ccache-4.7.4.ebuild 2489 BLAKE2B c96ba952f7f90c54812fcc1ead1bc4adf7b036937b2d80a05c0bebc54cdf3cdaac456e8918b6f4905cb38c19aa98d9c912624d22bfd76c0ae35d32e8c7cea6dd SHA512 90802b6ff902bb7cced6947824d38ea90bf8da66b48dec9cc7f1584193f4fb3f4d50217685306e1504118a55a46c6680f27b6a59368c835058171ef33f772e4b
EBUILD ccache-4.8-r1.ebuild 3607 BLAKE2B 591692c06da7e031ce7811e057ea8d638252bd9f6577074230dfb31d7da1977a2d9da8ae3f5eb8665bc48d9ca13cb54fd7952185817482bb4139828fc9167690 SHA512 f2d6a6745589b6a7fbc6998a6c9e296da3f01e05a61ead453315166d7cda335cf0028b1db7fee3814e5b62c0e1312ebde1eb587fba395270793b5c1a5473724c
+EBUILD ccache-4.8-r2.ebuild 3653 BLAKE2B e13133a7ddfa243ba9b36125709fb452923ad6119b9c3af2b872826f7f23fd077d850190ec3065337418d1a47e960c4231695897ef3ed3fe0aec57d87871582b SHA512 5d466f0935c26f9ed92ff9d8c2dc5c1710ccbdc753439f1c9f9b1fb0577c06a7477d6670fecae1454ee4b0fdb4ffb6eeccb34f2c21917c926d07c337151f4e81
MISC metadata.xml 710 BLAKE2B 0a93cf3dd4222eb2fd500c3cafdff3c01eacecc489a471270922fc5dd1daf58cd1398ddfb7ab4d271a6e84d5a3da5c3e7a341b1e7994af7b10fd432318de7c5e SHA512 dbfa6b8d8f435e25887b25ce25df65184a7f315986ee60a1c723d0e6592ca73bc7414b6650014812eb882e7e39bed953eaa21139a414043c50c018a7b780e6f1
diff --git a/dev-util/ccache/ccache-4.8-r2.ebuild b/dev-util/ccache/ccache-4.8-r2.ebuild
new file mode 100644
index 000000000000..1702d6d4b968
--- /dev/null
+++ b/dev-util/ccache/ccache-4.8-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# XXX: We don't use CCACHE_* for these vars like we do in e.g. cmake/libabigail/qemu
+# because Portage unsets them. Aaaah!
+#
+# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-ccache-docs
+# Set to 1 if prebuilt, 0 if not
+# (the construct below is to allow overriding from env for script)
+: ${MY_DOCS_PREBUILT:=1}
+
+MY_DOCS_PREBUILT_DEV=sam
+MY_DOCS_VERSION=$(ver_cut 1-2)
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+# See bug #784815
+MY_DOCS_USEFLAG="+doc"
+
+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 )"
+if [[ ${MY_DOCS_PREBUILT} == 1 ]] ; then
+ SRC_URI+=" !doc? ( https://dev.gentoo.org/~${MY_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${MY_DOCS_VERSION}-docs.tar.xz )"
+ MY_DOCS_USEFLAG="doc"
+fi
+
+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="${MY_DOCS_USEFLAG} 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.8-avoid-run-user.patch
+)
+
+src_unpack() {
+ # Avoid aborting on the doc tarball
+ if use verify-sig ; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
+ fi
+
+ default
+}
+
+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
+ -DHIREDIS_FROM_INTERNET=OFF
+ -DREDIS_STORAGE_BACKEND=$(usex redis)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dobin ccache-config
+ insinto /usr/share/shadowman/tools
+ newins - ccache <<<"${EPREFIX}/usr/lib/ccache/bin"
+
+ # If USE=doc, there'll be newly generated docs which we install instead.
+ if ! use doc && [[ ${MY_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${MY_DOCS_VERSION}-docs/doc/*.[0-8]
+ fi
+}
+
+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.8-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.8-avoid-run-user.patch
new file mode 100644
index 000000000000..51371464509c
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.8-avoid-run-user.patch
@@ -0,0 +1,34 @@
+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.)
+
+And see https://github.com/ccache/ccache/discussions/1086#discussioncomment-3327565.
+
+https://bugs.gentoo.org/837362 for 4.6 issue.
+https://bugs.gentoo.org/883799 and https://bugs.gentoo.org/887019 fo 4.8 issue.
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -1147,17 +1147,5 @@ Config::check_key_tables_consistency()
+ std::string
+ Config::default_temporary_dir() const
+ {
+- static const std::string run_user_tmp_dir = [] {
+-#ifndef _WIN32
+- const char* const xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
+- if (xdg_runtime_dir && Stat::stat(xdg_runtime_dir).is_directory()) {
+- auto dir = FMT("{}/ccache-tmp", xdg_runtime_dir);
+- 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 : m_cache_dir + "/tmp";
++ return m_cache_dir + "/tmp";
+ }