Skip to content

Commit

Permalink
gobject-introspection: tweak scanner patch
Browse files Browse the repository at this point in the history
Now handles build-provided library paths more robustly, removing those that are found via PKGCONFIG and are thus clearly "system" paths.

Ref: https://trac.macports.org/ticket/61382
  • Loading branch information
michaelld authored and dbevans committed Nov 3, 2020
1 parent 2d1819a commit 8fb4974
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gnome/gobject-introspection/Portfile
Expand Up @@ -5,7 +5,7 @@ PortGroup active_variants 1.1

name gobject-introspection
version 1.60.2
revision 2
revision 3
set branch [join [lrange [split ${version} .] 0 1] .]
categories gnome
platforms darwin
Expand Down
Expand Up @@ -14,7 +14,7 @@
args.append('-L.')
--- giscanner/dumper.py.orig
+++ giscanner/dumper.py
@@ -236,8 +236,20 @@
@@ -236,8 +236,29 @@

args.extend(sources)

Expand All @@ -24,6 +24,15 @@
+ self._packages, msvc_syntax=self._compiler.check_is_msvc())
+ this_L = [lib[len('-L'):] for lib in pkg_config_libs_only_L]
+
+ # remove self._options.library_paths entries that are in
+ # "this_L" already, since those are "system" and will be found
+ # via the "runtime_path_envvar" setting below
+ tmp_L = []
+ for t_L in self._options.library_paths:
+ if t_L not in this_L:
+ tmp_L.append (t_L)
+ self._options.library_paths = tmp_L

This comment has been minimized.

Copy link
@neverpanic

neverpanic Nov 3, 2020

Member

@michaelld

self._options.library_paths = [l for l in self._options.library_paths if l not in this_L]

This comment has been minimized.

Copy link
@michaelld

michaelld Nov 4, 2020

Author Contributor

niiiiccce!

This comment has been minimized.

Copy link
@michaelld

michaelld Nov 4, 2020

Author Contributor

I thought there was a more concise way to do this ... tried a few ways & moved on since I had other stuff to do. Thx!

+
+ if os.name == 'nt':
+ runtime_path_envvar = ['LIB', 'PATH']
+ else:
Expand Down

0 comments on commit 8fb4974

Please sign in to comment.