summary refs log tree commit diff
path: root/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-09-07 17:31:44 -0400
committerRaghav Gururajan <rg@raghavgururajan.name>2021-09-07 18:05:57 -0400
commit426038df3b4a00fc3c4a3997c4014ac6da5192cf (patch)
tree0a6fe6eb815e45a06bd1868085256e1608e3748c /gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
parent693d75e859150601145b7f7303f61d4f48e76927 (diff)
downloadguix-426038df3b4a00fc3c4a3997c4014ac6da5192cf.tar.gz
gnu: gobject-introspection: Update to 1.68.0 and adjust patches.
* gnu/packages/glib.scm (gobject-introspection)[version]: Update to 1.68.0.
* gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch: Modify.
* gnu/packages/patches/gobject-introspection-cc.patch: Modify.
Diffstat (limited to 'gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch')
-rw-r--r--gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch57
1 files changed, 38 insertions, 19 deletions
diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
index 956fa617c3..3c03dba218 100644
--- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
+++ b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
@@ -1,11 +1,23 @@
-# Names of libraries included in typelib files are opened by dlopen.  Here we 
-# add the full path.
-#
-# This patch was provided by Luca Bruno <lucabru@src.gnome.org>  for 
-# 'gobject-introspection' 1.40.0 in Nix.
-#
-# It has since been updated to work with newer versions of
-# gobject-introspection.
+From 8471367e35e122fb6e661c243810df92c69440b4 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 7 Sep 2021 17:15:18 -0400
+Subject: Names of libraries included in typelib files are opened
+ by dlopen. Here we add the full path.
+
+This patch was provided by Luca Bruno <lucabru@src.gnome.org>,
+for 'gobject-introspection' 1.40.0 in Nix.
+
+It has since been updated to work with newer versions of
+gobject-introspection.
+---
+ giscanner/scannermain.py     | 37 ++++++++++++++++++++++++++++++++++++
+ giscanner/shlibs.py          | 30 ++++++++++++++++++++---------
+ giscanner/utils.py           | 15 +++++----------
+ tests/scanner/test_shlibs.py |  3 ++-
+ 4 files changed, 65 insertions(+), 20 deletions(-)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 957ba0b7..78f9b11b 100644
 --- a/giscanner/scannermain.py
 +++ b/giscanner/scannermain.py
 @@ -95,6 +95,39 @@ def get_windows_option_group(parser):
@@ -48,7 +60,7 @@
  def _get_option_parser():
      parser = optparse.OptionParser('%prog [options] sources',
                                     version='%prog ' + giscanner.__version__)
-@@ -205,6 +238,10 @@ match the namespace prefix.""")
+@@ -214,6 +247,10 @@ match the namespace prefix.""")
      parser.add_option("", "--filelist",
                        action="store", dest="filelist", default=[],
                        help="file containing headers and sources to be scanned")
@@ -59,6 +71,8 @@
  
      group = get_preprocessor_option_group(parser)
      parser.add_option_group(group)
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index 9f8ab5df..8aa37c99 100644
 --- a/giscanner/shlibs.py
 +++ b/giscanner/shlibs.py
 @@ -57,6 +57,14 @@ def _ldd_library_pattern(library_name):
@@ -76,7 +90,7 @@
  # This is a what we do for non-la files. We assume that we are on an
  # ELF-like system where ldd exists and the soname extracted with ldd is
  # a filename that can be opened with dlopen().
-@@ -106,7 +112,8 @@ def _resolve_non_libtool(options, binary, libraries):
+@@ -108,7 +116,8 @@ def _resolve_non_libtool(options, binary, libraries):
              output = output.decode("utf-8", "replace")
  
          shlibs = resolve_from_ldd_output(libraries, output)
@@ -86,7 +100,7 @@
  
  
  def sanitize_shlib_path(lib):
-@@ -115,19 +122,18 @@ def sanitize_shlib_path(lib):
+@@ -117,19 +126,18 @@ def sanitize_shlib_path(lib):
      # In case we get relative paths on macOS (like @rpath) then we fall
      # back to the basename as well:
      # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222
@@ -111,7 +125,7 @@
      if len(patterns) == 0:
          return []
  
-@@ -139,8 +145,12 @@ def resolve_from_ldd_output(libraries, output):
+@@ -141,8 +149,12 @@ def resolve_from_ldd_output(libraries, output):
          if line.endswith(':'):
              continue
          for word in line.split():
@@ -126,10 +140,11 @@
                  if m:
                      del patterns[library]
                      shlibs.append(m.group())
-
+diff --git a/giscanner/utils.py b/giscanner/utils.py
+index 45807f17..8a319cd1 100644
 --- a/giscanner/utils.py
 +++ b/giscanner/utils.py
-@@ -111,17 +111,11 @@ def extract_libtool_shlib(la_file):
+@@ -113,16 +113,11 @@ def extract_libtool_shlib(la_file):
      if dlname is None:
          return None
  
@@ -141,8 +156,7 @@
 -        if libdir is None:
 -            return dlbasename
 -        return libdir + '/' + dlbasename
--    # From the comments in extract_libtool(), older libtools had
--    # a path rather than the raw dlname
+-    # Older libtools had a path rather than the raw dlname
 -    return os.path.basename(dlname)
 +    dlbasename = os.path.basename(dlname)
 +    libdir = _extract_libdir_field(la_file)
@@ -151,10 +165,12 @@
 +    return libdir + '/' + dlbasename
  
  
- def extract_libtool(la_file):
+ # Returns arguments for invoking libtool, if applicable, otherwise None
+diff --git a/tests/scanner/test_shlibs.py b/tests/scanner/test_shlibs.py
+index a8337c60..7f123103 100644
 --- a/tests/scanner/test_shlibs.py
 +++ b/tests/scanner/test_shlibs.py
-@@ -40,6 +64,7 @@ class TestLddParser(unittest.TestCase):
+@@ -40,7 +40,8 @@ class TestLddParser(unittest.TestCase):
  
          self.assertEqual(
              sanitize_shlib_path('/foo/bar'),
@@ -163,4 +179,7 @@
 +            '/foo/bar')
  
      def test_unresolved_library(self):
-output = ''
+         output = ''
+-- 
+2.33.0
+