Blame SOURCES/0001-build-ensure-access-to-resources-in-corelib-build.patch

a78d3a
From fa324fc228691cd2b1aa86dbbde43f37a5dd7758 Mon Sep 17 00:00:00 2001
a78d3a
From: Christian Hergert <chergert@redhat.com>
a78d3a
Date: Sun, 7 Mar 2021 08:54:15 -0800
a78d3a
Subject: [PATCH 1/1] build: ensure access to resources in corelib build
a78d3a
a78d3a
This should help with some transient build failures in dependent projects.
a78d3a
---
a78d3a
 gtksourceview/meson.build | 13 +++++++------
a78d3a
 1 file changed, 7 insertions(+), 6 deletions(-)
a78d3a
a78d3a
diff --git a/gtksourceview/meson.build b/gtksourceview/meson.build
a78d3a
index fd080a9c..b6192604 100644
a78d3a
--- a/gtksourceview/meson.build
a78d3a
+++ b/gtksourceview/meson.build
a78d3a
@@ -145,122 +145,123 @@ core_enums_header = '''
a78d3a
 
a78d3a
 #if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
a78d3a
 # error "Only <gtksourceview/gtksource.h> can be included directly."
a78d3a
 #endif
a78d3a
 
a78d3a
 #include <gtksourceview/gtksourceversion.h>
a78d3a
 '''
a78d3a
 
a78d3a
 core_enums = gnome.mkenums_simple('gtksource-enumtypes',
a78d3a
             sources: core_public_h,
a78d3a
   identifier_prefix: 'GtkSource',
a78d3a
       symbol_prefix: 'gtk_source',
a78d3a
       header_prefix: core_enums_header,
a78d3a
           decorator: 'GTK_SOURCE_ENUM_EXTERN',
a78d3a
      install_header: true,
a78d3a
         install_dir: join_paths(pkgincludedir, 'gtksourceview'),
a78d3a
 )
a78d3a
 
a78d3a
 version_h = configuration_data()
a78d3a
 version_h.set('GTK_SOURCE_MAJOR_VERSION', version_major)
a78d3a
 version_h.set('GTK_SOURCE_MINOR_VERSION', version_minor)
a78d3a
 version_h.set('GTK_SOURCE_MICRO_VERSION', version_micro)
a78d3a
 
a78d3a
 gtksourceversion_h = configure_file(
a78d3a
           input: 'gtksourceversion.h.in',
a78d3a
          output: 'gtksourceversion.h',
a78d3a
   configuration: version_h,
a78d3a
     install_dir: join_paths(pkgincludedir, 'gtksourceview'),
a78d3a
 )
a78d3a
 
a78d3a
+gtksource_res = gnome.compile_resources(
a78d3a
+  'gtksourceview-gresources',
a78d3a
+  'gtksourceview.gresource.xml'
a78d3a
+)
a78d3a
+
a78d3a
 core_sources = [
a78d3a
   core_public_c,
a78d3a
   core_private_c,
a78d3a
   core_enums,
a78d3a
   gtksourceversion_h,
a78d3a
   core_marshallers,
a78d3a
+  gtksource_res,
a78d3a
 ]
a78d3a
 
a78d3a
 install_headers(
a78d3a
   core_public_h,
a78d3a
   install_dir: join_paths(pkgincludedir, 'gtksourceview'),
a78d3a
 )
a78d3a
 
a78d3a
 core_enums_h = core_enums.get(1)
a78d3a
 
a78d3a
 # Unfortunately, Visual Studio builds must build the core
a78d3a
 # sources twice, once for the GtkSourceView DLL, and once for
a78d3a
 # the tests (static core lib), so that we can ensure that
a78d3a
 # all the items from the core sources are properly linked into
a78d3a
 # the final GtkSourceView DLL and exported from it.
a78d3a
 core_lib = static_library(package_string + 'core', core_sources,
a78d3a
   include_directories: gtksourceview_include_dirs,
a78d3a
          dependencies: core_deps,
a78d3a
                c_args: core_c_args,
a78d3a
               install: false
a78d3a
 )
a78d3a
 
a78d3a
 core_dep = declare_dependency(
a78d3a
             link_with: core_lib,
a78d3a
   include_directories: rootdir,
a78d3a
          dependencies: core_deps,
a78d3a
               sources: [core_enums_h]
a78d3a
 )
a78d3a
 
a78d3a
 gtksource_deps = [
a78d3a
   core_dep,
a78d3a
 ]
a78d3a
 
a78d3a
 gtksource_libs = [core_lib]
a78d3a
 
a78d3a
 extra_public_sources = []
a78d3a
 
a78d3a
 subdir('completion-providers')
a78d3a
 
a78d3a
-gtksource_res = gnome.compile_resources(
a78d3a
-  'gtksourceview-gresources',
a78d3a
-  'gtksourceview.gresource.xml'
a78d3a
-)
a78d3a
-
a78d3a
 
a78d3a
 # We can't use the static libs on Visual Studio builds
a78d3a
 # to form our DLL here directly, so we must use
a78d3a
 # extract_all_objects() to extract all the core and word
a78d3a
 # completion provider objects that we previously built
a78d3a
 # into static .lib's and link them into the main DLL
a78d3a
 # instead
a78d3a
 gtksource_objs = []
a78d3a
 foreach int_lib : gtksource_libs
a78d3a
   gtksource_objs += int_lib.extract_all_objects()
a78d3a
 endforeach
a78d3a
 
a78d3a
-gtksource_lib = shared_library(package_string, gtksource_res,
a78d3a
+gtksource_lib = shared_library(package_string,
a78d3a
                 version: lib_version,
a78d3a
         darwin_versions: lib_osx_version,
a78d3a
     include_directories: gtksourceview_include_dirs,
a78d3a
            dependencies: cc.get_id() == 'msvc' ? core_deps : gtksource_deps,
a78d3a
                 objects: cc.get_id() == 'msvc' ? gtksource_objs : [],
a78d3a
              link_whole: cc.get_id() == 'msvc' ? [] : gtksource_libs,
a78d3a
                  c_args: core_c_args,
a78d3a
               link_args: release_link_args,
a78d3a
                 install: true,
a78d3a
   gnu_symbol_visibility: 'hidden',
a78d3a
 )
a78d3a
 
a78d3a
 gtksource_dep_sources = [
a78d3a
   core_enums_h,
a78d3a
 ]
a78d3a
 
a78d3a
 if generate_gir
a78d3a
   gtksource_gir_sources = [
a78d3a
     core_public_c,
a78d3a
     core_public_h,
a78d3a
     core_enums_h,
a78d3a
     extra_public_sources,
a78d3a
   ]
a78d3a
 
a78d3a
   gtksource_gir = gnome.generate_gir(gtksource_lib,
a78d3a
                 sources: gtksource_gir_sources,
a78d3a
               nsversion: api_version,
a78d3a
               namespace: 'GtkSource',
a78d3a
           symbol_prefix: 'gtk_source',
a78d3a
       identifier_prefix: 'GtkSource',
a78d3a
-- 
a78d3a
2.39.1
a78d3a