diff options
author | 2024-08-26 23:52:26 +0100 | |
---|---|---|
committer | 2024-08-26 23:54:06 +0100 | |
commit | b3b6229c93f6a57685b81370e8c0d9e46cb68e4f (patch) | |
tree | 9fd4d174285d7fe2a675213c6a775e353d51efdf /x11-misc | |
parent | app-shells/bash: add 5.2_p32-r1 with fix for 5.0-introduced regression in read (diff) | |
download | gentoo-b3b6229c93f6a57685b81370e8c0d9e46cb68e4f.tar.gz gentoo-b3b6229c93f6a57685b81370e8c0d9e46cb68e4f.tar.bz2 gentoo-b3b6229c93f6a57685b81370e8c0d9e46cb68e4f.zip |
x11-misc/appmenu-gtk-module: add 24.05
Note that this really is 24.05. The tarball has 24.02 as a directory
inside but this tarball *is* different to that for the real 24.02.
Upstream appear to have form for this, given the pkgconfig patch
from before too.
While here, apply Eli's new automagic gtk mechanism.
Bug: https://bugs.gentoo.org/785619
Bug: https://bugs.gentoo.org/884891
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-misc')
5 files changed, 156 insertions, 0 deletions
diff --git a/x11-misc/appmenu-gtk-module/Manifest b/x11-misc/appmenu-gtk-module/Manifest index a2be37478ac4..ea75a3b62cfd 100644 --- a/x11-misc/appmenu-gtk-module/Manifest +++ b/x11-misc/appmenu-gtk-module/Manifest @@ -1 +1,2 @@ DIST appmenu-gtk-module-0.7.6.tar.xz 41212 BLAKE2B 7d37107e36502e44a38a1dc4e7ab02a761ec368b791182b223a4ae2631bad2eb52d9fec913ae0274f95f15a1cfbefb47f4807f1e83e8e3985fd4af7c6f0d075b SHA512 6efad2a13a04ae0a2a5e87fdc62eb7a37c8c85051339a3774fd8b579eea97b4633b10e064325205b3f10597530bab003deae24986c3175429a899c292e8786d5 +DIST appmenu-gtk-module-24.05.tar.xz 41364 BLAKE2B 45593cad5431f1b12fd7bc710399f7be7ff381d5757672c90db42187197de67b80f4436fc402e59abfa164d6d659557fb5a57737020d4cda361a2904154e9878 SHA512 0b233e56663f1e46f35b8edda5ea551f9569f6ffc20730fc62fcc090cf14a4032d58c7b8f03f14b29e9433f8ccd9fc89e3de7be50141fba5f85f5bf219517fa7 diff --git a/x11-misc/appmenu-gtk-module/appmenu-gtk-module-24.05.ebuild b/x11-misc/appmenu-gtk-module/appmenu-gtk-module-24.05.ebuild new file mode 100644 index 000000000000..3041130bea89 --- /dev/null +++ b/x11-misc/appmenu-gtk-module/appmenu-gtk-module-24.05.ebuild @@ -0,0 +1,77 @@ +# 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 + + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/${PN}-r1 85-${PN} +} + +pkg_postinst() { + gnome2_schemas_update +} diff --git a/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-24.05-fix-pkgconfig.patch b/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-24.05-fix-pkgconfig.patch new file mode 100644 index 000000000000..76455dd55655 --- /dev/null +++ b/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-24.05-fix-pkgconfig.patch @@ -0,0 +1,10 @@ +--- a/meson.build ++++ b/meson.build +@@ -1,6 +1,6 @@ + project('appmenu-gtk-module', 'c', + meson_version: '>=0.61.0', +- version: '24.02', ++ version: '24.05', + license: ['LGPL-3.0-or-later'], + default_options: [ + 'c_std=gnu11', diff --git a/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-24.05-no-automagic-unitdir.patch b/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-24.05-no-automagic-unitdir.patch new file mode 100644 index 000000000000..007462e767d8 --- /dev/null +++ b/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-24.05-no-automagic-unitdir.patch @@ -0,0 +1,56 @@ +From c60d530583a8bd07aea22c4f3f3aa8b0aaf271c1 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev <gyakovlev@gentoo.org> +Date: Tue, 4 Jan 2022 19:06:37 -0800 +Subject: [PATCH] appmenu-gtk-module: add userunitdir option + +allows setting systemd unit on systemd-less systems + +Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> +--- + .../appmenu-gtk-module/data/meson.build | 19 ++++++++++++------- + .../appmenu-gtk-module/meson_options.txt | 1 + + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/subprojects/appmenu-gtk-module/data/meson.build b/subprojects/appmenu-gtk-module/data/meson.build +index 8378965..d0d1717 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -2,14 +2,19 @@ install_data([ + 'org.appmenu.gtk-module.gschema.xml' + ], install_dir: schema_dir) + ++userunitdir = get_option('userunitdir') + systemd = dependency('systemd', required: false) + +-if systemd.found() ++if userunitdir == '' ++ if systemd.found() + userunitdir = systemd.get_variable(pkgconfig:'systemduserunitdir') +- configure_file( +- input: 'appmenu-gtk-module.service.in', +- output: 'appmenu-gtk-module.service', +- install_dir: userunitdir, +- configuration: {'CMAKE_INSTALL_FULL_BINDIR': join_paths(prefix,get_option('bindir'))} +- ) ++ else ++ userunitdir = '/usr/lib/systemd/user' ++ endif + endif ++configure_file( ++ input: 'appmenu-gtk-module.service.in', ++ output: 'appmenu-gtk-module.service', ++ install_dir: userunitdir, ++ configuration: {'CMAKE_INSTALL_FULL_BINDIR': join_paths(prefix,get_option('bindir'))} ++) +diff --git a/subprojects/appmenu-gtk-module/meson_options.txt b/subprojects/appmenu-gtk-module/meson_options.txt +index f93877a..ec0b3a6 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,4 @@ + option('gtk', type: 'array', choices : ['2','3'], value: ['2','3'], description: 'Supported GTK versions') + option('tests', type : 'boolean', value : false, description: 'Parser tests') + option('gtk_doc', type: 'boolean', value: false, description: 'Build API reference') ++option('userunitdir', type: 'string', description: 'Installation path for user unit file (optional)') +-- +2.34.1 + diff --git a/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-r1 b/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-r1 new file mode 100644 index 000000000000..e6520aabcd6f --- /dev/null +++ b/x11-misc/appmenu-gtk-module/files/appmenu-gtk-module-r1 @@ -0,0 +1,12 @@ +if [[ -n "$GTK_MODULES" ]]; then + GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module" +else + GTK_MODULES="appmenu-gtk-module" +fi + +if [[ -z "$UBUNTU_MENUPROXY" ]]; then + UBUNTU_MENUPROXY=1 +fi + +export GTK_MODULES +export UBUNTU_MENUPROXY |