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

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