summaryrefslogtreecommitdiff
path: root/dev-util/ccache
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/ccache')
-rw-r--r--dev-util/ccache/Manifest5
-rw-r--r--dev-util/ccache/ccache-4.2.1.ebuild81
-rw-r--r--dev-util/ccache/ccache-4.3-r2.ebuild (renamed from dev-util/ccache/ccache-4.3-r1.ebuild)1
-rw-r--r--dev-util/ccache/files/ccache-4.3-PWD.patch85
4 files changed, 88 insertions, 84 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 669f6bf0da8e..4a2a6cf4f5e0 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -1,10 +1,9 @@
AUX ccache-3.5-nvcc-test.patch 262 BLAKE2B b33b6372e8e6c597d7ed6c781f0a3ac22c435d1309fe387e62c5f9b61c783294ec81cfd1c8a0afc60e63148dcc89f95ebc6d313a0567431a8d05c96e3d59bae1 SHA512 651e26335df8eb551f95064d67925d6e7dd15c8a082b291cdea31fcbc2e5482b2358de71c205c668173b3dc5a75ef004d95dbdd92391e4a4aa6bc1283f5f3a72
AUX ccache-4.0-objdump.patch 271 BLAKE2B e641f1acef1e439660753c781d5760ab2a2530ce8dbcfacb1c3835523ec41ff35701536698827f11c39c1e06641fcf6b57d374944ecb44888a66c7860f97b813 SHA512 cc53f44b173c1ae66258aa573182ae936304dac9daf8489a20c45dbe3d554df207bd93b370da2c86b22fbc4edf5fd954f84fd18812d97d41a88ea4c7926f117c
AUX ccache-4.1-avoid-run-user.patch 557 BLAKE2B 956ac163da6c8acdefb5b395549067272beea095e93686cf553d534c94d76c1c032ef3423f851907367006e1e7bc7b4afe1494bef1eb293e5aca2e3625c29c10 SHA512 bbdd370e478839980423777053baa42ce37cd18ebf8cd36d3f5b13d9252c38b17840ab6e71aefda20a9903bd4a85e4cdb4582728a9db9d1e847b0ee9569bba9e
+AUX ccache-4.3-PWD.patch 2677 BLAKE2B 4a21c496fc2e2249490246d9595935afe13244a4ba39181ac7193445299870a00f8168d6d1602d1ef17881ed32acae27ccb68a1cbc3b386e6c88a2bf5e8ee341 SHA512 2c71fccb53f6205e99995e66b2666834d5c3fd106933b715bc4325bafc27121e8cf6b7925ce1c9d524aac6941f444137c249bda837cfc7be4c08cf6cb5a49f8f
AUX ccache-config-3 2147 BLAKE2B 6e703e12b6a2f83b838f8b1d1e534de3366b6e2994990b30c381b0df28be9c0ae7c0f1d7325282e97ca54881171846c13945b264bd4a793785ff1a19d0941669 SHA512 05d512b001b6a2fdc947d10d810c89683144080a060c24a37422e9b587594e1ee42fa1d7607461571f196819dae92146d861e8ae116e9226e1ff97ea035b3003
-DIST ccache-4.2.1.tar.xz 431484 BLAKE2B 10bb0d1e263e441d91c2dfcd2b2c89f64dfb10b4c5aa66012c388fea2c99d8488538e84b5cef86abf0c9f9aaa0a562b7c7be8a9d4a4073ae3c046e7fe28b7eda SHA512 46bb760ddad5999c5bdff4f3ce6e405eb2018c4a591ad76ba3dd7921b8bfd59a257d992d285e38d69aaf86537962602689175b8741894094819775eec9493b77
DIST ccache-4.3.tar.xz 433508 BLAKE2B 6ab48aa587b4dc86020e3b0f722003dc5c03709626e143a1d38506b6072f9963fc76e89b6d18128dfc28035bf8d24e46ea44f219db69a1b3a294416f0b023090 SHA512 ec082de95ea8b22154ce1e67e0a0fc28266cfb71f382205f7eab14e6ac1c7841027d063041131832b3227d833d99ec874e90df238f35f433de4c381566931c7f
-EBUILD ccache-4.2.1.ebuild 1655 BLAKE2B b3cc038828f86dbd2d8060f5d13a197c399e7b99d0c0fcf4a82fbb498c212a9624fcb023f481c628a123fd1e2237689b1b094187c5fa1caa98aeca38c9c870d7 SHA512 0adb9fe19611bd373870e85d889b2bdaecb0fe6b11c40f3d48add1ecdca99c4b6beed5b151c685eaf13f0b11b0988bf870525ac23e3f78c865565f84e1aba156
-EBUILD ccache-4.3-r1.ebuild 2017 BLAKE2B b1d1697ba86b583246404c35d2a06b13ca4e12b17a095e425899309d803934b4522fba8c207d88de1737c14c6d2ec763b200b46f241789a9e649c08485bdd41e SHA512 210e3baef35396a2a647c115b3dc7a7bcf0d675134edda1b6cd0e5d8240f9af82ac209fb79164a86f9dbb7d40f07089b3aac03a94c5b00d32734f8f4ea34b774
+EBUILD ccache-4.3-r2.ebuild 2047 BLAKE2B 5fe18afc473289fd0d9b754d80e6b1e9751af18de361c4fefce62f25103417ea1bfb4794119ac7d828e87ef32bf6e9df03ea9a75d253902768c3c1219ebf8002 SHA512 306b5baad390e1872ceebab5b9bbd2a16a855321be67a7edf4e0c15264e7c56683a3351dae952cea1f6e9afdf03ac74f4d08b6518e654acd51f5928204001d85
EBUILD ccache-4.3.ebuild 1655 BLAKE2B b3cc038828f86dbd2d8060f5d13a197c399e7b99d0c0fcf4a82fbb498c212a9624fcb023f481c628a123fd1e2237689b1b094187c5fa1caa98aeca38c9c870d7 SHA512 0adb9fe19611bd373870e85d889b2bdaecb0fe6b11c40f3d48add1ecdca99c4b6beed5b151c685eaf13f0b11b0988bf870525ac23e3f78c865565f84e1aba156
MISC metadata.xml 538 BLAKE2B 5d70ae3ee732e530a300eddb61097898034fd227dbc9f9b7d1a86004c755b247f3d7e23737e23a68028fa35d07d9fa76a940bbadcb2e279e80e297d0562fe169 SHA512 1688d981f12ab344da5a579da421675dded7bc1a1e7db5f784f4ab757c630a012e377802aff6b30a59d1928ec0f026d9a60a7d84e9eb0593f1de02b980a7d86a
diff --git a/dev-util/ccache/ccache-4.2.1.ebuild b/dev-util/ccache/ccache-4.2.1.ebuild
deleted file mode 100644
index afcecdc6d9e4..000000000000
--- a/dev-util/ccache/ccache-4.2.1.ebuild
+++ /dev/null
@@ -1,81 +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"
-IUSE="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
-)
-
-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=(
- -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.3-r1.ebuild b/dev-util/ccache/ccache-4.3-r2.ebuild
index 1410477f616f..987b811477e6 100644
--- a/dev-util/ccache/ccache-4.3-r1.ebuild
+++ b/dev-util/ccache/ccache-4.3-r2.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}"/${P}-PWD.patch
)
src_prepare() {
diff --git a/dev-util/ccache/files/ccache-4.3-PWD.patch b/dev-util/ccache/files/ccache-4.3-PWD.patch
new file mode 100644
index 000000000000..3943dab5bd2e
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.3-PWD.patch
@@ -0,0 +1,85 @@
+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
+ }