From 4b3f0d8873bed1d4252217cbc215b9ac679d7cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 4 Feb 2018 11:50:12 +0100 Subject: [PATCH] Revert "Merge #34584: lgi: Fix cairo bindings search path" In the end I merged different version than I wanted. This reverts commit f25d21d202fcbbd63e9330edb5e5219332e9aac8, reversing changes made to af884f5607e90b898e66fe9d5e74252bdbdaf0a6. --- .../lgi-find-cairo-through-typelib.patch | 47 ------------------- pkgs/top-level/lua-packages.nix | 2 - 2 files changed, 49 deletions(-) delete mode 100644 pkgs/top-level/lgi-find-cairo-through-typelib.patch diff --git a/pkgs/top-level/lgi-find-cairo-through-typelib.patch b/pkgs/top-level/lgi-find-cairo-through-typelib.patch deleted file mode 100644 index 613b2eda0b58..000000000000 --- a/pkgs/top-level/lgi-find-cairo-through-typelib.patch +++ /dev/null @@ -1,47 +0,0 @@ -Reorder some code so that the cairo-gobject library is used before this tries to -dlopen("libcairo.so.2"). Since cairo-gobject depends (RT_DEPEND) on cairo, this -causes cairo to be used and so the missing search path for the dlopen() call is -not a problem. - -diff --git a/lgi/override/cairo.lua b/lgi/override/cairo.lua -index ca8193f..019239b 100644 ---- a/lgi/override/cairo.lua -+++ b/lgi/override/cairo.lua -@@ -20,18 +20,8 @@ local record = require 'lgi.record' - local enum = require 'lgi.enum' - local ti = ffi.types - --cairo._module = core.module('cairo', 2) - local module_gobject = core.gi.cairo.resolve - ---- Versioning support. --function cairo.version_encode(major, minor, micro) -- return 10000 * major + 100 * minor + micro --end --cairo.version = core.callable.new { -- addr = cairo._module.cairo_version, ret = ti.int } () --cairo.version_string = core.callable.new { -- addr = cairo._module.cairo_version_string, ret = ti.utf8 } () -- - -- Load some constants. - cairo._constant = { - MIME_TYPE_JP2 = 'image/jp2', -@@ -58,6 +48,18 @@ for _, name in pairs { - end - end - -+-- Load libcairo.so directly; this has to happen after the typelib was used -+cairo._module = core.module('cairo', 2) -+ -+-- Versioning support. -+function cairo.version_encode(major, minor, micro) -+ return 10000 * major + 100 * minor + micro -+end -+cairo.version = core.callable.new { -+ addr = cairo._module.cairo_version, ret = ti.int } () -+cairo.version_string = core.callable.new { -+ addr = cairo._module.cairo_version_string, ret = ti.utf8 } () -+ - -- Load definitions of all boxed records. - cairo._struct = cairo._struct or {} - for index, struct in pairs { diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index d4822b72e248..b91f9dae9f04 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -671,8 +671,6 @@ let sed -i "s|/usr/local|$out|" lgi/Makefile ''; - patches = [ ./lgi-find-cairo-through-typelib.patch ]; - meta = with stdenv.lib; { description = "GObject-introspection based dynamic Lua binding to GObject based libraries"; homepage = https://github.com/pavouk/lgi;