Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2013 01:01:30 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r324297 - in head/devel/lua-lgi: . files
Message-ID:  <201308060101.r7611UPd032000@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308060101.r7611UPd032000>