Blame SOURCES/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch

d8fab0
From 012b0b019ede3cfa7df20bf60c7915a771ecff78 Mon Sep 17 00:00:00 2001
d8fab0
From: Kalev Lember <kalevlember@gmail.com>
d8fab0
Date: Thu, 4 Dec 2014 11:22:04 +0100
d8fab0
Subject: [PATCH] matting-levin: Fix the build with recent suitesparse versions
d8fab0
d8fab0
Stop using the UF_long define that was deprecated previously and has
d8fab0
completely disappeared in suitesparse 4.3.
d8fab0
d8fab0
https://bugzilla.gnome.org/show_bug.cgi?id=741105
d8fab0
---
d8fab0
 operations/external/matting-levin.c | 20 ++++++++++----------
d8fab0
 1 file changed, 10 insertions(+), 10 deletions(-)
d8fab0
d8fab0
diff --git a/operations/external/matting-levin.c b/operations/external/matting-levin.c
d8fab0
index 63e85d1..cf84699 100644
d8fab0
--- a/operations/external/matting-levin.c
d8fab0
+++ b/operations/external/matting-levin.c
d8fab0
@@ -850,8 +850,8 @@ matting_sparse_new (guint cols, guint rows, guint elems)
d8fab0
   sparse_t *s = g_new (sparse_t, 1);
d8fab0
   s->columns  = cols;
d8fab0
   s->rows     = rows;
d8fab0
-  s->col_idx  = g_new  (UF_long, cols + 1);
d8fab0
-  s->row_idx  = g_new  (UF_long, elems);
d8fab0
+  s->col_idx  = g_new  (SuiteSparse_long, cols + 1);
d8fab0
+  s->row_idx  = g_new  (SuiteSparse_long, elems);
d8fab0
   s->values   = g_new0 (gdouble, elems);
d8fab0
 
d8fab0
   return s;
d8fab0
@@ -964,8 +964,8 @@ matting_get_laplacian (const gdouble       *restrict image,
d8fab0
             image_elems  = roi->width * roi->height,
d8fab0
             i, j, k, x, y,
d8fab0
             status;
d8fab0
-  UF_long  *trip_col,
d8fab0
-           *trip_row;
d8fab0
+  SuiteSparse_long *trip_col,
d8fab0
+                   *trip_row;
d8fab0
   glong     trip_nz = 0,
d8fab0
             trip_cursor = 0,
d8fab0
             trip_masked = 0;
d8fab0
@@ -995,8 +995,8 @@ matting_get_laplacian (const gdouble       *restrict image,
d8fab0
   trip_nz   = trip_masked * window_elems * window_elems;
d8fab0
   trip_nz  += image_elems; // Sparse diagonal and row summing at conclusion
d8fab0
 
d8fab0
-  trip_col  = g_new  (UF_long, trip_nz);
d8fab0
-  trip_row  = g_new  (UF_long, trip_nz);
d8fab0
+  trip_col  = g_new  (SuiteSparse_long, trip_nz);
d8fab0
+  trip_row  = g_new  (SuiteSparse_long, trip_nz);
d8fab0
   trip_val  = g_new0 (gdouble, trip_nz);
d8fab0
 
d8fab0
   /* Compute the contribution of each pixel in the image to the laplacian */
d8fab0
@@ -1082,10 +1082,10 @@ matting_get_laplacian (const gdouble       *restrict image,
d8fab0
           for (y = 0; y < window_elems; ++y)
d8fab0
             for (x = 0; x < window_elems; ++x)
d8fab0
               {
d8fab0
-                UF_long yx = y % diameter,
d8fab0
-                        yy = y / diameter,
d8fab0
-                        xx = x % diameter,
d8fab0
-                        xy = x / diameter;
d8fab0
+                SuiteSparse_long yx = y % diameter,
d8fab0
+                                 yy = y / diameter,
d8fab0
+                                 xx = x % diameter,
d8fab0
+                                 xy = x / diameter;
d8fab0
 
d8fab0
                 g_return_val_if_fail (trip_cursor < trip_nz, FALSE);
d8fab0
                 trip_col[trip_cursor] = (i - radius + yx) + (j - radius + yy) * roi->width,
d8fab0
-- 
d8fab0
2.1.0
d8fab0