[packages/imlib] - updated giflib patch for giflib 5.1 - rel 25

baggins baggins at pld-linux.org
Wed Oct 29 01:07:52 CET 2014


commit d637f914229975f2f041e686309d984cd597ecbd
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Oct 29 01:09:23 2014 +0100

    - updated giflib patch for giflib 5.1
    - rel 25

 imlib-giflib.patch | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 imlib.spec         |  2 +-
 2 files changed, 87 insertions(+), 3 deletions(-)
---
diff --git a/imlib.spec b/imlib.spec
index 473e7cd..a8793e5 100644
--- a/imlib.spec
+++ b/imlib.spec
@@ -6,7 +6,7 @@ Summary(pl.UTF-8):	Biblioteki do renderowania i ładowania grafiki pod X11R6
 Summary(pt_BR.UTF-8):	Biblioteca de carga e renderização para X11R6
 Name:		imlib
 Version:	1.9.15
-Release:	24
+Release:	25
 Epoch:		1
 License:	LGPL v2
 Group:		X11/Libraries
diff --git a/imlib-giflib.patch b/imlib-giflib.patch
index 6b35019..3529691 100644
--- a/imlib-giflib.patch
+++ b/imlib-giflib.patch
@@ -13,12 +13,20 @@
  unsigned char      *
  loader_gif(FILE *f, int *w, int *h, int *t)
  {
+@@ -29,6 +29,7 @@
+   int                 intjump[] = {8, 8, 4, 2};
+   int                 istransp, transp;
+   int                 fd;
++  int                 giferr;
+ 
+   done = 0;
+   istransp = 0;
 @@ -30,7 +36,7 @@
    fd = fileno(f);
    /* Apparently rewind(f) isn't sufficient */
    lseek(fd, (long) 0, 0);
 -  gif = DGifOpenFileHandle(fd);
-+  gif = DGifOpenFileHandle(fd, NULL);
++  gif = DGifOpenFileHandle(fd, &giferr);
  
    transp = -1;
    data = NULL;
@@ -39,6 +47,40 @@
  	      rec = TERMINATE_RECORD_TYPE;
  	    }
  	  *w = gif->Image.Width;
+@@ -68,13 +69,13 @@
+ 	  rows = malloc(*h * sizeof(GifRowType *));
+ 	  if (!rows)
+ 	    {
+-	      DGifCloseFile(gif);
++	      DGifCloseFile(gif, &giferr);
+ 	      return NULL;
+ 	    }
+ 	  data = _gdk_malloc_image(*w, *h);
+ 	  if (!data)
+ 	    {
+-	      DGifCloseFile(gif);
++	      DGifCloseFile(gif, &giferr);
+ 	      free(rows);
+ 	      return NULL;
+ 	    }
+@@ -85,7 +86,7 @@
+ 	      rows[i] = malloc(*w * sizeof(GifPixelType));
+ 	      if (!rows[i])
+ 		{
+-		  DGifCloseFile(gif);
++		  DGifCloseFile(gif, &giferr);
+ 		  for (i = 0; i < *h; i++)
+ 		    if (rows[i])
+ 		      free(rows[i]);
+@@ -174,7 +175,7 @@
+ 	    }
+ 	}
+     }
+-  DGifCloseFile(gif);
++  DGifCloseFile(gif, &giferr);
+   for (i = 0; i < *h; i++)
+     free(rows[i]);
+   free(rows);
 --- imlib-1.9.15/Imlib/load.c.orig	2014-02-02 08:59:39.119743612 +0100
 +++ imlib-1.9.15/Imlib/load.c	2014-02-02 09:16:12.426368593 +0100
 @@ -429,6 +429,12 @@
@@ -54,12 +96,20 @@
  unsigned char      *
  _LoadGIF(ImlibData * id, FILE *f, int *w, int *h, int *t)
  {
+@@ -448,6 +448,7 @@
+   int                 intjump[] = {8, 8, 4, 2};
+   int                 istransp, transp;
+   int                 fd;
++  int                 giferr;
+ 
+   done = 0;
+   istransp = 0;
 @@ -452,7 +458,7 @@
    fd = fileno(f);
    /* Apparently rewind(f) isn't sufficient */
    lseek(fd, (long) 0, 0);
 -  gif = DGifOpenFileHandle(fd);
-+  gif = DGifOpenFileHandle(fd, NULL);
++  gif = DGifOpenFileHandle(fd, &giferr);
  
    if (!gif)
      return NULL;
@@ -80,3 +130,37 @@
  	      rec = TERMINATE_RECORD_TYPE;
  	    }
  	  *w = gif->Image.Width;
+@@ -486,13 +486,13 @@
+ 	  rows = malloc(*h * sizeof(GifRowType *));
+ 	  if (!rows)
+ 	    {
+-	      DGifCloseFile(gif);
++	      DGifCloseFile(gif, &giferr);
+ 	      return NULL;
+ 	    }
+ 	  data = _imlib_malloc_image(*w, *h);
+ 	  if (!data)
+ 	    {
+-	      DGifCloseFile(gif);
++	      DGifCloseFile(gif, &giferr);
+ 	      free(rows);
+ 	      return NULL;
+ 	    }
+@@ -503,7 +503,7 @@
+ 	      rows[i] = malloc(*w * sizeof(GifPixelType));
+ 	      if (!rows[i])
+ 		{
+-		  DGifCloseFile(gif);
++		  DGifCloseFile(gif, &giferr);
+ 		  for (i = 0; i < *h; i++)
+ 		    if (rows[i])
+ 		      free(rows[i]);
+@@ -592,7 +592,7 @@
+ 	    }
+ 	}
+     }
+-  DGifCloseFile(gif);
++  DGifCloseFile(gif, &giferr);
+   for (i = 0; i < *h; i++)
+     free(rows[i]);
+   free(rows);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/imlib.git/commitdiff/d637f914229975f2f041e686309d984cd597ecbd



More information about the pld-cvs-commit mailing list