diff options
Diffstat (limited to 'sys-libs/pkgcraft')
-rw-r--r-- | sys-libs/pkgcraft/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/pkgcraft/pkgcraft-0.0.11.ebuild | 90 | ||||
-rw-r--r-- | sys-libs/pkgcraft/pkgcraft-9999.ebuild | 4 |
3 files changed, 95 insertions, 3 deletions
diff --git a/sys-libs/pkgcraft/Manifest b/sys-libs/pkgcraft/Manifest index f5a290f0ec60..79f9d2d62aa1 100644 --- a/sys-libs/pkgcraft/Manifest +++ b/sys-libs/pkgcraft/Manifest @@ -1,4 +1,6 @@ +DIST pkgcraft-c-0.0.11.tar.xz 31609776 BLAKE2B 9e341ddedebbfab61543e86eafa074700c9b1e9b415704eb1286419f88257d8c56a40f725855d4c92d7e0223dfe0fb645d4aa4a3849e9684b96943d65d174061 SHA512 75cd8d07c550fb6c60b7743918ff0b462ce3c39adedb537a9b12325ba6e1aab5fe7b138ffecd37bdcc2d94a810f6c9651311d5810f4fe0014410622c36233442 DIST pkgcraft-c-0.0.6.tar.xz 18239736 BLAKE2B b037ab525abeee07f6bfa766248220bbb9d5259b735e953add63b2e363826ccb5cf96beda31e05022ec3adbbcdc7e57012f441923cecb96e73372189e8aee755 SHA512 f8c12a3f8f1a9097bfd21ad32d4ce2af16d69fa768c0647189c06678b8c110dcf23e1ef844136df763d9b6fa0d2297f82409bb7fff9eacaaf2eee073197568bf +EBUILD pkgcraft-0.0.11.ebuild 1892 BLAKE2B 0645c0a01b6d56688275b82e053877202d4bd49d28725310991bfdb82da0621a833d3820ff4ff4b89875307db160f171173b2b2bcaa940de0f1170eb95e3883a SHA512 47489c21bed02a665d02a0aa31378943545927c349b430c7948648ddc9a6bdc794217e43279cc876df36c275ec0154298b68da0c690395ad7873d990878ac5ff EBUILD pkgcraft-0.0.6.ebuild 1892 BLAKE2B d9297b0ff9a3d9e4419e5c3b34a54da46c97ee8c33ec446eea299e18c7f2c223e972e977945b36a29746636a37e3c63ff6e7b420218e24dd7865984407df5c0e SHA512 34062fd216b946e523101ff96f24ff797bfc03f49b8af713a89239d84066841af3fa94326567c185b1531cf667ae12be9afefb4646cd36a8c00f6541538afded -EBUILD pkgcraft-9999.ebuild 1885 BLAKE2B 7a3563e437207544ae81a77e593b3dd450169d7323b82968d11ff7cfc3e29cc9f1e7b81a30ff4a92c25ceb241940a37ce2060d45b9286e68808ad18122ae741f SHA512 e20daca479f0da089bd8514512d079a241c072093ca2b85a5ea5fc266e99be6a17f3511f001c4f03285b313c9f5684ff13f3fe8a63bcc2a45bdc4aa48df9c22e +EBUILD pkgcraft-9999.ebuild 1892 BLAKE2B 0645c0a01b6d56688275b82e053877202d4bd49d28725310991bfdb82da0621a833d3820ff4ff4b89875307db160f171173b2b2bcaa940de0f1170eb95e3883a SHA512 47489c21bed02a665d02a0aa31378943545927c349b430c7948648ddc9a6bdc794217e43279cc876df36c275ec0154298b68da0c690395ad7873d990878ac5ff MISC metadata.xml 322 BLAKE2B b0ee0fc53eb8b4b485f74806a78b5560aaf53f1772d7bd3e5af4e03385b3f3aed18fc52462c2d49de6c0d735db0cae3fab175b8adc0e5f7c4baa89e28973776f SHA512 9343cd5028750182fe9325c44f4c4c7df0976b79e0422b66e0fd16f94be76eaa203e8ecad5ec2cbed3535f455f038e51968850ced9afb27af9a98b6b968df88a diff --git a/sys-libs/pkgcraft/pkgcraft-0.0.11.ebuild b/sys-libs/pkgcraft/pkgcraft-0.0.11.ebuild new file mode 100644 index 000000000000..f839051b1542 --- /dev/null +++ b/sys-libs/pkgcraft/pkgcraft-0.0.11.ebuild @@ -0,0 +1,90 @@ +# Copyright 2023 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.70 +" + +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)" + ) + + # 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 --color always --all-features + 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}" + ) + + edo cargo cinstall "${cargoargs[@]}" +} diff --git a/sys-libs/pkgcraft/pkgcraft-9999.ebuild b/sys-libs/pkgcraft/pkgcraft-9999.ebuild index af77f15e2a08..f839051b1542 100644 --- a/sys-libs/pkgcraft/pkgcraft-9999.ebuild +++ b/sys-libs/pkgcraft/pkgcraft-9999.ebuild @@ -21,7 +21,7 @@ else SRC_URI="https://github.com/pkgcraft/pkgcraft/releases/download/${MY_P}/${MY_P}.tar.xz" S="${WORKDIR}"/${MY_P} - KEYWORDS="~amd64" + KEYWORDS="~amd64 ~arm64" fi LICENSE="MIT" @@ -35,7 +35,7 @@ RESTRICT="!test? ( test )" BDEPEND+=" dev-util/cargo-c sys-devel/clang - >=virtual/rust-1.65 + >=virtual/rust-1.70 " QA_FLAGS_IGNORED="usr/lib.*/libpkgcraft.so.*" |