mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
Upstream, ouch sets rust-version 1.93.0 in their Cargo.toml [1,2,3], so we must match that with RUST_MIN_VER. This also forces us to bump LLVM_COMPAT, as Rust 1.93.0 requires LLVM 21 [4]. (Also addressed a BadDescription complaint from pkgcheck. It also throws DeprecatedEclass because of llvm-r1, but I don't think there's much I can do about that until cargo.eclass is updated.) [1]: https://github.com/ouch-org/ouch/blob/0.8.0/Cargo.toml#L9 [2]: https://github.com/ouch-org/ouch/blob/0.8.1/Cargo.toml#L9 [3]: https://github.com/ouch-org/ouch/blob/0.8.2/Cargo.toml#L9 [4]: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/rust/rust-1.93.0.ebuild#n8 Part-of: https://codeberg.org/gentoo/guru/pulls/56 Merges: https://codeberg.org/gentoo/guru/pulls/56 Closes: https://bugs.gentoo.org/976392 Signed-off-by: Dustin Smith <d.usty360@gmail.com>
67 lines
1.6 KiB
Bash
67 lines
1.6 KiB
Bash
# Copyright 2023-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
CRATES=""
|
|
|
|
LLVM_COMPAT=( {21..22} )
|
|
RUST_NEEDS_LLVM=1
|
|
RUST_MIN_VER="1.93.0"
|
|
|
|
inherit llvm-r1 cargo shell-completion
|
|
|
|
DESCRIPTION="A cli utility for easily compressing and decompressing files and directories"
|
|
HOMEPAGE="https://github.com/ouch-org/ouch"
|
|
SRC_URI="https://github.com/ouch-org/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
|
DEPS_URI="https://github.com/gentoo-crate-dist/${PN}/releases/download/${PV}/${P}-crates.tar.xz"
|
|
SRC_URI+=" ${DEPS_URI}"
|
|
|
|
LICENSE="MIT"
|
|
# Dependent crate licenses
|
|
LICENSE+=" Apache-2.0 BSD MIT Unicode-DFS-2016 ZLIB"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64"
|
|
|
|
DEPEND="
|
|
app-arch/bzip2
|
|
app-arch/bzip3
|
|
app-arch/xz-utils
|
|
virtual/zlib:=
|
|
"
|
|
RDEPEND="${DEPEND}"
|
|
BDEPEND="
|
|
$(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}=')
|
|
"
|
|
|
|
QA_FLAGS_IGNORED="usr/bin/${PN}"
|
|
QA_PRESTRIPPED="usr/bin/${PN}"
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
# unrar-ng-sys unconditionally adds -stdlib=libc++ which breaks on Linux
|
|
# where libstdc++ is the default C++ standard library. Remove it.
|
|
local build_rs="${ECARGO_VENDOR}/unrar-ng-sys-0.7.6/build.rs"
|
|
if [[ -f "${build_rs}" ]]; then
|
|
sed -i 's/-stdlib=libc++//g' "${build_rs}" || die "Failed to patch unrar-ng-sys build.rs"
|
|
else
|
|
ewarn "Could not find unrar-ng-sys build.rs to patch"
|
|
fi
|
|
}
|
|
|
|
src_compile() {
|
|
local -x OUCH_ARTIFACTS_FOLDER=artifacts
|
|
cargo_src_compile
|
|
}
|
|
|
|
src_install() {
|
|
cargo_src_install
|
|
|
|
doman artifacts/*.1
|
|
|
|
newbashcomp "artifacts/${PN}.bash" "${PN}"
|
|
dozshcomp "artifacts/_${PN}"
|
|
dofishcomp "artifacts/${PN}.fish"
|
|
}
|