1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2024 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit gnome2-utils meson systemd
|
|
6 |
inherit edo gnome2-utils flag-o-matic meson systemd virtualx
|
7 |
7 |
|
8 |
8 |
DESCRIPTION="Application menu module for GTK"
|
9 |
9 |
HOMEPAGE="https://gitlab.com/vala-panel-project/vala-panel-appmenu"
|
10 |
|
SRC_URI="https://gitlab.com/vala-panel-project/vala-panel-appmenu/uploads/e0b6a32a340922cd05060292b0757162/${P}.tar.xz"
|
11 |
|
S="${WORKDIR}/${PN}"
|
|
10 |
SRC_URI="https://gitlab.com/vala-panel-project/vala-panel-appmenu/uploads/b5ace7bf5bd6e3ec3b20e98befb5da39/${P}.tar.xz"
|
|
11 |
# 24.05 really is a different release to 24.02 (diffed tarballs to check),
|
|
12 |
# but it has the wrong version in the directory name.
|
|
13 |
S="${WORKDIR}"/${PN}-24.02
|
12 |
14 |
|
13 |
15 |
LICENSE="LGPL-3+"
|
14 |
16 |
SLOT="0"
|
15 |
17 |
KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
|
16 |
|
IUSE="gtk2 wayland"
|
|
18 |
IUSE="gtk2 test wayland"
|
|
19 |
# Tests are manual and hang in the ebuild
|
|
20 |
RESTRICT="!test? ( test ) test"
|
17 |
21 |
|
18 |
22 |
RDEPEND="
|
19 |
23 |
dev-libs/glib[dbus]
|
20 |
|
>=x11-libs/gtk+-3.22.0:3[wayland=]
|
|
24 |
>=x11-libs/gtk+-3.22.0:3[wayland?]
|
21 |
25 |
gtk2? ( >=x11-libs/gtk+-2.24.0:2 )
|
22 |
26 |
"
|
23 |
|
DEPEND="${RDEPEND}
|
|
27 |
DEPEND="
|
|
28 |
${RDEPEND}
|
24 |
29 |
wayland? ( dev-libs/wayland )
|
25 |
30 |
"
|
26 |
31 |
BDEPEND="virtual/pkgconfig"
|
27 |
32 |
|
28 |
33 |
PATCHES=(
|
29 |
|
"${FILESDIR}/${P}-no-automagic-gtk.patch"
|
30 |
|
"${FILESDIR}/${P}-no-automagic-unitdir.patch"
|
31 |
|
"${FILESDIR}/${P}-fix-pkgconfig.patch"
|
|
34 |
"${FILESDIR}/${PN}-0.7.6-no-automagic-gtk.patch"
|
|
35 |
"${FILESDIR}/${PN}-24.05-no-automagic-unitdir.patch"
|
|
36 |
"${FILESDIR}/${PN}-24.05-fix-pkgconfig.patch"
|
32 |
37 |
)
|
33 |
38 |
|
34 |
39 |
src_configure() {
|
|
40 |
# defang automagic dependencies, bug #785619
|
|
41 |
use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
|
|
42 |
|
35 |
43 |
# outputs [ '2', '3' ] OR [ '3' ]
|
36 |
44 |
local gtks="[$(usex gtk2 " '2'," '') '3' ]"
|
37 |
45 |
|
38 |
|
meson_src_configure -Dgtk="${gtks}" -Duserunitdir="$(systemd_get_userunitdir)"
|
|
46 |
local emesonargs=(
|
|
47 |
-Dgtk="${gtks}"
|
|
48 |
-Duserunitdir="$(systemd_get_userunitdir)"
|
|
49 |
$(meson_use test tests)
|
|
50 |
)
|
|
51 |
|
|
52 |
meson_src_configure
|
|
53 |
}
|
|
54 |
|
|
55 |
my_test() {
|
|
56 |
cd "${BUILD_DIR}"/tests || die
|
|
57 |
|
|
58 |
local name
|
|
59 |
for name in hello radio tester ; do
|
|
60 |
edo ./${name}
|
|
61 |
done
|
|
62 |
}
|
|
63 |
|
|
64 |
src_test() {
|
|
65 |
virtx my_test
|
39 |
66 |
}
|
40 |
67 |
|
41 |
68 |
src_install() {
|
42 |
69 |
meson_src_install
|
43 |
70 |
|
|
71 |
mv "${ED}"/usr/share/doc/appmenu-gtk-module/* "${ED}"/usr/share/doc/${PF} || die
|
|
72 |
rmdir "${ED}"/usr/share/doc/appmenu-gtk-module || die
|
|
73 |
|
|
74 |
rm "${ED}"/usr/share/licenses/appmenu-gtk-module/LICENSE || die
|
|
75 |
|
44 |
76 |
exeinto /etc/X11/xinit/xinitrc.d
|
45 |
|
newexe "${FILESDIR}"/${PN} 85-${PN}
|
|
77 |
newexe "${FILESDIR}"/${PN}-r1 85-${PN}
|
46 |
78 |
}
|
47 |
79 |
|
48 |
80 |
pkg_postinst() {
|