From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iDZONCacIGTBhQEASxT56A (envelope-from ) for ; Sun, 26 Mar 2023 21:25:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gD4/NCacIGR8HAEA9RJhRA (envelope-from ) for ; Sun, 26 Mar 2023 21:25:26 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7349A1A0A for ; Sun, 26 Mar 2023 21:25:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgVzH-0007m2-KB; Sun, 26 Mar 2023 15:25:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgVzE-0007kR-KR for guix-patches@gnu.org; Sun, 26 Mar 2023 15:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgVzD-00077q-NM for guix-patches@gnu.org; Sun, 26 Mar 2023 15:25:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgVzD-0004HW-It for guix-patches@gnu.org; Sun, 26 Mar 2023 15:25:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62467] [PATCH gnome-team 4/5] gnu: Make gobject-introspection-next the new gobject-introspection. References: <716b57a44002b5d866aff0d2abe0190c90a39556.camel@gmail.com> In-Reply-To: <716b57a44002b5d866aff0d2abe0190c90a39556.camel@gmail.com> Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Mar 2023 19:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62467 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62467@debbugs.gnu.org Cc: rg@raghavgururajan.name Received: via spool by 62467-submit@debbugs.gnu.org id=B62467.167985867916387 (code B ref 62467); Sun, 26 Mar 2023 19:25:03 +0000 Received: (at 62467) by debbugs.gnu.org; 26 Mar 2023 19:24:39 +0000 Received: from localhost ([127.0.0.1]:45859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgVyo-0004G6-A0 for submit@debbugs.gnu.org; Sun, 26 Mar 2023 15:24:39 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgVyl-0004F7-Ci for 62467@debbugs.gnu.org; Sun, 26 Mar 2023 15:24:36 -0400 Received: by mail-wm1-f67.google.com with SMTP id n10-20020a05600c4f8a00b003ee93d2c914so5702413wmq.2 for <62467@debbugs.gnu.org>; Sun, 26 Mar 2023 12:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679858670; h=message-id:cc:to:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=x9YwLQMUZdSP3BSG9I74Of+DDLHXwVzlcA4btZLXj0c=; b=Ag1pq6OXmkN5ppGVTtY9aLzZR097LQpIourWfxAA8jOGGj8aO9eUsTeeP+kw3uBwxt NtAeZpHNlxeXOe0b5hRITqEkuYI4HJG0u4Oa4Ibvp8Sw59v2KL2xhJJjAppi6Z9eWxkP 4fT68oggFR8qdjUV736tsfc7SGBWh0V0F3epFjdf2Q1iAYLi0wUJuWY7kcRXwTzWFWTl H+PuB+PpQ87ZYac5jswrFVKbgJrAVW4dCTtvjOzOXkyh5m2PvRzGJxWeaqbYICzSTqgV wZkh3LyT7Z8Hd/tSiOUmmcs4p4XJUogCsWwfJvG2psfQPoa3EofSgmyRqNMCmSu2PbON fPYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679858670; h=message-id:cc:to:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=x9YwLQMUZdSP3BSG9I74Of+DDLHXwVzlcA4btZLXj0c=; b=NKDX6D1b4Tbt3hm34aBlEfuAE0eDXaEl7iGCDOfLYbNM7xyl9XLmzsAf20yB2JxRNe 056jqzCMVwRflJjV3xy0eFoGv+THhiIRF45HCn5a7Vi7DPOyoyr/oxqXnzI1WTskHfVt 5gYvLFrXQKucVxLcLOcUBkY9/tjuDKAQorNCvfL1SRRuWQ9soJB/N1mic3RvA3TJLF+B XIgeNAIuXwMho/h/SN2dvh8A7LWjGJ/6aFvO2n4hfbbhpwzs189/rtMp1T1xcv6fH31x EZq7FY5A7xLiXJqWAhhcrg3jyaj9vd8EfoJd9gvemkTvrX4iEnA535vSwRfhKlyMbjdv DiMQ== X-Gm-Message-State: AO0yUKWp2nk81UEMCpSwJmCww8G2srjEtixFa8/EGs9Yn2gCD/F5qhqr J78RZW9lcGDL0KOPBafzITI5f+39brHuyA== X-Google-Smtp-Source: AK7set+0ExHFIRR2A5OGFE/Qm1MhyeNYLOBT+bk7svTud6D7/WQQw2vrqisbGh1Z2f98+R9ENbaePQ== X-Received: by 2002:a05:600c:ad5:b0:3ee:5519:fae1 with SMTP id c21-20020a05600c0ad500b003ee5519fae1mr7847655wmr.12.1679858669565; Sun, 26 Mar 2023 12:24:29 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id x4-20020a1c7c04000000b003ee0d191539sm11337911wmc.10.2023.03.26.12.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 12:24:29 -0700 (PDT) From: Liliana Marie Prikler Date: Sun, 26 Mar 2023 21:14:47 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <53cc392242bc66f39be8e2b0c6d694600ed57825.camel@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679858726; a=rsa-sha256; cv=none; b=GiEUIymnYDjKilQvnRo+GSmiMfDOiv8NUPbvNwH7+3s17LXIuEZjB5V4OUK+jI1E/RDBfC AVRdp2KrIaXCh2ieyZI+R4sqhDeQ6MmJ36bNaB8/Tbpx8FGOINTEEqP98nIO7ltOMSqhJA sNkS6NhGiDoIitE3U2wTb3PXcXkUKeCI++z/kJMFOY+Cwe+8UI2nbcchlO+cM5Zj7827JK RGckTjllfK21VKYfSV/gSg///PXr1DFDy1ypCBpbslOA2wN4eZ1TkPppsOIiSfsmN3BQ/Y q6P56NOIyOC6LFNH3bAN8+h+0UQewYqnyKFWEXQa5zLwO4RDUX4mXeqZNOavHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Ag1pq6OX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679858726; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=x9YwLQMUZdSP3BSG9I74Of+DDLHXwVzlcA4btZLXj0c=; b=eoKyYpfc1w8l+lID49rC6mj2fujyWSUs+eb9l4fkHQxAu9B8B8U5MlXDJvuGW1pmXIhHGc 6dQ0+3uP93t9s0ZY0XLbIslVAVfb21dQoIGx830ByClYLvBR1BSs6GQ31dhedVDaB4Sq55 YUcXZWX/oyj3IvN70XYNHxKMyofYEZXVg4DzBao3XQ60uOQAFc1jc2mRQxOCh7xHBPq8f4 3upKk32inrx5Pr3yxllFz1lOeNzDJepwsigmJmlIFojbWSpzwp+i76PwFno+EWwk9mxM0C 9Sy67QYhVbVFuF4zf78iq49+Hd2nvUaZBHKljFs60ntCN6WnSpLd0JSShqrJbg== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Ag1pq6OX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.63 X-Spam-Score: -0.63 X-Migadu-Queue-Id: 7349A1A0A X-TUID: GteOVdDRuLMh * gnu/packages/glib.scm (gobject-introspection): Update to 1.73.1. (gobject-introspection-next): Delete variable. * gnu/packages/gtk.scm.scm (gtksourceview)[native-inputs]: Replace gobject-introspection-next with gobject-introspection. * gnu/packages/guile-xyz.scm (guile-g-golf)[native-inputs]: Replace gobject-introspection-next with gobject-introspection. * gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch: Rename to… * gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch: … this. * gnu/packages/patches/gobject-introspection-cc-1.72.patch: Rename to… * gnu/packages/patches/gobject-introspection-cc.patch: … this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 2 - gnu/packages/glib.scm | 21 +-- gnu/packages/gtk.scm | 2 +- gnu/packages/guile-xyz.scm | 2 +- ...trospection-absolute-shlib-path-1.72.patch | 173 ------------------ ...ct-introspection-absolute-shlib-path.patch | 51 +++--- .../gobject-introspection-cc-1.72.patch | 15 -- .../patches/gobject-introspection-cc.patch | 11 +- 8 files changed, 39 insertions(+), 238 deletions(-) delete mode 100644 gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch delete mode 100644 gnu/packages/patches/gobject-introspection-cc-1.72.patch diff --git a/gnu/local.mk b/gnu/local.mk index 64a1268fbe..3e94281ccf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1264,9 +1264,7 @@ dist_patch_DATA = \ %D%/packages/patches/gnutls-cross.patch \ %D%/packages/patches/gnutls-guile-eintr-eagain.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ - %D%/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ - %D%/packages/patches/gobject-introspection-cc-1.72.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ %D%/packages/patches/go-fix-script-tests.patch \ %D%/packages/patches/go-github-com-golang-snappy-32bit-test.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index ecf5cb491f..09386d1652 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -477,14 +477,14 @@ (define target-name (define gobject-introspection (package (name "gobject-introspection") - (version "1.66.1") + (version "1.73.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" "gobject-introspection/" (version-major+minor version) "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "078n0q7b6z682mf4irclrksm73cyixq295mqnqifl9plwmgaai6x")) + (base32 "1gkbx32as3v2286w7k3j24fwhkxj6brr49881m2zavxamfwxdm34")) (patches (search-patches "gobject-introspection-cc.patch" "gobject-introspection-girepository.patch" @@ -564,23 +564,6 @@ (define gobject-introspection ;; For tools. license:gpl2+)))) -(define-public gobject-introspection-next - (package - (inherit gobject-introspection) - (name "gobject-introspection") - (version "1.73.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" - "gobject-introspection/" (version-major+minor version) - "/gobject-introspection-" version ".tar.xz")) - (sha256 - (base32 "1gkbx32as3v2286w7k3j24fwhkxj6brr49881m2zavxamfwxdm34")) - (patches (search-patches - "gobject-introspection-cc-1.72.patch" - "gobject-introspection-girepository.patch" - "gobject-introspection-absolute-shlib-path-1.72.patch")))))) - (define intltool (package (name "intltool") diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 75cf9004b4..f89b0dc199 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -684,7 +684,7 @@ (define-public gtksourceview (list `(,glib "bin") ; for glib-genmarshal, etc. gettext-minimal gi-docgen - gobject-introspection-next + gobject-introspection pkg-config vala ;; For testing. diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 5d861c5c82..5c7c880b0e 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2303,7 +2303,7 @@ (define (get lib) clutter xorg-server-for-tests)) (propagated-inputs - (list gobject-introspection-next)) + (list gobject-introspection)) (home-page "https://www.gnu.org/software/g-golf/") (synopsis "Guile bindings for GObject Introspection") (description diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch deleted file mode 100644 index 8bb86467c0..0000000000 --- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch +++ /dev/null @@ -1,173 +0,0 @@ -Names of libraries included in typelib files are opened by dlopen. -Here we add the full path. - -This patch was provided by Luca Bruno , -for 'gobject-introspection' 1.40.0 in Nix. - -It has since been updated to work with newer versions of -gobject-introspection. - -diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py -index 1d39ab84..e12ed24e 100644 ---- a/giscanner/scannermain.py -+++ b/giscanner/scannermain.py -@@ -95,6 +95,39 @@ def get_windows_option_group(parser): - return group - - -+def _get_default_fallback_libpath(): -+ # Newer multiple-output-optimized stdenv has an environment variable -+ # $outputLib which in turn specifies another variable which then is used as -+ # the destination for the library contents (${!outputLib}/lib). -+ store_path = os.environ.get(os.environ.get("outputLib")) if "outputLib" in os.environ else None -+ if store_path is None: -+ outputs = os.environ.get("outputs", "out").split() -+ if "lib" in outputs: -+ # For multiple output derivations let's try whether there is a $lib -+ # environment variable and use that as the base store path. -+ store_path = os.environ.get("lib") -+ elif "out" in outputs: -+ # Otherwise we have a single output derivation, so the libraries -+ # most certainly will end up in "$out/lib". -+ store_path = os.environ.get("out") -+ -+ if store_path is not None: -+ # Even if we have a $lib as output, there still should be a $lib/lib -+ # directory. -+ return os.path.join(store_path, 'lib') -+ else: -+ # If we haven't found a possible scenario, let's return an empty string -+ # so that the shared library won't be prepended with a path. -+ # -+ # Note that this doesn't mean that all hope is lost, because after all -+ # we can still use --fallback-library-path to set one. -+ # -+ # Also, we're not returning None, because that would make it very -+ # difficult to disable adding fallback paths altogether using something -+ # like: --fallback-library-path="" -+ return "" -+ -+ - def _get_option_parser(): - parser = optparse.OptionParser('%prog [options] sources', - version='%prog ' + giscanner.__version__) -@@ -220,6 +253,10 @@ match the namespace prefix.""") - parser.add_option("", "--compiler", - action="store", dest="compiler", default=None, - help="the C compiler to use internally") -+ parser.add_option("", "--fallback-library-path", -+ action="store", dest="fallback_libpath", -+ default=_get_default_fallback_libpath(), -+ help="Path to prepend to unknown shared libraries") - - 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): - $""" % re.escape(library_name), re.VERBOSE) - - -+def _ldd_library_guix_pattern(library_name): -+ store_dir = re.escape( -+ os.environ.get("NIX_STORE", default="/gnu/store") -+ ) -+ pattern = r'(%s(?:/[^/]*)+lib%s[^A-Za-z0-9_-][^\s\(\)]*)' -+ return re.compile(pattern % (store_dir, re.escape(library_name))) -+ -+ - # 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(). -@@ -108,7 +116,8 @@ def _resolve_non_libtool(options, binary, libraries): - output = output.decode("utf-8", "replace") - - shlibs = resolve_from_ldd_output(libraries, output) -- return list(map(sanitize_shlib_path, shlibs)) -+ fallback_libpath = options.fallback_libpath or ""; -+ return list(map(lambda p: os.path.join(fallback_libpath, p), map(sanitize_shlib_path, shlibs))) - - - 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 -- if sys.platform == "darwin": -- if not os.path.isabs(lib): -- return os.path.basename(lib) -- return lib -- else: -+ -+ # Always use absolute paths if available -+ if not os.path.isabs(lib): - return os.path.basename(lib) -+ return lib - - - def resolve_from_ldd_output(libraries, output): - patterns = {} - for library in libraries: - if not os.path.isfile(library): -- patterns[library] = _ldd_library_pattern(library) -+ patterns[library] = (_ldd_library_pattern(library), _ldd_library_guix_pattern(library)) - if len(patterns) == 0: - return [] - -@@ -141,8 +149,12 @@ def resolve_from_ldd_output(libraries, output): - if line.endswith(':'): - continue - for word in line.split(): -- for library, pattern in patterns.items(): -- m = pattern.match(word) -+ for library, (pattern, guix_pattern) in patterns.items(): -+ store_dir = os.environ.get("NIX_STORE", default="/gnu/store") -+ if line.find(store_dir) != -1: -+ m = guix_pattern.match(word) -+ else: -+ m = pattern.match(word) - if m: - del patterns[library] - shlibs.append(m.group()) -diff --git a/giscanner/utils.py b/giscanner/utils.py -index 31c7ea48..630002a8 100644 ---- a/giscanner/utils.py -+++ b/giscanner/utils.py -@@ -114,16 +114,11 @@ def extract_libtool_shlib(la_file): - if dlname is None: - return None - -- # Darwin uses absolute paths where possible; since the libtool files never -- # contain absolute paths, use the libdir field -- if platform.system() == 'Darwin': -- dlbasename = os.path.basename(dlname) -- libdir = _extract_libdir_field(la_file) -- if libdir is None: -- return dlbasename -- return libdir + '/' + dlbasename -- # 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) -+ if libdir is None: -+ return dlbasename -+ return libdir + '/' + dlbasename - - - # 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,7 +40,8 @@ class TestLddParser(unittest.TestCase): - - self.assertEqual( - sanitize_shlib_path('/foo/bar'), -- '/foo/bar' if sys.platform == 'darwin' else 'bar') -+ # Always use an absolute filename for Guix -+ '/foo/bar') - - def test_unresolved_library(self): - output = '' diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch index 956fa617c3..8bb86467c0 100644 --- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch +++ b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch @@ -1,11 +1,14 @@ -# Names of libraries included in typelib files are opened by dlopen. Here we -# add the full path. -# -# This patch was provided by Luca Bruno for -# 'gobject-introspection' 1.40.0 in Nix. -# -# It has since been updated to work with newer versions of -# gobject-introspection. +Names of libraries included in typelib files are opened by dlopen. +Here we add the full path. + +This patch was provided by Luca Bruno , +for 'gobject-introspection' 1.40.0 in Nix. + +It has since been updated to work with newer versions of +gobject-introspection. + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index 1d39ab84..e12ed24e 100644 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -95,6 +95,39 @@ def get_windows_option_group(parser): @@ -48,10 +51,10 @@ def _get_option_parser(): parser = optparse.OptionParser('%prog [options] sources', version='%prog ' + giscanner.__version__) -@@ -205,6 +238,10 @@ match the namespace prefix.""") - parser.add_option("", "--filelist", - action="store", dest="filelist", default=[], - help="file containing headers and sources to be scanned") +@@ -220,6 +253,10 @@ match the namespace prefix.""") + parser.add_option("", "--compiler", + action="store", dest="compiler", default=None, + help="the C compiler to use internally") + parser.add_option("", "--fallback-library-path", + action="store", dest="fallback_libpath", + default=_get_default_fallback_libpath(), @@ -59,6 +62,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 +81,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 +91,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 +116,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 +131,11 @@ if m: del patterns[library] shlibs.append(m.group()) - +diff --git a/giscanner/utils.py b/giscanner/utils.py +index 31c7ea48..630002a8 100644 --- a/giscanner/utils.py +++ b/giscanner/utils.py -@@ -111,17 +111,11 @@ def extract_libtool_shlib(la_file): +@@ -114,16 +114,11 @@ def extract_libtool_shlib(la_file): if dlname is None: return None @@ -141,8 +147,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 +156,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 +170,4 @@ + '/foo/bar') def test_unresolved_library(self): -output = '' + output = '' diff --git a/gnu/packages/patches/gobject-introspection-cc-1.72.patch b/gnu/packages/patches/gobject-introspection-cc-1.72.patch deleted file mode 100644 index d3b1df82af..0000000000 --- a/gnu/packages/patches/gobject-introspection-cc-1.72.patch +++ /dev/null @@ -1,15 +0,0 @@ -Use gcc as the default C compiler if CC is not set. - -diff --git a/giscanner/__init__.py b/giscanner/__init__.py -index 7c2f365a..607fe341 100644 ---- a/giscanner/__init__.py -+++ b/giscanner/__init__.py -@@ -21,6 +21,8 @@ import os - builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') - if builddir is not None: - __path__.append(os.path.join(builddir, 'giscanner')) # type: ignore # mypy issue #1422 -+if not 'CC' in os.environ: -+ os.environ['CC'] = 'gcc' - try: - from ._version import __version__ - except ImportError: diff --git a/gnu/packages/patches/gobject-introspection-cc.patch b/gnu/packages/patches/gobject-introspection-cc.patch index 6a86b56b44..d3b1df82af 100644 --- a/gnu/packages/patches/gobject-introspection-cc.patch +++ b/gnu/packages/patches/gobject-introspection-cc.patch @@ -1,12 +1,13 @@ Use gcc as the default C compiler if CC is not set. -diff -ru gobject-introspection-1.58.1.orig/giscanner/__init__.py gobject-introspection-1.58.1/giscanner/__init__.py ---- gobject-introspection-1.58.1.orig/giscanner/__init__.py 1970-01-01 01:00:00.000000000 +0100 -+++ gobject-introspection-1.58.1/giscanner/__init__.py 2018-12-03 13:33:28.788971299 +0100 -@@ -22,6 +22,8 @@ +diff --git a/giscanner/__init__.py b/giscanner/__init__.py +index 7c2f365a..607fe341 100644 +--- a/giscanner/__init__.py ++++ b/giscanner/__init__.py +@@ -21,6 +21,8 @@ import os builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') if builddir is not None: - __path__.append(os.path.join(builddir, 'giscanner')) + __path__.append(os.path.join(builddir, 'giscanner')) # type: ignore # mypy issue #1422 +if not 'CC' in os.environ: + os.environ['CC'] = 'gcc' try: -- 2.39.2