blob: 274718de5ba085f814eed892737de69443a802cd (
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
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo gnome2-utils flag-o-matic meson systemd virtualx
DESCRIPTION="Application menu module for GTK"
HOMEPAGE="https://gitlab.com/vala-panel-project/vala-panel-appmenu"
SRC_URI="https://gitlab.com/vala-panel-project/vala-panel-appmenu/uploads/b5ace7bf5bd6e3ec3b20e98befb5da39/${P}.tar.xz"
# 24.05 really is a different release to 24.02 (diffed tarballs to check),
# but it has the wrong version in the directory name.
S="${WORKDIR}"/${PN}-24.02
LICENSE="LGPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="gtk2 test wayland"
# Tests are manual and hang in the ebuild
RESTRICT="!test? ( test ) test"
RDEPEND="
dev-libs/glib[dbus]
>=x11-libs/gtk+-3.22.0:3[wayland?]
gtk2? ( >=x11-libs/gtk+-2.24.0:2 )
"
DEPEND="
${RDEPEND}
wayland? ( dev-libs/wayland )
"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${PN}-0.7.6-no-automagic-gtk.patch"
"${FILESDIR}/${PN}-24.05-no-automagic-unitdir.patch"
"${FILESDIR}/${PN}-24.05-fix-pkgconfig.patch"
)
src_configure() {
# defang automagic dependencies, bug #785619
use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
# outputs [ '2', '3' ] OR [ '3' ]
local gtks="[$(usex gtk2 " '2'," '') '3' ]"
local emesonargs=(
-Dgtk="${gtks}"
-Duserunitdir="$(systemd_get_userunitdir)"
$(meson_use test tests)
)
meson_src_configure
}
my_test() {
cd "${BUILD_DIR}"/tests || die
local name
for name in hello radio tester ; do
edo ./${name}
done
}
src_test() {
virtx my_test
}
src_install() {
meson_src_install
mv "${ED}"/usr/share/doc/appmenu-gtk-module/* "${ED}"/usr/share/doc/${PF} || die
rmdir "${ED}"/usr/share/doc/appmenu-gtk-module || die
rm "${ED}"/usr/share/licenses/appmenu-gtk-module/LICENSE || die
exeinto /etc/X11/xinit/xinitrc.d
newexe "${FILESDIR}"/${PN}-r1 85-${PN}
}
pkg_postinst() {
gnome2_schemas_update
}
|