Files
guru/media-gfx/czkawka/czkawka-12.0.1.ebuild
ingenarel (NeoJesus) 0cdede5684 */*: quote subshells where cargo_target_dir is called [4/4]
The previous commits fixed instances where ebuilds weren't using
cargo_target_dir to get the target directory. But, was either using
hardcoded target/release paths, which would break if 'DEBUG' USE flag is
enabled, or it was using something else like
`usex debug debug release`

This commit quotes all the instances where cargo_target_dir is called in
a subshell. Because I was doing that anyway for the files I touched in
https://codeberg.org/gentoo/guru/pulls/21

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://codeberg.org/gentoo/guru/pulls/21
Merges: https://codeberg.org/gentoo/guru/pulls/21
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-09-10 16:44:06 +02:00

97 lines
2.1 KiB
Bash

# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES="
"
RUST_MIN_VER="1.94.1"
inherit cargo desktop xdg virtualx
DESCRIPTION="App to find duplicates, empty folders and similar images"
HOMEPAGE="https://github.com/qarmin/czkawka"
SRC_URI="
https://github.com/qarmin/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
https://gitlab.com/api/v4/projects/70192841/packages/generic/${PN}/${PV}/${P}-crates.tar.xz
"
# questionable license for gtk gui assets
# https://github.com/qarmin/czkawka/issues/1029
LICENSE="MIT gtk? ( CC-BY-4.0 ) "
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0 ISC
LGPL-2.1 LGPL-3 MIT MPL-2.0 UoI-NCSA Unicode-3.0 ZLIB
|| ( GPL-3 )
"
SLOT="0"
KEYWORDS="~amd64"
IUSE="avif gui gtk heif +krokiet raw"
REQUIRED_USE="
gui? ( gtk )
"
DEPEND="
avif? (
media-libs/libavif:=
)
gtk? (
dev-libs/glib:2
gui-libs/gtk:4
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/pango
)
heif? (
media-libs/libheif:=
)
raw? (
media-libs/libraw:=
)
"
RDEPEND="${DEPEND}"
BDEPEND="
virtual/pkgconfig
"
QA_FLAGS_IGNORED=".*"
src_configure() {
local myfeatures=(
$(usev heif)
$(usev raw libraw)
$(usev avif libavif)
)
cargo_src_configure --no-default-features --bin czkawka_cli \
$(usev krokiet "--bin krokiet --features winit_software,winit_femtovg") \
$(usev gui "--bin czkawka_gui")
}
src_test() {
virtx cargo_src_test
}
src_install() {
dobin "$(cargo_target_dir)/czkawka_cli"
use gtk && dobin "$(cargo_target_dir)/czkawka_gui"
use krokiet && dobin "$(cargo_target_dir)/krokiet"
if use gui; then
doicon data/icons/com.github.qarmin.czkawka.svg
doicon data/icons/com.github.qarmin.czkawka-symbolic.svg
domenu data/com.github.qarmin.czkawka.desktop
insinto /usr/share/metainfo
doins data/com.github.qarmin.czkawka.metainfo.xml
fi
if use krokiet; then
doicon data/icons/io.github.qarmin.krokiet.svg
domenu data/io.github.qarmin.krokiet.desktop
insinto /usr/share/metainfo
doins data/io.github.qarmin.krokiet.metainfo.xml
fi
}