From ba7a27a64f186996e274d28159e22ccd27a4d66586620a747d2d95531c6b21a0 Mon Sep 17 00:00:00 2001 From: OBS User mrdocs Date: Mon, 27 Oct 2014 03:35:20 +0000 Subject: [PATCH] Accepting request 258426 from home:MargueriteSu:branches:graphics fix build for factory w/ SuiteSparse 4.4.0 OBS-URL: https://build.opensuse.org/request/show/258426 OBS-URL: https://build.opensuse.org/package/show/graphics/gegl?expand=0&rev=30 --- gegl-UF_long.patch | 44 +++++++++++++++++++++++++++++++++++++ gegl.changes | 9 ++++++++ gegl.spec | 55 +++++++++++++++++++++++++--------------------- 3 files changed, 83 insertions(+), 25 deletions(-) create mode 100644 gegl-UF_long.patch diff --git a/gegl-UF_long.patch b/gegl-UF_long.patch new file mode 100644 index 0000000..001a7b5 --- /dev/null +++ b/gegl-UF_long.patch @@ -0,0 +1,44 @@ +Index: gegl-0.2.0/operations/external/matting-levin.c +=================================================================== +--- gegl-0.2.0.orig/operations/external/matting-levin.c ++++ gegl-0.2.0/operations/external/matting-levin.c +@@ -848,8 +848,8 @@ matting_sparse_new (guint cols, guint ro + sparse_t *s = g_new (sparse_t, 1); + s->columns = cols; + s->rows = rows; +- s->col_idx = g_new (UF_long, cols + 1); +- s->row_idx = g_new (UF_long, elems); ++ s->col_idx = g_new (SuiteSparse_long, cols + 1); ++ s->row_idx = g_new (SuiteSparse_long, elems); + s->values = g_new0 (gdouble, elems); + + return s; +@@ -948,7 +948,7 @@ matting_get_laplacian (const gdouble + image_elems = roi->width * roi->height, + i, j, k, x, y, + status; +- UF_long *trip_col, ++ SuiteSparse_long *trip_col, + *trip_row; + glong trip_nz = 0, + trip_cursor = 0, +@@ -979,8 +979,8 @@ matting_get_laplacian (const gdouble + trip_nz = trip_masked * window_elems * window_elems; + trip_nz += image_elems; // Sparse diagonal and row summing at conclusion + +- trip_col = g_new (UF_long, trip_nz); +- trip_row = g_new (UF_long, trip_nz); ++ trip_col = g_new (SuiteSparse_long, trip_nz); ++ trip_row = g_new (SuiteSparse_long, trip_nz); + trip_val = g_new0 (gdouble, trip_nz); + + /* Compute the contribution of each pixel in the image to the laplacian */ +@@ -1066,7 +1066,7 @@ matting_get_laplacian (const gdouble + for (y = 0; y < window_elems; ++y) + for (x = 0; x < window_elems; ++x) + { +- UF_long yx = y % diameter, ++ SuiteSparse_long yx = y % diameter, + yy = y / diameter, + xx = x % diameter, + xy = x / diameter; diff --git a/gegl.changes b/gegl.changes index 20532aa..4f00e1d 100644 --- a/gegl.changes +++ b/gegl.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Oct 25 19:46:46 UTC 2014 - i@marguerite.su + +- fix build for factory + * add patch: gegl-UF_long.patch + * newer suitesparse abandoned UF_long in favor for SuiteSparse_long +- fix build for graphics repo + * ugly fix, multiple provides of gd by gd and gd-tools from libgd2 + ------------------------------------------------------------------- Mon Feb 4 14:31:22 UTC 2013 - coolo@suse.com diff --git a/gegl.spec b/gegl.spec index 1c52d85..2914462 100644 --- a/gegl.spec +++ b/gegl.spec @@ -1,7 +1,7 @@ # # spec file for package gegl # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 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 @@ -16,10 +16,24 @@ # +%define debug_package_requires libgegl-0_2-0 = %{version}-%{release} Name: gegl +Version: 0.2.0 +Release: 0 +Summary: Generic Graphics Library +License: GPL-3.0+ and LGPL-3.0+ +Group: System/Libraries +Url: http://gegl.org/ +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 +Patch0: gegl-lua52.patch +# PATCH-FIX-UPSTREAM gegl-ruby19.patch dimstar@opensuse.org -- Fix build with ruby 1.9 +Patch1: gegl-ruby19.patch # 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. +# PATCH-FIX-UPSTREAM sutesparse changed UF_long for SuiteSparse_long +Patch2: gegl-UF_long.patch BuildRequires: ImageMagick BuildRequires: OpenEXR-devel BuildRequires: SDL-devel @@ -27,8 +41,12 @@ BuildRequires: asciidoc BuildRequires: babl-devel >= 0.1.10 BuildRequires: enscript BuildRequires: gcc-c++ +# multiple provides by gd and gd-tools +BuildRequires: gd BuildRequires: glib2-devel >= 2.16.1 BuildRequires: graphviz-gd +# Only for directory ownership: +BuildRequires: gtk-doc BuildRequires: gtk2-devel BuildRequires: intltool BuildRequires: lensfun-devel @@ -46,8 +64,7 @@ BuildRequires: lua-devel BuildRequires: ruby # For umfpack BuildRequires: suitesparse-devel -# Only for directory ownership: -BuildRequires: gtk-doc +BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?BUILD_ORIG} BuildRequires: ffmpeg-devel %if 0%{?BUILD_ORIG_ADDON} @@ -59,19 +76,6 @@ Obsoletes: %{name}-orig-addon %else Provides: patched_subset %endif -Url: http://gegl.org/ -Version: 0.2.0 -Release: 0 -Summary: Generic Graphics Library -License: GPL-3.0+ and LGPL-3.0+ -Group: System/Libraries -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 -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 -%define debug_package_requires libgegl-0_2-0 = %{version}-%{release} %description GEGL provides infrastructure to do demand based cached non destructive @@ -92,7 +96,6 @@ input and output. %if 0%{?BUILD_ORIG} %if 0%{?BUILD_ORIG_ADDON} - %package 0_2-orig-addon Summary: Generic Graphics Library Group: System/Libraries @@ -145,29 +148,33 @@ support for a wide range of color models and pixel storage formats for input and output. %lang_package -n %{name}-0_2 + %prep %setup -q %patch0 -p1 %patch1 -p1 +%if 0%{?suse_version} > 1310 +%patch2 -p1 +%endif # docs-build-fix.diff %build -export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -## do not use autogen.sh, it intentionally fails, if there is no ruby. +export RPM_OPT_FLAGS="%{optflags} -fno-strict-aliasing" +## do not use autogen.sh, it intentionally fails, if there is no ruby. ## so why use autogen, when you do not want portability? # ./autogen.sh %configure\ --enable-workshop=yes\ --disable-static --disable-silent-rules -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install -%makeinstall +make DESTDIR=%{buildroot} install %{?_smp_mflags} %if ! 0%{?BUILD_ORIG} for MODULE in \ %{_libdir}/gegl-0.2/ff-load.so \ ; do - rm -f $RPM_BUILD_ROOT$MODULE + rm -f %{buildroot}$MODULE done %endif find %{buildroot} -type f -name "*.la" -delete -print @@ -177,9 +184,6 @@ find %{buildroot} -type f -name "*.la" -delete -print %postun -n libgegl-0_2-0 -p /sbin/ldconfig -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root) %{_bindir}/gegl @@ -214,5 +218,6 @@ rm -rf $RPM_BUILD_ROOT %doc %{_datadir}/gtk-doc/html/gegl/ %files -n %{name}-0_2-lang -f %{name}-0.2.lang +%defattr(-,root,root) %changelog