diff options
author | Sam James <sam@gentoo.org> | 2021-09-12 01:43:00 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-09-12 01:48:28 +0100 |
commit | 308cad885033e862b073c10bf73e8b3844a23c5f (patch) | |
tree | 599d43b710479ec20695da94b37c2b73b156997e /dev-util/ccache | |
parent | www-apps/icingaweb2: 2.9.3 stable amd64 / x86 (diff) | |
download | gentoo-308cad885033e862b073c10bf73e8b3844a23c5f.tar.gz gentoo-308cad885033e862b073c10bf73e8b3844a23c5f.tar.bz2 gentoo-308cad885033e862b073c10bf73e8b3844a23c5f.zip |
dev-util/ccache: add 4.4.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/ccache')
-rw-r--r-- | dev-util/ccache/Manifest | 1 | ||||
-rw-r--r-- | dev-util/ccache/ccache-4.4.1.ebuild | 88 |
2 files changed, 89 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index a1dab85d5449..03deeefa2095 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -1,2 +1,3 @@ DIST ccache-4.3.tar.xz 433508 BLAKE2B 6ab48aa587b4dc86020e3b0f722003dc5c03709626e143a1d38506b6072f9963fc76e89b6d18128dfc28035bf8d24e46ea44f219db69a1b3a294416f0b023090 SHA512 ec082de95ea8b22154ce1e67e0a0fc28266cfb71f382205f7eab14e6ac1c7841027d063041131832b3227d833d99ec874e90df238f35f433de4c381566931c7f +DIST ccache-4.4.1.tar.xz 509916 BLAKE2B 54fec9480c37c144667ae2dd969cabc1526a01312200b2b9b26ef1d5533836e2070d28e6a7fbc580f232b22dbd6f1a56a43494b8960d96c5a97d8f041e8f31ca SHA512 820c0b05d2b0209e8478c7409da0e27de8e9621c683aa0f147f9c025b8ac7bc3d06d6945d346143790168da79dfbd14b0ccfb284c7ac05c35f85b492be07d676 DIST ccache-4.4.tar.xz 509516 BLAKE2B 6c4519d3cd93be49dfff09f22ada798894c9f4475395443e0dcfcf768178f1520cf26bc5c2e0ea22e06cc3ebd6ddaf930a2d1b517593a10c3253f7faa3131f43 SHA512 a857d1aded9c352eabba9c0f31b43fd17ae91672dabdfc086851448867c9dff6ad6dd7ee60f8e39102d41b7d8cf7866c6bf104e0214e865de45e75a8df7626f0 diff --git a/dev-util/ccache/ccache-4.4.1.ebuild b/dev-util/ccache/ccache-4.4.1.ebuild new file mode 100644 index 000000000000..39deaa2e861d --- /dev/null +++ b/dev-util/ccache/ccache-4.4.1.ebuild @@ -0,0 +1,88 @@ +# 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 +} |