Accepting request 235948 from M17N
- Update fontforge-fixgiflib.patch to support giflib7-5.1 (forwarded request 235928 from jengelh) OBS-URL: https://build.opensuse.org/request/show/235948 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fontforge?expand=0&rev=35
This commit is contained in:
commit
84c1d13677
@ -1,8 +1,33 @@
|
||||
---
|
||||
gutils/gimagereadgif.c | 32 ++++++++++++++++++++++++++------
|
||||
1 file changed, 26 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: fontforge-20120731-b/gutils/gimagereadgif.c
|
||||
===================================================================
|
||||
--- fontforge-20120731-b.orig/gutils/gimagereadgif.c
|
||||
+++ fontforge-20120731-b/gutils/gimagereadgif.c
|
||||
@@ -132,7 +132,7 @@ GImage *GImageReadGif(char *filename) {
|
||||
@@ -44,7 +44,11 @@ static int a_file_must_define_something=
|
||||
static DL_CONST void *libgif=NULL;
|
||||
static GifFileType *(*_DGifOpenFileName)(char *);
|
||||
static int (*_DGifSlurp)(GifFileType *);
|
||||
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
|
||||
+static int (*_DGifCloseFile)(GifFileType *, int *);
|
||||
+#else
|
||||
static int (*_DGifCloseFile)(GifFileType *);
|
||||
+#endif
|
||||
|
||||
static int loadgif() {
|
||||
char *err;
|
||||
@@ -58,7 +62,7 @@ return( 0 );
|
||||
}
|
||||
_DGifOpenFileName = (GifFileType *(*)(char *)) dlsym(libgif,"DGifOpenFileName");
|
||||
_DGifSlurp = (int (*)(GifFileType *)) dlsym(libgif,"DGifSlurp");
|
||||
- _DGifCloseFile = (int (*)(GifFileType *)) dlsym(libgif,"DGifCloseFile");
|
||||
+ _DGifCloseFile = (void *)dlsym(libgif,"DGifCloseFile");
|
||||
if ( _DGifOpenFileName && _DGifSlurp && _DGifCloseFile )
|
||||
return( 1 );
|
||||
dlclose(libgif);
|
||||
@@ -132,13 +136,17 @@ GImage *GImageReadGif(char *filename) {
|
||||
if ( !loadgif())
|
||||
return( NULL );
|
||||
|
||||
@ -11,7 +36,30 @@ Index: fontforge-20120731-b/gutils/gimagereadgif.c
|
||||
fprintf( stderr, "can't open %s\n", filename);
|
||||
return( NULL );
|
||||
}
|
||||
@@ -220,7 +220,7 @@ GImage *GImageReadGif(char *filename) {
|
||||
|
||||
if ( _DGifSlurp(gif)==GIF_ERROR ) {
|
||||
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
|
||||
+ _DGifCloseFile(gif, NULL);
|
||||
+#else
|
||||
_DGifCloseFile(gif);
|
||||
+#endif
|
||||
fprintf( stderr, "Bad gif file %s\n", filename );
|
||||
return( NULL );
|
||||
}
|
||||
@@ -150,7 +158,11 @@ return( NULL );
|
||||
ret = images[0];
|
||||
else
|
||||
ret = GImageCreateAnimation(images,gif->ImageCount);
|
||||
- _DGifCloseFile(gif);
|
||||
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
|
||||
+ _DGifCloseFile(gif, NULL);
|
||||
+#else
|
||||
+ _DGifCloseFile(gif);
|
||||
+#endif
|
||||
free(images);
|
||||
return( ret );
|
||||
}
|
||||
@@ -220,13 +232,17 @@ GImage *GImageReadGif(char *filename) {
|
||||
GifFileType *gif;
|
||||
int i;
|
||||
|
||||
@ -20,3 +68,27 @@ Index: fontforge-20120731-b/gutils/gimagereadgif.c
|
||||
fprintf( stderr, "can't open %s\n", filename);
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if ( DGifSlurp(gif)==GIF_ERROR ) {
|
||||
- DGifCloseFile(gif);
|
||||
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
+#else
|
||||
+ DGifCloseFile(gif);
|
||||
+#endif
|
||||
fprintf(stderr,"Bad gif file %s\n", filename );
|
||||
return( NULL );
|
||||
}
|
||||
@@ -238,7 +254,11 @@ return( NULL );
|
||||
ret = images[0];
|
||||
else
|
||||
ret = GImageCreateAnimation(images,gif->ImageCount);
|
||||
- DGifCloseFile(gif);
|
||||
+#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1))
|
||||
+ DGifCloseFile(gif, NULL);
|
||||
+#else
|
||||
+ DGifCloseFile(gif);
|
||||
+#endif
|
||||
free(images);
|
||||
return( ret );
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat May 31 16:12:53 UTC 2014 - jengelh@inai.de
|
||||
|
||||
- Update fontforge-fixgiflib.patch to support giflib7-5.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 17 07:21:51 UTC 2014 - pgajdos@suse.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user