gobject-introspection: refer to shlibs with absolute paths in typelibs

After this, LD_LIBRARY_PATH should not be required anymore.
The patch has been applied only for .la files, so there may
be some other cases missing.
This commit is contained in:
Luca Bruno 2014-08-14 22:59:24 +02:00
parent b83aceaecb
commit 36bef2b267
11 changed files with 30 additions and 24 deletions

View file

@ -33,7 +33,6 @@ stdenv.mkDerivation rec {
for f in "$out"/bin/*; do
wrapProgram "$f" \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" \
--prefix LD_LIBRARY_PATH : "${gnome3.libgnome_keyring}/lib" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking}/lib/gio/modules" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gnome_icon_theme}/share:${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"

View file

@ -51,7 +51,6 @@ buildPythonPackage rec {
--prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" \
--prefix GSETTINGS_SCHEMA_DIR : $out/share/glib-2.0/schemas \
--prefix LD_LIBRARY_PATH : ${gtk3}/lib/:${libvirt-glib}/lib/:${vte}/lib:${gtkvnc}/lib${optionalString spiceSupport ":${spice_gtk}/lib"} \
--prefix XDG_DATA_DIRS : "$out/share:${gsettings_desktop_schemas}/share:${gtk3}/share:$GSETTINGS_SCHEMAS_PATH:\$XDG_DATA_DIRS"
done

View file

@ -25,7 +25,6 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/gedit" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${gnome3.libpeas}/lib:${gnome3.gtksourceview}/lib" \
--prefix XDG_DATA_DIRS : "${gnome3.gtksourceview}/share:${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';

View file

@ -28,17 +28,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
preFixup =
let
libPath = stdenv.lib.makeLibraryPath
[ evince gtk3 gnome3.tracker gnome3.gnome_online_accounts ];
in
''
preFixup = ''
substituteInPlace $out/bin/gnome-documents --replace gapplication "${glib}/bin/gapplication"
wrapProgram "$out/bin/gnome-documents" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH ":" "${libPath}" \
--prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--run "if [ -z \"\$XDG_CACHE_DIR\" ]; then XDG_CACHE_DIR=\$HOME/.cache; fi; if [ -w \"\$XDG_CACHE_DIR/..\" ]; then mkdir -p \"\$XDG_CACHE_DIR/gnome-documents\"; fi"
rm $out/share/icons/hicolor/icon-theme.cache

View file

@ -24,19 +24,11 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
preFixup =
let
libPath = stdenv.lib.makeLibraryPath
[ glib gtk3 libnotify tracker gnome3.grilo cairo
gst_all_1.gstreamer gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad ];
in
''
preFixup = ''
wrapProgram "$out/bin/gnome-music" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${libPath}" \
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
--prefix GRL_PLUGIN_PATH : "${gnome3.grilo-plugins}/lib/grilo-0.2" \
--prefix PYTHONPATH : "$PYTHONPATH"

View file

@ -35,7 +35,6 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/gnome-shell" \
--prefix PATH : "${unzip}/bin" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${accountsservice}/lib:${ibus}/lib:${gdm}/lib" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "${gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"

View file

@ -30,7 +30,6 @@ stdenv.mkDerivation rec {
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH ":" "${libsoup}/lib:${gnome3.gnome_desktop}/lib:${libnotify}/lib:${gtk3}/lib:${atk}/lib" \
--prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)"
'';

View file

@ -30,8 +30,7 @@ stdenv.mkDerivation rec {
for i in $out/libexec/gpaste/*; do
wrapProgram $i \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${libPath}"
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
done
'';

View file

@ -0,0 +1,25 @@
--- ./giscanner/utils.py.orig 2014-08-14 22:05:05.055334080 +0200
+++ ./giscanner/utils.py 2014-08-14 22:05:24.687497334 +0200
@@ -110,17 +110,11 @@
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
- # From the comments in extract_libtool(), 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
def extract_libtool(la_file):

View file

@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
setupHook = ./setup-hook.sh;
patches = [ ./absolute_shlib_path.patch ];
meta = with stdenv.lib; {
description = "A middleware layer between C libraries and language bindings";
homepage = http://live.gnome.org/GObjectIntrospection;

View file

@ -26,7 +26,6 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/d-feet \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix LD_LIBRARY_PATH : "${gtk3}/lib:${atk}/lib:${libwnck3}/lib" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$out/share"
rm $out/share/icons/hicolor/icon-theme.cache