Introduction

This is a small blog post with medium usage of numbers to show how much lines of patches and how many packages on xbps-src had gir enabled for cross arches.

We will also look at how many fixes went upstream with links to each merge request and pull request that has been made and merged.

The numbers are from the day this article is published.

xbps-src

Let's start with a list of packages that have added gir:

spice-gtk
gstreamer1
playerctl
geocode-glib
libhandy
jsonrpc-glib
libgit2-glib
libnice
gssdp
grilo
libxklavier
template-glib
gmime3
libgexiv2
accountsservice
gjs
gtksourceview4
zeitgeist
libgweather
rest
libsoup
telepathy-glib
tepl
colord
glade3
amtk
libgxps
libdazzle
libcloudproviders
appstream-glib
json-glib
libnotify
gtk+3
libosinfo
libxmlb
libgusb
pango
gdk-pixbuf
atk

That is 39 package is total, here is the same graph but the commit that introduced the change is now available

9b951d7960e4abebf296d92e5fd58ef415131958 -> spice-gtk
5c7be9025dd072b5af762308630b64fead2f7775 -> gstreamer1
42a9cf96c028a2dd089b72888e4fd005b0033a76 -> playerctl
ddc4fcc572bdc9f8cf068897a7cd59b0c18d68cd -> geocode-glib
20e11f9dfca2854c3782ab84880a956ec23aecbc -> libhandy
729620aa9fe2c8281866d77a75de9bbb2d1d6c4d -> jsonrpc-glib
953e7becaf6d7e92d0bdac8e8e62a78ff53b22ed -> libgit2-glib
4b5fbbe1c150c52b811cd5b2f68e5c49c4f6c6ff -> libnice
eb5382126d663509bdd9628adecebe6e5c567bb0 -> gssdp
2c9f2a132807bd643e03d5a9ecb856e52d4ead9a -> grilo
177ade5a7debafaf0eb5515922578f2dc72b4cc3 -> libxklavier
ee7237b57b0861a98737ffd88bff25fae5c2756f -> template-glib
f759d0d0e2f808e9d4bf7963cfacd4dd4ce1ff3c -> gmime3
88abaa8e0313030ae70bbd21376c7d12bc051427 -> libgexiv2
41187d4a49e542c60b0bbf98d8484203bced0f99 -> accountsservice
f96911283997001258edc9405870e25f3dadff7b -> gjs
dea969b6d0fec29f1b5b413ed5b01cb07511a926 -> gtksourceview4
353cc52fcf56f94c795ad2db5674c3cb55a77d13 -> zeitgeist
e8a4217ee36564096610a17d410cb7238995ac88 -> libgweather
243e83d37f76535fbf9a2215e14ebad00a9d94e3 -> rest
0e116f4377470d34dd657e2e095ac1b9a2487b35 -> libsoup
3af5665004b3323af8cfef89b5517d5dbeba08a9 -> telepathy-glib
5bc99ff6290d8821c7e7b880d71e7874f5346ec3 -> tepl
818f76e8bc5fef7ef0a1e9aa7b7d1dbf8f1842e0 -> colord
ff9ff93579ca06dbba712f28a1ae648b3fa1ab1e -> glade3
942e0b9267e04bf3a09d9aeb981b2c11101763b2 -> amtk
054f572ad817ce23685df4970fb77e4a7abfa56e -> libgxps
50a9e6c46be7516bae18386237caa808072c4986 -> libdazzle
0403ea836b7f2a419c22dcd516be820f160479f7 -> libcloudproviders
03f3215e0f1b81493af7eb348b0d09d6d780d477 -> appstream-glib
00a0a4ad948d9ea6c20b969d1c8a4e0abd8708b3 -> json-glib
559964ebbffcc16e9b66e306953f2923a41db790 -> libnotify
e6dd7107a70e8846cc577cb01c1b18a4c2f40d99 -> gtk+3
960f3fc434e6e6470973961e8fd3435cf1168fe0 -> libosinfo
c355b3498c0c3908f2258cc9980ca15ecafb19b6 -> libxmlb
5c24610dd70bd6440287f968d8420f5635691270 -> libgusb
d42494625cb1815c1d2699821da642f6bf7e4e54 -> pango
c824a3abcccc012855d57f4b1479c13de03f235d -> gdk-pixbuf
b3ff0a41e346f83ef7b2358a58d7272a01796439 -> atk

That is 39 commits as well, one for each package. But not all commits are created equal, let's see what each changed.

commit 9b951d7960e4abebf296d92e5fd58ef415131958
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 17:17:50 2019 -0200

    spice-gtk: enable gir and vala

 srcpkgs/spice-gtk/template | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

commit 5c7be9025dd072b5af762308630b64fead2f7775
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 17:04:51 2019 -0200

    gstreamer1: enable gir

 srcpkgs/gstreamer1/template | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

commit 42a9cf96c028a2dd089b72888e4fd005b0033a76
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 16:15:52 2019 -0200

    playerctl: enable gir

 srcpkgs/playerctl/patches/fix-gir-cross.patch | 13 +++++++++++++
 srcpkgs/playerctl/template                    | 16 +++++++++-------
 2 files changed, 22 insertions(+), 7 deletions(-)

commit ddc4fcc572bdc9f8cf068897a7cd59b0c18d68cd
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 16:04:10 2019 -0200

    geocode-glib: enable gir

 srcpkgs/geocode-glib/patches/fix-gir-cross.patch | 17 +++++++++++++++++
 srcpkgs/geocode-glib/template                    | 18 ++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)

commit 20e11f9dfca2854c3782ab84880a956ec23aecbc
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 11:25:45 2019 -0200

    libhandy: enable gir, vala and glade

 srcpkgs/libhandy/patches/fix-gir-cross.patch | 18 ++++++++++++++++++
 srcpkgs/libhandy/template                    | 15 +++++++++------
 2 files changed, 27 insertions(+), 6 deletions(-)

commit 729620aa9fe2c8281866d77a75de9bbb2d1d6c4d
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 10:50:58 2019 -0200

    jsonrpc-glib: enable gir and vala

 srcpkgs/jsonrpc-glib/patches/fix-gir-cross.patch | 16 ++++++++++++++++
 srcpkgs/jsonrpc-glib/template                    | 18 ++++++++++++------
 2 files changed, 28 insertions(+), 6 deletions(-)

commit 953e7becaf6d7e92d0bdac8e8e62a78ff53b22ed
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 03:40:39 2019 -0200

    libgit2-glib: enable gir

 srcpkgs/libgit2-glib/patches/fix-gir-cross.patch | 14 ++++++++++++++
 srcpkgs/libgit2-glib/template                    | 23 ++++++++++++++---------
 2 files changed, 28 insertions(+), 9 deletions(-)

commit 4b5fbbe1c150c52b811cd5b2f68e5c49c4f6c6ff
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 03:17:28 2019 -0200

    libnice: enable gir

 srcpkgs/libnice/template | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

commit eb5382126d663509bdd9628adecebe6e5c567bb0
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 03:12:23 2019 -0200

    gssdp: enable gir and vapi

 srcpkgs/gssdp/template | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

commit 2c9f2a132807bd643e03d5a9ecb856e52d4ead9a
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 03:02:54 2019 -0200

    grilo: enable gir and vapi

 srcpkgs/grilo/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

commit 177ade5a7debafaf0eb5515922578f2dc72b4cc3
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 02:21:59 2019 -0200

    libxklavier: enable gir

 srcpkgs/libxklavier/template | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

commit ee7237b57b0861a98737ffd88bff25fae5c2756f
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 00:05:59 2019 -0200

    template-glib: enable gir, remove gir and vala build_option
    
    Gobject introspection is hard required, so there is no reason
    to avoid it with gir and vala

 srcpkgs/template-glib/patches/fix-gir-cross.patch | 17 +++++++++++++++++
 srcpkgs/template-glib/template                    | 22 ++++++++++------------
 2 files changed, 27 insertions(+), 12 deletions(-)

commit f759d0d0e2f808e9d4bf7963cfacd4dd4ce1ff3c
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 02:10:51 2019 -0200

    gmime3: enable gir

 srcpkgs/gmime3/template | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

commit 88abaa8e0313030ae70bbd21376c7d12bc051427
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Thu Feb 7 00:46:46 2019 -0200

    libgexiv2: enable gir

 srcpkgs/libgexiv2/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

commit 41187d4a49e542c60b0bbf98d8484203bced0f99
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Wed Feb 6 23:30:07 2019 -0200

    accountsservice: enable gir

 srcpkgs/accountsservice/template | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

commit f96911283997001258edc9405870e25f3dadff7b
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Wed Feb 6 23:07:45 2019 -0200

    gjs: enable gir

 srcpkgs/gjs/template | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

commit dea969b6d0fec29f1b5b413ed5b01cb07511a926
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Tue Feb 5 15:28:14 2019 -0200

    gtksourceview4: enable gir and add vala build_option

 srcpkgs/gtksourceview4/template | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

commit 353cc52fcf56f94c795ad2db5674c3cb55a77d13
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Tue Feb 5 18:25:13 2019 -0200

    zeitgeist: enable gir, add vala build option

 srcpkgs/zeitgeist/template | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

commit e8a4217ee36564096610a17d410cb7238995ac88
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Tue Feb 5 15:55:14 2019 -0200

    libgweather: enable gir and vala

 srcpkgs/libgweather/patches/fix-gir-cross.patch | 17 +++++++++++++++++
 srcpkgs/libgweather/template                    | 17 +++++++++++------
 2 files changed, 28 insertions(+), 6 deletions(-)

commit 243e83d37f76535fbf9a2215e14ebad00a9d94e3
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Tue Feb 5 20:33:12 2019 -0200

    rest: enable gir
    
    depends: #8223

 srcpkgs/rest/template | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

commit 0e116f4377470d34dd657e2e095ac1b9a2487b35
Author: Rasmus Thomsen <rasmus.thomsen@protonmail.com>
Date:   Tue Feb 5 18:59:49 2019 +0100

    libsoup: enable gir, add vala option
    
    closes #8223
    
    Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>

 srcpkgs/libsoup/template | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

commit 3af5665004b3323af8cfef89b5517d5dbeba08a9
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Tue Feb 5 18:23:52 2019 -0200

    telepathy-glib: enable gir add vala build option

 srcpkgs/telepathy-glib/template | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

commit 5bc99ff6290d8821c7e7b880d71e7874f5346ec3
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 14:57:25 2019 -0200

    tepl: enable gir

 srcpkgs/tepl/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

commit 818f76e8bc5fef7ef0a1e9aa7b7d1dbf8f1842e0
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 18:02:49 2019 -0200

    colord: enable gir

 srcpkgs/colord/patches/fix-gir-cross.patch | 28 +++++++++++++++++++++++++++
 srcpkgs/colord/template                    | 31 ++++++++++++++++--------------
 2 files changed, 45 insertions(+), 14 deletions(-)

commit ff9ff93579ca06dbba712f28a1ae648b3fa1ab1e
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 15:05:11 2019 -0200

    glade3: enable gir

 srcpkgs/glade3/template | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

commit 942e0b9267e04bf3a09d9aeb981b2c11101763b2
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 02:24:28 2019 -0200

    amtk: enable gir

 srcpkgs/amtk/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

commit 054f572ad817ce23685df4970fb77e4a7abfa56e
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 12:35:29 2019 -0200

    libgxps: enable gir

 srcpkgs/libgxps/patches/fix-gir-cross.patch | 14 ++++++++++++++
 srcpkgs/libgxps/template                    | 24 ++++++++++++++----------
 2 files changed, 28 insertions(+), 10 deletions(-)

commit 50a9e6c46be7516bae18386237caa808072c4986
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 08:51:53 2019 -0200

    libdazzle: enable gir, split vala build_option

 srcpkgs/libdazzle/patches/fix-cross-gir.patch | 14 ++++++++++++++
 srcpkgs/libdazzle/template                    | 22 ++++++++++++++--------
 2 files changed, 28 insertions(+), 8 deletions(-)

commit 0403ea836b7f2a419c22dcd516be820f160479f7
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 08:36:00 2019 -0200

    libcloudproviders: enable gir

 srcpkgs/libcloudproviders/template | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

commit 03f3215e0f1b81493af7eb348b0d09d6d780d477
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 08:30:22 2019 -0200

    appstream-glib: enable gir

 .../patches/0003-fix-as-compilation.patch               | 15 +++++++++++++++
 srcpkgs/appstream-glib/template                         | 17 +++++++++--------
 2 files changed, 24 insertions(+), 8 deletions(-)

commit 00a0a4ad948d9ea6c20b969d1c8a4e0abd8708b3
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 02:02:51 2019 -0200

    json-glib: enable gir

 srcpkgs/json-glib/template | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

commit 559964ebbffcc16e9b66e306953f2923a41db790
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 02:19:55 2019 -0200

    libnotify: enable gir

 srcpkgs/libnotify/template | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

commit e6dd7107a70e8846cc577cb01c1b18a4c2f40d99
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 02:33:10 2019 -0200

    gtk+3: enable gir
    
    required for amtk

 srcpkgs/gtk+3/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

commit 960f3fc434e6e6470973961e8fd3435cf1168fe0
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 02:08:55 2019 -0200

    libosinfo: enable gir

 srcpkgs/libosinfo/template | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

commit c355b3498c0c3908f2258cc9980ca15ecafb19b6
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Mon Feb 4 00:42:41 2019 -0200

    libxmlb: enable gir

 srcpkgs/libxmlb/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

commit 5c24610dd70bd6440287f968d8420f5635691270
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Sun Feb 3 15:33:22 2019 -0200

    libgusb: enable gir

 srcpkgs/libgusb/patches/fix-cross-gir.patch | 13 +++++++++++++
 srcpkgs/libgusb/template                    | 29 ++++++++++++++++++-----------
 2 files changed, 31 insertions(+), 11 deletions(-)

commit d42494625cb1815c1d2699821da642f6bf7e4e54
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Sun Feb 3 00:37:15 2019 -0200

    pango: enable gir

 srcpkgs/pango/template | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

commit c824a3abcccc012855d57f4b1479c13de03f235d
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Sun Feb 3 00:18:19 2019 -0200

    gdk-pixbuf: enable gir

 srcpkgs/gdk-pixbuf/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

commit b3ff0a41e346f83ef7b2358a58d7272a01796439
Author: maxice8 <thinkabit.ukim@gmail.com>
Date:   Sat Feb 2 23:53:11 2019 -0200

    atk: enable gir

 srcpkgs/atk/template | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

Looks good, we added 671 lines and removed 328 lines, now lets see how much we needed to send fixes to upstream.

Upstream

The good news is that not many required changes, here is a list of the package and the Pull Request, Merge Request made to it.

colord

Upstream: https://github.com/hughsie/colord  
Status: Merged  
PR: https://github.com/hughsie/colord/pull/86
lines-added: 4
lines-removed: 0
diff --git a/lib/colord/meson.build b/lib/colord/meson.build
index a46ca184..61f0518d 100644
--- a/lib/colord/meson.build
+++ b/lib/colord/meson.build
@@ -186,6 +186,7 @@ libcolord_girtarget = gnome.generate_gir(colord,
   export_packages : 'colord',
   extra_args : [
     '--c-include=colord.h',
+    '-DCD_COMPILATION',
     ],
   link_with : colordprivate,
   dependencies : [
diff --git a/lib/colorhug/meson.build b/lib/colorhug/meson.build
index e5556731..ba59f7dc 100644
--- a/lib/colorhug/meson.build
+++ b/lib/colorhug/meson.build
@@ -101,6 +101,9 @@ libcolorhug_gir = gnome.generate_gir(colorhug,
     'GUsb-1.0',
     libcolord_gir,
   ],
+  extra_args : [
+    '-DCD_COMPILATION',
+  ],
   install : true
 )

geocode-glib

Upstream: https://github.com/GNOME/geocode-glib
Status: Open
PR: https://github.com/GNOME/geocode-glib/pull/2
lines-added: 1
lines-removed: 2 
diff --git a/geocode-glib/meson.build b/geocode-glib/meson.build
index 8bc2bfc..0377535 100644
--- a/geocode-glib/meson.build
+++ b/geocode-glib/meson.build
@@ -69,10 +69,9 @@ pkgconf.generate(libraries: libgcglib,
                  ])
 
 gir = find_program('g-ir-scanner', required: false)
-cross_build = meson.is_cross_build()
 enable_gir = get_option('enable-introspection')
 
-if gir.found() and not cross_build and enable_gir
+if gir.found() and enable_gir
   gir_args = [
     '--quiet',
    '--c-include=geocode-glib/geocode-glib.h'

template-glib

Upstream: https://gitlab.gnome.org/GNOME/template-glib
Status: Merged
PR: https://gitlab.gnome.org/GNOME/template-glib/merge_requests/4
lines-added: 4
lines-removed: 1
diff --git a/src/meson.build b/src/meson.build
index 08d325b7e83b2c3a021aefeab18e3eea58ca9254..5adef727c7d00e3f8cd4c841205e3f44dc7015c2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -174,7 +174,10 @@ if get_option('with_introspection')
                 install: true,
         install_dir_gir: girdir,
     install_dir_typelib: typelibdir,
-             extra_args: [ '--c-include=tmpl-glib.h' ],
+             extra_args: [
+               '--c-include=tmpl-glib.h',
+               '-DTMPL_GLIB_COMPILATION',
+             ],
   )
 
   if get_option('with_vapi')

libgusb

Upstream: https://github.com/hughsie/libgusb
Status: Merged
PR: https://github.com/hughsie/libgusb/pull/14
lines-added: 1
lines-removed: 0
diff --git a/gusb/meson.build b/gusb/meson.build
index 7c25d51..36d21dd 100644
--- a/gusb/meson.build
+++ b/gusb/meson.build
@@ -106,6 +106,7 @@ libgusb_girtarget = gnome.generate_gir(gusb,
   export_packages : 'gusb',
   extra_args : [
     '--c-include=gusb.h',
+    '-DGUSB_COMPILATION',
     ],
   link_with : gusb,
   dependencies : [

jsonrpc-glib

Upstream: https://gitlab.gnome.org/GNOME/jsonrpc-glib
Status: Open
PR: https://gitlab.gnome.org/GNOME/jsonrpc-glib/merge_requests/4
lines-added: 4
lines-removed: 1
diff --git a/src/meson.build b/src/meson.build
index 12f8e32b19d777fe2c66604b9d8e1cd783746e8a..3366e96149f5fb66eeec4f9baa06605f7d30e755 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -79,7 +79,10 @@ if get_option('with_introspection')
                 install: true,
         install_dir_gir: girdir,
     install_dir_typelib: typelibdir,
-             extra_args: [ '--c-include=jsonrpc-glib.h' ],
+             extra_args: [
+                 '--c-include=jsonrpc-glib.h',
+                 '-DJSONRPC_GLIB_COMPILATION',
+             ],
   )
 
   if get_option('with_vapi')

libgit2-glib

Upstream: https://gitlab.gnome.org/GNOME/libgit2-glib
Status: Open
PR: https://gitlab.gnome.org/GNOME/libgit2-glib/merge_requests/9
lines-added: 1
lines-removed: 1
diff --git a/meson.build b/meson.build
index bdcc0b3bcd9ae8078483d0ded5b7a42cc2c4bedf..e56dd1165a39575ababc334cf2e5f316b25a9fd3 100644
--- a/meson.build
+++ b/meson.build
@@ -124,7 +124,7 @@ libgit2_dep = dependency('libgit2', version: '>=' + git2_req)
 enable_gir = get_option('introspection')
 if enable_gir
   # XXX: Not nice, but probably our best option
-  enable_gir = find_program('g-ir-scanner', required: false).found() and not meson.is_cross_build()
+  enable_gir = find_program('g-ir-scanner', required: false).found()
 endif
 
 enable_vapi = get_option('vapi')

libgweather

Upstream: https://gitlab.gnome.org/GNOME/libgweather
Status: Closed (merged manually)
PR: https://gitlab.gnome.org/GNOME/libgweather/merge_requests/18
lines-added: 4
lines-removed: 1
diff --git a/libgweather/meson.build b/libgweather/meson.build
index 47a154760538e2923fdb660c32ce2932c0ef2562..301e7e870c77dc27ecf1339e48937fc7fce61507 100644
--- a/libgweather/meson.build
+++ b/libgweather/meson.build
@@ -75,7 +75,10 @@ gweather_gir = gnome.generate_gir(lib_libgweather,
   identifier_prefix: 'GWeather',
   export_packages: 'gweather-3.0',
   header: 'libgweather/gweather.h',
-  extra_args: ['--warn-all'],
+  extra_args: [
+    '--warn-all',
+    '-DGWEATHER_COMPILATION',
+  ],
   install: true,
 )
 

libgxps

Upstream: https://gitlab.gnome.org/GNOME/libgxps
Status: Open
PR: https://gitlab.gnome.org/GNOME/libgxps/merge_requests/2
lines-added: 1
lines-removed: 1
diff --git a/meson.build b/meson.build
index a34a6161a9ce34c9555f472cf9c9a13b4f30bd7f..2d6eb1ed3ad49cc8aacf5349fc875335273339a8 100644
--- a/meson.build
+++ b/meson.build
@@ -131,7 +131,7 @@ libm_dep = cc.find_library('m', required: false)
 
 gnome = import('gnome')
 gir = find_program('g-ir-scanner', required: false)
-build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable-introspection')
+build_gir = gir.found() and not get_option('disable-introspection')
 
 configure_file(output: 'config.h', configuration: cdata)

libhandy

Upstream: https://source.puri.sm/Librem5/libhandy
Status: Open
PR: https://source.puri.sm/Librem5/libhandy/merge_requests/223
lines-added: 5
lines-removed: 1
diff --git a/src/meson.build b/src/meson.build
index bf52dafa01dc1e257c29a4f587c9370a5671fc45..6346d7ac857a45d7d2384889907991ba8ce92ae0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -198,7 +198,11 @@ if introspection
                  install: true,
          install_dir_gir: girdir,
      install_dir_typelib: typelibdir,
-              extra_args: [ '--c-include=handy.h', '--quiet' ],
+              extra_args: [
+                  '--c-include=handy.h',
+                  '--quiet',
+                  '-DHANDY_COMPILATION',
+              ],
    )
 
    if get_option('vapi')

playerctl

Upstream: https://github.com/acrisci/playerctl
Status: Merged
PR: https://github.com/acrisci/playerctl/pull/120
lines-added: 1
lines-removed: 0
diff --git a/playerctl/meson.build b/playerctl/meson.build
index ccace6a..22a6ec1 100644
--- a/playerctl/meson.build
+++ b/playerctl/meson.build
@@ -95,6 +95,7 @@ if get_option('introspection')
       'playerctl-player.c',
       'playerctl-player.h',
     ],
+    extra_args : [ '-DPLAYERCTL_COMPILATION' ],
     nsversion: playerctl_major_version + '.0',
     namespace: 'Playerctl',
     includes: ['GObject-2.0'],

Conclusion

And that is all, those fixes should be upstream in the next release and the number of lines added in xbps-src should drop dramatically.