--- deal-3.1.4.orig/Makefile +++ deal-3.1.4/Makefile @@ -14,12 +14,12 @@ MAC_ARCH_UNIVERSAL = -arch i386 -arch ppc #DEBUG_FLAGS=-g -ansi -Wall -O2 $(MAC_ARCH) #CPPFLAGS = -fno-rtti -g -O2 $(MAC_ARCH) -DEBUG_FLAGS=-fast -ansi -Wall $(MAC_ARCH) -CPPFLAGS = -fno-rtti -fast -Winline -Wall $(MAC_ARCH) +DEBUG_FLAGS=-g -ansi -Wall $(MAC_ARCH) +CPPFLAGS =-g -fno-rtti -Winline -Wall $(MAC_ARCH) # Change TCL_INCL to point to the directory containing Tcl's # include files -TCL_INCL=/usr/local +TCL_INCL=/usr/include/tcl # Change TCL_LIB to point to the directory where you have a copy # of libtcl. @@ -54,7 +54,7 @@ COMPILE.c= $(CC) $(CFLAGS) -c -CFLAGS= $(DEBUG_FLAGS) -I$(TCL_INCL) $(EXTRA_CFLAGS) +CFLAGS+= $(DEBUG_FLAGS) -I$(TCL_INCL) $(EXTRA_CFLAGS) OBJS=random.o additive.o hand.o deal.o formats.o tcl_deal.o maindeal.o stat.o counttable.o \ @@ -243,6 +243,6 @@ $(CC) $(CFLAGS) -M *.c *.cpp >Make.dep clean: - rm -rf deal $(OBJS) $(SRCDIR) $(SRCZIP) $(SRCGZIP) $(DOCZIP) $(DMG) $(EXEZIP) $(BINDIR) html site + rm -rf deal $(OBJS) $(SRCDIR) $(SRCZIP) $(SRCGZIP) $(DOCZIP) $(DMG) $(EXEZIP) $(BINDIR) site include Make.dep --- deal-3.1.4.orig/debian/copyright +++ deal-3.1.4/debian/copyright @@ -0,0 +1,47 @@ +This package was debianized by Christoph Berg on +Sat, 1 Jan 2005 13:04:59 +0100. + +It was downloaded from http://thomaso.best.vwh.net/bridge/deal/ +The orig.tar.gz file was created by repackaging the deal308src.zip file. + +Copyright: + Copyright (C) 1996-2002, Thomas Andrews + Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (c) 1983 Regents of the University of California. + +Upstream Author: Thomas Andrews + +License: + * 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. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The file ansidecl.h is licensed under the terms of the GNU General Public +License, version 1 or later. + +The file random.c has a separate copyright: +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ --- deal-3.1.4.orig/debian/compat +++ deal-3.1.4/debian/compat @@ -0,0 +1 @@ +4 --- deal-3.1.4.orig/debian/dirs +++ deal-3.1.4/debian/dirs @@ -0,0 +1,6 @@ +usr/games +usr/share/doc/deal/html/graphics +usr/share/doc/deal/html/ex +usr/share/deal/input +usr/share/deal/format +usr/share/deal/lib --- deal-3.1.4.orig/debian/links +++ deal-3.1.4/debian/links @@ -0,0 +1 @@ +usr/share/doc/deal/html/ex usr/share/doc/deal/examples --- deal-3.1.4.orig/debian/watch +++ deal-3.1.4/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/(.)(.)(.)/$1.$2.$3/" \ +http://bridge.thomasoandrews.com/deal/downloading.html deal([\d.-]*)(?:src)?.zip --- deal-3.1.4.orig/debian/README.source +++ deal-3.1.4/debian/README.source @@ -0,0 +1,57 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To configure quilt to use debian/patches instead of patches, you want +either to export QUILT_PATCHES=debian/patches in your environment +or use this snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + fi + done + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. --- deal-3.1.4.orig/debian/rules +++ deal-3.1.4/debian/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make + +D = $(CURDIR)/debian/deal + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + +build: build-stamp +build-stamp: configure-stamp $(QUILT_STAMPFN) + dh_testdir + CFLAGS="$(CFLAGS)" $(MAKE) + touch build-stamp + +clean: unpatch + dh_testdir + $(MAKE) clean + dh_clean makecounttable counttable.c build-stamp configure-stamp + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + install -m 755 deal $D/usr/games/deal + install -m 644 deal.tcl $D/usr/share/deal/deal.tcl + install -m 644 input/* $D/usr/share/deal/input + install -m 644 format/* $D/usr/share/deal/format + install -m 644 lib/* $D/usr/share/deal/lib + + install -m 644 html/*.* $D/usr/share/doc/deal/html + install -m 644 html/graphics/* $D/usr/share/doc/deal/html/graphics + install -m 644 html/ex/* $D/usr/share/doc/deal/html/ex + +binary-indep: + +binary-arch: build install + dh_installchangelogs CHANGES + dh_installdocs + dh_installman debian/deal.6 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- deal-3.1.4.orig/debian/control +++ deal-3.1.4/debian/control @@ -0,0 +1,17 @@ +Source: deal +Section: games +Priority: optional +Maintainer: Christoph Berg +Build-Depends: debhelper (>= 4.0.0), libdds-dev, quilt, tcl-dev +Standards-Version: 3.8.0 + +Package: deal +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: bridge hand generator + This program generates bridge hands. It can be told to generate only hands + satisfying conditions like being balanced, having a range of HCPs, controls, + or other user-definable properties. Hands can be output in various formats, + like pbn for feeding to other bridge programs, deal itself, or split up into a + file per player for practise. Extensible via Tcl. +Homepage: http://bridge.thomasoandrews.com/deal/ --- deal-3.1.4.orig/debian/changelog +++ deal-3.1.4/debian/changelog @@ -0,0 +1,40 @@ +deal (3.1.4-1) unstable; urgency=low + + * New upstream release. (Closes: #488598) + Thanks to Travis Crump for spotting, the watch file didn't notice. + * Update upstream website location in control and watch files. + * Use libdds.a instead of the shipped dds.cpp copy. + * Convert to quilt (except for an overzealous clean target in the Makefile). + + -- Christoph Berg Sun, 06 Jul 2008 00:57:45 +0200 + +deal (3.0.8-4) unstable; urgency=low + + * Fix segfault on amd64, (int)random() sometimes returned negative numbers + (Closes: #383625). + * Xor the seed with getpid() to make deals more random. + + -- Christoph Berg Wed, 30 Aug 2006 01:37:28 +0200 + +deal (3.0.8-3) unstable; urgency=low + + * Rebuild. + * Bump Standards-Version. + + -- Christoph Berg Wed, 12 Oct 2005 18:24:19 +0200 + +deal (3.0.8-2) unstable; urgency=low + + * Two input/ files were still using relative source paths. + * Noted copyright holders in debian/copyright and the used licenses. + * Pass CFLAGS to Makefile in debian/rules. + * Add ${misc:Depends} in debian/control. + + -- Christoph Berg Sun, 6 Feb 2005 13:00:19 +0100 + +deal (3.0.8-1) unstable; urgency=low + + * Initial release (Closes: #185739). + + -- Christoph Berg Sun, 9 Jan 2005 22:21:06 +0100 + --- deal-3.1.4.orig/debian/deal.6 +++ deal-3.1.4/debian/deal.6 @@ -0,0 +1,68 @@ +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH DEAL 6 "January 1, 2005" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +deal \- bridge hand generator +.SH SYNOPSIS +.B deal +[ \-ltv ] [ \-e expr ] [ \-i condition file ] [ \-I format ] [ \-s seed ] +[ \-[NSEW] hand-spec ] [ count ] +.SH DESCRIPTION +\fBdeal\fP is a program to generate bridge hands. +.SH OPTIONS +.TP +.B \-l +Write deals in a "single-line" format. +.TP +.B \-t +Print distribution table and exit. +The distribution table is an ordered list of all possible hand patterns for a single hand. +.TP +.B \-v +Be verbose, print sample count. +.TP +.B \-e expr +Evaluate the Tcl expression expr. +.TP +.B \-i condition file +File that defines the hand type to generate or the output format. +(Can be given multiple times.) +.TP +.B \-I format +Read hands from stdin. +Formats available are: ddline, giblib, line, pbn, smartstack. +You might deal, say, 10,000 hands which satisfy specific criteria, saving them to a file. +Then you can use that output for input with deal \-I to find out which hands satisfy other constraints. +.TP +.B \-s seed +Initialize random generator with \fBseed\fP. +.TP +.B \-[NSEW] hand-spec +Specifies the cards held by the specified hand. The hand-spec should be of the +form: "AK8532 \- KQ72 A65". Voids must be represented with a '\-' character. +hand-spec should be one argument, so the string should be quoted on the command +line. +.TP +.B count +Number of hands to generate, default is 10. +.SH SEE ALSO +.BR /usr/share/doc/deal/html, +.BR /usr/share/deal. +.SH AUTHOR +deal was written by Thomas Andrews . +.PP +This manual page was written by Christoph Berg , +for the Debian project (but may be used by others). --- deal-3.1.4.orig/debian/patches/libdds-dev +++ deal-3.1.4/debian/patches/libdds-dev @@ -0,0 +1,34 @@ +--- a/Makefile ++++ b/Makefile +@@ -27,7 +27,7 @@ TCL_INCL=/usr/include/tcl + TCL_LIB=$(TCL_DIR)/lib + + ###### +-LDFLAGS= -L$(TCL_LIB) -ltcl -lm ++LDFLAGS= -L$(TCL_LIB) -ltcl -lm -ldds + + + +@@ -54,11 +54,11 @@ EXTRA_OBJS= + + COMPILE.c= $(CC) $(CFLAGS) -c + +-CFLAGS+= $(DEBUG_FLAGS) -I$(TCL_INCL) $(EXTRA_CFLAGS) ++CFLAGS+= $(DEBUG_FLAGS) -I$(TCL_INCL) $(EXTRA_CFLAGS) -DDDSInitStart=InitStart + + + OBJS=random.o additive.o hand.o deal.o formats.o tcl_deal.o maindeal.o stat.o counttable.o \ +- vector.o dist.o stringbox.o dealtypes.o keywords.o holdings.o tcl_dds.o dds.o $(EXTRA_OBJS) ++ vector.o dist.o stringbox.o dealtypes.o keywords.o holdings.o tcl_dds.o $(EXTRA_OBJS) + SRCS=additive.c hand.c deal.c formats.c tcl_deal.c dist.c vector.c stat.c counttable.c stringbox.c dealtypes.c holdings.c keywords.c maindeal.c random.c dds.cpp + SRCKIT=additive.c hand.c deal.c formats.c tcl_deal.c dist.c vector.c stat.c makecounttable.c stringbox.c dealtypes.c holdings.c keywords.c maindeal.c random.c tcl_dds.c dds.cpp + HFILES=deck.h deal.h tcl_incl.h vector.h stat.h tcl_dist.h dist.h formats.h additive.h stringbox.h dealtypes.h holdings.h keywords.h ansidecl.h dds.h ddsInterface.h Holding.h +@@ -74,7 +74,7 @@ UUKIT=$(EXAMPLES) $(OTHERFILES) deal + BINARY=./deal + + deal: $(OBJS) +- g++ $(CFLAGS) $(OBJS) -o deal $(LDFLAGS) ++ gcc $(CFLAGS) $(OBJS) -o deal $(LDFLAGS) + + universal: + $(MAKE) clean --- deal-3.1.4.orig/debian/patches/series +++ deal-3.1.4/debian/patches/series @@ -0,0 +1,4 @@ +libdds-dev +absolute-paths +seed-getpid +unsigned-random --- deal-3.1.4.orig/debian/patches/unsigned-random +++ deal-3.1.4/debian/patches/unsigned-random @@ -0,0 +1,18 @@ +deal (3.0.8-4) unstable; urgency=low + + * Fix segfault on amd64, (int)random() sometimes returned negative numbers + (Closes: #383625). + + -- Christoph Berg Wed, 30 Aug 2006 01:37:28 +0200 + +--- deal-3.1.4.orig/deal.c ++++ deal-3.1.4/deal.c +@@ -190,7 +190,7 @@ + #if USE_RAND48 + return dealt+(int) (drand48() *(double)(52-dealt)); + #else +- return dealt+(int) (fast_mod(random() , (52-dealt))); ++ return dealt+(int) (fast_mod((unsigned) random() , (52-dealt))); + #endif + } + --- deal-3.1.4.orig/debian/patches/seed-getpid +++ deal-3.1.4/debian/patches/seed-getpid @@ -0,0 +1,25 @@ +deal (3.0.8-4) unstable; urgency=low + + * Xor the seed with getpid() to make deals more random. + + -- Christoph Berg Wed, 30 Aug 2006 01:37:28 +0200 + +--- a/tcl_deal.c ++++ b/tcl_deal.c +@@ -24,6 +24,8 @@ + #include + #include + #include ++#include ++#include + + #include "deal.h" + #include "vector.h" +@@ -483,6 +485,7 @@ int old_main(argc,argv) + extern char *optarg; + + time(&for_seeding); ++ for_seeding ^= getpid(); + #ifdef USE_RAND48 + srand48(for_seeding); + #else --- deal-3.1.4.orig/debian/patches/absolute-paths +++ deal-3.1.4/debian/patches/absolute-paths @@ -0,0 +1,187 @@ +--- a/deal.tcl ++++ b/deal.tcl +@@ -30,4 +30,4 @@ if {[string first "Windows" $tcl_platfor + + catch { deal_init_tcl } + +-source lib/features.tcl ++source /usr/share/deal/lib/features.tcl +--- a/tcl_deal.c ++++ b/tcl_deal.c +@@ -453,7 +453,7 @@ DEAL31_API int *Deal_Init(Tcl_Interp *in + + Tcl_CreateObjCommand(interp,"deal_init_tcl",tcl_init,NULL,NULL); + +- result=Tcl_VarEval(interp,"source deal.tcl",NULL); ++ result=Tcl_VarEval(interp,"source /usr/share/deal/deal.tcl",NULL); + if (result==TCL_ERROR) { + tcl_error(interp); + } +--- a/input/smartstack.tcl ++++ b/input/smartstack.tcl +@@ -17,7 +17,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # +-source lib/handFactory.tcl ++source /usr/share/deal/lib/handFactory.tcl + + namespace eval smartstack { + +--- a/input/giblib.tcl ++++ b/input/giblib.tcl +@@ -17,7 +17,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # +-source lib/gib.tcl ++source /usr/share/deal/lib/gib.tcl + + # + # The giblib implements the ability to read files of the +--- a/lib/ddeval.tcl ++++ b/lib/ddeval.tcl +@@ -18,7 +18,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-source lib/handProc.tcl ++source /usr/share/deal/lib/handProc.tcl + + namespace eval ddeval { + variable ddData +--- a/lib/binky.tcl ++++ b/lib/binky.tcl +@@ -18,7 +18,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-source lib/handProc.tcl ++source /usr/share/deal/lib/handProc.tcl + + namespace eval binky { + variable binkyData +--- a/lib/parscore.tcl ++++ b/lib/parscore.tcl +@@ -18,7 +18,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-source lib/score.tcl ++source /usr/share/deal/lib/score.tcl + + proc rlist {A B C D} {list $D $C $B $A} + +--- a/format/gibpar ++++ b/format/gibpar +@@ -1 +1 @@ +-source format/par ++source /usr/share/deal/format/par +--- a/format/par ++++ b/format/par +@@ -17,7 +17,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # +-source lib/parscore.tcl ++source /usr/share/deal/lib/parscore.tcl + + namespace eval par { + +--- a/format/parArticle ++++ b/format/parArticle +@@ -20,7 +20,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # +-source lib/parscore.tcl ++source /usr/share/deal/lib/parscore.tcl + + set particle(num) 0 + set particle(dealer) [list north east south west] +--- a/ex/3nt-nostack.tcl ++++ b/ex/3nt-nostack.tcl +@@ -13,7 +13,7 @@ + # This is slower than the smart-stacking version by an order of magnitude + # when requesting 1000 deals. + # +-source format/none ++source /usr/share/deal/format/none + + south is "AK K52 98765 962" + +--- a/ex/3nt-stack.tcl ++++ b/ex/3nt-stack.tcl +@@ -13,7 +13,7 @@ + # + # Obviously, they shouldn't be exactly the same, but they should be similar. + +-source format/none ++source /usr/share/deal/format/none + + source ex/3nt-common.tcl + +--- a/html/ex/3nt-nostack.txt ++++ b/html/ex/3nt-nostack.txt +@@ -13,7 +13,7 @@ + # This is slower than the smart-stacking version by an order of magnitude + # when requesting 1000 deals. + # +-source format/none ++source /usr/share/deal/format/none + + south is "AK K52 98765 962" + +--- a/html/ex/3nt-stack.txt ++++ b/html/ex/3nt-stack.txt +@@ -13,7 +13,7 @@ + # + # Obviously, they shouldn't be exactly the same, but they should be similar. + +-source format/none ++source /usr/share/deal/format/none + + shapecond gam3NT.shape {$s<=3&&$h<=3&&(($d>=7&&$c<=4)||($c>=7&&$d<=4))} + +--- a/lib/features.tcl ++++ b/lib/features.tcl +@@ -55,7 +55,7 @@ namespace eval deal { + + + proc input {format args} { +- uplevel #0 [list source "input/$format.tcl" ] ++ uplevel #0 [list source "/usr/share/deal/input/$format.tcl" ] + set command [list "${format}::set_input"] + foreach arg $args { + lappend command $arg +@@ -93,7 +93,7 @@ if {[string equal [info commands dds_res + shapecond balanced {($h<5)&&($s<5)&&($s*$s+$h*$h+$d*$d+$c*$c)<=47} + shapecond semibalanced {$h<=5&&$s<=5&&$d<=6&&$c<=6&&$c>=2&&$d>=2&&$h>=2&&$s>=2} + shapecond AnyShape {1} +-source format/default ++source /usr/share/deal/format/default + + # + # The three routines, joinclass, negateclass, intersectclass, used to be +--- a/ex/7.tcl ++++ b/ex/7.tcl +@@ -8,7 +8,7 @@ + # to define opening bids and later check to see if a hand + # fits the conditions + +-source lib/bid.tcl ++source /usr/share/deal/lib/bid.tcl + + defvector AKQ 4 3 2 + defvector Top4 1 1 1 1 +--- a/html/ex/7.txt ++++ b/html/ex/7.txt +@@ -8,7 +8,7 @@ + # to define opening bids and later check to see if a hand + # fits the conditions + +-source lib/bid.tcl ++source /usr/share/deal/lib/bid.tcl + + defvector AKQ 4 3 2 + defvector Top4 1 1 1 1