diff options
author | Karol Wojtaszek <sekretarz@gentoo.org> | 2005-08-02 15:48:13 +0000 |
---|---|---|
committer | Karol Wojtaszek <sekretarz@gentoo.org> | 2005-08-02 15:48:13 +0000 |
commit | d24d5aa092fb57aabf219f64b14d38434a3ac573 (patch) | |
tree | 84d412aadb0e19b2740299c21914a76cd686be5e /media-gfx | |
parent | Version bumped. (diff) | |
download | gentoo-2-d24d5aa092fb57aabf219f64b14d38434a3ac573.tar.gz gentoo-2-d24d5aa092fb57aabf219f64b14d38434a3ac573.tar.bz2 gentoo-2-d24d5aa092fb57aabf219f64b14d38434a3ac573.zip |
Fixed compile problems, bug #84160. Merged tic98.diff to tic98-gentoo.diff
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/tic98/ChangeLog | 6 | ||||
-rw-r--r-- | media-gfx/tic98/files/tic98-1.01-gentoo.diff | 123 | ||||
-rw-r--r-- | media-gfx/tic98/files/tic98.diff | 90 | ||||
-rw-r--r-- | media-gfx/tic98/tic98-1.01-r1.ebuild | 5 |
4 files changed, 130 insertions, 94 deletions
diff --git a/media-gfx/tic98/ChangeLog b/media-gfx/tic98/ChangeLog index 907b6a228793..1d0ace7250f2 100644 --- a/media-gfx/tic98/ChangeLog +++ b/media-gfx/tic98/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-gfx/tic98 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/tic98/ChangeLog,v 1.2 2005/03/05 13:36:26 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/tic98/ChangeLog,v 1.3 2005/08/02 15:48:13 sekretarz Exp $ + + 02 Aug 2005; <sekretarz@gentoo.org> -files/tic98.diff, + files/tic98-1.01-gentoo.diff, tic98-1.01-r1.ebuild: + Fixed compile problems, bug #84160. Merged tic98.diff to tic98-gentoo.diff *tic98-1.01 (05 Mar 2005) diff --git a/media-gfx/tic98/files/tic98-1.01-gentoo.diff b/media-gfx/tic98/files/tic98-1.01-gentoo.diff index 21ab2f3a68cf..880dfa059545 100644 --- a/media-gfx/tic98/files/tic98-1.01-gentoo.diff +++ b/media-gfx/tic98/files/tic98-1.01-gentoo.diff @@ -80,3 +80,126 @@ diff -Nru tic98/ppmd_model.c tic98.gentoo/ppmd_model.c unsigned int arith_decode_target (unsigned int totl) /* Arithmetically decodes the target. */ +diff -Nru tic98.orig/page_features.c tic98/page_features.c +--- tic98.orig/page_features.c 1999-06-22 03:48:42.000000000 +0200 ++++ tic98/page_features.c 2005-08-02 19:47:09.485681960 +0200 +@@ -37,18 +37,17 @@ + void + dump_header() + { +- fprintf(stdout,"@arff 3 +-@relation features +-@attribute 'Number' real +-@attribute 'Area' real +-@attribute 'Avg_area' real +-@attribute 'Density' real +-@attribute 'Aspect' real +-@attribute 'Holes' real +-@attribute 'Edges' real +-@attribute 'class' string range ( {?} ) +-@data +-"); ++ fprintf(stdout,"@arff 3" ++"@relation features" ++"@attribute 'Number' real" ++"@attribute 'Area' real" ++"@attribute 'Avg_area' real" ++"@attribute 'Density' real" ++"@attribute 'Aspect' real" ++"@attribute 'Holes' real" ++"@attribute 'Edges' real" ++"@attribute 'class' string range ( {?} )" ++"@data"); + + + } +diff -ru tic98/main_tic.c tic98-new/main_tic.c +--- tic98/main_tic.c Thu Jul 1 21:02:56 1999 ++++ tic98-new/main_tic.c Fri Mar 16 11:43:56 2001 +@@ -11,6 +11,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <errno.h> + + #include "arithcode.h" + #include "globals.h" +@@ -96,8 +97,10 @@ + marklistptr list=NULL,list2=NULL; + marktype copy; + +- if(marktype_readnamed(fn, image)!=0) ++ if(marktype_readnamed(fn, image)!=0) { ++ fprintf(stderr, "imagefn_to_list(): bad input file %s\n", fn); + return NULL; ++ } + + *w=image->w; + *h=image->h; +@@ -495,7 +498,10 @@ + + TimerStart(1); + +- freopen(outfilename[0],"wb",stdout); ++ if (! freopen(outfilename[0],"wb",stdout)) { ++ fprintf(stderr, "failed to open %s for writing: %s\n", ++ outfilename[0], strerror(errno)); ++ } + + tic98_init(&t); + tic98_start_encoding(); +@@ -503,8 +509,11 @@ + for(i=0;i<num_in;i++){ + int w,h,xx,yy,ok=0; + marktype image; +- list=imagefn_to_list(&image,infilename[i], &w, &h); +- ++ if (! (list=imagefn_to_list(&image,infilename[i], &w, &h))) { ++ fprintf(stderr, "cannot read file %s\n", infilename[i]); ++ exit(1); ++ } ++ + tic98_num_encode(&t,NEW_PAGE); + + for(xx=0;xx<image.w;xx++) +@@ -560,7 +569,10 @@ + newoutname=(char*)malloc(sizeof(char)*(strlen(outfilename[0])+10)); + assert(newoutname); + +- freopen(infilename[0],"rb",stdin); ++ if (! freopen(infilename[0],"rb",stdin)) { ++ fprintf(stderr, "failed to open %s for reading: %s\n", ++ infilename[0], strerror(errno)); ++ } + + tic98_init(&t); + tic98_start_decoding(); +diff -ru tic98/marklist.c tic98-new/marklist.c +--- tic98/marklist.c Thu Jul 1 21:56:19 1999 ++++ tic98-new/marklist.c Fri Mar 16 11:44:20 2001 +@@ -94,11 +94,11 @@ + magic = magic_popnamed (fn, &err) >> 16; /* only interested in first 2 bytes */ + + if (err != 0) { +- return 1; /* failure */ + fprintf (stderr, "error - can't open file '%s'\n", fn); +- return 1; ++ return 1; /* failure */ + } + if (!((magic == MAGIC_P1) || (magic == MAGIC_P4))) { ++ fprintf (stderr, "bad magic in file '%s'\n", fn); + return 1; + } + if (fn2) { +diff -ru tic98/utils.c tic98-new/utils.c +--- tic98/utils.c Tue Jun 22 02:48:43 1999 ++++ tic98-new/utils.c Fri Mar 16 11:23:57 2001 +@@ -117,7 +117,7 @@ + } + else{ + *err=1; +-/* error("magic_popnamed","can't open file",fn);*/ ++ error("magic_popnamed","can't open file",fn); + return 0; + } + } diff --git a/media-gfx/tic98/files/tic98.diff b/media-gfx/tic98/files/tic98.diff deleted file mode 100644 index 63f76d013df2..000000000000 --- a/media-gfx/tic98/files/tic98.diff +++ /dev/null @@ -1,90 +0,0 @@ -diff -ru tic98/main_tic.c tic98-new/main_tic.c ---- tic98/main_tic.c Thu Jul 1 21:02:56 1999 -+++ tic98-new/main_tic.c Fri Mar 16 11:43:56 2001 -@@ -11,6 +11,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#include <errno.h> - - #include "arithcode.h" - #include "globals.h" -@@ -96,8 +97,10 @@ - marklistptr list=NULL,list2=NULL; - marktype copy; - -- if(marktype_readnamed(fn, image)!=0) -+ if(marktype_readnamed(fn, image)!=0) { -+ fprintf(stderr, "imagefn_to_list(): bad input file %s\n", fn); - return NULL; -+ } - - *w=image->w; - *h=image->h; -@@ -495,7 +498,10 @@ - - TimerStart(1); - -- freopen(outfilename[0],"wb",stdout); -+ if (! freopen(outfilename[0],"wb",stdout)) { -+ fprintf(stderr, "failed to open %s for writing: %s\n", -+ outfilename[0], strerror(errno)); -+ } - - tic98_init(&t); - tic98_start_encoding(); -@@ -503,8 +509,11 @@ - for(i=0;i<num_in;i++){ - int w,h,xx,yy,ok=0; - marktype image; -- list=imagefn_to_list(&image,infilename[i], &w, &h); -- -+ if (! (list=imagefn_to_list(&image,infilename[i], &w, &h))) { -+ fprintf(stderr, "cannot read file %s\n", infilename[i]); -+ exit(1); -+ } -+ - tic98_num_encode(&t,NEW_PAGE); - - for(xx=0;xx<image.w;xx++) -@@ -560,7 +569,10 @@ - newoutname=(char*)malloc(sizeof(char)*(strlen(outfilename[0])+10)); - assert(newoutname); - -- freopen(infilename[0],"rb",stdin); -+ if (! freopen(infilename[0],"rb",stdin)) { -+ fprintf(stderr, "failed to open %s for reading: %s\n", -+ infilename[0], strerror(errno)); -+ } - - tic98_init(&t); - tic98_start_decoding(); -diff -ru tic98/marklist.c tic98-new/marklist.c ---- tic98/marklist.c Thu Jul 1 21:56:19 1999 -+++ tic98-new/marklist.c Fri Mar 16 11:44:20 2001 -@@ -94,11 +94,11 @@ - magic = magic_popnamed (fn, &err) >> 16; /* only interested in first 2 bytes */ - - if (err != 0) { -- return 1; /* failure */ - fprintf (stderr, "error - can't open file '%s'\n", fn); -- return 1; -+ return 1; /* failure */ - } - if (!((magic == MAGIC_P1) || (magic == MAGIC_P4))) { -+ fprintf (stderr, "bad magic in file '%s'\n", fn); - return 1; - } - if (fn2) { -diff -ru tic98/utils.c tic98-new/utils.c ---- tic98/utils.c Tue Jun 22 02:48:43 1999 -+++ tic98-new/utils.c Fri Mar 16 11:23:57 2001 -@@ -117,7 +117,7 @@ - } - else{ - *err=1; --/* error("magic_popnamed","can't open file",fn);*/ -+ error("magic_popnamed","can't open file",fn); - return 0; - } - } diff --git a/media-gfx/tic98/tic98-1.01-r1.ebuild b/media-gfx/tic98/tic98-1.01-r1.ebuild index 9496bf234cde..d7107baa1a5d 100644 --- a/media-gfx/tic98/tic98-1.01-r1.ebuild +++ b/media-gfx/tic98/tic98-1.01-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/tic98/tic98-1.01-r1.ebuild,v 1.2 2005/03/09 00:16:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/tic98/tic98-1.01-r1.ebuild,v 1.3 2005/08/02 15:48:13 sekretarz Exp $ inherit eutils @@ -19,8 +19,7 @@ S="${WORKDIR}/${PN}" src_compile() { epatch ${FILESDIR}/${P}-gentoo.diff - epatch $FILESDIR/${PN}.diff - emake all || die + emake all || die emake all2 || die } |