--- gio/xdgmime/xdgmime.c.orig
+++ gio/xdgmime/xdgmime.c
@@ -228,7 +228,7 @@ xdg_init_dirs (void)
   xdg_data_dirs = getenv ("XDG_DATA_DIRS");
 
   if (xdg_data_dirs == NULL)
-    xdg_data_dirs = "/usr/local/share/:/usr/share/";
+    xdg_data_dirs = "@PREFIX@/share/:/usr/share/";
 
   /* Work out how many dirs we’re dealing with. */
   if (xdg_data_home != NULL || home != NULL)
--- girepository/girepository.c.orig
+++ girepository/girepository.c
@@ -300,6 +300,8 @@ gi_repository_init (GIRepository *repository)
       typelib_dir = g_build_filename (libdir, "girepository-1.0", NULL);
 
       g_ptr_array_add (repository->typelib_search_path, g_steal_pointer (&typelib_dir));
+
+      g_ptr_array_add (repository->typelib_search_path, g_strdup ("@PREFIX@/lib/girepository-1.0"));
     }
 
   repository->library_paths = g_ptr_array_new_null_terminated (1, g_free, TRUE);
--- glib/gutils.c.orig
+++ glib/gutils.c
@@ -2698,7 +2698,7 @@ g_build_system_data_dirs (void)
    */
 #ifndef G_OS_WIN32
   if (!data_dirs || !data_dirs[0])
-    data_dirs = "/usr/local/share/:/usr/share/";
+    data_dirs = "@PREFIX@/share/:/usr/share/";
 
   data_dir_vector = g_strsplit (data_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
 #else
--- glib/gutils.c.orig	2026-02-17 11:04:01
+++ glib/gutils.c	2026-02-17 11:04:29
@@ -385,7 +385,7 @@
        * what to search if PATH is unset. POSIX may, dunno.
        */
       
-      path = "/bin:/usr/bin:.";
+      path = "@PREFIX@/bin:/usr/bin:.";
     }
 #else
   if G_LIKELY (original_path == NULL)
