From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/appmenu-gtk-module/files/, x11-misc/appmenu-gtk-module/
Date: Sun, 17 Jul 2022 08:16:18 +0000 (UTC) [thread overview]
Message-ID: <1658045768.66783743d949869c0dc95248b179dc1d24bc0172.asturm@gentoo> (raw)
commit: 66783743d949869c0dc95248b179dc1d24bc0172
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 31 03:07:48 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 08:16:08 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66783743
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 <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/23598
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
| 1 +
| 52 ++++++++++++++++++++
.../files/0.7.6-no-automagic-gtk.patch | 28 +++++++++++
.../files/0.7.6-no-automagic-unitdir.patch | 56 ++++++++++++++++++++++
| 3 ++
5 files changed, 140 insertions(+)
--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
--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
+
--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>
next reply other threads:[~2022-07-17 8:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 8:16 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-27 0:08 [gentoo-commits] repo/gentoo:master commit in: x11-misc/appmenu-gtk-module/files/, x11-misc/appmenu-gtk-module/ Sam James
2022-07-17 8:16 Andreas Sturmlechner
2020-07-26 18:35 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1658045768.66783743d949869c0dc95248b179dc1d24bc0172.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox