Author: roam-guest Date: 2009-04-03 13:35:56 +0000 (Fri, 03 Apr 2009) New Revision: 9372
Added: packages/trunk/cookietool/debian/patches/ packages/trunk/cookietool/debian/patches/01-manpage-typos.patch packages/trunk/cookietool/debian/patches/02-gcc-4-ftbfs.patch packages/trunk/cookietool/debian/patches/series Removed: packages/trunk/cookietool/Makefile packages/trunk/cookietool/compress.c packages/trunk/cookietool/doc/ Modified: packages/trunk/cookietool/debian/changelog packages/trunk/cookietool/debian/control packages/trunk/cookietool/debian/rules Log: Use quilt for patch management. Drop the patch to the Makefile that only changes the VCS Id tag. Deleted: packages/trunk/cookietool/Makefile =================================================================== --- packages/trunk/cookietool/Makefile 2009-04-03 13:20:38 UTC (rev 9371) +++ packages/trunk/cookietool/Makefile 2009-04-03 13:35:56 UTC (rev 9372) @@ -1,48 +0,0 @@ -# $Id: Makefile,v 1.9 2001/05/19 15:19:47 baran epic4 $ -# slightly rewritten original Wilhelm Noeker's Makefile - -targets = cookietool cdbsplit cdbdiff -objects = cookietool.o cdbsplit.o cdbdiff.o strstuff.o \ - cookio.o compress.o -prefix = usr -binprefix = $(prefix)/games -manprefix = $(prefix)/share/man/man6 -CC = gcc -RM = rm -v -INSTALL = install -CFLAGS = -O2 -Wall - -build : $(targets) - -strstuff.o : strstuff.c strstuff.h -cookio.o : cookio.c cookio.h -compress.o : compress.c compress.h - -cookietool : cookietool.o strstuff.o compress.o cookio.o -cookietool.o : cookietool.c strstuff.h compress.h cookio.h - -cdbdiff : cdbdiff.o strstuff.o compress.o cookio.o -cdbdiff.o : cdbdiff.c strstuff.h compress.h cookio.h - -cdbsplit : cdbsplit.o strstuff.o cookio.o -cdbsplit.o : cdbsplit.c strstuff.h cookio.h - -clean : - @-$(RM) $(targets) $(objects) - -# for AmigaOS installation change install-binary-unix to -# install-binary-amiga; for non-debian-installation, use `make all' - -install : install-binary # install-manpages - -install-binary : - @for file in $(targets); do \ - $(INSTALL) -m 0755 $$file $(DESTDIR)/$(binprefix)/$$file; \ - done; - -install-manpages : - @for file in doc/*.6; do \ - $(INSTALL) -m 0644 $$file $(DESTDIR)/$(manprefix)/$$file; \ - done; - -all : build install install-manpages Deleted: packages/trunk/cookietool/compress.c =================================================================== --- packages/trunk/cookietool/compress.c 2009-04-03 13:20:38 UTC (rev 9371) +++ packages/trunk/cookietool/compress.c 2009-04-03 13:35:56 UTC (rev 9372) @@ -1,335 +0,0 @@ -/* - cookietool is (c) 1995-2001 by Wilhelm Noeker ([email protected]) - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA - - */ - - -/*========================================================================*\ - | File: compress.c Date: 22 Mar 2001 | - *------------------------------------------------------------------------* - | Read cookies, remove duplicates, sort, and write back to file. | - | These routines are common to both cookietool and cdbdiff. | - | | -\*========================================================================*/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include "cookio.h" -#include "compress.h" - - - -struct cookie - { - UBYTE *text; - UBYTE *sorthook; - long size; - long number; - }; - -struct cookie *clist = NULL; -long listsize = 0; /* will be adjusted dynamically */ -long listed = 0; - - -/* - * Assign ascending numbers to all cookies in the list and reset each sort - * hook to the start of its body text. - */ -void rebuild_listinfo() - { - long l; - - for( l = 0; l < listed; l++ ) - { - clist[ l ].number = l; - clist[ l ].sorthook = clist[ l ].text; - } - } - - - -/* - * Build cookie list from file. - * The list may or may not be empty before this call. - */ -void read_cookies( FILE *fp, int fmt ) - { - long lines, cbuflen, offset, ignored = 0; - char *cptr; - - offset = listed; /* may or may not be 0 */ - printf( "Reading cookies..." ); - fflush( stdout ); - while( (cptr = read_cookie( fp, fmt, &cbuflen, &lines, NULL )) != NULL ) - { - if( lines > 0 ) - { /* store the cookie */ - if( listed == listsize ) - { /* we start with listsize==0, clist==NULL ! */ - listsize = 3 * listsize / 2 + 1000; - clist = realloc( clist, listsize * sizeof( struct cookie ) ); - if( !clist ) - { - printf( "\nList reallocation failed\n" ); - exit( 20 ); - } - } - clist[ listed ].text = malloc( cbuflen + 1 ); /* mind the '\0'! */ - if( clist[ listed ].text != NULL ) - { - clist[ listed ].size = cbuflen; - strcpy( clist[ listed ].text, cptr ); - } - else - { - printf( "\nOut of memory\n" ); - exit( 20 ); - } - listed++; - } - else - ignored++; /* or ignore it */ - } - rebuild_listinfo(); - printf( " done. (%ld read, %ld empty)\n", listed-offset, ignored ); - } - - -/* - * Write cookies to file, optionally skipping some at the start of the - * list. - */ -void write_cookies( FILE *fp, int fmt, long offset ) - { - long l; - - printf( "Writing cookies..." ); - fflush( stdout ); - for( l = offset; l < listed; l++ ) - if( !write_cookie( clist[ l ].text, fp, fmt ) ) - { - printf( "\nFile error, aborted !!!\n" ); - exit( 20 ); - } - printf( " done. (%ld written)\n", listed-offset ); - } - - - -/* - * Cookie comparison, for sorting. - */ -int cookie_cmp( struct cookie *a, struct cookie *b, int mode ) - { - int c = 0; - - switch( mode ) - { - case SORT_BODY: /* by name */ - c = str_cmp( a->sorthook, b->sorthook ); - break; - case SORT_REVERSE: /* descending, by name */ - c = str_cmp( b->sorthook, a->sorthook ); - break; - case SORT_SIZE: /* by size */ - c = a->size - b->size; - break; - } - if( c == 0 ) /* when in doubt, the number decides */ - c = a->number - b->number; - return c; - } - - - -/* - * sift(): does the main work for my_heapsort() - */ -void sift( struct cookie v[], long i, long m, int mode ) - { - long j; - struct cookie temp; - - while( (j = 2 * (i + 1) - 1) <= m ) - { - if( j < m && cookie_cmp( &v[ j ], &v[ j + 1 ], mode ) < 0 ) - j++; - if( cookie_cmp( &v[ i ], &v[ j ], mode ) < 0 ) - { - temp = v[ i ]; - v[ i ] = v[ j ]; - v[ j ] = temp; - i = j; - } - else - i = m; /* done */ - } - } - - -/* - * Note the side effect: Will print three "."s to stdout: one on entry, - * one when the sort is halfway through, and another one when it's all done. - */ -void my_heapsort( struct cookie v[], long n, int mode ) - { - long i; - struct cookie temp; - - putchar( '.' ); fflush( stdout ); - if( n < 2 ) /* no sorting necessary */ - return; - for( i = n/2 - 1; i >= 0; i-- ) - sift( v, i, n - 1, mode ); - putchar( '.' ); fflush( stdout ); - for( i = n - 1; i >= 1; i-- ) - { - temp = v[ 0 ]; - v[ 0 ] = v[ i ]; - v[ i ] = temp; - sift( v, 0, i - 1, mode ); - } - putchar( '.' ); fflush( stdout ); - } - - - -/* - * Adjust sorthooks for the final sort, according to the desired mode. - */ -void set_hooks( int mode, UBYTE *hooktarget ) - { - long l; - int hot; - UBYTE *s; - - printf( "Adjusting sort hooks..." ); - fflush( stdout ); - for( l = 0; l < listed; l++ ) - { - s = clist[ l ].text; - switch( mode ) - { - case SORT_LASTLINE: /* start of last line */ - hot = 1; - while( *s ) - { - if( *s == '\n' ) - hot = 1; - else if( hot ) - { - clist[ l ].sorthook = s; - hot = 0; - } - s++; - } - break; - case SORT_LASTWORD: /* start of last word */ - hot = 1; - while( *s ) - { - if( isspace( *s ) ) - hot = 1; - else if( hot ) - { - clist[ l ].sorthook = s; - hot = 0; - } - s++; - } - break; - case SORT_HOOKTARGET: - while( s ) /* at last occurence of <hooktarget> */ - { - clist[ l ].sorthook = s++; - s = strstr( s, hooktarget ); - } - break; - } - } - printf( " done.\n" ); - } - - - -/* - * Delete cookies and (optionally) log them to a file. For values of delmode - * and sortmode, see "compress.h". - * Note that the routine expects the sorthooks to point at the body texts - * on entry, but may modify and not restore them itself. There are many - * reasons why this does *not* hurt with the current implementations of both - * cookietool and cdbdiff, but it might be a pitfall in the future. - */ -void one_cookie( int delmode, int sortmode, UBYTE *hooktarget, FILE *fp, int fmt ) - { - long i, j, dbl = 0, abr = 0; - int cmp; - - if( delmode != DUPDEL_NONE ) - { - printf( "Removing double entries" ); - if( delmode == DUPDEL_ABBREVS ) - printf( " + 'abbreviations'" ); - /* sort descending by string */ - my_heapsort( clist, listed, SORT_REVERSE ); - for( i = listed - 1; i > 0; i = j ) - { - for( j = i - 1; j >= 0 - && ( (cmp = str_cmp( clist[ j ].text, clist[ i ].text )) == 0 - || (delmode == DUPDEL_ABBREVS && cmp == STR_LONGER) ); j-- ) - { - if( fp ) - if( !write_cookie( clist[ i ].text, fp, fmt ) ) - { - printf( "\nFile error, aborted !!!\n" ); - exit( 20 ); - } - free( clist[ i ].text ); - clist[ i-- ] = clist[ --listed ]; - if( cmp == 0 ) - dbl++; - else - abr++; - } - } - printf( " done. (%ld ", dbl ); - if( delmode == DUPDEL_ABBREVS ) - printf( "+ %ld ", abr ); - printf( "found)\n" ); - } - if( sortmode == SORT_RESTORE ) - { - printf( "Restoring order" ); - my_heapsort( clist, listed, SORT_RESTORE ); - } - else - { - if( sortmode > SORT_BODY ) - set_hooks( sortmode, hooktarget ); - printf( "Sorting" ); - if( sortmode == SORT_SIZE ) - my_heapsort( clist, listed, SORT_SIZE ); - else - my_heapsort( clist, listed, SORT_BODY ); - } - printf( " done.\n" ); - } - Modified: packages/trunk/cookietool/debian/changelog =================================================================== --- packages/trunk/cookietool/debian/changelog 2009-04-03 13:20:38 UTC (rev 9371) +++ packages/trunk/cookietool/debian/changelog 2009-04-03 13:35:56 UTC (rev 9372) @@ -1,6 +1,7 @@ cookietool (2.5-3) unstable; urgency=low * New maintainer. Closes: #503560 + * Use quilt for patch management. -- Peter Pentchev <[email protected]> Fri, 03 Apr 2009 16:18:42 +0300 Modified: packages/trunk/cookietool/debian/control =================================================================== --- packages/trunk/cookietool/debian/control 2009-04-03 13:20:38 UTC (rev 9371) +++ packages/trunk/cookietool/debian/control 2009-04-03 13:35:56 UTC (rev 9372) @@ -1,7 +1,7 @@ Source: cookietool Section: games Priority: optional -Build-Depends: debhelper (>= 4.0) +Build-Depends: debhelper (>= 4.0), quilt Maintainer: Debian Games Team <[email protected]> Uploaders: Peter Pentchev <[email protected]> Standards-Version: 3.6.2.1 Added: packages/trunk/cookietool/debian/patches/01-manpage-typos.patch =================================================================== --- packages/trunk/cookietool/debian/patches/01-manpage-typos.patch (rev 0) +++ packages/trunk/cookietool/debian/patches/01-manpage-typos.patch 2009-04-03 13:35:56 UTC (rev 9372) @@ -0,0 +1,78 @@ +A couple of typo fixes for the manual pages: +- spell "fussy" correctly +- un-UTF-8 the Amiga contributor's name + +Author: Miros/law L. Baran <[email protected]> + +--- a/doc/cdbdiff.6 ++++ b/doc/cdbdiff.6 +@@ -1,5 +1,3 @@ +-.\" Hey, EMACS: -*- nroff -*- +-.\" $Jubal::Debian::Packages$ + .TH COOKIETOOL 6 "May 19, 2001" + .SH NAME + cdbdiff \- program to operate cookie (fortune) database +@@ -27,7 +25,7 @@ + case sensitive comparisons. + .TP + .B \-d[0-3] +-how fuzzy about word delimiters? (default: 2) ++how fussy about word delimiters? (default: 2) + .TP + .B \-f[0-3] + input file format \- \-f3: cookies are separated by '%%' lines; \-f2: +@@ -42,7 +40,7 @@ + None known. + .SH AUTHOR + Upstream author and Aminet cookietool.lha package with AmigaOS binaries +-uploader is Wilhelm N�ker, <[email protected]>. Unix manpages ++uploader is Wilhelm Noeker, <[email protected]>. Unix manpages + (including this one) and makefile are maintained by Miros/law L. Baran + <[email protected]>. This manual page uses many excerpts from the + original README file. +--- a/doc/cdbsplit.6 ++++ b/doc/cdbsplit.6 +@@ -1,5 +1,3 @@ +-.\" Hey, EMACS: -*- nroff -*- +-.\" $Jubal::Debian::Packages$ + .TH COOKIETOOL 6 "May 19, 2001" + .SH NAME + cdbsplit \- program to operate cookie (fortune) database +@@ -32,7 +30,7 @@ + case-sensitive comparisons (for both keywords and groups) + .TP + .B \-d[0-3] +-how fuzzy about word delimiters? (default: 2) ++how fussy about word delimiters? (default: 2) + .TP + .B \-k<keyword> + optional keyword +@@ -78,7 +76,7 @@ + None known. + .SH AUTHOR + Upstream author and Aminet cookietool.lha package with AmigaOS binaries +-uploader is Wilhelm N�ker, <[email protected]>. Unix manpages ++uploader is Wilhelm Noeker, <[email protected]>. Unix manpages + (including this one) and makefile are maintained by Miros/law L. Baran + <[email protected]>. This manual page uses many excerpts from the + original README file. +--- a/doc/cookietool.6 ++++ b/doc/cookietool.6 +@@ -30,7 +30,7 @@ + case sensitive comparisons. + .TP + .B \-d[0-3] +-how fuzzy about word delimiters? (default: 2) ++how fussy about word delimiters? (default: 2) + .TP + .B \-b + delete cookies that are 'abbreviations' of another, too. +@@ -62,7 +62,7 @@ + None known. + .SH AUTHOR + Upstream author and Aminet cookietool.lha package with AmigaOS binaries +-uploader is Wilhelm N�ker, <[email protected]>. Unix manpages ++uploader is Wilhelm Noeker, <[email protected]>. Unix manpages + (including this one) and makefile are maintained by Miros/law L. Baran + <[email protected]>. This manual page uses many excerpts from the + original README file. Added: packages/trunk/cookietool/debian/patches/02-gcc-4-ftbfs.patch =================================================================== --- packages/trunk/cookietool/debian/patches/02-gcc-4-ftbfs.patch (rev 0) +++ packages/trunk/cookietool/debian/patches/02-gcc-4-ftbfs.patch 2009-04-03 13:35:56 UTC (rev 9372) @@ -0,0 +1,14 @@ +Fix FTBFS with gcc-4.0. + +Author: Hamish Moffatt <[email protected]> + +--- a/compress.c ++++ b/compress.c +@@ -263,7 +263,6 @@ + s = strstr( s, hooktarget ); + } + break; +- default: + } + } + printf( " done.\n" ); Added: packages/trunk/cookietool/debian/patches/series =================================================================== --- packages/trunk/cookietool/debian/patches/series (rev 0) +++ packages/trunk/cookietool/debian/patches/series 2009-04-03 13:35:56 UTC (rev 9372) @@ -0,0 +1,2 @@ +01-manpage-typos.patch +02-gcc-4-ftbfs.patch Modified: packages/trunk/cookietool/debian/rules =================================================================== --- packages/trunk/cookietool/debian/rules 2009-04-03 13:20:38 UTC (rev 9371) +++ packages/trunk/cookietool/debian/rules 2009-04-03 13:35:56 UTC (rev 9372) @@ -2,11 +2,13 @@ # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. +include /usr/share/quilt/quilt.make + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 build: build-stamp -build-stamp: +build-stamp: ${QUILT_STAMPFN} dh_testdir $(MAKE) @@ -22,6 +24,7 @@ -$(MAKE) clean dh_clean + $(MAKE) -f debian/rules unpatch install: build dh_testdir
_______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

