summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@humppa.nl>2011-11-18 12:01:22 +0100
committerJasper Lievisse Adriaanse <jasper@humppa.nl>2011-11-18 12:09:26 +0100
commitcbf2a9e348d4ad9fbf5f2b3c4059177e4d93fb7f (patch)
treea8af5b53406a4f4776cd2fc65e3ba390210c1b75
parent42e9ea858c454646ecf5d4b9579ea7a2ce4192fd (diff)
downloadgobject-introspection-cbf2a9e348d4ad9fbf5f2b3c4059177e4d93fb7f.tar.gz
OpenBSD uses it's own libtool implementation which breaks giscanner in certain
situations. So adjust resolve_non_libtool() in this case. https://bugzilla.gnome.org/show_bug.cgi?id=664282
-rw-r--r--giscanner/shlibs.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
index b367d8e1..9579e7e6 100644
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
@@ -23,6 +23,7 @@ import os
import re
import platform
import subprocess
+import os
from .utils import get_libtool_command, extract_libtool_shlib
@@ -68,6 +69,19 @@ def _resolve_non_libtool(options, binary, libraries):
if not libraries:
return []
+ if os.uname()[0] == 'OpenBSD':
+ # Hack for OpenBSD when using the ports' libtool which uses slightly
+ # different directories to store the libraries in. So rewite binary.args[0]
+ # by inserting '.libs/'.
+ old_argdir = binary.args[0]
+ new_libsdir = os.path.join(os.path.dirname(binary.args[0]), '.libs/')
+ new_lib = new_libsdir + os.path.basename(binary.args[0])
+ if os.path.exists(new_lib):
+ binary.args[0] = new_lib
+ os.putenv('LD_LIBRARY_PATH', new_libsdir)
+ else:
+ binary.args[0] = old_argdir
+
if os.name == 'nt':
shlibs = []