diff --git a/sys-apps/uutils-coreutils/Manifest b/sys-apps/uutils-coreutils/Manifest index d95d2d8c8643b..d865cbded0f72 100644 --- a/sys-apps/uutils-coreutils/Manifest +++ b/sys-apps/uutils-coreutils/Manifest @@ -1,2 +1,4 @@ DIST coreutils-0.7.0-crates.tar.xz 22825916 BLAKE2B 810e8f398488ea8182da6a8edb7192d232ad04213326f6340f214f3eed514bba13112e32a9c0b91f869770c0cc808227661a53d288df7975caa2df75f24c1092 SHA512 940f6351d85e626ca4030555af38dec1ad2fcb9897bcf4f33958eb0576816d8e29ce9ab8d5144e819877b02cf14433f6d122ea6f5dc77a169fc40563534601cc +DIST coreutils-0.8.0-crates.tar.xz 23791272 BLAKE2B b5f413dbe58cc4bc4ed5370857873a2a33bdcd1deb88a4b366b8d281dc54c4f41587640b3ec41702fbdeb5babe6c1720816661621d1ee54f0259d9cbbd2ea6c0 SHA512 d92cfb7301c07a5566146dcde60356de6daa879c5545b183ef9f5d0546ac38d191b99f32b046d3f11001e222cee1fc454c588828c8366f9af0b90f167c7ea683 DIST uutils-coreutils-0.7.0.tar.gz 3137923 BLAKE2B ef7539429324b64adb710dcb93981f9e5bbd8e7b54af462dfb419d2877270c1cb88c67b170ee5098e7490766cfe0ea4a9807e06103ea5d6100006f84226eb4b7 SHA512 e6d01d9320050efaa64ac261d86fddbb79895a0768c388248b412be571989ec4fc78c094e9606d56154abab06b3f66bd4784c55dbf8129db183e78df4bd7c43c +DIST uutils-coreutils-0.8.0.tar.gz 3189526 BLAKE2B 834d816187989e2651a710f2cb6eae3a475615bd9793a5abde6bab5a78647640fcb9d9088fca7fea31d90bffedf6dcb49b407ee736991c24829fcf13c9702b44 SHA512 fb586a10c31d041a04ad5a61219569263a3b2a85314d1f5a032e5a599488a47c03289d5783ed41ad26b024b3c01c31cc787fa7a7c4a262521dc08c4694f3cfa6 diff --git a/sys-apps/uutils-coreutils/uutils-coreutils-0.8.0.ebuild b/sys-apps/uutils-coreutils/uutils-coreutils-0.8.0.ebuild new file mode 100644 index 0000000000000..346603bf33e13 --- /dev/null +++ b/sys-apps/uutils-coreutils/uutils-coreutils-0.8.0.ebuild @@ -0,0 +1,127 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.6.2 + +EAPI=8 + +CRATES=" +" + +RUST_MIN_VER="1.88.0" +LLVM_COMPAT=( {17..22} ) +inherit cargo flag-o-matic llvm-r2 multiprocessing + +DESCRIPTION="GNU coreutils rewritten in Rust" +HOMEPAGE="https://uutils.github.io/coreutils/ https://github.com/uutils/coreutils" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/uutils/coreutils" + inherit git-r3 +elif [[ ${PV} == *_p* ]] ; then + COREUTILS_COMMIT="" + SRC_URI="https://github.com/uutils/coreutils/archive/${COREUTILS_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/coreutils-${COREUTILS_COMMIT} +else + SRC_URI="https://github.com/uutils/coreutils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/coreutils-${PV} + + KEYWORDS="~amd64 ~arm64 ~ppc64" +fi + +if [[ ${PV} != 9999 ]] ; then + SRC_URI+=" + https://github.com/gentoo-crate-dist/coreutils/releases/download/${PV}/coreutils-${PV}-crates.tar.xz + " +fi + +LICENSE="MIT" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 BSD-2 BSD Boost-1.0 CC0-1.0 ISC MIT Unicode-3.0 ZLIB +" +SLOT="0" +IUSE="debug selinux test" +RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/oniguruma:= + selinux? ( sys-libs/libselinux ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + test? ( dev-util/cargo-nextest ) + selinux? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + ') + ) +" +QA_FLAGS_IGNORED=".*" + +pkg_setup() { + llvm-r2_pkg_setup + rust_pkg_setup +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi + + # This is should be a set of env vars in upstream CI + rm -f "${S}/.cargo/config.toml" +} + +src_compile() { + # normally cargo_src_compile sets this for us, but we don't use it + filter-lto + + # By default, the crate uses a system version if it can. This just guarantees + # that it will error out instead of building a vendored copy. + export RUSTONIG_SYSTEM_LIBONIG=1 + + makeargs=( + # Disable output synchronisation as make calls cargo + -Onone + + V=1 + + PROFILE=$(usex debug debug release) + + PREFIX="${EPREFIX}/usr" + PROG_PREFIX="uu-" + MULTICALL=y + MANDIR="/share/man/man1" + + SELINUX_ENABLED=$(usex selinux 1 0) + + # pinky, uptime, users, and who require utmpx (not available on musl) + # bug #832868 + # runcon chcon require selinux, but upstream broke the SELINUX_ENABLED logic + SKIP_UTILS="$(usev elibc_musl "pinky uptime users who") $(usev !selinux "runcon chcon")" + + # bug #963516 + LIBSTDBUF_DIR="${EPREFIX}/usr/libexec/${PN}" + ) + + emake "${makeargs[@]}" +} + +src_test() { + local -x RUST_BACKTRACE=full + local -x NEXTEST_TEST_THREADS="$(makeopts_jobs)" + + # Nicer output for nextest vs test + emake "${makeargs[@]}" \ + CARGOFLAGS="${CARGOFLAGS} $(usev !debug --release)" \ + TEST_NO_FAIL_FAST="--no-fail-fast" \ + nextest +} + +src_install() { + emake "${makeargs[@]}" DESTDIR="${D}" install +}