summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-02-02 04:09:02 +0000
committerSam James <sam@gentoo.org>2024-02-02 04:33:18 +0000
commitdb73ec7f6ea95646d2e137efb9fce7229729d6c9 (patch)
tree25d44e4c7769057931e9dac321a4a86eb83b5dcc /sys-libs/pkgcraft
parentapp-misc/ca-certificates: fix ewwy gross warning when no hooks exist (diff)
downloadgentoo-db73ec7f6ea95646d2e137efb9fce7229729d6c9.tar.gz
gentoo-db73ec7f6ea95646d2e137efb9fce7229729d6c9.tar.bz2
gentoo-db73ec7f6ea95646d2e137efb9fce7229729d6c9.zip
sys-libs/pkgcraft: add 0.0.14
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/pkgcraft')
-rw-r--r--sys-libs/pkgcraft/Manifest1
-rw-r--r--sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild92
2 files changed, 93 insertions, 0 deletions
diff --git a/sys-libs/pkgcraft/Manifest b/sys-libs/pkgcraft/Manifest
index 0e14c3239226..172f24ea1c37 100644
--- a/sys-libs/pkgcraft/Manifest
+++ b/sys-libs/pkgcraft/Manifest
@@ -1 +1,2 @@
DIST pkgcraft-c-0.0.13.tar.xz 29526760 BLAKE2B 5d87fcd427fcf5022bd5d9e24a80f52815d8c472b8eccc2d4b916be3b15faed868761c327d49693d6512807cefabd6120ce96772def99e81df0f87933a49caad SHA512 45bb65003ede7d9ae06a97360c5311e9ca75d5718d5107336e9c3511ad766bcda9ef87901bc57142b6d019aa95ebaf2f351fd69bf60a799aa1f904c452234168
+DIST pkgcraft-c-0.0.14.tar.xz 29920400 BLAKE2B dc163e0fb9bcdfb283346cc2bc2dfec9111d4d70c0bbd7b37b9306cd1bcf1d262e99b8126db71608f16807224ca6a357a7449d7076ab57b225745c7bb69c6080 SHA512 9d47788b60a00f5d006787fa38606f12a738a86e587cff0df5671a959d1e970860f31546117f44187f17c0fa8b52e6ac8ad6ec2a767abcc985e470d5a5f9f4a5
diff --git a/sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild b/sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild
new file mode 100644
index 000000000000..5745de4a1c9f
--- /dev/null
+++ b/sys-libs/pkgcraft/pkgcraft-0.0.14.ebuild
@@ -0,0 +1,92 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES=" "
+inherit edo cargo toolchain-funcs
+
+DESCRIPTION="C library for pkgcraft"
+HOMEPAGE="https://pkgcraft.github.io/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/pkgcraft/pkgcraft"
+ inherit git-r3
+
+ S="${WORKDIR}"/${P}/crates/pkgcraft-c
+
+ BDEPEND="test? ( dev-util/cargo-nextest )"
+else
+ MY_P=${PN}-c-${PV}
+ SRC_URI="https://github.com/pkgcraft/pkgcraft/releases/download/${MY_P}/${MY_P}.tar.xz"
+ S="${WORKDIR}"/${MY_P}
+
+ KEYWORDS="~amd64 ~arm64"
+fi
+
+LICENSE="MIT"
+# Dependent crate licenses
+LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016"
+SLOT="0/${PV}"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# clang needed for bindgen
+BDEPEND+="
+ dev-util/cargo-c
+ sys-devel/clang
+ >=virtual/rust-1.71
+"
+
+QA_FLAGS_IGNORED="usr/lib.*/libpkgcraft.so.*"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ cargo_live_src_unpack
+ else
+ cargo_src_unpack
+ fi
+}
+
+src_compile() {
+ local cargoargs=(
+ --library-type=cdylib
+ --prefix=/usr
+ --libdir="/usr/$(get_libdir)"
+ $(usev !debug '--release')
+ )
+
+ # For scallop building bash
+ tc-export AR CC
+
+ # Can pass -vv if need more output from e.g. scallop configure
+ edo cargo cbuild "${cargoargs[@]}"
+}
+
+src_test() {
+ if [[ ${PV} == 9999 ]] ; then
+ # It's interesting to test the whole thing rather than just
+ # pkgcraft-c.
+ cd "${WORKDIR}"/${P} || die
+
+ # Need nextest per README (separate processes required)
+ # Invocation from https://github.com/pkgcraft/pkgcraft/blob/main/.github/workflows/ci.yml#L56
+ edo cargo nextest run $(usev !debug '--release') --color always --all-features --tests
+ else
+ # There are no tests for pkgcraft-c. Test via e.g. dev-python/pkgcraft.
+ :;
+ fi
+}
+
+src_install() {
+ local cargoargs=(
+ --library-type=cdylib
+ --prefix=/usr
+ --libdir="/usr/$(get_libdir)"
+ --destdir="${ED}"
+ $(usev !debug '--release')
+ )
+
+ edo cargo cinstall "${cargoargs[@]}"
+}