summaryrefslogtreecommitdiff
path: root/gnome-extra/nemo/nemo-6.6.4.ebuild
blob: f565ff0e31b1f2a1d3a46e75dec78952105e68a8 (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
131
132
133
134
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{13..14} )

inherit meson flag-o-matic gnome2-utils optfeature python-single-r1 virtualx xdg

DESCRIPTION="A file manager for Cinnamon, forked from Nautilus"
HOMEPAGE="https://linuxmint-developer-guide.readthedocs.io/en/latest/cinnamon.html https://linuxmint.com/"
SRC_URI="https://github.com/linuxmint/nemo/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2+ LGPL-2+ LGPL-2.1+ FDL-1.1"
SLOT="0"
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv x86"
IUSE="exif gtk-doc +nls selinux test tracker wayland xmp"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

# https://github.com/linuxmint/nemo/issues/2501
RESTRICT="test"

COMMON_DEPEND="
	${PYTHON_DEPS}
	>=app-accessibility/at-spi2-core-2.46.0:2
	>=dev-libs/glib-2.45.7:2[dbus]
	>=dev-libs/gobject-introspection-1.82.0-r2:=
	>=dev-libs/json-glib-1.6.0
	dev-libs/libxmlb:0/2[introspection]
	>=gnome-extra/cinnamon-desktop-6.6:0=
	gnome-extra/libgsf:=
	x11-libs/cairo
	x11-libs/gdk-pixbuf:2
	>=x11-libs/gtk+-3.24.41-r1:3[introspection,wayland?,X]
	x11-libs/libX11
	>=x11-libs/pango-1.40.0
	>=x11-libs/xapp-3.2.2[introspection]

	exif? (
		>=media-libs/libexif-0.6.20
	)
	selinux? (
		sys-libs/libselinux
	)
	tracker? (
		app-misc/tinysparql:3
	)
	xmp? (
		>=media-libs/exempi-2.2.0:=
	)
"
RDEPEND="
	${COMMON_DEPEND}
	$(python_gen_cond_dep '
		dev-python/pygobject:3[${PYTHON_USEDEP}]
	')
	x11-themes/xapp-symbolic-icon-theme

	nls? (
		>=gnome-extra/cinnamon-translations-6.6
	)
"
PDEPEND="
	>=gnome-base/gvfs-0.1.2
"
DEPEND="
	${COMMON_DEPEND}
	x11-base/xorg-proto
"
BDEPEND="
	>=dev-util/gdbus-codegen-2.80.5-r1
	>=dev-util/intltool-0.40.1
	sys-devel/gettext
	virtual/pkgconfig

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

PATCHES=(
	# Undo the switch to untex as it's not packaged.
	"${FILESDIR}/${PN}-5.0.3-use-detex.patch"
)

src_prepare() {
	default
	python_fix_shebang files/usr/share/nemo/actions install-scripts
}

src_configure() {
	# defang automagic dependencies
	use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND

	local emesonargs=(
		$(meson_use exif)
		$(meson_use xmp)
		$(meson_use selinux)
		$(meson_use tracker)
		$(meson_use gtk-doc gtk_doc)
	)
	meson_src_configure
}

src_install() {
	meson_src_install
}

src_test() {
	virtx meson_src_test
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update

	optfeature "archive file mounting" sys-apps/gnome-disk-utility
	optfeature "archive file extract/create from the context menu" gnome-extra/nemo-fileroller

	optfeature_header "Install additional packages to make their associated file types searchable:"
	optfeature "EPUB" "app-arch/unzip app-text/html2text"
	optfeature "image metadata" media-gfx/exif
	optfeature "MP3 tags" media-sound/id3
	optfeature "Microsoft Office .doc" app-text/catdoc
	optfeature "Microsoft Office .xls" dev-python/xlrd
	optfeature "PDF" "app-text/poppler[utils]"
	optfeature "PostScript" app-text/ghostscript-gpl
	optfeature "TeX" app-text/texlive-core
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}