* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2020-03-24 22:30 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-03-24 22:30 UTC (permalink / raw
To: gentoo-commits
commit: 650d7b15773aea3eda20f2b870ad3266ddeefa6d
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 24 22:27:06 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Mar 24 22:29:55 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=650d7b15
dev-util/ccache: backport workaround for /dev/null clobber
In bug #712080 'hard_link = true' mode of ccache unlinked /dev/null
as ccache was running as root. This workaround allows /dev/null
to survive. Other special files still stay affected.
Bug: https://bugs.gentoo.org/712080
Package-Manager: Portage-2.3.95, Repoman-2.3.21
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/ccache-3.7.8-r1.ebuild | 71 +++++++++++++++++++++++
dev-util/ccache/files/ccache-3.7.8-dev-null.patch | 57 ++++++++++++++++++
2 files changed, 128 insertions(+)
diff --git a/dev-util/ccache/ccache-3.7.8-r1.ebuild b/dev-util/ccache/ccache-3.7.8-r1.ebuild
new file mode 100644
index 00000000000..c84c0678c54
--- /dev/null
+++ b/dev-util/ccache/ccache-3.7.8-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
+IUSE="test"
+
+DEPEND="app-arch/xz-utils
+ sys-libs/zlib"
+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 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-nvcc-test.patch
+ "${FILESDIR}"/${PN}-3.7.8-dev-null.patch
+)
+
+src_prepare() {
+ default
+
+ sed \
+ -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
+ "${FILESDIR}"/ccache-config-3 > ccache-config || die
+}
+
+src_configure() {
+ econf --without-bundled-zlib
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_test() {
+ emake check V=1
+}
+
+src_install() {
+ DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
+ default
+
+ 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-3.7.8-dev-null.patch b/dev-util/ccache/files/ccache-3.7.8-dev-null.patch
new file mode 100644
index 00000000000..389f9e3a1e2
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.7.8-dev-null.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/712080
+
+From 9a794689a8ba47e79c96d6c370976448b756973c Mon Sep 17 00:00:00 2001
+From: Joel Rosdahl <joel@rosdahl.net>
+Date: Sun, 22 Mar 2020 14:30:23 +0100
+Subject: [PATCH] Disable hard link mode when the output object file is
+ /dev/null
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When hard link mode is enabled, ccache ≥3.6 unlinks the output file
+before writing to it as a workaround for a bug in Clang (#331). This
+unfortunately means that /dev/null will be removed when building as root
+(don’t do that, BTW) with hard link mode enabled and /dev/null as the
+the output file. A similar problem exists if the dependency file is
+/dev/null, regardless of hard link mode.
+
+Fix this by not unlinking the output file if it’s /dev/null and by not
+copying files to /dev/null at all. (There is no need to handle other
+non-regular output files since /dev/null is the only allowed non-regular
+output file.)
+
+Fixes #564.
+---
+ src/ccache.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/ccache.c b/src/ccache.c
+index 6e9da51..b9bafac 100644
+--- a/src/ccache.c
++++ b/src/ccache.c
+@@ -1299,6 +1299,11 @@ move_file_to_cache_same_fs(const char *source, const char *dest)
+ static void
+ do_copy_or_link_file_from_cache(const char *source, const char *dest, bool copy)
+ {
++ if (str_eq(dest, "/dev/null")) {
++ cc_log("Skipping copy from %s to %s", source, dest);
++ return;
++ }
++
+ int ret;
+ bool do_link = !copy && conf->hard_link && !file_is_compressed(source);
+ if (do_link) {
+@@ -1432,7 +1437,8 @@ to_cache(struct args *args, struct hash *depend_mode_hash)
+ args_add(args, "-o");
+ args_add(args, output_obj);
+
+- if (conf->hard_link) {
++ if (conf->hard_link && !str_eq(output_obj, "/dev/null")) {
++ // This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=39782.
+ x_unlink(output_obj);
+ }
+
+--
+2.26.0
+
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2024-05-30 2:09 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2024-05-30 2:09 UTC (permalink / raw
To: gentoo-commits
commit: fe3f4d51550c80fe7bb55548665bb44434731283
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 30 02:09:03 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 30 02:09:12 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe3f4d51
dev-util/ccache: add 4.10
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/Manifest | 3 +
dev-util/ccache/ccache-4.10.ebuild | 141 +++++++++++++++++++++
.../ccache/files/ccache-4.10-avoid-run-user.patch | 34 +++++
.../files/ccache-4.10-unittest-httplib.patch | 12 ++
4 files changed, 190 insertions(+)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index ac00ffd780a6..e53c67e2f5fa 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,3 +1,6 @@
+DIST ccache-4.10-docs.tar.xz 82900 BLAKE2B 0d0ef988bb21bc05642c2d5ea42bdf9c87c190464d3bddc08a8bf281b003670a50a07a88bf31731a781d5454be09b87168bc8df3b239b93f4e3d3e3f667e9094 SHA512 c1030e76dea6eaeed5548dda80a766bb9c944f8e1223157eb7a227f08f80f48a8fece4e1a99beced4c6075b40ec7de3df662111c95f9390624f6e9a3b04c1083
+DIST ccache-4.10.tar.xz 411272 BLAKE2B 55e4efa41a53a664e8dfa25cd2b21dda80bf7847c467cf361058aaf06425a5c494d9e5b71e70f7d9327a6d57672af271946ad4e24fbd99f49c0bb8c256a9a2a5 SHA512 8bc8451a5e66300cb26ef7c1348d1b47e164ede17eab7f5f857a584a9def599c5c752d5591017a5e5b9673f108bb7a4a5bd59368e379fed9531e833fca8808a4
+DIST ccache-4.10.tar.xz.asc 833 BLAKE2B 4cdd6ce059ab54dca39365120b74e675a5a8c16e280f2e812d7a81feecda4283b63f84bf921d8b18493e348de38850facc95d48f0631e9ae46f33d7154a01f21 SHA512 faa3177d07a63746fe1dac1e748124d85207aa51d55894523e88074bf3b02deba7e961d2f7de48265acc6898bdd083bb48cb65631b02d9f7bdb7a27364d0fc4c
DIST ccache-4.8-docs.tar.xz 80280 BLAKE2B e8e00dd10a00670ff3a0c3f5ab0966469fa5246de64724e24d0287020d4636fb5a1f59421aaa094d05b88bd20efd2a4a06e46dfb957bcf77ad2ea61fd02551c9 SHA512 e0036a7f86b458028c6e24158f95b62e40d9f659031e16adc59c067096bb728f1cb583a2edecaf2118f15b8e00f028fa6f1cfa2466fba76b7c870cca93a883eb
DIST ccache-4.8.3.tar.xz 569724 BLAKE2B 53211db0e516eea9739b8f05bf6a3db678b4b5cff7af741469360556da20a320e4a40253ca9e51568045a394d3497b428413ff6cf77f4273aa4906357b427d1f SHA512 e0e344cd215de67fe060b36fb1b902bab61454477624fbe41d2ec57fdd721cec9c8920ca834f0ef0ccfeedb961b17143f18197497557887d88911ff66e330478
DIST ccache-4.8.3.tar.xz.asc 833 BLAKE2B e800b7bdce705db3ced97f0fe008e8391811f9c7c49e815b6cd2cf220cf1107f3941d29d7bcdd10f79da4e6cad9766243e482011aeb5a170e1c5920b6ebdd726 SHA512 2e2298a3cf800d9de669f560269bd07ca2b76f761198af10f7174759ea95a23518dedce83f481bdd392bb60adbd736e5dd2c21af88beb761c0f589f685737586
diff --git a/dev-util/ccache/ccache-4.10.ebuild b/dev-util/ccache/ccache-4.10.ebuild
new file mode 100644
index 000000000000..cf2714cb487b
--- /dev/null
+++ b/dev-util/ccache/ccache-4.10.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2024 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=/usr/share/openpgp-keys/joelrosdahl.asc
+inherit cmake toolchain-funcs flag-o-matic prefix 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
+
+# https://ccache.dev/license.html
+# ccache, blake3, NonstdSpan, tl-expected
+LICENSE="GPL-3+ || ( CC0-1.0 Apache-2.0 ) Boost-1.0 CC0-1.0"
+LICENSE+=" elibc_mingw? ( LGPL-3 ISC PSF-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~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 )"
+
+# TODO: package NonstdSpan, TlExpected
+# TODO: figure out why blake3 can't be found
+# TODO: upstream httplib patch
+DEPEND="
+ >=app-arch/zstd-1.3.4:=
+ >=dev-cpp/cpp-httplib-0.10.6:=
+ >=dev-libs/libfmt-8.0.0:=
+ >=dev-libs/xxhash-0.8.0
+ redis? ( >=dev-libs/hiredis-0.13.3:= )
+"
+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.
+BDEPEND="
+ doc? ( dev-ruby/asciidoctor )
+ test? (
+ >=dev-cpp/doctest-2.4.6
+ dev-libs/elfutils
+ )
+ 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.10-avoid-run-user.patch
+ "${FILESDIR}"/${PN}-4.10-unittest-httplib.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
+
+ cp "${FILESDIR}"/ccache-config-3 ccache-config || die
+ eprefixify ccache-config
+}
+
+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)
+ -DDEPS=LOCAL
+ -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.10-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.10-avoid-run-user.patch
new file mode 100644
index 000000000000..d60cc365f25d
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.10-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/ccache/Config.cpp
++++ b/src/ccache/Config.cpp
+@@ -1193,17 +1193,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 && DirEntry(xdg_runtime_dir).is_directory()) {
+- auto dir = FMT("{}/ccache-tmp", xdg_runtime_dir);
+- if (fs::create_directories(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";
+ }
diff --git a/dev-util/ccache/files/ccache-4.10-unittest-httplib.patch b/dev-util/ccache/files/ccache-4.10-unittest-httplib.patch
new file mode 100644
index 000000000000..2689ba7fcbde
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.10-unittest-httplib.patch
@@ -0,0 +1,12 @@
+TODO: send upstream (in Gentoo, we don't rename it to cpp-httplib, so need to check for that as a library too)
+--- a/cmake/FindCppHttplib.cmake
++++ b/cmake/FindCppHttplib.cmake
+@@ -12,7 +12,7 @@ else()
+ if(NOT "${CMAKE_MATCH_0}" STREQUAL "" AND "${_cpphttplib_version_string}" VERSION_GREATER_EQUAL "${CppHttplib_FIND_VERSION}")
+ # Some dists like Fedora package cpp-httplib as a single header while some
+ # dists like Debian package it as a traditional library.
+- find_library(CPPHTTPLIB_LIBRARY cpp-httplib)
++ find_library(CPPHTTPLIB_LIBRARY httplib)
+ if(CPPHTTPLIB_LIBRARY)
+ message(STATUS "Using system CppHttplib (${CPPHTTPLIB_LIBRARY})")
+ add_library(dep_cpphttplib UNKNOWN IMPORTED)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2024-01-05 7:32 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2024-01-05 7:32 UTC (permalink / raw
To: gentoo-commits
commit: 65c91a401281c8b9c2145f79a47798812db97666
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 5 07:31:44 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 07:32:10 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65c91a40
dev-util/ccache: add 4.9
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/Manifest | 3 +
dev-util/ccache/ccache-4.9.ebuild | 132 +++++++++++++++++++++
.../ccache/files/ccache-4.9-avoid-run-user.patch | 34 ++++++
3 files changed, 169 insertions(+)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 904ac1d142c5..c19c5dff0974 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,3 +1,6 @@
DIST ccache-4.8-docs.tar.xz 80280 BLAKE2B e8e00dd10a00670ff3a0c3f5ab0966469fa5246de64724e24d0287020d4636fb5a1f59421aaa094d05b88bd20efd2a4a06e46dfb957bcf77ad2ea61fd02551c9 SHA512 e0036a7f86b458028c6e24158f95b62e40d9f659031e16adc59c067096bb728f1cb583a2edecaf2118f15b8e00f028fa6f1cfa2466fba76b7c870cca93a883eb
DIST ccache-4.8.3.tar.xz 569724 BLAKE2B 53211db0e516eea9739b8f05bf6a3db678b4b5cff7af741469360556da20a320e4a40253ca9e51568045a394d3497b428413ff6cf77f4273aa4906357b427d1f SHA512 e0e344cd215de67fe060b36fb1b902bab61454477624fbe41d2ec57fdd721cec9c8920ca834f0ef0ccfeedb961b17143f18197497557887d88911ff66e330478
DIST ccache-4.8.3.tar.xz.asc 833 BLAKE2B e800b7bdce705db3ced97f0fe008e8391811f9c7c49e815b6cd2cf220cf1107f3941d29d7bcdd10f79da4e6cad9766243e482011aeb5a170e1c5920b6ebdd726 SHA512 2e2298a3cf800d9de669f560269bd07ca2b76f761198af10f7174759ea95a23518dedce83f481bdd392bb60adbd736e5dd2c21af88beb761c0f589f685737586
+DIST ccache-4.9-docs.tar.xz 82684 BLAKE2B bc3517803cac75a0124358f740e3f4f4b923341277b77cb9ac7649520bbf19a65a51ebf324cc886f98e606bd29681ca3956073a85b737159792e068d529e299c SHA512 870d15dc9e3a0557dfe533862927ff8e90730678439b576e782f79f1f69c5bb499ff4c7e397a7eca059691ec5f89412594e32c74209a58003a6f55002c00d467
+DIST ccache-4.9.tar.xz 583744 BLAKE2B 682b491d061452d77d988d7e9e661ed4ce729a40a58370af55e1f24c5e973e4808d7211b4f8b8ab7f9328ecc651c032fa2efd37675566308197c22fd9a776675 SHA512 04200e5ceab56fc119f4376189f45fe811409a8022f08e82cd3089e252f350d604d777a237a57651fcd0c20f8ba0f27e4f3cc330a5970d455a696a977408d563
+DIST ccache-4.9.tar.xz.asc 833 BLAKE2B ad91919ab45f98d334c9b2d273b8139a2fb64b28a3fdb2a2042beaaa32905978113cd08ff95a009891c6159505431e4c1e0203adca94032feb2a4cee9bd089e2 SHA512 2f51d11d00756d099a64a9e5698591385d2c822438123f1c9e753c66e35f4ea9706db3414d7049cb6604defebc72927b6772c4e8a2271e03fb80f815659f90fa
diff --git a/dev-util/ccache/ccache-4.9.ebuild b/dev-util/ccache/ccache-4.9.ebuild
new file mode 100644
index 000000000000..68cf3874b664
--- /dev/null
+++ b/dev-util/ccache/ccache-4.9.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 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=/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
+
+# https://ccache.dev/license.html
+LICENSE="GPL-3+ GPL-3 MIT BSD Boost-1.0 BSD-2 || ( CC0-1.0 Apache-2.0 )"
+LICENSE+=" elibc_mingw? ( LGPL-3 ISC PSF-2 )"
+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.9-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.9-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.9-avoid-run-user.patch
new file mode 100644
index 000000000000..ccce18b9d573
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.9-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
+@@ -1194,17 +1194,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 && DirEntry(xdg_runtime_dir).is_directory()) {
+- auto dir = FMT("{}/ccache-tmp", xdg_runtime_dir);
+- if (fs::create_directories(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";
+ }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2024-01-05 7:10 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2024-01-05 7:10 UTC (permalink / raw
To: gentoo-commits
commit: df6c278a22a10718de70ca7d62e89167c562e10c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 5 06:55:02 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 06:55:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df6c278a
dev-util/ccache: drop 4.7.4, 4.8.2
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/Manifest | 4 -
dev-util/ccache/ccache-4.7.4.ebuild | 91 --------------
dev-util/ccache/ccache-4.8.2.ebuild | 131 ---------------------
.../files/ccache-4.8.2-gcc-ice-workaround.patch | 25 ----
4 files changed, 251 deletions(-)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 66e431c754da..904ac1d142c5 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,7 +1,3 @@
-DIST ccache-4.7.4.tar.xz 547820 BLAKE2B 03e03223f0fd6eb001c7d93bcd03a0ef6656ebd3ffcc920b9e772fb68275ddf1e8a941f8f7de68358cbc7a9b9d5aa65e35b91554ff24684f29ff1953aefae75f SHA512 48c663b51e874cfbd8daf0ef9759d025c2605c36da47ebbc77b52ceb941b810436600429f74204f13e2e2e601af6186a4bdb992f8da239f88cb9df4c6c95d58f
-DIST ccache-4.7.4.tar.xz.asc 833 BLAKE2B e155f9cb695794a28771a928d50e18705441b9fb9a8ec425aabc78dabcd68caca68ba15f74ba176a73abf414c4ba98b1832da3536fcd87d7c32f2689fe7e1908 SHA512 567a051e7c93cd62c8ad7631fea98a6846e2f548aaa201acefbe44d1027f8048cae5ef462488da7ce90864b23a426d524f576472428f93ecbc5cea3ae224b860
DIST ccache-4.8-docs.tar.xz 80280 BLAKE2B e8e00dd10a00670ff3a0c3f5ab0966469fa5246de64724e24d0287020d4636fb5a1f59421aaa094d05b88bd20efd2a4a06e46dfb957bcf77ad2ea61fd02551c9 SHA512 e0036a7f86b458028c6e24158f95b62e40d9f659031e16adc59c067096bb728f1cb583a2edecaf2118f15b8e00f028fa6f1cfa2466fba76b7c870cca93a883eb
-DIST ccache-4.8.2.tar.xz 560888 BLAKE2B ca907c16b353fabfb8e6479a076aa5cf791e6150f2b16eabf1817d4955d9b5f0200d4b12527ba0493ad9b2d7567adaaf8416bbff858a66fff5a5687328ab7395 SHA512 2edf8da79a9286eb4ed5b6dc2063b55fb97e22a40d1c501c6f17b2f0ce32dfc02e99754afbabbd24fed8312e13e5b8bfc20687d0b5c0cf19fbf64e3adc7bb25b
-DIST ccache-4.8.2.tar.xz.asc 833 BLAKE2B ea92ceaf9873a1a8373414bb7ad74f101873cbf3bae2ba1c6986d40018b8f37d2fd7cab8d0bcbdfb7cbd167edf0128edb2a6d61ecce2645018a01d450aae25a9 SHA512 6182b7a793d5142c1d9d627b6ea058ac524b6914a85d9628788f7eeea7b762c5422ef6007c404fe9b5d77841b69382289ffb6efbf931c9507940c10bee8ff95f
DIST ccache-4.8.3.tar.xz 569724 BLAKE2B 53211db0e516eea9739b8f05bf6a3db678b4b5cff7af741469360556da20a320e4a40253ca9e51568045a394d3497b428413ff6cf77f4273aa4906357b427d1f SHA512 e0e344cd215de67fe060b36fb1b902bab61454477624fbe41d2ec57fdd721cec9c8920ca834f0ef0ccfeedb961b17143f18197497557887d88911ff66e330478
DIST ccache-4.8.3.tar.xz.asc 833 BLAKE2B e800b7bdce705db3ced97f0fe008e8391811f9c7c49e815b6cd2cf220cf1107f3941d29d7bcdd10f79da4e6cad9766243e482011aeb5a170e1c5920b6ebdd726 SHA512 2e2298a3cf800d9de669f560269bd07ca2b76f761198af10f7174759ea95a23518dedce83f481bdd392bb60adbd736e5dd2c21af88beb761c0f589f685737586
diff --git a/dev-util/ccache/ccache-4.7.4.ebuild b/dev-util/ccache/ccache-4.7.4.ebuild
deleted file mode 100644
index 10b421bb1cec..000000000000
--- a/dev-util/ccache/ccache-4.7.4.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/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
-)
-
-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"
-}
-
-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/ccache-4.8.2.ebuild b/dev-util/ccache/ccache-4.8.2.ebuild
deleted file mode 100644
index fbbc909e5d51..000000000000
--- a/dev-util/ccache/ccache-4.8.2.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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=/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
- "${FILESDIR}"/${P}-gcc-ice-workaround.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.2-gcc-ice-workaround.patch b/dev-util/ccache/files/ccache-4.8.2-gcc-ice-workaround.patch
deleted file mode 100644
index a638930ad6ad..000000000000
--- a/dev-util/ccache/files/ccache-4.8.2-gcc-ice-workaround.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bugs.gentoo.org/906310
-https://bugs.gentoo.org/906942
-https://github.com/ccache/ccache/issues/1289
-https://github.com/ccache/ccache/commit/689168c292f1ed26c5f4a3070aeb649dad7facb5
-
-From 689168c292f1ed26c5f4a3070aeb649dad7facb5 Mon Sep 17 00:00:00 2001
-From: Joel Rosdahl <joel@rosdahl.net>
-Date: Tue, 1 Aug 2023 12:30:12 +0200
-Subject: [PATCH] fix: Work around GCC 12.3 bug 109241
-
-See also #1289.
---- a/src/storage/local/LocalStorage.cpp
-+++ b/src/storage/local/LocalStorage.cpp
-@@ -854,7 +854,9 @@ LocalStorage::recompress(const std::optional<int8_t> level,
- auto l2_content_lock = get_level_2_content_lock(l1_index, l2_index);
- l2_content_lock.make_long_lived(lock_manager);
- if (!l2_content_lock.acquire()) {
-- LOG("Failed to acquire content lock for {}/{}", l1_index, l2_index);
-+ // LOG_RAW+fmt::format instead of LOG due to GCC 12.3 bug #109241
-+ LOG_RAW(fmt::format(
-+ "Failed to acquire content lock for {}/{}", l1_index, l2_index));
- return;
- }
-
-
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2023-08-08 2:10 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-08-08 2:10 UTC (permalink / raw
To: gentoo-commits
commit: c1683082f6735325895ab84e5d16801dc7fad2f5
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 8 02:09:48 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 8 02:09:48 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1683082
dev-util/ccache: backport ICE workaround
Already fixed in stable GCC but let's backport as it makes life easier for
people.
Bug: https://bugs.gentoo.org/906310
Bug: https://bugs.gentoo.org/906942
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/ccache-4.8.2.ebuild | 1 +
.../files/ccache-4.8.2-gcc-ice-workaround.patch | 25 ++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/dev-util/ccache/ccache-4.8.2.ebuild b/dev-util/ccache/ccache-4.8.2.ebuild
index 782242e5b788..8ec5b78da959 100644
--- a/dev-util/ccache/ccache-4.8.2.ebuild
+++ b/dev-util/ccache/ccache-4.8.2.ebuild
@@ -62,6 +62,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
"${FILESDIR}"/${PN}-4.0-objdump.patch
"${FILESDIR}"/${PN}-4.8-avoid-run-user.patch
+ "${FILESDIR}"/${P}-gcc-ice-workaround.patch
)
src_unpack() {
diff --git a/dev-util/ccache/files/ccache-4.8.2-gcc-ice-workaround.patch b/dev-util/ccache/files/ccache-4.8.2-gcc-ice-workaround.patch
new file mode 100644
index 000000000000..a638930ad6ad
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.8.2-gcc-ice-workaround.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/906310
+https://bugs.gentoo.org/906942
+https://github.com/ccache/ccache/issues/1289
+https://github.com/ccache/ccache/commit/689168c292f1ed26c5f4a3070aeb649dad7facb5
+
+From 689168c292f1ed26c5f4a3070aeb649dad7facb5 Mon Sep 17 00:00:00 2001
+From: Joel Rosdahl <joel@rosdahl.net>
+Date: Tue, 1 Aug 2023 12:30:12 +0200
+Subject: [PATCH] fix: Work around GCC 12.3 bug 109241
+
+See also #1289.
+--- a/src/storage/local/LocalStorage.cpp
++++ b/src/storage/local/LocalStorage.cpp
+@@ -854,7 +854,9 @@ LocalStorage::recompress(const std::optional<int8_t> level,
+ auto l2_content_lock = get_level_2_content_lock(l1_index, l2_index);
+ l2_content_lock.make_long_lived(lock_manager);
+ if (!l2_content_lock.acquire()) {
+- LOG("Failed to acquire content lock for {}/{}", l1_index, l2_index);
++ // LOG_RAW+fmt::format instead of LOG due to GCC 12.3 bug #109241
++ LOG_RAW(fmt::format(
++ "Failed to acquire content lock for {}/{}", l1_index, l2_index));
+ return;
+ }
+
+
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2023-06-13 18:12 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-06-13 18:12 UTC (permalink / raw
To: gentoo-commits
commit: c53ba48e6c2b55a955ea41aaabe242b880276d5f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 13 18:11:35 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 13 18:11:58 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c53ba48e
dev-util/ccache: drop 4.6.3
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/Manifest | 2 -
dev-util/ccache/ccache-4.6.3.ebuild | 93 ----------------------
.../ccache/files/ccache-4.6.2-avoid-run-user.patch | 30 -------
3 files changed, 125 deletions(-)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index c458a2ad7b68..e230e1cec10a 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,5 +1,3 @@
-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
DIST ccache-4.7.4.tar.xz 547820 BLAKE2B 03e03223f0fd6eb001c7d93bcd03a0ef6656ebd3ffcc920b9e772fb68275ddf1e8a941f8f7de68358cbc7a9b9d5aa65e35b91554ff24684f29ff1953aefae75f SHA512 48c663b51e874cfbd8daf0ef9759d025c2605c36da47ebbc77b52ceb941b810436600429f74204f13e2e2e601af6186a4bdb992f8da239f88cb9df4c6c95d58f
DIST ccache-4.7.4.tar.xz.asc 833 BLAKE2B e155f9cb695794a28771a928d50e18705441b9fb9a8ec425aabc78dabcd68caca68ba15f74ba176a73abf414c4ba98b1832da3536fcd87d7c32f2689fe7e1908 SHA512 567a051e7c93cd62c8ad7631fea98a6846e2f548aaa201acefbe44d1027f8048cae5ef462488da7ce90864b23a426d524f576472428f93ecbc5cea3ae224b860
DIST ccache-4.8-docs.tar.xz 80280 BLAKE2B e8e00dd10a00670ff3a0c3f5ab0966469fa5246de64724e24d0287020d4636fb5a1f59421aaa094d05b88bd20efd2a4a06e46dfb957bcf77ad2ea61fd02551c9 SHA512 e0036a7f86b458028c6e24158f95b62e40d9f659031e16adc59c067096bb728f1cb583a2edecaf2118f15b8e00f028fa6f1cfa2466fba76b7c870cca93a883eb
diff --git a/dev-util/ccache/ccache-4.6.3.ebuild b/dev-util/ccache/ccache-4.6.3.ebuild
deleted file mode 100644
index 269b9595497c..000000000000
--- a/dev-util/ccache/ccache-4.6.3.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# 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.2-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.2-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch
deleted file mode 100644
index ff579ca7fdb6..000000000000
--- a/dev-util/ccache/files/ccache-4.6.2-avoid-run-user.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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.
---- a/src/Config.cpp
-+++ b/src/Config.cpp
-@@ -1039,14 +1039,5 @@ Config::check_key_tables_consistency()
- std::string
- Config::default_temporary_dir() const
- {
-- 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 : m_cache_dir + "/tmp";
-+ return m_cache_dir + "/tmp";
- }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2022-04-17 18:32 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-04-17 18:32 UTC (permalink / raw
To: gentoo-commits
commit: 994391ae87835f151009ee177fc10fa4332551c7
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 18:23:20 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 18:23:20 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=994391ae
dev-util/ccache: drop 4.3-r3, 4.4.2
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/Manifest | 2 -
dev-util/ccache/ccache-4.3-r3.ebuild | 91 ------------------------------
dev-util/ccache/ccache-4.4.2.ebuild | 88 -----------------------------
dev-util/ccache/files/ccache-4.3-PWD.patch | 85 ----------------------------
4 files changed, 266 deletions(-)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 29ab5c3c1a3d..ddf19bb26242 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,5 +1,3 @@
-DIST ccache-4.3.tar.xz 433508 BLAKE2B 6ab48aa587b4dc86020e3b0f722003dc5c03709626e143a1d38506b6072f9963fc76e89b6d18128dfc28035bf8d24e46ea44f219db69a1b3a294416f0b023090 SHA512 ec082de95ea8b22154ce1e67e0a0fc28266cfb71f382205f7eab14e6ac1c7841027d063041131832b3227d833d99ec874e90df238f35f433de4c381566931c7f
-DIST ccache-4.4.2.tar.xz 510260 BLAKE2B f0d8b9ac6e1972592ce5a51a392279a01f01c09e6bffc498ff0b20aa46acb6d7f949ae9f4c6006e20b15cdea9fa2fa057c78b69ef66c2e13b3ddee13367e91b1 SHA512 afcec4806b1e307ec16006ecd9e39eb69fc1376407877f024c882926725d41f2b08eccdcfb3efd8dac9e481d07f9c08c043b8cea5ea563a0f49b2f587325e4a7
DIST ccache-4.5.1.tar.xz 513008 BLAKE2B 637b6d36c169bc742efd165569879a47405c2884918ed3731186e8176c926fa0e8e9cd648756d501ae3b741c671e2399cfdb0bc216410bc64826d4fe00d69498 SHA512 267dcc6b41270eeffe029d13e58eca3399540037cc19dc58bb5ebeb7dcc51b201fbde91c9824eaee5b14fbf28bb7304b78d1340118bc72e56b80ff148575bc56
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.3-r3.ebuild b/dev-util/ccache/ccache-4.3-r3.ebuild
deleted file mode 100644
index d49b0b149a99..000000000000
--- a/dev-util/ccache/ccache-4.3-r3.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake toolchain-funcs
-
-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"
-# Enable 'static-c++' by default to make 'gcc' ebuild Just Work: bug #761220
-IUSE="+static-c++ test"
-
-DEPEND=""
-RDEPEND="${DEPEND}
- app-arch/zstd:0=
- 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 )
-"
-BDEPEND="
- app-text/asciidoc
-"
-
-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.1-avoid-run-user.patch
- "${FILESDIR}"/${P}-PWD.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
-
- # 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 failures.
- use static-c++ && append-ldflags -static-libstdc++
-}
-
-src_configure() {
- local mycmakeargs=(
- -DUSE_CCACHE=OFF
- -DUSE_FASTER_LINKER=OFF
- -DZSTD_FROM_INTERNET=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} && ${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/ccache-4.4.2.ebuild b/dev-util/ccache/ccache-4.4.2.ebuild
deleted file mode 100644
index 56532612dfec..000000000000
--- a/dev-util/ccache/ccache-4.4.2.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake toolchain-funcs flag-o-matic
-
-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"
-# 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"
-# 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 )"
-
-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.1-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
-
- # 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 failures.
- use static-c++ && append-ldflags -static-libstdc++
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DOCUMENTATION=$(usex doc)
- -DENABLE_TESTING=$(usex test)
- -DUSE_CCACHE=OFF
- -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} && ${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.3-PWD.patch b/dev-util/ccache/files/ccache-4.3-PWD.patch
deleted file mode 100644
index 3943dab5bd2e..000000000000
--- a/dev-util/ccache/files/ccache-4.3-PWD.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-https://github.com/ccache/ccache/commit/2d720aed1843b47aafb2af8bfd15139228545e2b.patch
-https://bugs.gentoo.org/751355
-
-From 2d720aed1843b47aafb2af8bfd15139228545e2b Mon Sep 17 00:00:00 2001
-From: Joel Rosdahl <joel@rosdahl.net>
-Date: Wed, 16 Jun 2021 18:19:04 +0200
-Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20crash=20on=20relative=20PWD=20v?=
- =?UTF-8?q?alue?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Even though PWD “shall represent an absolute pathname of the current
-working directory”[1], we shouldn’t crash if a user sets it to a
-relative path.
-
-[1]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
-
-Fixes #860.
----
- src/Util.cpp | 2 +-
- test/run | 1 +
- test/suites/basedir.bash | 32 ++++++++++++++++++++++++++++++++
- 3 files changed, 34 insertions(+), 1 deletion(-)
-
---- a/src/Util.cpp
-+++ b/src/Util.cpp
-@@ -617,7 +617,7 @@ get_apparent_cwd(const std::string& actual_cwd)
- return actual_cwd;
- #else
- auto pwd = getenv("PWD");
-- if (!pwd) {
-+ if (!pwd || !Util::is_absolute_path(pwd)) {
- return actual_cwd;
- }
-
---- a/test/run
-+++ b/test/run
-@@ -356,6 +356,7 @@ reset_environment() {
- unset TERM
- unset XDG_CACHE_HOME
- unset XDG_CONFIG_HOME
-+ export PWD=$(pwd)
-
- export CCACHE_DETECT_SHEBANG=1
- export CCACHE_DIR=$ABS_TESTDIR/.ccache
---- a/test/suites/basedir.bash
-+++ b/test/suites/basedir.bash
-@@ -311,4 +311,36 @@ EOF
- expect_stat 'cache miss' 1
- expect_equal_content reference.stderr ccache.stderr
- fi
-+
-+ # -------------------------------------------------------------------------
-+ TEST "Relative PWD"
-+
-+ cd dir1
-+ CCACHE_BASEDIR="$(pwd)" PWD=. $CCACHE_COMPILE -I$(pwd)/include -c src/test.c
-+ expect_stat 'cache hit (direct)' 0
-+ expect_stat 'cache hit (preprocessed)' 0
-+ expect_stat 'cache miss' 1
-+
-+ cd ../dir2
-+ CCACHE_BASEDIR="$(pwd)" PWD=. $CCACHE_COMPILE -I$(pwd)/include -c src/test.c
-+ expect_stat 'cache hit (direct)' 1
-+ expect_stat 'cache hit (preprocessed)' 0
-+ expect_stat 'cache miss' 1
-+
-+ # -------------------------------------------------------------------------
-+ TEST "Unset PWD"
-+
-+ unset PWD
-+
-+ cd dir1
-+ CCACHE_BASEDIR="$(pwd)" $CCACHE_COMPILE -I$(pwd)/include -c src/test.c
-+ expect_stat 'cache hit (direct)' 0
-+ expect_stat 'cache hit (preprocessed)' 0
-+ expect_stat 'cache miss' 1
-+
-+ cd ../dir2
-+ CCACHE_BASEDIR="$(pwd)" $CCACHE_COMPILE -I$(pwd)/include -c src/test.c
-+ expect_stat 'cache hit (direct)' 1
-+ expect_stat 'cache hit (preprocessed)' 0
-+ expect_stat 'cache miss' 1
- }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2021-02-16 23:35 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2021-02-16 23:35 UTC (permalink / raw
To: gentoo-commits
commit: e00f7ea381541098508ea4fd1dc90282f401d803
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 23:35:17 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 23:35:32 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e00f7ea3
dev-util/ccache: fix -latomic discovery on sparc
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/ccache-4.2.ebuild | 1 +
dev-util/ccache/files/ccache-4.2-atomic.patch | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/dev-util/ccache/ccache-4.2.ebuild b/dev-util/ccache/ccache-4.2.ebuild
index 3f58044c682..c34ca6a6ca3 100644
--- a/dev-util/ccache/ccache-4.2.ebuild
+++ b/dev-util/ccache/ccache-4.2.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
"${FILESDIR}"/${PN}-4.0-objdump.patch
"${FILESDIR}"/${PN}-4.1-avoid-run-user.patch
+ "${FILESDIR}"/${PN}-4.2-atomic.patch
)
src_prepare() {
diff --git a/dev-util/ccache/files/ccache-4.2-atomic.patch b/dev-util/ccache/files/ccache-4.2-atomic.patch
new file mode 100644
index 00000000000..6148e232af9
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.2-atomic.patch
@@ -0,0 +1,11 @@
+https://github.com/ccache/ccache/pull/800
+--- a/cmake/StdAtomic.cmake
++++ b/cmake/StdAtomic.cmake
+@@ -10,6 +10,7 @@ set(
+ int main()
+ {
+ std::atomic<long long> x;
++ ++x;
+ (void)x.load();
+ return 0;
+ }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2020-11-26 8:29 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-11-26 8:29 UTC (permalink / raw
To: gentoo-commits
commit: 096e095119e791717533de78867c03ea02e6ab4c
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 08:28:51 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 08:29:38 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=096e0951
dev-util/ccache: drop old
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/Manifest | 1 -
dev-util/ccache/ccache-4.0.ebuild | 104 ---------------------
dev-util/ccache/files/ccache-4.0-atomic.patch | 21 -----
.../ccache/files/ccache-4.0-avoid-run-user.patch | 18 ----
4 files changed, 144 deletions(-)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 35ac993d8d4..4437be2c6bc 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,3 +1,2 @@
DIST ccache-3.7.12.tar.xz 354684 BLAKE2B b0b1028ede8206622c4b563cdc1351bdbe49ac11aa92d405c778af91db5bac029f7331371ef0a55bc3b1c7a0b60fbc5711277e048481bf0f4ad4b1be8acd3495 SHA512 0eb47869f86d36b3e5fad0d5073973f0444f3efe23fd14469a9e05154ea219228443098b1c5e4a8a0c5c78b4bfa7623735b50ebd6b8b4d0626766061850d6a62
-DIST ccache-4.0.tar.xz 383264 BLAKE2B ef4ca19860e2a0d313354cbd59a9eff441e86663820e8233dcf4b45a008ffa330b4a4c22eb11f3c6a7a98950d7d247034e60eb71c84ec4471f60fa19591651bd SHA512 1e55767bc2919109ae3c9b74f0adcd518e7e11df45c3981b2e9f8b04a780f9730457eeef1df137c65ab20e0959600c5317f06b58ffb82f5806c7c9f6cc305715
DIST ccache-4.1.tar.xz 389240 BLAKE2B 265ed6cd9602a04db0fadf63266d0fe1e78a74c69a27f05854a287e4048934d6afd63e71987bc525217782075c1a158601c400f3418caa0eb9730f34275bd08c SHA512 e80075eeea3fef8215de0a793e02381bfb59d7e74237fa34a49306047c60f0de0e678396ad3a9e5d86d3ad2aa21bbe29c7f0055f06b3ba2470f6895ce2eedd7b
diff --git a/dev-util/ccache/ccache-4.0.ebuild b/dev-util/ccache/ccache-4.0.ebuild
deleted file mode 100644
index da46cf9b15a..00000000000
--- a/dev-util/ccache/ccache-4.0.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake toolchain-funcs
-
-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
- "${FILESDIR}"/${PN}-4.0-atomic.patch
-)
-
-# ccache does not do it automatically. TODO: fix upstream
-need_latomic() {
- # test if -latomic is needed and helps. -latomic is needed
- # at least on ppc32. Use bit of inodeCache.cpp test.
- cat >"${T}"/a-test.cc <<-EOF
- #include <atomic>
- #include <cstdint>
- std::atomic<std::int64_t> a;
- int main() { return a.load() == 0; }
- EOF
-
- local cxx_cmd=(
- $(tc-getCXX)
- $CXXFLAGS
- $LDFLAGS
- "${T}"/a-test.cc
- -o "${T}"/a-test
- )
-
- einfo "${cxx_cmd[@]}"
- "${cxx_cmd[@]}" && return 1
-
- einfo "Trying to add -latomic"
- einfo "${cxx_cmd[@]}"
- cxx_cmd+=(-latomic)
- "${cxx_cmd[@]}" && return 0
-
- return 1
-}
-
-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_configure() {
- local mycmakeargs=(
- -DLINK_WITH_ATOMIC=$(need_latomic && echo YES || echo NO)
- )
- cmake_src_configure
-}
-
-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-atomic.patch b/dev-util/ccache/files/ccache-4.0-atomic.patch
deleted file mode 100644
index 87b237c7dd5..00000000000
--- a/dev-util/ccache/files/ccache-4.0-atomic.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -63,11 +63,17 @@ if(WIN32)
- endif()
- endif()
-
-+option(LINK_WITH_ATOMIC "Add 'atomic' if needed" OFF)
-+set(atomic_lib "")
-+if(LINK_WITH_ATOMIC)
-+ set(atomic_lib "atomic")
-+endif()
-+
- find_package(Threads REQUIRED)
- target_link_libraries(
- ccache_lib
- PRIVATE standard_settings standard_warnings ZSTD::ZSTD
-- Threads::Threads third_party_lib)
-+ Threads::Threads third_party_lib ${atomic_lib})
-
- target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} .)
-
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
deleted file mode 100644
index 07da25c6c34..00000000000
--- a/dev-util/ccache/files/ccache-4.0-avoid-run-user.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-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";
- }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2020-11-22 21:20 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-11-22 21:20 UTC (permalink / raw
To: gentoo-commits
commit: 6dd356bb47e026d4f52dda46237491b0d7170357
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 22 21:20:22 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Nov 22 21:20:31 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dd356bb
dev-util/ccache: drop -latomic patch
Upstream added -latomic detection.
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/ccache-4.1.ebuild | 39 ---------------------------
dev-util/ccache/files/ccache-4.1-atomic.patch | 23 ----------------
2 files changed, 62 deletions(-)
diff --git a/dev-util/ccache/ccache-4.1.ebuild b/dev-util/ccache/ccache-4.1.ebuild
index a783943f868..8f04356c74b 100644
--- a/dev-util/ccache/ccache-4.1.ebuild
+++ b/dev-util/ccache/ccache-4.1.ebuild
@@ -35,39 +35,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
"${FILESDIR}"/${PN}-4.0-objdump.patch
"${FILESDIR}"/${PN}-4.1-avoid-run-user.patch
- "${FILESDIR}"/${PN}-4.1-atomic.patch
)
-# ccache does not do it automatically. TODO: fix upstream
-need_latomic() {
- # test if -latomic is needed and helps. -latomic is needed
- # at least on ppc32. Use bit of inodeCache.cpp test.
- cat >"${T}"/a-test.cc <<-EOF
- #include <atomic>
- #include <cstdint>
- std::atomic<std::int64_t> a;
- int main() { return a.load() == 0; }
- EOF
-
- local cxx_cmd=(
- $(tc-getCXX)
- $CXXFLAGS
- $LDFLAGS
- "${T}"/a-test.cc
- -o "${T}"/a-test
- )
-
- einfo "${cxx_cmd[@]}"
- "${cxx_cmd[@]}" && return 1
-
- einfo "Trying to add -latomic"
- einfo "${cxx_cmd[@]}"
- cxx_cmd+=(-latomic)
- "${cxx_cmd[@]}" && return 0
-
- return 1
-}
-
src_prepare() {
cmake_src_prepare
@@ -79,15 +48,7 @@ src_prepare() {
tc-export CC OBJDUMP
}
-src_configure() {
- local mycmakeargs=(
- -DLINK_WITH_ATOMIC=$(need_latomic && echo YES || echo NO)
- )
- cmake_src_configure
-}
-
src_install() {
- # TODO: install manpage: https://github.com/ccache/ccache/issues/684
cmake_src_install
dobin ccache-config
diff --git a/dev-util/ccache/files/ccache-4.1-atomic.patch b/dev-util/ccache/files/ccache-4.1-atomic.patch
deleted file mode 100644
index dc48c4a5c89..00000000000
--- a/dev-util/ccache/files/ccache-4.1-atomic.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-powerpc, sparc and many other 32-bit arches need
-explicit libatomic for atd::atomic primitives..
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -67,12 +67,18 @@ if(WIN32)
- endif()
- endif()
-
-+option(LINK_WITH_ATOMIC "Add 'atomic' if needed" OFF)
-+set(atomic_lib "")
-+if(LINK_WITH_ATOMIC)
-+ set(atomic_lib "atomic")
-+endif()
-+
- set(THREADS_PREFER_PTHREAD_FLAG ON)
- find_package(Threads REQUIRED)
- target_link_libraries(
- ccache_lib
- PRIVATE standard_settings standard_warnings ZSTD::ZSTD
-- Threads::Threads third_party_lib)
-+ Threads::Threads third_party_lib ${atomic_lib})
-
- target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} .)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2020-11-22 20:57 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-11-22 20:57 UTC (permalink / raw
To: gentoo-commits
commit: 7158e6d5be786b4e656beea266330943fe2243d1
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 22 20:57:12 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Nov 22 20:57:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7158e6d5
dev-util/ccache: bump up to 4.1
Among other things it should fix inconsistent handling
of `-fcolor-diagnostics` in compiler and linker drivers
noticed by Mihai Moldovan.
Closes: https://bugs.gentoo.org/751463
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/Manifest | 1 +
dev-util/ccache/ccache-4.1.ebuild | 108 +++++++++++++++++++++
dev-util/ccache/files/ccache-4.1-atomic.patch | 23 +++++
.../ccache/files/ccache-4.1-avoid-run-user.patch | 18 ++++
4 files changed, 150 insertions(+)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 9db6c02c4c0..35ac993d8d4 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,2 +1,3 @@
DIST ccache-3.7.12.tar.xz 354684 BLAKE2B b0b1028ede8206622c4b563cdc1351bdbe49ac11aa92d405c778af91db5bac029f7331371ef0a55bc3b1c7a0b60fbc5711277e048481bf0f4ad4b1be8acd3495 SHA512 0eb47869f86d36b3e5fad0d5073973f0444f3efe23fd14469a9e05154ea219228443098b1c5e4a8a0c5c78b4bfa7623735b50ebd6b8b4d0626766061850d6a62
DIST ccache-4.0.tar.xz 383264 BLAKE2B ef4ca19860e2a0d313354cbd59a9eff441e86663820e8233dcf4b45a008ffa330b4a4c22eb11f3c6a7a98950d7d247034e60eb71c84ec4471f60fa19591651bd SHA512 1e55767bc2919109ae3c9b74f0adcd518e7e11df45c3981b2e9f8b04a780f9730457eeef1df137c65ab20e0959600c5317f06b58ffb82f5806c7c9f6cc305715
+DIST ccache-4.1.tar.xz 389240 BLAKE2B 265ed6cd9602a04db0fadf63266d0fe1e78a74c69a27f05854a287e4048934d6afd63e71987bc525217782075c1a158601c400f3418caa0eb9730f34275bd08c SHA512 e80075eeea3fef8215de0a793e02381bfb59d7e74237fa34a49306047c60f0de0e678396ad3a9e5d86d3ad2aa21bbe29c7f0055f06b3ba2470f6895ce2eedd7b
diff --git a/dev-util/ccache/ccache-4.1.ebuild b/dev-util/ccache/ccache-4.1.ebuild
new file mode 100644
index 00000000000..a783943f868
--- /dev/null
+++ b/dev-util/ccache/ccache-4.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake toolchain-funcs
+
+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 )
+"
+BDEPEND="
+ app-text/asciidoc
+"
+
+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.1-avoid-run-user.patch
+ "${FILESDIR}"/${PN}-4.1-atomic.patch
+)
+
+# ccache does not do it automatically. TODO: fix upstream
+need_latomic() {
+ # test if -latomic is needed and helps. -latomic is needed
+ # at least on ppc32. Use bit of inodeCache.cpp test.
+ cat >"${T}"/a-test.cc <<-EOF
+ #include <atomic>
+ #include <cstdint>
+ std::atomic<std::int64_t> a;
+ int main() { return a.load() == 0; }
+ EOF
+
+ local cxx_cmd=(
+ $(tc-getCXX)
+ $CXXFLAGS
+ $LDFLAGS
+ "${T}"/a-test.cc
+ -o "${T}"/a-test
+ )
+
+ einfo "${cxx_cmd[@]}"
+ "${cxx_cmd[@]}" && return 1
+
+ einfo "Trying to add -latomic"
+ einfo "${cxx_cmd[@]}"
+ cxx_cmd+=(-latomic)
+ "${cxx_cmd[@]}" && return 0
+
+ return 1
+}
+
+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_configure() {
+ local mycmakeargs=(
+ -DLINK_WITH_ATOMIC=$(need_latomic && echo YES || echo NO)
+ )
+ cmake_src_configure
+}
+
+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.1-atomic.patch b/dev-util/ccache/files/ccache-4.1-atomic.patch
new file mode 100644
index 00000000000..dc48c4a5c89
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.1-atomic.patch
@@ -0,0 +1,23 @@
+powerpc, sparc and many other 32-bit arches need
+explicit libatomic for atd::atomic primitives..
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -67,12 +67,18 @@ if(WIN32)
+ endif()
+ endif()
+
++option(LINK_WITH_ATOMIC "Add 'atomic' if needed" OFF)
++set(atomic_lib "")
++if(LINK_WITH_ATOMIC)
++ set(atomic_lib "atomic")
++endif()
++
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+ target_link_libraries(
+ ccache_lib
+ PRIVATE standard_settings standard_warnings ZSTD::ZSTD
+- Threads::Threads third_party_lib)
++ Threads::Threads third_party_lib ${atomic_lib})
+
+ target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} .)
diff --git a/dev-util/ccache/files/ccache-4.1-avoid-run-user.patch b/dev-util/ccache/files/ccache-4.1-avoid-run-user.patch
new file mode 100644
index 00000000000..be7db76ecbf
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.1-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
+@@ -885,11 +885,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("/run/user/{}", geteuid());
+- if (Stat::stat(user_tmp_dir).is_directory()) {
+- return user_tmp_dir + "/ccache-tmp";
+- }
+-#endif
+ return cache_dir + "/tmp";
+ }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2020-10-02 22:25 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-10-02 22:25 UTC (permalink / raw
To: gentoo-commits
commit: 7da7ed7419d9081987af1dd5a88571bf87783da4
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 2 22:24:33 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Oct 2 22:24:57 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7da7ed74
dev-util/ccache: bump up to 3.7.12
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/Manifest | 1 +
dev-util/ccache/ccache-3.7.12.ebuild | 76 +++++++++++++++++++++++
dev-util/ccache/files/ccache-3.7.12-objdump.patch | 12 ++++
3 files changed, 89 insertions(+)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 6c35ab7c7bb..eb12073ed68 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1 +1,2 @@
DIST ccache-3.7.11.tar.xz 354160 BLAKE2B 46fc5d65d6224bb796db7632b35ccca1089e5fed36eeb2ba231cf4c1aaa94be10bf0504f6ef565ce11673e527e09dee64583a764062ca7fea38364d790dd8cc1 SHA512 47b71b3ab4b89bf9b6f6d15941c22d2207b369922f51f9a8fbf4e86554325053dccce669e1c1ed3c0019a7e0a3d610f399e52d3fee68b56111aa7c1b24132c11
+DIST ccache-3.7.12.tar.xz 354684 BLAKE2B b0b1028ede8206622c4b563cdc1351bdbe49ac11aa92d405c778af91db5bac029f7331371ef0a55bc3b1c7a0b60fbc5711277e048481bf0f4ad4b1be8acd3495 SHA512 0eb47869f86d36b3e5fad0d5073973f0444f3efe23fd14469a9e05154ea219228443098b1c5e4a8a0c5c78b4bfa7623735b50ebd6b8b4d0626766061850d6a62
diff --git a/dev-util/ccache/ccache-3.7.12.ebuild b/dev-util/ccache/ccache-3.7.12.ebuild
new file mode 100644
index 00000000000..0e7e1e384c5
--- /dev/null
+++ b/dev-util/ccache/ccache-3.7.12.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+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"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="test"
+
+DEPEND="app-arch/xz-utils
+ sys-libs/zlib"
+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 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-nvcc-test.patch
+ "${FILESDIR}"/${PN}-3.7.12-objdump.patch
+)
+
+src_prepare() {
+ default
+
+ sed \
+ -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
+ "${FILESDIR}"/ccache-config-3 > ccache-config || die
+
+ # mainly used in tests
+ tc-export OBJDUMP
+}
+
+src_configure() {
+ econf --without-bundled-zlib
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_test() {
+ emake check V=1
+}
+
+src_install() {
+ DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
+ default
+
+ 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-3.7.12-objdump.patch b/dev-util/ccache/files/ccache-3.7.12-objdump.patch
new file mode 100644
index 00000000000..f5387104e45
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.7.12-objdump.patch
@@ -0,0 +1,12 @@
+Allow ${CHOST}-objdump (or any other override)
+--- a/test/suites/debug_prefix_map.bash
++++ b/test/suites/debug_prefix_map.bash
+@@ -24,7 +24,7 @@ objdump_cmd() {
+ if $HOST_OS_APPLE; then
+ xcrun dwarfdump -r0 $1
+ else
+- objdump -W $1
++ ${OBJDUMP-objdump} -W $1
+ fi
+ }
+
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2020-06-27 9:21 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-06-27 9:21 UTC (permalink / raw
To: gentoo-commits
commit: 068ded854ecce99aa28cb5bbd78f16769aaccf3a
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 27 09:21:17 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jun 27 09:21:27 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=068ded85
dev-util/ccache: use ${CHOST}-objdump
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/ccache-3.7.10.ebuild | 6 ++++++
dev-util/ccache/files/ccache-3.7.10-objdump.patch | 15 +++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/dev-util/ccache/ccache-3.7.10.ebuild b/dev-util/ccache/ccache-3.7.10.ebuild
index 32f24f67e07..900d8f39d69 100644
--- a/dev-util/ccache/ccache-3.7.10.ebuild
+++ b/dev-util/ccache/ccache-3.7.10.ebuild
@@ -3,6 +3,8 @@
EAPI=7
+inherit toolchain-funcs
+
DESCRIPTION="fast compiler cache"
HOMEPAGE="https://ccache.dev/"
SRC_URI="https://github.com/ccache/ccache/releases/download/v${PV}/ccache-${PV}.tar.xz"
@@ -26,6 +28,7 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
+ "${FILESDIR}"/${P}-objdump.patch
)
src_prepare() {
@@ -34,6 +37,9 @@ src_prepare() {
sed \
-e "/^EPREFIX=/s:'':'${EPREFIX}':" \
"${FILESDIR}"/ccache-config-3 > ccache-config || die
+
+ # mainly used in tests
+ tc-export OBJDUMP
}
src_configure() {
diff --git a/dev-util/ccache/files/ccache-3.7.10-objdump.patch b/dev-util/ccache/files/ccache-3.7.10-objdump.patch
new file mode 100644
index 00000000000..bad334a5c54
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.7.10-objdump.patch
@@ -0,0 +1,15 @@
+Allow ${CHOST}-objdump (or any other override)
+--- a/test/suites/debug_prefix_map.bash
++++ b/test/suites/debug_prefix_map.bash
+@@ -24,9 +24,9 @@ objdump_cmd() {
+ if $HOST_OS_APPLE; then
+ xcrun dwarfdump -r0 $1
+ elif $HOST_OS_FREEBSD; then
+- objdump -W $1
++ ${OBJDUMP-objdump} -W $1
+ else
+- objdump -g $1
++ ${OBJDUMP-objdump} -g $1
+ fi
+ }
+
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2019-01-03 18:45 Sergei Trofimovich
0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2019-01-03 18:45 UTC (permalink / raw
To: gentoo-commits
commit: d312d6ee5684543057c01f6880d5cf85d7c04c9b
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 3 18:43:14 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jan 3 18:45:05 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d312d6ee
dev-util/ccache: bump up to 3.5.1
Package-Manager: Portage-2.3.53, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-util/ccache/Manifest | 1 +
dev-util/ccache/ccache-3.5.1.ebuild | 84 ++++++++++++++++++++++
dev-util/ccache/files/ccache-3.5.1-configure.patch | 19 +++++
3 files changed, 104 insertions(+)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index bcff8ea031f..fd20b0190a1 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,4 +1,5 @@
DIST ccache-3.2.4.tar.xz 302548 BLAKE2B 7d642dc3f944183660e79cfdfd68948528aa3ea4ef8162a4d04837c85ccace35107e663ec81a15438dab133fca2e8bf100fecd483f33c9b0aa52c68989ae8122 SHA512 d048b70804c81dece97f3ba511b3c109ec0d14e7dca69bc68faeeb61a4a7b5639c03e3e5ad7dad4e42b4bd198d7a7fffa4e3b7ef99590dfd4df0805db6c25db7
DIST ccache-3.3.4.tar.xz 314468 BLAKE2B 6e465598df428979a2c821a698afef25c05d09045cbb54ec54cc3b65b8ce6416b6eb46fae0cf5d60f766129cef11eb01410b522318c67416fdf47f6e8fceae66 SHA512 891bcf11b27fa20a250bc86d182663e46af450a3a807b6cab502f202cd57123ce93bcb1fe5e48866feecda76912a5f742efa5869df9117d81624ba185dd4e02c
DIST ccache-3.4.3.tar.xz 328824 BLAKE2B f2ff3276cbadde642a362400b32291f59f60c274861c4c706f0bced801aec7aeeafeeb611331bc23e96fc8790a1d1ffd39df58f24f6a5384d8ddda0da54c9339 SHA512 8a92ef3f3b3688bb4c0b39106bea387ec3065a074327c1fa793e511192acd5cf9aeb5c0065ee8868a944ec63463c2b59fb84edd952102468cd12fcbb1ee16c49
+DIST ccache-3.5.1.tar.xz 335988 BLAKE2B f9cb8d48b16ebf48a409af6e69f16606e543144781b9988f25f5031dd7c4137709e32f76f6ae8879aef425064e6dce112195849008f2dcc9b6deb39d2726cae5 SHA512 25956ac68f24b3a443d9cf74fe759d9d5946e2f2188d40538a31d383550c6674c22f7e9290ceb71f1ee3987ed8f2802343a5a137b2f68692008ead3a347761af
DIST ccache-3.5.tar.xz 334668 BLAKE2B e3e2b63e8c4c8074514fb3a5794325fa05a4d52f48fc436ab0ad21b643ca4d1a1502c989cb47ed68972b105d4f1642e4fadc5ecef1235fe2bd3be5d218094a79 SHA512 92181fb794f06dc231baa4193c37e8f1d844c9281fd64bcb8f4b35c87b4a88dfc9bf36b810b37151ee85699778fcd3783818949a7010e619aeca7e3b33b7a2e3
diff --git a/dev-util/ccache/ccache-3.5.1.ebuild b/dev-util/ccache/ccache-3.5.1.ebuild
new file mode 100644
index 00000000000..b57ecc61aab
--- /dev/null
+++ b/dev-util/ccache/ccache-3.5.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit readme.gentoo-r1
+
+DESCRIPTION="fast compiler cache"
+HOMEPAGE="https://ccache.samba.org/"
+SRC_URI="https://www.samba.org/ftp/ccache/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+IUSE=""
+
+DEPEND="app-arch/xz-utils
+ sys-libs/zlib"
+RDEPEND="${DEPEND}
+ dev-util/shadowman
+ sys-apps/gentoo-functions"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.4-size-on-disk.patch #456178
+ "${FILESDIR}"/${PN}-3.5-nvcc-test.patch
+ "${FILESDIR}"/${PN}-3.5.1-configure.patch
+)
+
+src_prepare() {
+ default
+
+ # make sure we always use system zlib
+ rm -rf src/zlib || die
+ sed \
+ -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
+ "${FILESDIR}"/ccache-config-3 > ccache-config || die
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_test() {
+ emake check V=1
+}
+
+src_install() {
+ DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
+ default
+
+ dobin ccache-config
+ insinto /usr/share/shadowman/tools
+ newins - ccache <<<'/usr/lib/ccache/bin'
+
+ DOC_CONTENTS="
+To use ccache with **non-Portage** C compiling, add
+${EPREFIX}/usr/lib/ccache/bin to the beginning of your path, before ${EPREFIX}/usr/bin.
+Portage 2.0.46-r11+ will automatically take advantage of ccache with
+no additional steps. If this is your first install of ccache, type
+something like this to set a maximum cache size of 2GB:\\n
+# ccache -M 2G\\n
+If you are upgrading from an older version than 3.x you should clear all of your caches like so:\\n
+# CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C\\n
+ccache now supports sys-devel/clang and dev-lang/icc, too!"
+
+ readme.gentoo_create_doc
+}
+
+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
+
+ # nuke broken symlinks from previous versions that shouldn't exist
+ rm -rf "${EROOT}"/usr/lib/ccache.backup || die
+
+ readme.gentoo_print_elog
+}
diff --git a/dev-util/ccache/files/ccache-3.5.1-configure.patch b/dev-util/ccache/files/ccache-3.5.1-configure.patch
new file mode 100644
index 00000000000..b3e1a29670a
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.5.1-configure.patch
@@ -0,0 +1,19 @@
+https://github.com/ccache/ccache/issues/344
+
+--- a/configure
++++ b/configure
+@@ -642,4 +642,5 @@ no_implicit_fallthrough_warning
+ more_warnings
+ include_dev_mk
++getopt_long_c
+ extra_libs
+ disable_man
+@@ -4724,4 +4725,8 @@ done
+
+
++if test x"$ac_cv_func_getopt_long" != x"yes"; then
++ getopt_long_c="src/getopt_long.c"
++fi
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compar_fn_t in stdlib.h" >&5
+ $as_echo_n "checking for compar_fn_t in stdlib.h... " >&6; }
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/
@ 2016-11-10 5:40 Mike Frysinger
0 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2016-11-10 5:40 UTC (permalink / raw
To: gentoo-commits
commit: b0df990f50fda5f0feeed344e76960192ae321f5
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 10 05:38:27 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Nov 10 05:39:44 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0df990f
dev-util/ccache: version bump to 3.3.3 #598866
dev-util/ccache/Manifest | 1 +
dev-util/ccache/ccache-3.3.3.ebuild | 67 ++++++++++++++++++++++
.../ccache/files/ccache-3.3-size-on-disk.patch | 21 +++++++
3 files changed, 89 insertions(+)
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index b49bfff..fb073d4 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,3 +1,4 @@
DIST ccache-3.2.4.tar.xz 302548 SHA256 1c3da93f654e78a4ac71a54b0f63b19bc0fef9aa5522f4ebb9c201d4361cea5d SHA512 d048b70804c81dece97f3ba511b3c109ec0d14e7dca69bc68faeeb61a4a7b5639c03e3e5ad7dad4e42b4bd198d7a7fffa4e3b7ef99590dfd4df0805db6c25db7 WHIRLPOOL 3dc1de9d1cab8769b3776e48746a1967536e7a9d01e4eb23e1ddbaaf2858c16eba170a185312bfdb0a58951c77cd6c79ff30c7cf6ab366ade64c2b6997df7703
DIST ccache-3.2.5.tar.xz 304592 SHA256 117011534b199dbe290b08acae1591c81525536a1e140da22e0fbc04c20bab85 SHA512 12612b899044db50c60bea8ed6cfeb54960ab67514d0aabaea5ee71d3d4d83bb00637e02008365d1d061adf5aa546499948a5eb8a0419222f681058c7fd5fd24 WHIRLPOOL 2cad966b419c16d7956fb2644c1113a8817437f313d54dd17fb16ae4a15f67a322b59d1b225307c980d2e17442478b71ef2bb118d2af4025e530e68fb46767cb
DIST ccache-3.2.7.tar.xz 305596 SHA256 f1db1ef3cdcf85cf40c7be926c28b4a3beb12ea4d7f1760edf45e753c5147d95 SHA512 4292bd880f7ec39591a4abc232822121e79e706659e36c6aac3f3846fa119ebe18eed3bfefb535e229da8556fe787f1700ff3c63df56d459c6f44260db24b9fa WHIRLPOOL 9abbb67873fb894d1a82e96773b723ec06830dc2a344e4d1fdfc713bc5a9a219b918633ea2b2e9c9a48a0eddc4eca3ca0eb2eb6c8b484e6e469990010dfee904
+DIST ccache-3.3.3.tar.xz 312160 SHA256 3b02a745da1cfa9eb438af7147e0fd3545e2f6163de9e5b07da86f58859f04ec SHA512 59652955708c11dc4e2a0d76bc3810de0ce4009b93196d7e6a28ecf3829616d278e7dfedbd715136cd20c81f57d3912682bec8dbcd5ebed5aaf6508520b93587 WHIRLPOOL 5da75d4088fe2596eb7dc10354b322e6122114689126c676317747e20c2d82d7d830ff1476a8799844a0e377cbab085c0ccab21480b0231ed68c11a7d1c55991
diff --git a/dev-util/ccache/ccache-3.3.3.ebuild b/dev-util/ccache/ccache-3.3.3.ebuild
new file mode 100644
index 00000000..afb341d
--- /dev/null
+++ b/dev-util/ccache/ccache-3.3.3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils readme.gentoo-r1
+
+DESCRIPTION="fast compiler cache"
+HOMEPAGE="http://ccache.samba.org/"
+SRC_URI="https://samba.org/ftp/ccache/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="app-arch/xz-utils
+ sys-libs/zlib"
+RDEPEND="${DEPEND}
+ sys-apps/gentoo-functions"
+
+src_prepare() {
+ # make sure we always use system zlib
+ rm -rf zlib || die
+ epatch "${FILESDIR}"/${PN}-3.3-size-on-disk.patch #456178
+ sed \
+ -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
+ "${FILESDIR}"/ccache-config-3 > ccache-config || die
+}
+
+src_install() {
+ DOCS=( AUTHORS.txt MANUAL.txt NEWS.txt README.md )
+ default
+
+ dobin ccache-config
+
+ DOC_CONTENTS="
+To use ccache with **non-Portage** C compiling, add
+${EPREFIX}/usr/lib/ccache/bin to the beginning of your path, before ${EPREFIX}/usr/bin.
+Portage 2.0.46-r11+ will automatically take advantage of ccache with
+no additional steps. If this is your first install of ccache, type
+something like this to set a maximum cache size of 2GB:\\n
+# ccache -M 2G\\n
+If you are upgrading from an older version than 3.x you should clear all of your caches like so:\\n
+# CCACHE_DIR='${CCACHE_DIR:-${PORTAGE_TMPDIR}/ccache}' ccache -C\\n
+ccache now supports sys-devel/clang and dev-lang/icc, too!"
+
+ readme.gentoo_create_doc
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ "${EROOT}"/usr/bin/ccache-config --remove-links
+ "${EROOT}"/usr/bin/ccache-config --remove-links ${CHOST}
+ fi
+}
+
+pkg_postinst() {
+ "${EROOT}"/usr/bin/ccache-config --install-links
+ "${EROOT}"/usr/bin/ccache-config --install-links ${CHOST}
+
+ # nuke broken symlinks from previous versions that shouldn't exist
+ rm -f "${EROOT}"/usr/lib/ccache/bin/${CHOST}-cc || die
+ rm -rf "${EROOT}"/usr/lib/ccache.backup || die
+
+ readme.gentoo_print_elog
+}
diff --git a/dev-util/ccache/files/ccache-3.3-size-on-disk.patch b/dev-util/ccache/files/ccache-3.3-size-on-disk.patch
new file mode 100644
index 00000000..e4e2ff8
--- /dev/null
+++ b/dev-util/ccache/files/ccache-3.3-size-on-disk.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/56178
+
+stick to the size of files on disk rather than their byte size.
+this func is only used for stats management, so this should be safe.
+
+--- a/util.c
++++ b/util.c
+@@ -845,12 +845,7 @@ file_size(struct stat *st)
+ #ifdef _WIN32
+ return (st->st_size + 1023) & ~1023;
+ #else
+- size_t size = st->st_blocks * 512;
+- if ((size_t)st->st_size > size) {
+- // Probably a broken stat() call...
+- size = (st->st_size + 1023) & ~1023;
+- }
+- return size;
++ return st->st_blocks * 512;
+ #endif
+ }
+
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-05-30 2:09 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-24 22:30 [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/files/, dev-util/ccache/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2024-05-30 2:09 Sam James
2024-01-05 7:32 Sam James
2024-01-05 7:10 Sam James
2023-08-08 2:10 Sam James
2023-06-13 18:12 Sam James
2022-04-17 18:32 Sam James
2021-02-16 23:35 Sergei Trofimovich
2020-11-26 8:29 Sergei Trofimovich
2020-11-22 21:20 Sergei Trofimovich
2020-11-22 20:57 Sergei Trofimovich
2020-10-02 22:25 Sergei Trofimovich
2020-06-27 9:21 Sergei Trofimovich
2019-01-03 18:45 Sergei Trofimovich
2016-11-10 5:40 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox