summaryrefslogtreecommitdiff
path: root/media-gfx/xviewer/xviewer-3.4.16.ebuild
blob: d5c28e1043d53ef2a922eb5cb94322a7c6812f37 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit meson gnome2-utils readme.gentoo-r1 strip-linguas

DESCRIPTION="A generic image viewer"
HOMEPAGE="https://github.com/linuxmint/xviewer"
SRC_URI="https://github.com/linuxmint/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64"
IUSE="gtk-doc exif jpeg lcms svg xmp"

DEPEND="
	dev-libs/glib:2
	dev-libs/libpeas:0[gtk]
	gnome-extra/cinnamon-desktop:=
	x11-libs/gdk-pixbuf:2
	x11-libs/gtk+:3[X]
	x11-libs/xapp

	exif? (
		media-libs/libexif
	)
	jpeg? (
		media-libs/libjpeg-turbo:=
	)
	lcms? (
		media-libs/lcms:2
	)
	svg? (
		gnome-base/librsvg:2
	)
	xmp? (
		media-libs/exempi:2=
	)
"
RDEPEND="
	${DEPEND}
	x11-themes/xapp-symbolic-icon-theme
"
BDEPEND="
	dev-util/intltool
	virtual/pkgconfig

	gtk-doc? (
		dev-util/gtk-doc
	)
"

DISABLE_AUTOFORMATTING="yes"
FORCE_PRINT_ELOG="yes"
DOC_CONTENTS="
${PN} can support additional image formats by installing the following
packages:

AVIF/HEIF - media-libs/libheif[gdk-pixbuf]
WebP      - gui-libs/gdk-pixbuf-loader-webp

In some cases you may need to run

	gdk-pixbuf-query-loaders --update-cache

manually after installing GDK pixbuf-based packages for XViewer to recognize
the new formats.
"

src_prepare() {
	default

	strip-linguas -i "${S}/po" || die
	echo $LINGUAS > "${S}/po/LINGUAS" || die
	echo $LINGUAS > "${S}/help/LINGUAS" || die
}

src_configure() {
	local emesonargs=(
		$(meson_feature xmp exempi)
		$(meson_feature exif)
		$(meson_feature jpeg)
		$(meson_feature lcms)
		$(meson_feature svg rsvg)
		$(meson_use gtk-doc docs)
	)
	meson_src_configure
}

src_install() {
	meson_src_install
	readme.gentoo_create_doc
}

pkg_postinst() {
	xdg_icon_cache_update
	xdg_desktop_database_update
	gnome2_schemas_update
	readme.gentoo_print_elog
}

pkg_postrm() {
	xdg_icon_cache_update
	xdg_desktop_database_update
	gnome2_schemas_update
}