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

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