svn commit: r324297 - in head/devel/lua-lgi: . files
Matthias Andree
mandree at FreeBSD.org
Tue Aug 6 01:01:31 UTC 2013
Author: mandree
Date: Tue Aug 6 01:01:30 2013
New Revision: 324297
URL: http://svnweb.freebsd.org/changeset/ports/324297
Log:
Fix compatibility with GTK+ v2.x, which does not provide Gdk.RGBA.
(GTK+ v3.x does provide that).
PR: 179960
Submitted by: Vitaly Magerya <vmagerya at gmail.com>
Approved by: (maintainer timeout, 6 weeks; port signed over to lua@)
Obtained from: <https://github.com/pavouk/lgi/commit/8000f6d1362fc38ebe349119554d291f6226e04e>
Added:
head/devel/lua-lgi/files/patch-lgi-override-Gdk.lua (contents, props changed)
Modified:
head/devel/lua-lgi/Makefile
Modified: head/devel/lua-lgi/Makefile
==============================================================================
--- head/devel/lua-lgi/Makefile Tue Aug 6 00:32:08 2013 (r324296)
+++ head/devel/lua-lgi/Makefile Tue Aug 6 01:01:30 2013 (r324297)
@@ -2,6 +2,7 @@
PORTNAME= lgi
PORTVERSION= 0.7.1
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
Added: head/devel/lua-lgi/files/patch-lgi-override-Gdk.lua
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/lua-lgi/files/patch-lgi-override-Gdk.lua Tue Aug 6 01:01:30 2013 (r324297)
@@ -0,0 +1,31 @@
+--- lgi/override/Gdk.lua.orig 2013-06-25 14:33:15.000000000 +0300
++++ lgi/override/Gdk.lua 2013-06-25 14:34:28.000000000 +0300
+@@ -54,16 +54,18 @@
+ } do Gdk._constant[name] = Gdk.Atom(val) end
+
+ -- Easier-to-use Gdk.RGBA.parse() override.
+-local parse = Gdk.RGBA.parse
+-function Gdk.RGBA._method.parse(arg1, arg2)
+- if Gdk.RGBA:is_type_of(arg1) then
+- -- Standard member method.
+- return parse(arg1, arg2)
+- else
+- -- Static constructor variant.
+- local rgba = Gdk.RGBA()
+- return parse(rgba, arg1) and rgba or nil
+- end
++if Gdk.RGBA then
++ local parse = Gdk.RGBA.parse
++ function Gdk.RGBA._method.parse(arg1, arg2)
++ if Gdk.RGBA:is_type_of(arg1) then
++ -- Standard member method.
++ return parse(arg1, arg2)
++ else
++ -- Static constructor variant.
++ local rgba = Gdk.RGBA()
++ return parse(rgba, arg1) and rgba or nil
++ end
++ end
+ end
+
+ -- Gdk.Window.destroy() actually consumes 'self'. Prepare workaround
More information about the svn-ports-all
mailing list