Accepting request 121387 from home:dimstar:branches:graphics

Fix build on Factory with ruby 1.9

OBS-URL: https://build.opensuse.org/request/show/121387
OBS-URL: https://build.opensuse.org/package/show/graphics/gegl?expand=0&rev=26
This commit is contained in:
Ismail Dönmez 2012-05-18 11:36:55 +00:00 committed by Git OBS Bridge
parent 1184ca40a2
commit 84c0fef512
3 changed files with 55 additions and 0 deletions

43
gegl-ruby19.patch Normal file
View File

@ -0,0 +1,43 @@
commit 809642a08787638d9682149de25d36ee273902ff
Author: Øvind Kolå<pippin gimp org>
Date: Thu Apr 5 18:49:54 2012 +0200
tools/create-reference.rb: fix utf8 handling for ruby >= 1.9.x
A patch from Tim Mooney, fixing bug #673523
tools/create-reference.rb | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
Index: gegl-0.2.0/tools/create-reference.rb
===================================================================
--- gegl-0.2.0.orig/tools/create-reference.rb
+++ gegl-0.2.0/tools/create-reference.rb
@@ -5,6 +5,11 @@
# Use under a public domain license.
#
+if RUBY_VERSION =~ /^1.9/ or RUBY_VERSION =~ /^[2345]/
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+end
+
class Argument
attr_accessor :name, :data_type, :doc
def initialize
Index: gegl-0.2.0/tools/gobj2dot.rb
===================================================================
--- gegl-0.2.0.orig/tools/gobj2dot.rb
+++ gegl-0.2.0/tools/gobj2dot.rb
@@ -15,6 +15,11 @@
#
# Copyright (C) 2009 Henrik Akesson
+if RUBY_VERSION =~ /^1.9/ or RUBY_VERSION =~ /^[2345]/
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+end
+
require 'find'
if ARGV[0] == nil or ARGV.length != 1 or ARGV[0] == "-h"

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri May 18 09:50:52 UTC 2012 - dimstar@opensuse.org
- Add gegl-ruby19.patch: Fix build with ruby 1.9.
- Add liberation-fonts: the documentation references bitstream
vera sans font, so we need to provide it for the build.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 3 08:45:42 UTC 2012 - vuntz@opensuse.org Tue Apr 3 08:45:42 UTC 2012 - vuntz@opensuse.org

View File

@ -32,6 +32,8 @@ BuildRequires: graphviz-gd
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: intltool BuildRequires: intltool
BuildRequires: lensfun-devel BuildRequires: lensfun-devel
# Needed to build the doc, as Bitstream Vera Sans is the referenced font.
BuildRequires: liberation-fonts
BuildRequires: libexiv2-devel BuildRequires: libexiv2-devel
BuildRequires: libjasper-devel >= 1.900.1 BuildRequires: libjasper-devel >= 1.900.1
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
@ -66,6 +68,8 @@ Group: System/Libraries
Source: http://ftp.gtk.org/pub/gegl/0.2/%{name}-%{version}.tar.bz2 Source: http://ftp.gtk.org/pub/gegl/0.2/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gegl-lua52.patch bgo#667675 vuntz@opensuse.org -- Fix build with lua 5.2 # PATCH-FIX-UPSTREAM gegl-lua52.patch bgo#667675 vuntz@opensuse.org -- Fix build with lua 5.2
Patch0: gegl-lua52.patch Patch0: gegl-lua52.patch
# PATCH-FIX-UPSTREAM gegl-ruby19.patch dimstar@opensuse.org -- Fix build with ruby 1.9
Patch1: gegl-ruby19.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires libgegl-0_2-0 = %{version}-%{release} %define debug_package_requires libgegl-0_2-0 = %{version}-%{release}
@ -144,6 +148,7 @@ input and output.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
# docs-build-fix.diff # docs-build-fix.diff
%build %build