Bug 3772 - Fixed port: giftool-1.0
Summary: Fixed port: giftool-1.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1997-06-04 03:40 UTC by Nakai
Modified: 2007-09-17 12:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nakai 1997-06-04 03:40:01 UTC
I have updated giftool port to follow the latest version.
Please enjoy....

Add file:
files/patch-aa
files/patch-ab

---------------
diff -ruN giftool.orig/Makefile giftool/Makefile
--- giftool.orig/Makefile	Wed Jun  4 11:25:16 1997
+++ giftool/Makefile	Mon Mar 10 11:50:36 1997
@@ -1,15 +1,14 @@
 # New ports collection makefile for:   giftool
-# Version required:    0.9
-# Date created:        14 October 1996
+# Version required:    1.0
+# Date created:        7 March 1997
 # Whom:                Yukihiro Nakai <Nakai@Mlab.t.u-tokyo.ac.jp>
 #
 # $Id: Makefile,v 1.3 1996/12/07 09:28:43 max Exp $
 #
 
-DISTNAME=	giftool
-PKGNAME=        giftool-0.9
+DISTNAME=	giftool-1.0
 CATEGORIES=	graphics
-MASTER_SITES=   ftp://ftp.huie.hokudai.ac.jp/pub/tool/graphics/
+MASTER_SITES=   ftp://ftp.sbs.de/pub/www/tools/giftool/
 
 MAINTAINER=	Nakai@Mlab.t.u-tokyo.ac.jp
 
@@ -18,6 +17,19 @@
 NO_WRKSUBDIR=	yes
 ALL_TARGET=	giftool
 
+pre-clean:
+	@ rm -f ${PATCHDIR}/*
+
+pre-patch:
+.if defined(RETVALUE)
+	@ echo "Return value patch enabled....."
+	@ cp ${FILESDIR}/patch-aa ${PATCHDIR}
+.endif
+.if defined(MALLOCSIZE)
+	@ echo "Malloc size improve parch enabled....."
+	@ cp ${FILESDIR}/patch-ab ${PATCHDIR}
+.endif
+
 do-install:
 	@ ${INSTALL_PROGRAM} ${WRKSRC}/giftool ${PREFIX}/bin
 	@ ${MKDIR} -p ${PREFIX}/share/doc/giftool
@@ -28,7 +40,7 @@
 
 post-install:
 .if !defined(BATCH)
-	@ more -e ${FILESDIR}/post-install-notes
+	@ /usr/bin/more -e ${FILESDIR}/post-install-notes
 .endif
 
 .include <bsd.port.mk>
diff -ruN giftool.orig/files/md5 giftool/files/md5
--- giftool.orig/files/md5	Wed Jun  4 11:25:16 1997
+++ giftool/files/md5	Mon Mar 10 11:51:49 1997
@@ -1 +1 @@
-MD5 (giftool.tar.gz) = e62e1c16930ccdd64ccebc62005aacf3
+MD5 (giftool-1.0.tar.gz) = 3d90069d230b5d42a5e1803cfcb9d6ed
diff -ruN giftool.orig/files/patch-aa giftool/files/patch-aa
--- giftool.orig/files/patch-aa	Thu Jan  1 09:00:00 1970
+++ giftool/files/patch-aa	Sat Mar  8 15:38:02 1997
@@ -0,0 +1,27 @@
+*** main.c.orig	Sat Mar  8 06:34:28 1997
+--- main.c	Sat Mar  8 06:37:33 1997
+***************
+*** 1275,1281 ****
+  	exit(1);
+  }
+  
+! main(int argc, char *argv[]) 
+  {
+  	int		c, i;
+  	int		batchMode = 0;
+--- 1275,1281 ----
+  	exit(1);
+  }
+  
+! int main(int argc, char *argv[]) 
+  {
+  	int		c, i;
+  	int		batchMode = 0;
+***************
+*** 1410,1413 ****
+--- 1410,1414 ----
+  			GIFFree(stream);
+  		}
+  	}
++ 	return 0;
+  }
diff -ruN giftool.orig/files/patch-ab giftool/files/patch-ab
--- giftool.orig/files/patch-ab	Thu Jan  1 09:00:00 1970
+++ giftool/files/patch-ab	Sat Mar  8 15:30:31 1997
@@ -0,0 +1,19 @@
+*** readGIF.c.orig	Sat Mar  8 06:28:02 1997
+--- readGIF.c	Sat Mar  8 06:30:05 1997
+***************
+*** 253,259 ****
+  				cur->data.image.cmapSize = 0;
+  
+  			}
+! 			cur->data.image.data = (unsigned char *)malloc(cur->width * cur->height);
+  			cur->data.image.interlaced = BitSet(buf[8], INTERLACE);
+  			readImage(fd, BitSet(buf[8], INTERLACE), 
+  				cur->width, cur->height, cur->data.image.data);
+--- 253,259 ----
+  				cur->data.image.cmapSize = 0;
+  
+  			}
+! 			cur->data.image.data = (unsigned char *)malloc(cur->width * cur->height + 1);
+  			cur->data.image.interlaced = BitSet(buf[8], INTERLACE);
+  			readImage(fd, BitSet(buf[8], INTERLACE), 
+  				cur->width, cur->height, cur->data.image.data);
diff -ruN giftool.orig/pkg/DESCR giftool/pkg/DESCR
--- giftool.orig/pkg/DESCR	Wed Jun  4 11:25:17 1997
+++ giftool/pkg/DESCR	Sat Mar  8 15:50:17 1997
@@ -19,3 +19,24 @@
 
 giftool version 1.0 is Copyright 1994 Home Pages, Inc and is shareware.
 Please, use the -info option to read the licensing information.
+
+PORT BUILD OPTION
+=================
+
+There are two useful options are suggested and available for this port of
+giftool. You can specify it following "make clean".
+
+make RETVALUE=yes
+-----------
+Giftool does not return value from main(), so it is impossible to use this
+tools in programs like make(1) or pipes.
+This option is suggested by Sergei Chechetkin <csl@whale.sunbay.crimea.ua>.
+
+make MALLOCSIZE=yes
+---------------
+Giftool 1.0 or some earlier version cause segmentation fault about some
+images. Something about pre-read seems to be bad, so make malloc size 
+bigger to improve that.
+This option is suggested by Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>.
+
+You can specify all options such as 'make RETVALUE=yes MALLOCSIZE=yes'.
diff -ruN giftool.orig/pkg/PLIST giftool/pkg/PLIST
--- giftool.orig/pkg/PLIST	Wed Jun  4 11:25:17 1997
+++ giftool/pkg/PLIST	Sat Mar  8 14:41:43 1997
@@ -2,4 +2,3 @@
 share/doc/giftool/COPYRIGHT
 share/doc/giftool/README
 share/doc/giftool/post-install-notes
-@dirrm share/doc/giftool