--- dicelab-0.7.orig/debian/changelog +++ dicelab-0.7/debian/changelog @@ -0,0 +1,51 @@ +dicelab (0.7-5) unstable; urgency=medium + + * Maintenance Release + * Bumped standards-version and debhelper + * Added Homepage link + + -- Robert Lemmen Wed, 14 Mar 2018 19:38:33 +0100 + +dicelab (0.7-4) unstable; urgency=medium + + * Add build-dep to libfl-dev (closes: #846421) + + -- Robert Lemmen Mon, 05 Dec 2016 21:58:27 +0000 + +dicelab (0.7-3) unstable; urgency=medium + + * Patch extern declaration in main.c to correct return type (closes: #748038) + * Changes towards lintian-cleanliness + * Bump standards-version + + -- Robert Lemmen Mon, 06 Jun 2016 21:10:16 +0100 + +dicelab (0.7-2) unstable; urgency=low + + * Update packaging + * Bump standards-version + * Fix a couple of hyphen-vs-minus cases in manpage + * Enable hardening flags during build + * Fix a few typos in the package description (closes: #540595) + * make manpage less confusing around --calc and --count + + -- Robert Lemmen Fri, 05 Jul 2013 09:08:30 +0100 + +dicelab (0.7-1) unstable; urgency=low + + * New upstream release + + -- Robert Lemmen Wed, 25 Nov 2009 12:30:05 +0000 + +dicelab (0.6-1) unstable; urgency=low + + * New upstream release + + -- Robert Lemmen Fri, 22 Feb 2008 15:47:40 +0000 + +dicelab (0.5-1) unstable; urgency=low + + * Initial release (closes: #440822) + + -- Robert Lemmen Mon, 10 Dec 2007 17:06:15 +0100 + --- dicelab-0.7.orig/debian/compat +++ dicelab-0.7/debian/compat @@ -0,0 +1 @@ +10 --- dicelab-0.7.orig/debian/control +++ dicelab-0.7/debian/control @@ -0,0 +1,17 @@ +Source: dicelab +Section: math +Priority: optional +Maintainer: Robert Lemmen +Homepage: http://semistable.com/dicelab/ +Build-Depends: debhelper (>= 10), flex, libfl-dev, inkscape +Standards-Version: 4.1.3 + +Package: dicelab +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: evaluate the statistical distribution of dice rolls + With dicelab you can express most dice rolls (and similar things) in a + functional language, and then either roll the expression, or evaluate the + statistical distribution. In the latter case you can choose whether you want to + simply roll and tally many times, or actually compute the distribution (which + is more precise, but takes a long time in some obscure cases). --- dicelab-0.7.orig/debian/copyright +++ dicelab-0.7/debian/copyright @@ -0,0 +1,14 @@ +This package was debianized by Robert Lemmen on +Tue, 28 Aug 2007 17:17:32 +0200. + +It was downloaded from http://www.semistable.com/dicelab + +Upstream Author: Robert Lemmen + +Copyright: 2006 - 2007 Robert Lemmen + +License: + +Dicelab and the Debian packaging is (C) 2006 - 2007, Robert Lemmen + and is licensed under the GPL, see +`/usr/share/common-licenses/GPL'. --- dicelab-0.7.orig/debian/dirs +++ dicelab-0.7/debian/dirs @@ -0,0 +1 @@ +usr/bin --- dicelab-0.7.orig/debian/docs +++ dicelab-0.7/debian/docs @@ -0,0 +1,2 @@ +README +docs/dicelab_manual.pdf --- dicelab-0.7.orig/debian/rules +++ dicelab-0.7/debian/rules @@ -0,0 +1,65 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) +LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) + +config.status: configure + dh_testdir + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + + +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + +build-stamp: config.status + dh_testdir + $(MAKE) + $(MAKE) -C docs + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/dicelab install + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + 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 --- dicelab-0.7.orig/debian/source/format +++ dicelab-0.7/debian/source/format @@ -0,0 +1 @@ +1.0 --- dicelab-0.7.orig/debian/watch +++ dicelab-0.7/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.semistable.com/dicelab/dicelab-(.*)\.tar\.gz --- dicelab-0.7.orig/dicelab.1 +++ dicelab-0.7/dicelab.1 @@ -14,8 +14,8 @@ .BR \-\-version ", "\-v display version number .TP -.BR \-\-print\-tree ", "\-p -print the parse tree (for debugging purposes) +.BR \-\-calc ", "\-c +calculate the distribution .TP .BR \-\-roll ", "\-r roll the dice as specified. This will also be used if no other action is @@ -25,8 +25,11 @@ reroll many times and sum up the results to get a statistical distribution of values .TP -.BR \-\-count ", "\-c -specify the number of rerolls for --eval, default it 10000 +.BR \-\-count ", "\-n +specify the number of rerolls for \-\-eval, default it 10000 +.TP +.BR \-\-print\-tree ", "\-p +print the parse tree (for debugging purposes) .TP .BR \-f read the scheme description from file instead from stdin @@ -46,7 +49,7 @@ error. In order to get the sum of two six-sided dice, do sum(2#d6). .SH FULL SYNTAX -.NF +.nf ::= -?[0-9]+ ::= @@ -95,7 +98,7 @@ ::= | ; -.FI +.fi Comments may be inserted by using double slashed (//) as in C. @@ -108,7 +111,7 @@ .PP .BR - .IP -This is the unary minus operator. Examples: -1 +This is the unary minus operator. Examples: \-1 .PP .BR % .IP @@ -118,7 +121,7 @@ .BR . .IP This is the scalar concatenation operator. x . y gives xy, the -concatenation of x and y. Examples: -10.9, d6.d6 +concatenation of x and y. Examples: \-10.9, d6.d6 .PP .BR d .IP @@ -235,78 +238,78 @@ .SH EXAMPLES Count the number of dice greater than 7: .IP -.NF +.nf count >7 5#d10 -.FI +.fi .PP Count the number of dice greater than 7 minus the number of dice equal to 1: .IP -.NF +.nf let c=5#d10 in (count >7 c)-(count ==1 c) -.FI +.fi .PP Count the number of rolls until a 6 is rolled: .IP -.NF +.nf count (while x=d6 do ((count <6 x)#d6)) -.FI +.fi .PP Count the number of rolls until a 6 is rolled, more efficiently: .IP -.NF +.nf count (while x=(d6/6) do ((count <1 x)#(d6/6))) -.FI +.fi .PP Roll attributes for a new D&D character: .IP -.NF +.nf 6#sum(drop low 1 4#d6) -.FI +.fi .PP Roll on the 11..66 morale check table in The Gamers' Civil War Brigade Series: .IP -.NF +.nf d6.d6 -.FI +.fi .PP Find the median of 3 d20s: .IP -.NF +.nf high 1 low 2 3#d20 -.FI +.fi .PP 3d6 with rerolls on 6s: .IP -.NF +.nf sum(while x=3#d6 do ((count ==6 x)#d6)) -.FI +.fi .PP Roll 7 d10 and find the largest sum of identical dice: .IP -.NF +.nf let x = 7#d10 in high 1 (foreach y in 1..10 do sum (==y x)) -.FI +.fi .PP The Fibonacci sequence is defined by Fn = Fn-1 + Fn-2, with F1 = F2 = 1. Calculate the first twenty Fibonacci numbers: .IP -.NF +.nf let n = 20 in let f = (1,1) in foreach i in 1..n do let f = (f,sum(high 2 f)) in if ==n i then f else () -.FI +.fi .PP Risk has battles where the attacker rolls 3d6 and the defender rolls 2d6. @@ -315,23 +318,23 @@ matches, the highest wins, with ties going to the defender. The number of attacker wins: .IP -.NF +.nf let a = 3#d6 in let b = 2#d6 in count( (<(high 1 a) high 1 b), (<(high 1 low 2 a) low 1 b)) -.FI +.fi .PP -Storyteller die roll with target number 8 and botches indicated at -1: +Storyteller die roll with target number 8 and botches indicated at \-1: .IP -.NF +.nf let c=5#d10 in let succs = count >7 c in let ones = count ==1 c in if >0 succs then high 1 (0,succs-ones) - else if >0 ones then -1 else 0 -.FI + else if >0 ones then \-1 else 0 +.fi .PP Combat in Silent Death is rather complex. Three dice are rolled. If their @@ -343,7 +346,7 @@ is the damage. This example assumes that the dice are two d8s and a d10, with a target number of 15: .IP -.NF +.nf let x = 2#d8,d10 in (count >15 sum x)# let a = low 1 x in // low die @@ -353,7 +356,7 @@ else if ==a a ==c b then b+c // two high equal else b // all different -.FI +.fi .SH CREDITS Dicelab is based on the excellent work "roll" by Torben Mogensen (http://www.diku.dk/~torbenm/Dice.zip). Without his work and comments, this would hardly ever have happened. --- dicelab-0.7.orig/main.c +++ dicelab-0.7/main.c @@ -20,7 +20,7 @@ #endif #define MAXIMUM_THRESH 0.01 -extern void yyparse(); +extern int yyparse(); extern FILE *yyin; int cmd_parse_tree = 0;