Subject: pkg/26161: pkgsrc/graphics/libungif does not compile on IRIX 5.3 (and maybe other platforms)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <geos@epost.de>
List: pkgsrc-bugs
Date: 07/04/2004 09:51:59
>Number:         26161
>Category:       pkg
>Synopsis:       pkgsrc/graphics/libungif does not compile on IRIX 5.3 (and maybe other platforms)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 04 09:53:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Georg Schwarz
>Release:        current pkgsrc
>Organization:
>Environment:
IRIX lorenz 5.3 08031225 IP20 mips
>Description:
pkgsrc/graphics/libungif does not compile on IRIX 5.3 (and maybe other platforms) due to missing definition of EXIT_SUCCESS, EXIT_FAILURE and due to wrong variable usage in the code.
>How-To-Repeat:

>Fix:
in order to compile libungif-4.1.0b1 on IRIX 5.3 I had to define EXIT_SUCCESS and EXIT_FAILURE, because IRIX 5.3 does not know about it. I did so in lib/gif_lib.h, but maybe there is a more appropriate location?

*** gif_lib.h.orig      Sun Jul  4 11:30:40 2004
--- gif_lib.h   Sun Jul  4 10:49:38 2004
***************
*** 311,314 ****
--- 311,321 ----
                     const int bg,
                     const int fg);
  
+ #ifndef EXIT_SUCCESS
+ #define EXIT_SUCCESS    0
+ #endif
+ #ifndef EXIT_FAILURE
+ #define EXIT_FAILURE    1
+ #endif
+ 
  #endif /* _GIF_LIB_H */

Secondly, there is a bug (wrong variable usage) in util/gif2iris.c. The following patch corrects it:

*** gif2iris.c.orig     Sun Jul  4 11:18:10 2004
--- gif2iris.c  Sun Jul  4 11:19:12 2004
***************
*** 227,234 ****
      BackGround = GifFile->SBackGroundColor;
      ColorMap = (GifFile->Image.ColorMap ? GifFile->Image.ColorMap :
                                       GifFile->SColorMap);
!     ColorMapSize = 1 << (GifFile->Image.ColorMap ? GifFile->Image.BitsPerPixel :
!                                               GifFile->SBitsPerPixel);
      GifQprintf("\n");
      Screen2Iris(ScreenBuffer, GifFile->SWidth, GifFile->SHeight);
  
--- 227,234 ----
      BackGround = GifFile->SBackGroundColor;
      ColorMap = (GifFile->Image.ColorMap ? GifFile->Image.ColorMap :
                                       GifFile->SColorMap);
!     ColorMapSize = 1 << (GifFile->Image.ColorMap ? GifFile->Image.ColorMap->BitsPerPixel :
!                                               GifFile->SColorMap->BitsPerPixel);
      GifQprintf("\n");
      Screen2Iris(ScreenBuffer, GifFile->SWidth, GifFile->SHeight);

>Release-Note:
>Audit-Trail:
>Unformatted: