diff mbox series

[meta-gnome] gnome-terminal: fix search_provider build

Message ID 20240106223305.337182-1-f_l_k@t-online.de
State Accepted
Headers show
Series [meta-gnome] gnome-terminal: fix search_provider build | expand

Commit Message

Markus Volk Jan. 6, 2024, 10:33 p.m. UTC
currently org.gnome.ShellSearchProvider2.xml is read from host machine and
thus gnome-terminal with search_provider enabled can only be build from a host
system that has gnome-shell installed.

Add an option and set it to STAGING_DATADIR to avoid:

| DEBUG: Executing shell function do_compile
| ninja: error: '/usr/share/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml', needed by 'src/terminal-search-provider-gdbus-generated.c', missing and no known rule to make it

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 ...-add-option-to-set-dbus_interfacedir.patch | 45 +++++++++++++++++++
 .../gnome-terminal/gnome-terminal_3.50.1.bb   | 10 +++--
 2 files changed, 51 insertions(+), 4 deletions(-)
 create mode 100644 meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch

Comments

Alexander Kanavin Jan. 7, 2024, 6:42 a.m. UTC | #1
Upstream-status is missing.

Alex

On Sat 6. Jan 2024 at 23.33, Markus Volk <f_l_k@t-online.de> wrote:

> currently org.gnome.ShellSearchProvider2.xml is read from host machine and
> thus gnome-terminal with search_provider enabled can only be build from a
> host
> system that has gnome-shell installed.
>
> Add an option and set it to STAGING_DATADIR to avoid:
>
> | DEBUG: Executing shell function do_compile
> | ninja: error:
> '/usr/share/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml', needed
> by 'src/terminal-search-provider-gdbus-generated.c', missing and no known
> rule to make it
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  ...-add-option-to-set-dbus_interfacedir.patch | 45 +++++++++++++++++++
>  .../gnome-terminal/gnome-terminal_3.50.1.bb   | 10 +++--
>  2 files changed, 51 insertions(+), 4 deletions(-)
>  create mode 100644
> meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch
>
> diff --git
> a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch
> b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch
> new file mode 100644
> index 000000000..86f6d6f01
> --- /dev/null
> +++
> b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch
> @@ -0,0 +1,45 @@
> +From 0ca761ee244a649c7420f15407439928addf6737 Mon Sep 17 00:00:00 2001
> +From: Markus Volk <f_l_k@t-online.de>
> +Date: Sat, 6 Jan 2024 23:05:25 +0100
> +Subject: [PATCH] meson: add option to set dbus_interfacedir
> +
> +Signed-off-by: Markus Volk <f_l_k@t-online.de>
> +---
> + meson_options.txt | 7 +++++++
> + src/meson.build   | 2 +-
> + 2 files changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson_options.txt b/meson_options.txt
> +index b555ab663..aea66a3dd 100644
> +--- a/meson_options.txt
> ++++ b/meson_options.txt
> +@@ -13,6 +13,13 @@
> + # You should have received a copy of the GNU General Public License
> + # along with this programme.  If not, see <https://www.gnu.org/licenses/
> >.
> +
> ++option(
> ++  'dbus_interfacedir',
> ++  type: 'string',
> ++  value: '',
> ++  description: 'Set searchprovider interface dir',
> ++)
> ++
> + option(
> +   'dbg',
> +   type: 'boolean',
> +diff --git a/src/meson.build b/src/meson.build
> +index 86e287403..cb707a85d 100644
> +--- a/src/meson.build
> ++++ b/src/meson.build
> +@@ -231,7 +231,7 @@ if get_option('search_provider')
> +
> +   server_sources += gnome.gdbus_codegen(
> +     'terminal-search-provider-gdbus-generated',
> +-    gt_prefix / gt_dbusinterfacedir /
> 'org.gnome.ShellSearchProvider2.xml',
> ++    get_option('dbus_interfacedir') /
> 'org.gnome.ShellSearchProvider2.xml',
> +     autocleanup: 'none',
> +     install_header: false,
> +     interface_prefix: 'org.gnome.Shell',
> +--
> +2.43.0
> +
> diff --git a/meta-gnome/recipes-gnome/gnome-terminal/
> gnome-terminal_3.50.1.bb b/meta-gnome/recipes-gnome/gnome-terminal/
> gnome-terminal_3.50.1.bb
> index 8616f2c9b..6fd816c8c 100644
> --- a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb
> +++ b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb
> @@ -19,15 +19,17 @@ DEPENDS = " \
>      libpcre2 \
>  "
>
> -SRC_URI = "git://
> gitlab.gnome.org/GNOME/gnome-terminal.git;protocol=https;nobranch=1 \
> -           file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
> -           "
> +SRC_URI = " \
> +       git://
> gitlab.gnome.org/GNOME/gnome-terminal.git;protocol=https;nobranch=1 \
> +       file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
> +       file://0001-meson-add-option-to-set-dbus_interfacedir.patch \
> +"
>  SRCREV = "5ac3b8e4bd6fa02651b3c23cedb0a7e1cd769655"
>  S = "${WORKDIR}/git"
>
>  PACKAGECONFIG ?= ""
>  PACKAGECONFIG[nautilus] =
> "-Dnautilus_extension=true,-Dnautilus_extension=false,nautilus,nautilus"
> -PACKAGECONFIG[search_provider] =
> "-Dsearch_provider=true,-Dsearch_provider=false,,gnome-shell"
> +PACKAGECONFIG[search_provider] = "-Dsearch_provider=true
> -Ddbus_interfacedir=${STAGING_DATADIR}/dbus-1/interfaces,-Dsearch_provider=false,gnome-shell"
>
>  FILES:${PN} += " \
>      ${datadir} \
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#108066):
> https://lists.openembedded.org/g/openembedded-devel/message/108066
> Mute This Topic: https://lists.openembedded.org/mt/103569702/1686489
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Markus Volk Jan. 7, 2024, 10:33 a.m. UTC | #2
On Sun, Jan 7 2024 at 07:42:45 AM +01:00:00, Alexander Kanavin 
<alex.kanavin@gmail.com> wrote:
> Upstream-status is missing.

I have expanded the patch so that it would work for upstream.
Upstream-Status: Pending was added

Give me some days for testing before I try to get it upstream
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch
new file mode 100644
index 000000000..86f6d6f01
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal/0001-meson-add-option-to-set-dbus_interfacedir.patch
@@ -0,0 +1,45 @@ 
+From 0ca761ee244a649c7420f15407439928addf6737 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Sat, 6 Jan 2024 23:05:25 +0100
+Subject: [PATCH] meson: add option to set dbus_interfacedir
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ meson_options.txt | 7 +++++++
+ src/meson.build   | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index b555ab663..aea66a3dd 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -13,6 +13,13 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this programme.  If not, see <https://www.gnu.org/licenses/>.
+ 
++option(
++  'dbus_interfacedir',
++  type: 'string',
++  value: '',
++  description: 'Set searchprovider interface dir',
++)
++
+ option(
+   'dbg',
+   type: 'boolean',
+diff --git a/src/meson.build b/src/meson.build
+index 86e287403..cb707a85d 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -231,7 +231,7 @@ if get_option('search_provider')
+ 
+   server_sources += gnome.gdbus_codegen(
+     'terminal-search-provider-gdbus-generated',
+-    gt_prefix / gt_dbusinterfacedir / 'org.gnome.ShellSearchProvider2.xml',
++    get_option('dbus_interfacedir') / 'org.gnome.ShellSearchProvider2.xml',
+     autocleanup: 'none',
+     install_header: false,
+     interface_prefix: 'org.gnome.Shell',
+-- 
+2.43.0
+
diff --git a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb
index 8616f2c9b..6fd816c8c 100644
--- a/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb
+++ b/meta-gnome/recipes-gnome/gnome-terminal/gnome-terminal_3.50.1.bb
@@ -19,15 +19,17 @@  DEPENDS = " \
     libpcre2 \
 "
 
-SRC_URI = "git://gitlab.gnome.org/GNOME/gnome-terminal.git;protocol=https;nobranch=1 \
-           file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
-           "
+SRC_URI = " \
+	git://gitlab.gnome.org/GNOME/gnome-terminal.git;protocol=https;nobranch=1 \
+	file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \
+	file://0001-meson-add-option-to-set-dbus_interfacedir.patch \
+"
 SRCREV = "5ac3b8e4bd6fa02651b3c23cedb0a7e1cd769655"
 S = "${WORKDIR}/git"
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[nautilus] = "-Dnautilus_extension=true,-Dnautilus_extension=false,nautilus,nautilus"
-PACKAGECONFIG[search_provider] = "-Dsearch_provider=true,-Dsearch_provider=false,,gnome-shell"
+PACKAGECONFIG[search_provider] = "-Dsearch_provider=true -Ddbus_interfacedir=${STAGING_DATADIR}/dbus-1/interfaces,-Dsearch_provider=false,gnome-shell"
 
 FILES:${PN} += " \
     ${datadir} \