Merge updates from master

This commit is contained in:
Repository mirror & CI
2024-06-17 09:48:57 +00:00
50 changed files with 84 additions and 87 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 2020-2023 Gentoo Authors
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -159,7 +159,7 @@ KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv"
QA_FLAGS_IGNORED="usr/bin/${PN}"
src_install() {
local build_dir="$(dirname $(find target/ -name ${PN}.bash -print -quit))"
local build_dir="$(dirname $(find "$(cargo_target_dir)" -name ${PN}.bash -print -quit))"
newbashcomp "${build_dir}/${PN}.bash" "${PN}"

View File

@@ -1,4 +1,4 @@
# Copyright 2020-2023 Gentoo Authors
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -190,7 +190,7 @@ src_prepare() {
}
src_install() {
local build_dir="$(dirname $(find target/ -name ${PN}.bash -print -quit))"
local build_dir="$(dirname $(find "$(cargo_target_dir)" -name ${PN}.bash -print -quit))"
newbashcomp "${build_dir}/${PN}.bash" "${PN}"

View File

@@ -38,7 +38,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_install() {

View File

@@ -38,7 +38,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_install() {

View File

@@ -38,7 +38,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_install() {

View File

@@ -38,7 +38,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_install() {

View File

@@ -44,7 +44,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_compile() {

View File

@@ -44,7 +44,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_compile() {

View File

@@ -44,7 +44,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_compile() {

View File

@@ -44,7 +44,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_compile() {

View File

@@ -44,7 +44,7 @@ src_unpack() {
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 target/$(usex debug debug release)|g;" Makefile || die
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_compile() {

View File

@@ -290,9 +290,9 @@ src_compile() {
}
src_install() {
newlib.so target/$(usex debug debug release)/librpm_sequoia.so librpm_sequoia.so.1
newlib.so "$(cargo_target_dir)"/librpm_sequoia.so librpm_sequoia.so.1
dosym librpm_sequoia.so.1 /usr/$(get_libdir)/librpm_sequoia.so
insinto /usr/$(get_libdir)/pkgconfig
doins target/$(usex debug debug release)/rpm-sequoia.pc
doins "$(cargo_target_dir)"/rpm-sequoia.pc
}

View File

@@ -742,9 +742,7 @@ src_install() {
make_desktop_entry ${PN} ${PN^} ${PN} "AudioVideo;Player;Emulator;" \
"MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;"
# TODO: swap with /gentoo after https://github.com/gentoo/gentoo/pull/29510
cd target/$(usex debug{,} release) || die
cd "$(cargo_target_dir)" || die
newbin ${PN}_desktop ${PN}
newbin exporter ${PN}_exporter
dobin ${PN}_scanner

View File

@@ -723,9 +723,7 @@ src_install() {
make_desktop_entry ${PN} ${PN^} ${PN} "AudioVideo;Player;Emulator;" \
"MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;"
# TODO: swap with /gentoo after https://github.com/gentoo/gentoo/pull/29510
cd target/$(usex debug{,} release) || die
cd "$(cargo_target_dir)" || die
newbin ${PN}_desktop ${PN}
newbin exporter ${PN}_exporter
dobin ${PN}_scanner

View File

@@ -75,9 +75,7 @@ src_install() {
make_desktop_entry ${PN} ${PN^} ${PN} "AudioVideo;Player;Emulator;" \
"MimeType=application/x-shockwave-flash;application/vnd.adobe.flash.movie;"
# TODO: swap with /gentoo after https://github.com/gentoo/gentoo/pull/29510
cd target/$(usex debug{,} release) || die
cd "$(cargo_target_dir)" || die
newbin ${PN}_desktop ${PN}
newbin exporter ${PN}_exporter
dobin ${PN}_scanner

View File

@@ -571,8 +571,8 @@ src_test() {
}
src_install() {
dobin target/$(usex debug "debug" "release")/yr
dolib.so target/$(usex debug "debug" "release")/*.so
dobin "$(cargo_target_dir)"/yr
dolib.so "$(cargo_target_dir)"/*.so
wrap_python ${FUNCNAME}
}

View File

@@ -367,7 +367,7 @@ src_install() {
doman "${T}"/${PN}.1
local build_dir=( target/$(usex debug{,} release)/build/${PN}-*/out )
local build_dir=( "$(cargo_target_dir)"/build/${PN}-*/out )
cd ${build_dir[0]} || die
newbashcomp ${PN}.bash ${PN}

View File

@@ -100,12 +100,12 @@ src_install() {
cargo_src_install
dodoc README.md CHANGELOG.md
# bash
./target/$(usex debug debug release)/emlop complete bash > emlop || die
"$(cargo_target_dir)"/emlop complete bash > emlop || die
dobashcomp emlop
# zsh
./target/$(usex debug debug release)/emlop complete zsh > _emlop || die
"$(cargo_target_dir)"/emlop complete zsh > _emlop || die
dozshcomp _emlop
# fish
./target/$(usex debug debug release)/emlop complete fish > emlop.fish || die
"$(cargo_target_dir)"/emlop complete fish > emlop.fish || die
dofishcomp emlop.fish
}

View File

@@ -115,12 +115,12 @@ src_install() {
cargo_src_install
dodoc README.md CHANGELOG.md emlop.toml
# bash
./target/$(usex debug debug release)/emlop complete bash > emlop || die
"$(cargo_target_dir)"/emlop complete bash > emlop || die
dobashcomp emlop
# zsh
./target/$(usex debug debug release)/emlop complete zsh > _emlop || die
"$(cargo_target_dir)"/emlop complete zsh > _emlop || die
dozshcomp _emlop
# fish
./target/$(usex debug debug release)/emlop complete fish > emlop.fish || die
"$(cargo_target_dir)"/emlop complete fish > emlop.fish || die
dofishcomp emlop.fish
}

View File

@@ -493,7 +493,7 @@ src_configure() {
src_compile() {
cargo_src_compile
ATUIN_BIN="target/$(usex debug debug release)/${PN}"
ATUIN_BIN="$(cargo_target_dir)/${PN}"
# Prepare shell completion generation
mkdir completions || die

View File

@@ -505,7 +505,7 @@ src_configure() {
src_compile() {
cargo_src_compile
ATUIN_BIN="target/$(usex debug debug release)/${PN}"
ATUIN_BIN="$(cargo_target_dir)/${PN}"
# Prepare shell completion generation
mkdir completions || die

View File

@@ -269,7 +269,7 @@ src_compile() {
if tc-is-cross-compiler; then
ewarn "html docs were skipped due to cross-compilation"
else
target/$(usex debug{,} release)/${PN} build -d html guide || die
"$(cargo_target_dir)"/${PN} build -d html guide || die
fi
fi
}

View File

@@ -280,7 +280,7 @@ src_compile() {
if tc-is-cross-compiler; then
ewarn "html docs were skipped due to cross-compilation"
else
target/$(usex debug{,} release)/${PN} build -d html guide || die
"$(cargo_target_dir)"/${PN} build -d html guide || die
fi
fi
}

View File

@@ -195,11 +195,11 @@ src_prepare() {
src_test() {
source "${FILESDIR}/test/features.bash" || die
test-features_main "${PWD}/target/release/starlark" || die
test-features_main "${PWD}/$(cargo_target_dir)/starlark" || die
}
src_install() {
dobin target/release/starlark
dobin "$(cargo_target_dir)/starlark"
ln "${ED}/usr/bin/starlark"{,-rust} || die
dodoc -r {docs,{CHANGELOG,README}.md}
}

View File

@@ -513,7 +513,7 @@ python_compile_all() {
use !doc || mdbook build -d html guide || die
if ! tc-is-cross-compiler; then
local maturin=target/$(usex debug{,} release)/maturin
local maturin=$(cargo_target_dir)/maturin
${maturin} completions bash > "${T}"/${PN} || die
${maturin} completions fish > "${T}"/${PN}.fish || die
${maturin} completions zsh > "${T}"/_${PN} || die

View File

@@ -513,7 +513,7 @@ python_compile_all() {
use !doc || mdbook build -d html guide || die
if ! tc-is-cross-compiler; then
local maturin=target/$(usex debug{,} release)/maturin
local maturin=$(cargo_target_dir)/maturin
${maturin} completions bash > "${T}"/${PN} || die
${maturin} completions fish > "${T}"/${PN}.fish || die
${maturin} completions zsh > "${T}"/_${PN} || die

View File

@@ -522,7 +522,7 @@ python_compile_all() {
use !doc || mdbook build -d html guide || die
if ! tc-is-cross-compiler; then
local maturin=target/$(usex debug{,} release)/maturin
local maturin=$(cargo_target_dir)/maturin
${maturin} completions bash > "${T}"/${PN} || die
${maturin} completions fish > "${T}"/${PN}.fish || die
${maturin} completions zsh > "${T}"/_${PN} || die

View File

@@ -419,7 +419,7 @@ src_compile() {
cargo_src_compile --bin ruff
local releasedir
releasedir=target/$(usex 'debug' 'debug' 'release')
releasedir=$(cargo_target_dir)
${releasedir}/ruff generate-shell-completion bash > ruff-completion.bash || die
${releasedir}/ruff generate-shell-completion zsh > ruff-completion.zsh || die
@@ -435,7 +435,7 @@ src_test() {
}
src_install() {
local releasedir=target/$(usex 'debug' 'debug' 'release')
local releasedir=$(cargo_target_dir)
dobin ${releasedir}/ruff

View File

@@ -419,7 +419,7 @@ src_compile() {
cargo_src_compile --bin ruff
local releasedir
releasedir=target/$(usex 'debug' 'debug' 'release')
releasedir=$(cargo_target_dir)
${releasedir}/ruff generate-shell-completion bash > ruff-completion.bash || die
${releasedir}/ruff generate-shell-completion zsh > ruff-completion.zsh || die
@@ -435,7 +435,7 @@ src_test() {
}
src_install() {
local releasedir=target/$(usex 'debug' 'debug' 'release')
local releasedir=$(cargo_target_dir)
dobin ${releasedir}/ruff

View File

@@ -415,7 +415,7 @@ src_compile() {
cargo_src_compile --bin ruff
local releasedir
releasedir=target/$(usex 'debug' 'debug' 'release')
releasedir=$(cargo_target_dir)
${releasedir}/ruff generate-shell-completion bash > ruff-completion.bash || die
${releasedir}/ruff generate-shell-completion zsh > ruff-completion.zsh || die
@@ -431,7 +431,7 @@ src_test() {
}
src_install() {
local releasedir=target/$(usex 'debug' 'debug' 'release')
local releasedir=$(cargo_target_dir)
dobin ${releasedir}/ruff

View File

@@ -96,7 +96,7 @@ QA_FLAGS_IGNORED="usr/bin/${PN}"
src_compile() {
cargo_src_compile
GIT_ABSORB_BIN="target/$(usex debug debug release)/${PN}"
GIT_ABSORB_BIN="$(cargo_target_dir)/${PN}"
# Prepare shell completion generation
mkdir completions || die

View File

@@ -132,7 +132,7 @@ src_compile() {
cargo_src_compile
GIT_ABSORB_BIN="target/$(usex debug debug release)/${PN}"
GIT_ABSORB_BIN="$(cargo_target_dir)/${PN}"
# Prepare shell completion generation
mkdir completions || die

View File

@@ -124,7 +124,7 @@ QA_FLAGS_IGNORED="usr/bin/${PN}"
src_compile() {
cargo_src_compile
GIT_ABSORB_BIN="target/$(usex debug debug release)/${PN}"
GIT_ABSORB_BIN="$(cargo_target_dir)/${PN}"
# Prepare shell completion generation
mkdir completions || die

View File

@@ -281,7 +281,7 @@ python_install_all() {
RM_CONTRIB+=( chg )
fi
if use rust; then
dobin rust/target/release/rhg
dobin "rust/$(cargo_target_dir)/rhg"
fi
for f in ${RM_CONTRIB[@]}; do

View File

@@ -291,7 +291,7 @@ python_install_all() {
RM_CONTRIB+=( chg )
fi
if use rust; then
dobin rust/target/release/rhg
dobin "rust/$(cargo_target_dir)/rhg"
fi
for f in ${RM_CONTRIB[@]}; do

View File

@@ -302,7 +302,7 @@ python_install_all() {
RM_CONTRIB+=( chg )
fi
if use rust; then
dobin rust/target/release/rhg
dobin "rust/$(cargo_target_dir)/rhg"
fi
for f in ${RM_CONTRIB[@]}; do

View File

@@ -130,7 +130,7 @@ python_install_all() {
RM_CONTRIB+=( chg )
fi
if use rust; then
dobin rust/target/release/rhg
dobin "rust/$(cargo_target_dir)/rhg"
fi
for f in ${RM_CONTRIB[@]}; do

View File

@@ -319,6 +319,16 @@ _cargo_gen_git_config() {
fi
}
# @FUNCTION: cargo_target_dir
# @DESCRIPTION:
# Return the directory within target that contains the build, e.g.
# target/aarch64-unknown-linux-gnu/release.
cargo_target_dir() {
local abi
tc-is-cross-compiler && abi=/$(rust_abi)
echo "${CARGO_TARGET_DIR:-target}${abi}/$(usex debug debug release)"
}
# @FUNCTION: cargo_src_unpack
# @DESCRIPTION:
# Unpacks the package and the cargo registry.

View File

@@ -107,10 +107,7 @@ src_compile() {
}
src_install() {
# if USE=debug, install binaries from the debug directory; else
# install binaries from the release directory
# https://bugs.gentoo.org/889052
dobin target/$(usex debug debug release)/{agreety,fakegreet,greetd}
dobin "$(cargo_target_dir)"/{agreety,fakegreet,greetd}
insinto /etc/greetd
doins config.toml

View File

@@ -94,10 +94,7 @@ src_compile() {
}
src_install() {
# if USE=debug, install binaries from the debug directory; else
# install binaries from the release directory
# https://bugs.gentoo.org/889052
dobin target/$(usex debug debug release)/{agreety,fakegreet,greetd}
dobin "$(cargo_target_dir)"/{agreety,fakegreet,greetd}
insinto /etc/greetd
doins config.toml

View File

@@ -224,6 +224,6 @@ src_install() {
mkdir -p "${D}"/usr/$(get_libdir)/firefox || die "Failed to create /usr/lib*/firefox directory."
exeinto /usr/$(get_libdir)/firefox
doexe target/release/geckodriver
doexe "$(cargo_target_dir)"/geckodriver
dosym -r /usr/$(get_libdir)/firefox/geckodriver /usr/bin/geckodriver
}

View File

@@ -195,8 +195,7 @@ QA_FLAGS_IGNORED=(
QA_PRESTRIPPED="${QA_FLAGS_IGNORED[*]}"
src_install() {
local target_dir="$(usex debug debug release)"
dobin target/"${target_dir}"/hurl{,fmt}
dobin "$(cargo_target_dir)"/hurl{,fmt}
doman docs/manual/hurl{,fmt}.1
dodoc CHANGELOG.md README.md LICENSE

View File

@@ -218,8 +218,8 @@ src_install() {
einstalldocs
local build_dir=( target/$(usex debug{,} release)/build/${PN}-*/out )
cd ${build_dir[0]} || die "Cannot change directory to ${PN} build"
local build_dir=( "$(cargo_target_dir)"/build/${PN}-*/out )
cd "${build_dir[0]}" || die "Cannot change directory to ${PN} build"
doman assets/manual/bat.1

View File

@@ -247,8 +247,8 @@ src_install() {
einstalldocs
local build_dir=( target/$(usex debug{,} release)/build/${PN}-*/out )
cd ${build_dir[0]} || die "Cannot change directory to ${PN} build"
local build_dir=( "$(cargo_target_dir)"/build/${PN}-*/out )
cd "${build_dir[0]}" || die "Cannot change directory to ${PN} build"
doman assets/manual/bat.1

View File

@@ -99,21 +99,21 @@ src_install() {
cargo_src_install
newbashcomp - rg <<-EOF
$(target/$(usex debug debug release)/rg --generate complete-bash)
"$(cargo_target_dir)"/rg --generate complete-bash)
EOF
insinto /usr/share/fish/vendor_completions.d
newins - rg.fish <<-EOF
$(target/$(usex debug debug release)/rg --generate complete-fish)
"$(cargo_target_dir)"/rg --generate complete-fish)
EOF
insinto /usr/share/zsh/site-functions
newins - _rg <<-EOF
$(target/$(usex debug debug release)/rg --generate complete-zsh)
"$(cargo_target_dir)"/rg --generate complete-zsh)
EOF
dodoc CHANGELOG.md FAQ.md GUIDE.md README.md
newman - rg.1 <<-EOF
$(target/$(usex debug debug release)/rg --generate man)
"$(cargo_target_dir)"/rg --generate man)
EOF
}

View File

@@ -175,7 +175,7 @@ src_install() {
emake \
DESTDIR="${D}" \
DATADIR="${ED}/usr/share" \
PDATA_TOOLS="target/$(usex debug debug release)/pdata_tools" \
PDATA_TOOLS="$(cargo_target_dir)/pdata_tools" \
install
einstalldocs

View File

@@ -175,7 +175,7 @@ src_install() {
emake \
DESTDIR="${D}" \
DATADIR="${ED}/usr/share" \
PDATA_TOOLS="target/$(usex debug debug release)/pdata_tools" \
PDATA_TOOLS="$(cargo_target_dir)/pdata_tools" \
install
einstalldocs

View File

@@ -1,4 +1,4 @@
# Copyright 2023 Gentoo Authors
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.6.3
@@ -280,14 +280,14 @@ QA_FLAGS_IGNORED="usr/bin/procs"
src_install() {
cargo_src_install
target/$(usex debug debug release)/procs --gen-completion bash || die
"$(cargo_target_dir)"/procs --gen-completion bash || die
newbashcomp procs.bash procs
target/$(usex debug debug release)/procs --gen-completion zsh || die
"$(cargo_target_dir)"/procs --gen-completion zsh || die
insinto /usr/share/zsh/site-functions
doins _procs
target/$(usex debug debug release)/procs --gen-completion fish || die
"$(cargo_target_dir)"/procs --gen-completion fish || die
insinto /usr/share/fish/vendor_completions.d
doins procs.fish
}

View File

@@ -308,14 +308,14 @@ QA_FLAGS_IGNORED="usr/bin/procs"
src_install() {
cargo_src_install
target/$(usex debug debug release)/procs --gen-completion bash || die
"$(cargo_target_dir)"/procs --gen-completion bash || die
newbashcomp procs.bash procs
target/$(usex debug debug release)/procs --gen-completion zsh || die
"$(cargo_target_dir)"/procs --gen-completion zsh || die
insinto /usr/share/zsh/site-functions
doins _procs
target/$(usex debug debug release)/procs --gen-completion fish || die
"$(cargo_target_dir)"/procs --gen-completion fish || die
insinto /usr/share/fish/vendor_completions.d
doins procs.fish
}

View File

@@ -791,10 +791,10 @@ src_compile() {
src_install() {
exeinto /usr/bin
doexe target/$(usex debug "debug" "release")/wezterm
doexe target/$(usex debug "debug" "release")/wezterm-gui
doexe target/$(usex debug "debug" "release")/wezterm-mux-server
doexe target/$(usex debug "debug" "release")/strip-ansi-escapes
doexe "$(cargo_target_dir)/wezterm"
doexe "$(cargo_target_dir)/wezterm-gui"
doexe "$(cargo_target_dir)/wezterm-mux-server"
doexe "$(cargo_target_dir)/strip-ansi-escapes"
insinto /usr/share/icons/hicolor/128x128/apps
newins assets/icon/terminal.png org.wezfurlong.wezterm.png