diff options
author | Sam James <sam@gentoo.org> | 2023-08-30 00:19:15 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-30 00:19:52 +0100 |
commit | 177b45204790210bc1beab2ba5b7e3e8f572e741 (patch) | |
tree | 26925dab5b271c13b29c127f436332dfdc61eb5f /dev-util/ccache | |
parent | dev-libs/vala-common: Version bump to 0.56.13 (diff) | |
download | gentoo-177b45204790210bc1beab2ba5b7e3e8f572e741.tar.gz gentoo-177b45204790210bc1beab2ba5b7e3e8f572e741.tar.bz2 gentoo-177b45204790210bc1beab2ba5b7e3e8f572e741.zip |
dev-util/ccache: add 4.8.3
Closes: https://bugs.gentoo.org/912389
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/ccache')
-rw-r--r-- | dev-util/ccache/Manifest | 2 | ||||
-rw-r--r-- | dev-util/ccache/ccache-4.8.3.ebuild | 132 |
2 files changed, 134 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest index 51c3658ed51d..66e431c754da 100644 --- a/dev-util/ccache/Manifest +++ b/dev-util/ccache/Manifest @@ -3,3 +3,5 @@ DIST ccache-4.7.4.tar.xz.asc 833 BLAKE2B e155f9cb695794a28771a928d50e18705441b9f 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.8.3.ebuild b/dev-util/ccache/ccache-4.8.3.ebuild new file mode 100644 index 000000000000..b514b4aee0cb --- /dev/null +++ b/dev-util/ccache/ccache-4.8.3.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 + +# 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.8-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 +} |