diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-12-30 19:07:48 -0800 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-07-17 10:16:08 +0200 |
commit | 66783743d949869c0dc95248b179dc1d24bc0172 (patch) | |
tree | dcf9b41e6b91ff5b98e186db8875d984410e4c58 /x11-misc | |
parent | app-arch/xar: fix QA check issues (diff) | |
download | gentoo-66783743d949869c0dc95248b179dc1d24bc0172.tar.gz gentoo-66783743d949869c0dc95248b179dc1d24bc0172.tar.bz2 gentoo-66783743d949869c0dc95248b179dc1d24bc0172.zip |
x11-misc/appmenu-gtk-module: add 0.7.6, make gtk2 optional
switch to meson buildsystem while at it.
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/23598
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'x11-misc')
5 files changed, 140 insertions, 0 deletions
diff --git a/x11-misc/appmenu-gtk-module/Manifest b/x11-misc/appmenu-gtk-module/Manifest index 2ab8f70f6a51..1efeacc99c80 100644 --- a/x11-misc/appmenu-gtk-module/Manifest +++ b/x11-misc/appmenu-gtk-module/Manifest @@ -1 +1,2 @@ DIST appmenu-gtk-module-0.7.3.tar.xz 48460 BLAKE2B b7008aa618e643a95445aad25bc19eed5b887810891318a891f088284f8f128e6392671226742a8b0c70699a9455739ee61ed56aec32129532ba53dc69809913 SHA512 d7df7e3cea3ccb66d013b23ae8796b8cbb0e0787f37f54078715c4863797c28d44ff38d7ac965b6eb0fd5cb327c1a4b891c74c66ba95b9b9a06e2c06ba5b2ad8 +DIST appmenu-gtk-module-0.7.6.tar.xz 41212 BLAKE2B 7d37107e36502e44a38a1dc4e7ab02a761ec368b791182b223a4ae2631bad2eb52d9fec913ae0274f95f15a1cfbefb47f4807f1e83e8e3985fd4af7c6f0d075b SHA512 6efad2a13a04ae0a2a5e87fdc62eb7a37c8c85051339a3774fd8b579eea97b4633b10e064325205b3f10597530bab003deae24986c3175429a899c292e8786d5 diff --git a/x11-misc/appmenu-gtk-module/appmenu-gtk-module-0.7.6.ebuild b/x11-misc/appmenu-gtk-module/appmenu-gtk-module-0.7.6.ebuild new file mode 100644 index 000000000000..b79bf5484484 --- /dev/null +++ b/x11-misc/appmenu-gtk-module/appmenu-gtk-module-0.7.6.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome2-utils meson systemd + +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/e0b6a32a340922cd05060292b0757162/${P}.tar.xz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="gtk2 wayland" + +BDEPEND="virtual/pkgconfig" + +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 ) +" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${FILESDIR}/0.7.6-no-automagic-gtk.patch" + "${FILESDIR}/0.7.6-no-automagic-unitdir.patch" +) + +src_configure() { + # outputs [ '2', '3' ] OR [ '3' ] + local gtks="[$(usex gtk2 " '2'," '') '3' ]" + + meson_src_configure -Dgtk="${gtks}" -Duserunitdir="$(systemd_get_userunitdir)" +} + +src_install() { + meson_src_install + + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/${PN} 85-${PN} +} + +pkg_postinst() { + gnome2_schemas_update +} diff --git a/x11-misc/appmenu-gtk-module/files/0.7.6-no-automagic-gtk.patch b/x11-misc/appmenu-gtk-module/files/0.7.6-no-automagic-gtk.patch new file mode 100644 index 000000000000..716aefa37612 --- /dev/null +++ b/x11-misc/appmenu-gtk-module/files/0.7.6-no-automagic-gtk.patch @@ -0,0 +1,28 @@ +From 59994f8b0a431f61786de5715c45c24b0dd76cd1 Mon Sep 17 00:00:00 2001 +From: Georgy Yakovlev <gyakovlev@gentoo.org> +Date: Tue, 4 Jan 2022 18:33:12 -0800 +Subject: [PATCH] appmenu-gtk-module/meson.build: only build gtk if requested + +Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> +--- + subprojects/appmenu-gtk-module/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/subprojects/appmenu-gtk-module/meson.build b/subprojects/appmenu-gtk-module/meson.build +index 06ab76d..7279f97 100644 +--- a/meson.build ++++ b/meson.build +@@ -41,8 +41,8 @@ gtk3_ver = '>=3.22.0' + gtk2 = dependency('gtk+-2.0', version: gtk2_ver, required: gtk2_requested) + gtk3 = dependency('gtk+-3.0', version: gtk3_ver, required: gtk3_requested) + +-build_gtk2 = gtk2.found() +-build_gtk3 = gtk3.found() ++build_gtk2 = gtk2_requested and gtk2.found() ++build_gtk3 = gtk3_requested and gtk3.found() + + ################# + # Configuration # +-- +2.34.1 + diff --git a/x11-misc/appmenu-gtk-module/files/0.7.6-no-automagic-unitdir.patch b/x11-misc/appmenu-gtk-module/files/0.7.6-no-automagic-unitdir.patch new file mode 100644 index 000000000000..e46fe74c0734 --- /dev/null +++ b/x11-misc/appmenu-gtk-module/files/0.7.6-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_pkgconfig_variable('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/metadata.xml b/x11-misc/appmenu-gtk-module/metadata.xml index c73224cc9ad9..a0bd0bacf718 100644 --- a/x11-misc/appmenu-gtk-module/metadata.xml +++ b/x11-misc/appmenu-gtk-module/metadata.xml @@ -8,4 +8,7 @@ <upstream> <remote-id type="github">derat/xsettingsd</remote-id> </upstream> + <use> + <flag name="gtk2">Build module for GTK+2</flag> + </use> </pkgmetadata> |