gdk-pixbuf: rename from gdk_pixbuf

This commit is contained in:
worldofpeace
2019-05-22 07:03:39 -04:00
parent 23a3256ee1
commit b1bc0645ea
246 changed files with 581 additions and 581 deletions

View File

@@ -1,4 +1,4 @@
# FIXME: make gdk_pixbuf dependency optional
# FIXME: make gdk-pixbuf dependency optional
{ stdenv
, buildPythonPackage
, pythonOlder
@@ -15,7 +15,7 @@
, withXcffib ? false, xcffib
, python
, glib
, gdk_pixbuf
, gdk-pixbuf
}@args:
import ./generic.nix ({

View File

@@ -1,4 +1,4 @@
# FIXME: make gdk_pixbuf dependency optional
# FIXME: make gdk-pixbuf dependency optional
{ stdenv
, buildPythonPackage
, pythonOlder
@@ -15,7 +15,7 @@
, withXcffib ? false, xcffib
, python
, glib
, gdk_pixbuf
, gdk-pixbuf
}@args:
import ./generic.nix ({

View File

@@ -3,7 +3,7 @@ Author: Alexander V. Nikolaev <avn@avnik.info>
Date: Sat Feb 6 08:09:06 2016 +0200
Patch dlopen() to allow direct paths to all required libs
This patch is NixOS specific
diff --git a/cairocffi/__init__.py b/cairocffi/__init__.py
@@ -13,15 +13,15 @@ index 718aa7f..1a1dcff 100644
@@ -27,20 +27,22 @@ VERSION = '0.7.2'
version = '1.10.0'
version_info = (1, 10, 0)
+# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be required for runtime
+_LIBS = {
+ 'cairo': '@cairo@/lib/libcairo@ext@',
+ 'glib-2.0': '@glib@/lib/libglib-2.0@ext@',
+ 'gobject-2.0': '@glib@/lib/libgobject-2.0@ext@',
+ 'gdk_pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@',
+ 'gdk-pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@',
+}
-def dlopen(ffi, *names):
+def dlopen(ffi, name, *names):
"""Try various names for the same library, for different platforms."""
@@ -42,6 +42,6 @@ index 718aa7f..1a1dcff 100644
+ if lib:
+ return lib
+ raise OSError("dlopen() failed to load a library: %s as %s" % (name, path))
cairo = dlopen(ffi, 'cairo', 'cairo-2')

View File

@@ -3,7 +3,7 @@ Author: Alexander V. Nikolaev <avn@avnik.info>
Date: Sat Feb 6 08:09:06 2016 +0200
Patch dlopen() to allow direct paths to all required libs
This patch is NixOS specific
diff --git a/cairocffi/__init__.py b/cairocffi/__init__.py
@@ -13,15 +13,15 @@ index 6061973..3538a58 100644
@@ -21,19 +21,22 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip()
version = '1.16.0'
version_info = (1, 16, 0)
+# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be required for runtime
+_LIBS = {
+ 'cairo': '@cairo@/lib/libcairo@ext@',
+ 'glib-2.0': '@glib@/lib/libglib-2.0@ext@',
+ 'gobject-2.0': '@glib@/lib/libgobject-2.0@ext@',
+ 'gdk_pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@',
+ 'gdk-pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@',
+}
-def dlopen(ffi, *names):
+def dlopen(ffi, name, *names):
"""Try various names for the same library, for different platforms."""
@@ -41,6 +41,6 @@ index 6061973..3538a58 100644
+ if lib:
+ return lib
+ raise OSError("dlopen() failed to load a library: %s as %s" % (name, path))
cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2', 'cairo.so.2')

View File

@@ -31,13 +31,13 @@ buildPythonPackage rec {
'';
patches = [
# OSError: dlopen() failed to load a library: gdk_pixbuf-2.0 / gdk_pixbuf-2.0-0
# OSError: dlopen() failed to load a library: gdk-pixbuf-2.0 / gdk-pixbuf-2.0-0
(substituteAll {
src = dlopen_patch;
ext = stdenv.hostPlatform.extensions.sharedLibrary;
cairo = cairo.out;
glib = glib.out;
gdk_pixbuf = gdk_pixbuf.out;
gdk_pixbuf = gdk-pixbuf.out;
})
./fix_test_scaled_font.patch
];

View File

@@ -7,7 +7,7 @@
, pytest
, glibc
, gtk2-x11
, gdk_pixbuf
, gdk-pixbuf
}:
buildPythonPackage rec {
@@ -42,7 +42,7 @@ buildPythonPackage rec {
elif name == 'gdk-x11-2.0':
path = '${gtk2-x11}/lib/libgdk-x11-2.0${ext}'
elif name == 'gdk_pixbuf-2.0':
path = '${gdk_pixbuf}/lib/libgdk_pixbuf-2.0${ext}'
path = '${gdk-pixbuf}/lib/libgdk_pixbuf-2.0${ext}'
if path is not None:
return ctypes.cdll.LoadLibrary(path)
raise Exception("Could not load library {}".format(names))