Hello community,

here is the log from the commit of package mtpaint for openSUSE:Factory checked 
in at 2013-03-22 21:06:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mtpaint (Old)
 and      /work/SRC/openSUSE:Factory/.mtpaint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mtpaint", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/mtpaint/mtpaint.changes  2012-11-25 
13:08:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mtpaint.new/mtpaint.changes     2013-03-22 
21:06:41.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Mar 12 22:03:46 UTC 2013 - [email protected]
+
+- fix build with giflib-5.x (mtpaint-3.40-giflib5.diff)
+
+-------------------------------------------------------------------

New:
----
  mtpaint-3.40-giflib5.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mtpaint.spec ++++++
--- /var/tmp/diff_new_pack.JQ7OlY/_old  2013-03-22 21:06:42.000000000 +0100
+++ /var/tmp/diff_new_pack.JQ7OlY/_new  2013-03-22 21:06:42.000000000 +0100
@@ -1,7 +1,8 @@
 #
 # spec file for package mtpaint
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 B1 Systems GmbH, Vohburg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +31,8 @@
 Patch1:         mtpaint-3.40-xdg-open.patch
 # PATCH-FIX-OPENSUSE mtpaint-3.40-strip.patch rh#787462 -- don't strip binary
 Patch2:         mtpaint-3.40-strip.patch
+# PATCH-FIX-OPENSUSE mtpaint-3.40-giflib5.diff -- fix build with giflib-5.x
+Patch3:         mtpaint-3.40-giflib5.diff
 BuildRequires:  giflib-devel
 BuildRequires:  libjpeg-devel
 BuildRequires:  libtiff-devel
@@ -75,6 +78,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2
+%patch3 -p1
 
 %build
 # fix warnings for gcc >= 4.4, use -fno-strict-aliasing
@@ -86,7 +90,6 @@
     asneeded \
     cflags \
     GIF \
-    gif \
     gtk2 \
     gtkfilesel \
     imagick \

++++++ mtpaint-3.40-giflib5.diff ++++++
diff --git a/src/png.c b/src/png.c
index 2b30821..e2ecf8f 100644
--- a/src/png.c
+++ b/src/png.c
@@ -1509,8 +1509,11 @@ static int load_gif_frames(char *file_name, ani_settings 
*ani)
        ls_settings w_set, init_set;
        int res, val, disposal, bpp, cmask, lastzero = FALSE;
 
-
+#if GIFLIB_MAJOR < 5
        if (!(giffy = DGifOpenFileName(file_name))) return (-1);
+#else
+       if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1);
+#endif
 
        /* Init state structure */
        memset(&stat, 0, sizeof(stat));
@@ -1621,7 +1624,11 @@ static int load_gif(char *file_name, ls_settings 
*settings)
        int delay = settings->gif_delay, trans = -1;//, disposal = 0;
 
 
+#if GIFLIB_MAJOR < 5
        if (!(giffy = DGifOpenFileName(file_name))) return (-1);
+#else
+       if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1);
+#endif
 
        /* Get global palette */
        settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap);
@@ -1682,10 +1689,17 @@ static int save_gif(char *file_name, ls_settings 
*settings)
        nc |= nc >> 1; nc |= nc >> 2; nc |= nc >> 4;
        nc += !nc + 1; // No less than 2 colors
 
+#if GIFLIB_MAJOR < 5
        gif_map = MakeMapObject(nc, NULL);
        if (!gif_map) return -1;
 
        giffy = EGifOpenFileName(file_name, FALSE);
+#else
+       gif_map = GifMakeMapObject(nc, NULL);
+       if (!gif_map) return -1;
+
+       giffy = EGifOpenFileName(file_name, FALSE, NULL);
+#endif
        if (!giffy) goto fail0;
 
        for (i = 0; i < settings->colors; i++)
@@ -1732,7 +1746,12 @@ fail:    EGifCloseFile(giffy);
        umask(mode);
        chmod(file_name, 0666 & ~mode);
 #endif
-fail0: FreeMapObject(gif_map);
+fail0:
+#if GIFLIB_MAJOR < 5
+       FreeMapObject(gif_map);
+#else
+       GifFreeMapObject(gif_map);
+#endif
 
        return (msg);
 }

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to