diff options
author | Sam James <sam@gentoo.org> | 2023-05-20 05:39:14 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-20 05:39:29 +0100 |
commit | ea57ee3c758c766e209d0d11b372d314ce924fc4 (patch) | |
tree | 814d6fde051bb6526f79967b5a50b87ed562a5a6 | |
parent | dev-util/valgrind: install gdb auto-loads to std dir (diff) | |
download | gentoo-ea57ee3c758c766e209d0d11b372d314ce924fc4.tar.gz gentoo-ea57ee3c758c766e209d0d11b372d314ce924fc4.tar.bz2 gentoo-ea57ee3c758c766e209d0d11b372d314ce924fc4.zip |
dev-util/ccache: add 4.8.1 (unkeyworded)
unkw'd b/c of failing tests. Reported upstream at https://github.com/ccache/ccache/issues/1288.
I suspect ccache is actually fine though and it's just doctest.
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dev-util/ccache/Manifest | 2 | ||||
-rw-r--r-- | dev-util/ccache/ccache-4.8.1.ebuild | 132 | ||||
-rw-r--r-- | dev-util/ccache/files/ccache-4.8.1-test-typo.patch | 20 |
3 files changed, 154 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index c6ab7452145f..b6ee9a4aee5a 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -3,5 +3,7 @@ DIST ccache-4.6.3.tar.xz.asc 833 BLAKE2B 064d7bdf474540992180372c4c011b5bdeb9883 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.1.tar.xz 559628 BLAKE2B 01c676447aff5493f319df8360b5478b171a229dc47068bfda814bd30afeb28492a3b112532dbe93cf89d47796f4d682e37b22a1d1c31aaf46023e4f7682d80c SHA512 672971560a8aed7754c4280b8983fb185bc7f7f456651e952db3e32fb855ba430c7dcec1f45466e4d10aa59e80e30696f540d93b5f260a846a49dbf4901de514 +DIST ccache-4.8.1.tar.xz.asc 833 BLAKE2B 948ef7d7965717f42f27ee0858c36b2d6272629f190ddf96f7882463304cc103bd70aebda739686fd6176024356c8998d58642ef1d3b0e7943ef7898496ab689 SHA512 c89af05eec3eee8001098c77b27d67b084af06f406af32aafe71f11a2592df86bfe7ac58283749bb7ab3401046312da129c7262230a1a3f892b81946227dd0ad DIST ccache-4.8.tar.xz 556804 BLAKE2B 5cca7d49088c5391abf93a2a493ba8e120575ae834abae86f3669e8c883a93ec29d48ab934aa086a87feb6a08d0c0053b3ce7174cec2f342c2d695a93fa3ef9a SHA512 561424d448a049971742b846429c2fa5f1df43c05f201610dab0a3fab7e4806589c14ca20875cb5733763603c0813fe9350a244b63dda03e9def95d547738d0b DIST ccache-4.8.tar.xz.asc 833 BLAKE2B 4a646db5b7a220a21ad93a02ea4bad23a666ad116af70211ea4a9a546ba7aeaf0c1c88c79d264f614a2ca5387dc91bf655a1632f53889dd74f49e085e2f6bd01 SHA512 22b6aeb54248576a1199e173db7b58b985bdc4e6a298e9fbd32992ab6dbadcd4496ffcadc24241215bd43166b68faf77aa3e492e44ffeac53e1e5e4c46015836 diff --git a/dev-util/ccache/ccache-4.8.1.ebuild b/dev-util/ccache/ccache-4.8.1.ebuild new file mode 100644 index 000000000000..37009fdc79b4 --- /dev/null +++ b/dev-util/ccache/ccache-4.8.1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# XXX: We don't use CCACHE_* for these vars like we do in e.g. cmake/libabigail/qemu +# because Portage unsets them. Aaaah! +# +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-ccache-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +: ${MY_DOCS_PREBUILT:=1} + +MY_DOCS_PREBUILT_DEV=sam +MY_DOCS_VERSION=$(ver_cut 1-2) +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# See bug #784815 +MY_DOCS_USEFLAG="+doc" + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/joelrosdahl.asc +inherit cmake toolchain-funcs flag-o-matic verify-sig + +DESCRIPTION="Fast compiler cache" +HOMEPAGE="https://ccache.dev/" +SRC_URI="https://github.com/ccache/ccache/releases/download/v${PV}/${P}.tar.xz" +SRC_URI+=" verify-sig? ( https://github.com/ccache/ccache/releases/download/v${PV}/${P}.tar.xz.asc )" +if [[ ${MY_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${MY_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${MY_DOCS_VERSION}-docs.tar.xz )" + MY_DOCS_USEFLAG="doc" +fi + +LICENSE="GPL-3 LGPL-3" +SLOT="0" +# Unkeyworded for now because of failing tests: https://github.com/ccache/ccache/issues/1288 +#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}-test-typo.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.1-test-typo.patch b/dev-util/ccache/files/ccache-4.8.1-test-typo.patch new file mode 100644 index 000000000000..f557d24e6e93 --- /dev/null +++ b/dev-util/ccache/files/ccache-4.8.1-test-typo.patch @@ -0,0 +1,20 @@ +https://github.com/ccache/ccache/pull/1287 + +From efad3d7c1d18a260b694904fe695e6abd7dfd4df Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 20 May 2023 05:30:54 +0100 +Subject: [PATCH] test: Fix typo (missing line continuation) + +Fixes: ef634bdb292e1e24b8d1b5490e7857144a77c0fd +--- a/test/suites/base.bash ++++ b/test/suites/base.bash +@@ -552,7 +552,7 @@ fi + # ------------------------------------------------------------------------- + TEST "Directory is not hashed if using -gz" + +- if $COMPILER -c test1.c -gz 2>/dev/null ++ if $COMPILER -c test1.c -gz 2>/dev/null \ + && $COMPILER -E test1.c -gz >preprocessed.i 2>/dev/null \ + && [ -s preprocessed.i ] \ + && ! grep -Fq $PWD preprocessed.i; then + |