Accepting request 99733 from home:vuntz:branches:graphics

Fix build

OBS-URL: https://build.opensuse.org/request/show/99733
OBS-URL: https://build.opensuse.org/package/show/graphics/gegl?expand=0&rev=22
This commit is contained in:
Ismail Dönmez 2012-01-11 10:37:55 +00:00 committed by Git OBS Bridge
parent 460952747a
commit e7f8e6222d
3 changed files with 66 additions and 13 deletions

39
gegl-lua52.patch Normal file
View File

@ -0,0 +1,39 @@
commit a5b601502d3293966994911cfcab6a0eb0d68e41
Author: Vincent Untz <vuntz@gnome.org>
Date: Wed Jan 11 09:52:25 2012 +0100
Fix build with lua 5.2 by not using API deprecated in 5.1 already
https://bugzilla.gnome.org/show_bug.cgi?id=667675
diff --git a/operations/workshop/external/gluas.c b/operations/workshop/external/gluas.c
index 536f1d9..dbcc362 100644
--- a/operations/workshop/external/gluas.c
+++ b/operations/workshop/external/gluas.c
@@ -97,7 +97,7 @@ static int l_progress (lua_State * lua);
static int l_flush (lua_State * lua);
static int l_print (lua_State * lua);
-static const luaL_reg gluas_functions[] =
+static const luaL_Reg gluas_functions[] =
{
{"set_rgba", l_set_rgba},
{"get_rgba", l_get_rgba},
@@ -122,7 +122,7 @@ static const luaL_reg gluas_functions[] =
};
static void
register_functions (lua_State *L,
- const luaL_reg *l)
+ const luaL_Reg *l)
{
for (;l->name; l++)
lua_register (L, l->name, l->func);
@@ -146,7 +146,7 @@ drawable_lua_process (GeglOperation *op,
lua_State *L;
Priv p;
- L = lua_open ();
+ L = luaL_newstate ();
luaL_openlibs (L);
register_functions (L, gluas_functions);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 11 08:57:36 UTC 2012 - vuntz@opensuse.org
- Add gegl-lua52.patch: fix build with lua 5.2, while still being
compatible with lua 5.1.
-------------------------------------------------------------------
Sun Nov 27 14:39:21 UTC 2011 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gegl
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,14 +15,24 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: gegl
# Patched code is built by default.
# Use rpmbuild -D 'BUILD_ORIG 1' to build original code.
# Use rpmbuild -D 'BUILD_ORIG 1' -D 'BUILD_ORIG_ADDON 1' to build patched build plus original as addon.
BuildRequires: ImageMagick OpenEXR-devel SDL-devel asciidoc babl-devel enscript gcc-c++ graphviz-gd gtk2-devel libjpeg-devel libpng-devel librsvg-devel libstdc++-devel lua-devel
BuildRequires: ImageMagick
BuildRequires: OpenEXR-devel
BuildRequires: SDL-devel
BuildRequires: asciidoc
BuildRequires: babl-devel
BuildRequires: enscript
BuildRequires: gcc-c++
BuildRequires: graphviz-gd
BuildRequires: gtk2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: librsvg-devel
BuildRequires: libstdc++-devel
BuildRequires: lua-devel
# FIXME: add back with next release after 0.1.0, when gobj2dot.rb will be there
# BuildRequires: ruby
BuildRequires: glib2-devel >= 2.16.1
@ -42,11 +52,13 @@ Provides: patched_subset
%endif
Url: http://gegl.org/
Version: 0.1.8
Release: 1
License: GPLv3+ ; LGPLv3+
Group: System/Libraries
Release: 0
Summary: Generic Graphics Library
License: GPL-3.0+ ; LGPL-3.0+
Group: System/Libraries
Source: ftp://ftp.gimp.org/pub/gegl/0.1/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gegl-lua52.patch bgo#667675 vuntz@opensuse.org -- Fix build with lua 5.2
Patch0: gegl-lua52.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires libgegl-0_1-0 = %{version}-%{release}
@ -57,7 +69,6 @@ support for a wide range of color models and pixel storage formats for
input and output.
%package 0_1
License: GPLv3+ ; LGPLv3+
Summary: Generic Graphics Library
Group: System/Libraries
@ -71,7 +82,6 @@ input and output.
%if 0%{?BUILD_ORIG_ADDON}
%package 0_1-orig-addon
License: GPLv3+ ; LGPLv3+
Summary: Generic Graphics Library
Group: System/Libraries
Supplements: packageand(%{name}-0_1:%(cd %{_libdir} ; rpm -qf --queryformat=%%{NAME} `readlink %{_libdir}/libavcodec.so` ))
@ -86,7 +96,6 @@ input and output.
%endif
%package -n libgegl-0_1-0
License: GPLv3+ ; LGPLv3+
Summary: Generic Graphics Library
Group: System/Libraries
Recommends: %{name}-0_1 >= %{version}
@ -98,7 +107,6 @@ support for a wide range of color models and pixel storage formats for
input and output.
%package devel
License: GPLv3+ ; LGPLv3+
Summary: Generic Graphics Library
Group: System/Libraries
Requires: libgegl-0_1-0 = %{version} babl-devel glib2-devel glibc-devel pcre-devel
@ -110,7 +118,6 @@ support for a wide range of color models and pixel storage formats for
input and output.
%package doc
License: GPLv3+ ; LGPLv3+
Summary: Generic Graphics Library
Group: System/Libraries
Requires: libgegl-0_1-0 = %{version}
@ -123,6 +130,7 @@ input and output.
%prep
%setup -q
%patch0 -p1
# docs-build-fix.diff
%build