Skip to contentSkip to conversation

package/meson: add upstream patch to fix vapigen support

PATCH Applied Adrian Perez de Castro 2 participants 3 messages Jan 13, 2022 – Jan 14, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/meson: add upstream patch to fix vapigen support

Import an upstream patch which fixes a typo in the Meson source code which caused a wrong command line option to be passed to the vapigen program. This fixes the build for all packages which use Meson and provide API bindings generated using said tool.

---
 ...x-typo-in-vapigen-option-metadatadir.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch
package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch new file +31 -0
new file mode 100644
index 0000000000..f8cc30ec29
@@ -0,0 +1,31 @@
+From 5385e4c0a4dd4f9cf1e15c9c321b22d19cc0011a Mon Sep 17 00:00:00 2001
+From: Michal Vasilek <[email protected]>
+Date: Mon, 10 Jan 2022 21:27:30 +0100
+Subject: [PATCH] gnome: fix typo in vapigen option metadatadir
+
+This typo was introduced in 9ef36fa80bf4483bcd837ea3985a51ab533c7972 and
+can cause a build failure, because --metadatdir is not a valid vapigen
+option.
+
+Signed-off-by: Adrian Perez de Castro <[email protected]>
+Upstream-Status: https://github.com/mesonbuild/meson/pull/9806
+---
+ mesonbuild/modules/gnome.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 1125e56e7..dfc66c2e3 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -1934,7 +1934,7 @@ class GnomeModule(ExtensionModule):
+         cmd: T.List[T.Union[str, 'ExternalProgram']]
+         cmd = [state.find_program('vapigen'), '--quiet', f'--library={library}', f'--directory={build_dir}']
+         cmd.extend([f'--vapidir={d}' for d in kwargs['vapi_dirs']])
+-        cmd.extend([f'--metadatdir={d}' for d in kwargs['metadata_dirs']])
++        cmd.extend([f'--metadatadir={d}' for d in kwargs['metadata_dirs']])
+         cmd.extend([f'--girdir={d}' for d in kwargs['gir_dirs']])
+         cmd += pkg_cmd
+         cmd += ['--metadatadir=' + source_dir]
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Adrian, All,

On 2022-01-13 13:57 +0200, Adrian Perez de Castro spake thusly:

Quoted 18 lines

Import an upstream patch which fixes a typo in the Meson source code which caused a wrong command line option to be passed to the vapigen program. This fixes the build for all packages which use Meson and provide API bindings generated using said tool.

---
 ...x-typo-in-vapigen-option-metadatadir.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch
package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch new file +1 -0
new file mode 100644
index 0000000000..f8cc30ec29
@@ -0,0 +1,31 @@
+From 5385e4c0a4dd4f9cf1e15c9c321b22d19cc0011a Mon Sep 17 00:00:00 2001

package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch line 11

Quoted 10 lines
package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch new file +10 -0
+From: Michal Vasilek <[email protected]>
+Date: Mon, 10 Jan 2022 21:27:30 +0100
+Subject: [PATCH] gnome: fix typo in vapigen option metadatadir
+
+This typo was introduced in 9ef36fa80bf4483bcd837ea3985a51ab533c7972 and
+can cause a build failure, because --metadatdir is not a valid vapigen
+option.
+
+Signed-off-by: Adrian Perez de Castro <[email protected]>
+Upstream-Status: https://github.com/mesonbuild/meson/pull/9806

When an upstream PR/MR has been merged, we prefer that an actual backport is made, so that the patch has the proper upstream hash, which helps in the future ases if a version bump includes that commit.

So I've made that a proper backport:

    $ git format-patch -n1 --start-number=3 --no-numbered 9952446a2

Applied to master with this backport, thanks.

Regards,
Yann E. MORIN.

Quoted 27 lines
package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch new file +20 -0
+---
+ mesonbuild/modules/gnome.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 1125e56e7..dfc66c2e3 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -1934,7 +1934,7 @@ class GnomeModule(ExtensionModule):
+         cmd: T.List[T.Union[str, 'ExternalProgram']]
+         cmd = [state.find_program('vapigen'), '--quiet', f'--library={library}', f'--directory={build_dir}']
+         cmd.extend([f'--vapidir={d}' for d in kwargs['vapi_dirs']])
+-        cmd.extend([f'--metadatdir={d}' for d in kwargs['metadata_dirs']])
++        cmd.extend([f'--metadatadir={d}' for d in kwargs['metadata_dirs']])
+         cmd.extend([f'--girdir={d}' for d in kwargs['gir_dirs']])
+         cmd += pkg_cmd
+         cmd += ['--metadatadir=' + source_dir]
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello Yann,

Quoted 35 lines · On Thu, 13 Jan 2022 18:41:30 +0100 "Yann E. MORIN" <[email protected]>…

On 2022-01-13 13:57 +0200, Adrian Perez de Castro spake thusly:

Quoted 18 lines

Import an upstream patch which fixes a typo in the Meson source code which caused a wrong command line option to be passed to the vapigen program. This fixes the build for all packages which use Meson and provide API bindings generated using said tool.

---
 ...x-typo-in-vapigen-option-metadatadir.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch
package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch new file +1 -0
new file mode 100644
index 0000000000..f8cc30ec29
@@ -0,0 +1,31 @@
+From 5385e4c0a4dd4f9cf1e15c9c321b22d19cc0011a Mon Sep 17 00:00:00 2001

package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch line 11

Quoted 10 lines
package/meson/0003-gnome-fix-typo-in-vapigen-option-metadatadir.patch new file +10 -0
+From: Michal Vasilek <[email protected]>
+Date: Mon, 10 Jan 2022 21:27:30 +0100
+Subject: [PATCH] gnome: fix typo in vapigen option metadatadir
+
+This typo was introduced in 9ef36fa80bf4483bcd837ea3985a51ab533c7972 and
+can cause a build failure, because --metadatdir is not a valid vapigen
+option.
+
+Signed-off-by: Adrian Perez de Castro <[email protected]>
+Upstream-Status: https://github.com/mesonbuild/meson/pull/9806

When an upstream PR/MR has been merged, we prefer that an actual backport is made, so that the patch has the proper upstream hash, which helps in the future ases if a version bump includes that commit.

Quoted 3 lines

So I've made that a proper backport:

    $ git format-patch -n1 --start-number=3 --no-numbered 9952446a2

Neat Git command, today I have learnt about a few things that format-patch can do!

Thanks for merging both this and the gcr patch :)

Cheers,
—Adrián

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot