summaryrefslogtreecommitdiff
path: root/dev-util/ccache
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-08 04:26:34 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-08 04:26:34 +0100
commit325837835fc86686829aaa6acace3d3c06c74cea (patch)
tree6cc31680e4ce26ab26e863fd7b72d0ffe2d9366f /dev-util/ccache
parent7ad61ca2bfc8f8da08d2fb3085e4333dcccb0a64 (diff)
gentoo auto-resync : 08:10:2024 - 04:26:34
Diffstat (limited to 'dev-util/ccache')
-rw-r--r--dev-util/ccache/Manifest1
-rw-r--r--dev-util/ccache/ccache-4.10.2-r1.ebuild147
2 files changed, 148 insertions, 0 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index 3d794f9b6e39..fd6c5c58e05c 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -23,6 +23,7 @@ DIST ccache-4.9.1.tar.xz 583764 BLAKE2B 9ebaf335fda54666e4bfc8f2c402f2b908b3922f
DIST ccache-4.9.1.tar.xz.asc 833 BLAKE2B a157b0c2c0777732d9a51fb7519f561fac098bbac9ba33fe453b210a6e9a34372b5d00b0fa940d2b783ab0eb48e7bc98707de884b191d83120d9ad8239c9fb76 SHA512 43605eca0f9a62565486c6c7ff622fc4d18a400518aa9c9e3c9d865a99c40c63a6a09d42ccd3428d28575c4de8a69be89c93830d26261d3479792e67179d0839
EBUILD ccache-4.10-r1.ebuild 4036 BLAKE2B 635b71e88a8c8e31ae716e0eb81738a4929c657dd86d3f0f6b5317881cf0b349b56f5ac8acd9b769c4e463b606b0b610da57381c558fe39872e95d059486b7a8 SHA512 2d66be32242ed9409b3c5b7be4a4ca846d3edf088c1e452fe57d2a5d90b20e8105f71377de804831856765f0963580876ba0f6313a235c4a65b7cf8482d5cf81
EBUILD ccache-4.10.1.ebuild 3957 BLAKE2B 737b7ec543d9b3184a9fe5442be7fda8d6d8e3d127d65877f5dc5f4bcbeba58fd8babc97dbf95e33413738631f7b0fdecc8d2e4afb9d0416618efe2c7d17a510 SHA512 4cbd18a4d5018d1cfccfde456b6be4420db7f5bdc9df601cf863ba00c2c514caa63bc8194d3cc879239ea0ad5ec216ddc3cea4193287d714fd7c7a1876b1a6fc
+EBUILD ccache-4.10.2-r1.ebuild 4027 BLAKE2B 42627af07e8a8b9510cce1cc8efa7feff09c7038d6840f46981018ef6fc6e97a2d4f2b6865da88243b883e2f282857a68de0d3ad0025f225826249d756948017 SHA512 1cca7c92c3ce30c4bd798b73615e8fa6a827bb849facae40937da3fd684c7b24a98dfe27839b644a7c2ca92d6a5ab290d71367f1925c7b19607948b7a8bdec25
EBUILD ccache-4.10.2.ebuild 3923 BLAKE2B ad68acbaa63251764ca604d36ed58017aab3fe0ab06ae816e7f86dae8e720dc8670c9b18aa1befeb834ee9d70f3160a991281cdfbad5b98538c4046372b4b41a SHA512 3807cb3abfaf513575e43977750c6d49a5671a4e2420ca54bda35c72f9d53eae42b6a944d231749b88f268380f2cc749e503c5bdffbe358b41be734941456c51
EBUILD ccache-4.8.3.ebuild 3746 BLAKE2B d80580fdbac2ae27a311c99ed2a27acc47d02cbae4bdacd3a58f12e818388feea2d6e2f47dfd096bc3b18c219e77cb0312ce473370ddf1f2df8a777bd455b7f7 SHA512 87ffa6c2eeba2a27093fb604e2920b2321db9435cdf18fd1f06dca010a444166ca48e6b55111fc1a74dedaeeb407bc1bf513bb33929bc78475c0014888485776
EBUILD ccache-4.9.1-r1.ebuild 3780 BLAKE2B 3e4e7253c3ece781c61d8e4862ed3e6d6a4c1f6416bf6fc05417db7078a2983835542f7c20f2a038632f7e3ecf63a3a054cb055ee51390a42bdd76b1c3fa957c SHA512 b40aa093d788eb5a0a26180b37041c4cdafc3cf162e8b3e2f71f1a8381173f90b704c27a0b140671a7b6522cabcc417fc571f2711394c6966a42e4261991b8b6
diff --git a/dev-util/ccache/ccache-4.10.2-r1.ebuild b/dev-util/ccache/ccache-4.10.2-r1.ebuild
new file mode 100644
index 000000000000..27ae5c200cb3
--- /dev/null
+++ b/dev-util/ccache/ccache-4.10.2-r1.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2024 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=/usr/share/openpgp-keys/joelrosdahl.asc
+inherit cmake toolchain-funcs flag-o-matic prefix 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
+# ccache, blake3, NonstdSpan, tl-expected
+LICENSE="GPL-3+ || ( CC0-1.0 Apache-2.0 ) Boost-1.0 CC0-1.0"
+LICENSE+=" elibc_mingw? ( LGPL-3 ISC PSF-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 )"
+
+# TODO: package NonstdSpan, TlExpected
+DEPEND="
+ >=app-arch/zstd-1.3.4:=
+ !static-c++? (
+ >=dev-cpp/cpp-httplib-0.10.6:=
+ >=dev-libs/libfmt-8.0.0:=
+ )
+ >=dev-libs/blake3-1.4.0:=
+ >=dev-libs/xxhash-0.8.0
+ redis? ( >=dev-libs/hiredis-0.13.3:= )
+"
+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.
+BDEPEND="
+ doc? ( dev-ruby/asciidoctor )
+ test? (
+ >=dev-cpp/doctest-2.4.6
+ dev-libs/elfutils
+ )
+ 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.10-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
+
+ cp "${FILESDIR}"/ccache-config-3 ccache-config || die
+ eprefixify ccache-config
+}
+
+src_configure() {
+ # Mainly used in tests
+ tc-export CC OBJDUMP
+
+ local mycmakeargs=(
+ -DENABLE_DOCUMENTATION=$(usex doc)
+ -DENABLE_TESTING=$(usex test)
+ -DDEPS=LOCAL
+ -DREDIS_STORAGE_BACKEND=$(usex redis)
+ )
+
+ # 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.
+ if use static-c++ ; then
+ append-ldflags -static-libstdc++
+ mycmakeargs+=(
+ -DDEP_CPPHTTPLIB=BUNDLED
+ -DDEP_FMT=BUNDLED
+ )
+ fi
+
+ 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
+}