--- gobject-introspection-1.78.0/tools/g-ir-tool-template.in.orig	2023-09-08 16:18:21.000000000 +0200
+++ gobject-introspection-1.78.0/tools/g-ir-tool-template.in	2023-09-12 16:25:42.924623000 +0200
@@ -49,11 +49,12 @@
 datadir = os.path.abspath(os.path.join(filedir, '..', 'share'))
 # Fallback to hard-coded paths if the relocatable paths are wrong
 if not os.path.isdir(os.path.join(datadir, 'gir-1.0')):
-    datadir = "@datarootdir@"
+    datadir = os.path.join(sys.prefix, "share")
 
 builtins.__dict__['DATADIR'] = datadir
 
 gir_dir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@', 'gir-1.0'))
+girdir = os.path.join(sys.prefix, "share")
 # Fallback to hard-coded paths if the relocatable paths are wrong
 if not os.path.isdir(gir_dir):
     gir_dir = "@GIR_DIR@"
@@ -92,7 +93,7 @@
     else:
         # Okay, we're not running uninstalled and the prefix is not
         # relocatable. Use hard-coded libdir.
-        pylibdir = os.path.join('@libdir@', 'gobject-introspection')
+        pylibdir = os.path.join(sys.prefix, 'lib', 'gobject-introspection')
 
 sys.path.insert(0, pylibdir)
 
