summaryrefslogtreecommitdiff
path: root/media-gfx/geeqie/geeqie-3.4.ebuild
blob: 4806704f9da960f48ea083951c421d4a29727f66 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LUA_COMPAT=( lua5-{1,3,4} luajit )

inherit flag-o-matic lua-single meson optfeature xdg

DESCRIPTION="A lightweight GTK image viewer forked from GQview"
HOMEPAGE="https://www.geeqie.org"
SRC_URI="https://github.com/BestImageViewer/${PN}/releases/download/v${PV}/${P}.tar.xz
	https://dev.gentoo.org/~voyageur/distfiles/${P}-docs.tar.xz"
# Doc build:
# clone git at matching tag
# mkdir build; ./build-aux/gen-changelog.sh . build;
# pandoc README.md -o build/README.html

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
IUSE="debug djvu exif ffmpegthumbnailer fits heif jpeg jpeg2k jpegxl lcms lua map openexr pdf raw spell tiff videometadata webp X xmp zip"

RDEPEND="gnome-extra/zenity
	virtual/libintl
	>=gui-libs/gtk-4.18:4[X?]
	djvu? ( app-text/djvu )
	exif? ( >=media-gfx/exiv2-0.18:=[xmp?] )
	ffmpegthumbnailer? ( media-video/ffmpegthumbnailer )
	fits? ( sci-libs/cfitsio:= )
	heif? ( >=media-libs/libheif-1.3.2 )
	jpeg2k? ( >=media-libs/openjpeg-2.3.0:2= )
	jpeg? ( media-libs/libjpeg-turbo:= )
	jpegxl? ( >=media-libs/libjxl-0.3.7:= )
	lcms? ( media-libs/lcms:2 )
	lua? ( ${LUA_DEPS} )
	map? ( media-libs/libshumate:= )
	openexr? ( media-libs/openexr:= )
	pdf? ( >=app-text/poppler-0.62[cairo] )
	raw? ( >=media-libs/libraw-0.20:= )
	spell? ( app-text/libspelling:= )
	tiff? ( media-libs/tiff:= )
	videometadata? ( media-video/ffmpeg:= )
	webp? ( media-libs/libwebp:= )
	zip? ( >=app-arch/libarchive-3.4.0 )"
DEPEND="${RDEPEND}"
BDEPEND="
	dev-util/glib-utils
	sys-devel/gettext
	virtual/pkgconfig"

REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
	videometadata? ( exif )"

pkg_setup() {
	# Do not require setting LUA_SINGLE_TARGET if lua is not used
	use lua && lua-single_pkg_setup
}

src_prepare() {
	default

	# Do not install the bundled icon fallback license/readme files.
	sed -e '/^install_data($/,/^)$/d' \
		-i data/icons/meson.build || die

	# Drop the "Ancillary files" test, repo/CI lint bundle
	sed -e "/^# Ancillary files test$/,/^summary({'Ancillary files'/d" \
		-i meson.build || die
}

src_configure() {
	# defang automagic dependencies
	# Currently only needed for X11-specific workarounds.
	use X || append-flags -DGENTOO_GTK_HIDE_X11

	local emesonargs=(
		-Dgq_helpdir="share/doc/${PF}"
		-Dgq_htmldir="share/doc/${PF}/html"
		# Disable in-build documentation generation
		-Ddoxygen=disabled
		-Dhelp_pdf=disabled
		-Dpandoc=disabled
		-Dyelp_build=disabled
		$(meson_use debug)
		$(meson_feature djvu)
		$(meson_feature exif exiv2)
		$(meson_feature ffmpegthumbnailer videothumbnailer)
		$(meson_feature fits)
		$(meson_feature heif)
		$(meson_feature jpeg)
		$(meson_feature jpeg2k j2k)
		$(meson_feature jpegxl)
		$(meson_feature lcms cms)
		$(meson_feature lua)
		$(meson_feature map gps_map)
		$(meson_feature openexr exr)
		$(meson_feature pdf)
		$(meson_feature raw libraw)
		$(meson_feature spell)
		$(meson_feature tiff)
		$(meson_feature videometadata)
		$(meson_feature zip archive)
	)

	meson_src_configure
}

src_install() {
	meson_src_install

	# Manually generated ChangeLog
	dodoc "${WORKDIR}"/${P}-docs/*

	# The application needs access to some uncompressed doc files.
	docompress -x /usr/share/doc/${PF}/AUTHORS
	docompress -x /usr/share/doc/${PF}/ChangeLog
	docompress -x /usr/share/doc/${PF}/README.md
}

pkg_postinst() {
	xdg_pkg_postinst

	optfeature "Camera import and tethered photography plugins" media-gfx/gphoto2
	optfeature "Lens ID plugin" media-libs/exiftool
	optfeature "Image crop plugin" "media-libs/exiftool media-gfx/imagemagick"
	optfeature "Image rotate plugin (JPEG)" media-gfx/fbida
	optfeature "Image rotate plugin (TIFF/PNG)" media-gfx/imagemagick
	optfeature "Print preview functionality" app-text/evince
}