Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gobject-introspection: add libtool library path tweaks to scanner #9071

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 3
revision 4
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,29 @@
@@ -236,8 +236,28 @@

args.extend(sources)

Expand All @@ -24,25 +24,24 @@
+ 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
+ # uniquely merge pkg_config and options library paths
+ self._options.library_paths = list (set().union (self._options.library_paths,
+ this_L))
+
+ # remove anything in LIBRARY_PATH
+ env_LIBRARY_PATH = os.environ['LIBRARY_PATH'].split(':') if \
+ 'LIBRARY_PATH' in os.environ else []
+ self._options.library_paths = [l for l in self._options.library_paths
+ if l not in env_LIBRARY_PATH]
+
+ if os.name == 'nt':
+ runtime_path_envvar = ['LIB', 'PATH']
+ else:
+ runtime_path_envvar = ['LIBRARY_PATH']
+ for envvar in runtime_path_envvar:
+ if envvar in os.environ:
+ os.environ[envvar] = \
+ os.pathsep.join(this_L + [os.environ[envvar]])
+ else:
+ os.environ[envvar] = os.pathsep.join(this_L)
+ os.environ[envvar] = os.pathsep.join \
+ (list (set().union (os.environ[envvar].split(':'), this_L))) \
+ if envvar in os.environ else os.pathsep.join(this_L)

if not self._options.external_library:
self._compiler.get_internal_link_flags(args,
Expand Down