0005-giflib.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. Adjust source code to work with giflib 5.1x
  2. Downloaded patch for gif.c from
  3. https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib-5.1.patch?h=packages/fbv
  4. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  5. diff -wbBur fbv-1.0b/gif.c fbv-1.0b.my/gif.c
  6. --- fbv-1.0b/gif.c 2003-08-25 00:23:02.000000000 +0400
  7. +++ fbv-1.0b.my/gif.c 2014-05-29 18:39:41.337332872 +0400
  8. @@ -31,10 +31,10 @@
  9. #include <string.h>
  10. #define min(a,b) ((a) < (b) ? (a) : (b))
  11. #define gflush return(FH_ERROR_FILE);
  12. -#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
  13. -#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
  14. +#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
  15. +#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
  16. #define agflush return(FH_ERROR_FORMAT);
  17. -#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); }
  18. +#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); }
  19. int fh_gif_id(char *name)
  20. @@ -81,7 +81,7 @@
  21. ColorMapObject *cmap;
  22. int cmaps;
  23. - gft=DGifOpenFileName(name);
  24. + gft=DGifOpenFileName(name, NULL);
  25. if(gft==NULL){printf("err5\n"); gflush;} //////////
  26. do
  27. {
  28. @@ -170,7 +170,7 @@
  29. }
  30. }
  31. while( rt!= TERMINATE_RECORD_TYPE );
  32. - DGifCloseFile(gft);
  33. + DGifCloseFile(gft, NULL);
  34. return(FH_ERROR_OK);
  35. }
  36. @@ -184,7 +184,7 @@
  37. int extcode;
  38. GifRecordType rt;
  39. - gft=DGifOpenFileName(name);
  40. + gft=DGifOpenFileName(name, NULL);
  41. if(gft==NULL) gflush;
  42. do
  43. {
  44. @@ -197,7 +197,7 @@
  45. px=gft->Image.Width;
  46. py=gft->Image.Height;
  47. *x=px; *y=py;
  48. - DGifCloseFile(gft);
  49. + DGifCloseFile(gft, NULL);
  50. return(FH_ERROR_OK);
  51. break;
  52. case EXTENSION_RECORD_TYPE:
  53. @@ -210,7 +210,7 @@
  54. }
  55. }
  56. while( rt!= TERMINATE_RECORD_TYPE );
  57. - DGifCloseFile(gft);
  58. + DGifCloseFile(gft, NULL);
  59. return(FH_ERROR_FORMAT);
  60. }
  61. #endif
  62. diff -uNr fbv-1.0b.org/configure fbv-1.0b/configure
  63. --- fbv-1.0b.org/configure 2004-09-07 13:29:27.000000000 +0200
  64. +++ fbv-1.0b/configure 2015-01-29 19:58:30.374599874 +0100
  65. @@ -106,9 +106,9 @@
  66. ungif="no"
  67. echo "libungif check" >>./config.log
  68. echo " 1st:" >>./config.log
  69. -$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs
  70. +$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lgif $libs
  71. if [ -e \$\$~test ]; then
  72. - libs="-lungif $libs" ; ungif="yes"
  73. + libs="-lgif $libs" ; ungif="yes"
  74. else
  75. echo " 2nd: -lX11 -L$xdir/lib" >>./config.log
  76. $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs