summaryrefslogtreecommitdiff
path: root/media-gfx/swayimg/swayimg-4.7.ebuild
blob: 28cf94de7c9edddd8a5914dc7adad51542100e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit meson xdg

DESCRIPTION="Lightweight image viewer for Wayland display servers"
HOMEPAGE="https://github.com/artemsen/swayimg"
SRC_URI="https://github.com/artemsen/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="avif bash-completion drm exif exr gif heif jpeg jpegxl png raw sixel svg test tiff +wayland webp X"
REQUIRED_USE="|| ( drm wayland )"
RESTRICT="!test? ( test )"

RDEPEND="
	media-libs/fontconfig
	media-libs/freetype
	x11-libs/libxkbcommon
	avif? ( media-libs/libavif:= )
	bash-completion? ( app-shells/bash-completion )
	drm? ( x11-libs/libdrm )
	exif? ( media-libs/libexif )
	exr? ( media-libs/openexr:= )
	gif? ( media-libs/giflib:= )
	heif? ( media-libs/libheif:= )
	jpeg? ( media-libs/libjpeg-turbo:= )
	jpegxl? ( media-libs/libjxl:= )
	png? ( media-libs/libpng:= )
	raw? ( media-libs/libraw:= )
	sixel? ( media-libs/libsixel )
	svg? (
		dev-libs/glib:2
		gnome-base/librsvg:2
		x11-libs/cairo[X=]
	)
	tiff? ( media-libs/tiff:= )
	wayland? (
		dev-libs/json-c:=
		dev-libs/wayland
	)
	webp? ( media-libs/libwebp:= )
"
DEPEND="${RDEPEND}
	svg? ( X? ( x11-base/xorg-proto ) )
	wayland? ( dev-libs/wayland-protocols )
"
BDEPEND="
	test? ( dev-cpp/gtest )
	wayland? ( dev-util/wayland-scanner )
"

src_configure() {
	local emesonargs=(
		$(meson_feature avif)
		$(meson_feature drm)
		$(meson_feature exif)
		$(meson_feature exr)
		$(meson_feature gif)
		$(meson_feature heif)
		$(meson_feature jpeg)
		$(meson_feature jpegxl jxl)
		$(meson_feature png)
		$(meson_feature raw)
		$(meson_feature sixel)
		$(meson_feature svg)
		$(meson_feature test tests)
		$(meson_feature tiff)
		$(meson_feature wayland)
		$(meson_feature wayland compositor)
		$(meson_feature webp)
		$(meson_feature bash-completion bash)
		-Dversion=${PV}
		-Ddesktop=true
		# avoid automagic building with scdoc
		-Dman=false
		-Dzsh=enabled
	)
	meson_src_configure
}

src_install() {
	meson_src_install

	doman extra/*.{1,5}
}