From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5C8A1580B9 for ; Fri, 27 Aug 2021 21:30:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B394E083E; Fri, 27 Aug 2021 21:30:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2D53FE083E for ; Fri, 27 Aug 2021 21:30:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1DF95335DC3 for ; Fri, 27 Aug 2021 21:30:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 783A73A for ; Fri, 27 Aug 2021 21:30:04 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1630099798.f6988b81e4fc908de6c49e2c733eb524f6ed0438.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/ccache/Manifest dev-util/ccache/ccache-4.4.ebuild dev-util/ccache/metadata.xml X-VCS-Directories: dev-util/ccache/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f6988b81e4fc908de6c49e2c733eb524f6ed0438 X-VCS-Branch: master Date: Fri, 27 Aug 2021 21:30:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 89077d35-ad62-48f3-99b9-54c2bb7dfb4a X-Archives-Hash: 58abd6a68770b9dbcdda5f98f07a15cb commit: f6988b81e4fc908de6c49e2c733eb524f6ed0438 Author: Sam James gentoo org> AuthorDate: Fri Aug 27 21:26:59 2021 +0000 Commit: Sam James gentoo org> CommitDate: Fri Aug 27 21:29:58 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6988b81 dev-util/ccache: add 4.4 Signed-off-by: Sam James gentoo.org> dev-util/ccache/Manifest | 1 + dev-util/ccache/ccache-4.4.ebuild | 86 +++++++++++++++++++++++++++++++++++++++ dev-util/ccache/metadata.xml | 1 + 3 files changed, 88 insertions(+) diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index 4e9442f6a4b..a1dab85d544 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -1 +1,2 @@ DIST ccache-4.3.tar.xz 433508 BLAKE2B 6ab48aa587b4dc86020e3b0f722003dc5c03709626e143a1d38506b6072f9963fc76e89b6d18128dfc28035bf8d24e46ea44f219db69a1b3a294416f0b023090 SHA512 ec082de95ea8b22154ce1e67e0a0fc28266cfb71f382205f7eab14e6ac1c7841027d063041131832b3227d833d99ec874e90df238f35f433de4c381566931c7f +DIST ccache-4.4.tar.xz 509516 BLAKE2B 6c4519d3cd93be49dfff09f22ada798894c9f4475395443e0dcfcf768178f1520cf26bc5c2e0ea22e06cc3ebd6ddaf930a2d1b517593a10c3253f7faa3131f43 SHA512 a857d1aded9c352eabba9c0f31b43fd17ae91672dabdfc086851448867c9dff6ad6dd7ee60f8e39102d41b7d8cf7866c6bf104e0214e865de45e75a8df7626f0 diff --git a/dev-util/ccache/ccache-4.4.ebuild b/dev-util/ccache/ccache-4.4.ebuild new file mode 100644 index 00000000000..39f7580581d --- /dev/null +++ b/dev-util/ccache/ccache-4.4.ebuild @@ -0,0 +1,86 @@ +# 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="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="app-text/asciidoc" + +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=( + -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/metadata.xml b/dev-util/ccache/metadata.xml index f673d3c5836..57030654f60 100644 --- a/dev-util/ccache/metadata.xml +++ b/dev-util/ccache/metadata.xml @@ -6,6 +6,7 @@ Gentoo Toolchain Project + Enable Redis backend for storage via dev-libs/hiredis Avoid dynamic dependency on gcc's libstdc++.