Import sudoku 1.0.1
A sudoku game with: * a curses interface; * generates hints upon request; * several levels of difficulty; * generation of new boards; * easy entry of boards published in newspapers, internet, etc...; * multiple output formats (text,csv,html,postscript). From Jasper Lievisse Adriaanse <jasper@nedbsd.nl>
This commit is contained in:
parent
b6a3027e58
commit
d38a47ec12
39
games/sudoku/Makefile
Normal file
39
games/sudoku/Makefile
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# $OpenBSD: Makefile,v 1.1.1.1 2006/05/29 19:32:08 alek Exp $
|
||||||
|
|
||||||
|
COMMENT= "console based sudoku"
|
||||||
|
|
||||||
|
DISTNAME= sudoku-1.0.1
|
||||||
|
CATEGORIES= games
|
||||||
|
|
||||||
|
HOMEPAGE= http://www.laurasia.com.au/sudoku/
|
||||||
|
|
||||||
|
MAINTAINER= Jasper Lievisse Adriaanse <jasper@nedbsd.nl>
|
||||||
|
|
||||||
|
# Public Domain
|
||||||
|
PERMIT_PACKAGE_CDROM= Yes
|
||||||
|
PERMIT_PACKAGE_FTP= Yes
|
||||||
|
PERMIT_DISTFILES_CDROM= Yes
|
||||||
|
PERMIT_DISTFILES_FTP= Yes
|
||||||
|
WANTLIB= c curses
|
||||||
|
|
||||||
|
MASTER_SITES= http://humppa.nl/distfiles/
|
||||||
|
EXTRACT_SUFX= .tgz
|
||||||
|
|
||||||
|
NO_REGRESS= Yes
|
||||||
|
|
||||||
|
do-configure:
|
||||||
|
@perl -i -pe 's,!!PREFIX!!,${PREFIX},' ${WRKSRC}/sudoku.6 \
|
||||||
|
${WRKSRC}/sudoku.c
|
||||||
|
|
||||||
|
do-build:
|
||||||
|
${CC} ${CFLAGS} -o ${WRKSRC}/sudoku ${WRKSRC}/sudoku.c -lcurses
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${INSTALL_DATA_DIR} ${PREFIX}/bin
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/sudoku ${PREFIX}/bin
|
||||||
|
${INSTALL_MAN} ${WRKSRC}/sudoku.6 ${PREFIX}/man/man6
|
||||||
|
${INSTALL_DATA_DIR} ${PREFIX}/share/sudoku
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/template ${PREFIX}/share/sudoku
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/sudoku.html ${PREFIX}/share/sudoku
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
4
games/sudoku/distinfo
Normal file
4
games/sudoku/distinfo
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
MD5 (sudoku-1.0.1.tgz) = 80a6a4a52aec36ffef2f76c4b15fc571
|
||||||
|
RMD160 (sudoku-1.0.1.tgz) = 77ddc4069c4736fda0285936ae9ecde47f9d46f8
|
||||||
|
SHA1 (sudoku-1.0.1.tgz) = ee5f8e392bd5fda758f982a793576ff9d24a15fd
|
||||||
|
SIZE (sudoku-1.0.1.tgz) = 31576
|
20
games/sudoku/patches/patch-sudoku_6
Normal file
20
games/sudoku/patches/patch-sudoku_6
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
$OpenBSD: patch-sudoku_6,v 1.1.1.1 2006/05/29 19:32:08 alek Exp $
|
||||||
|
--- sudoku.6.orig Mon May 29 16:06:27 2006
|
||||||
|
+++ sudoku.6 Mon May 29 16:06:58 2006
|
||||||
|
@@ -198,13 +198,13 @@
|
||||||
|
program.
|
||||||
|
.SH FILES
|
||||||
|
.TP
|
||||||
|
-.BI /usr/lib/sudoku/template
|
||||||
|
+.BI !!PREFIX!!/share/sudoku/template
|
||||||
|
Template file for generating new sudoku boards.
|
||||||
|
.TP
|
||||||
|
-.BI /usr/lib/sudoku/precanned
|
||||||
|
+.BI !!PREFIX!!/share/sudoku/precanned
|
||||||
|
Optional file, containing `precanned' sudoku boards.
|
||||||
|
.SH "FILE FORMATS"
|
||||||
|
-.SS /usr/lib/sudoku/template
|
||||||
|
+.SS !!PREFIX!!/share/sudoku/template
|
||||||
|
The template file contains a sequence of patterns that are used for
|
||||||
|
generating new
|
||||||
|
.B sudoku
|
25
games/sudoku/patches/patch-sudoku_c
Normal file
25
games/sudoku/patches/patch-sudoku_c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
$OpenBSD: patch-sudoku_c,v 1.1.1.1 2006/05/29 19:32:08 alek Exp $
|
||||||
|
--- sudoku.c.orig Mon Jul 25 03:13:53 2005
|
||||||
|
+++ sudoku.c Mon May 29 16:05:37 2006
|
||||||
|
@@ -44,10 +44,10 @@
|
||||||
|
|
||||||
|
/* Default file locations */
|
||||||
|
#ifndef TEMPLATE
|
||||||
|
-#define TEMPLATE "/usr/lib/sudoku/template"
|
||||||
|
+#define TEMPLATE "!!PREFIX!!/share/sudoku/template"
|
||||||
|
#endif
|
||||||
|
#ifndef PRECANNED
|
||||||
|
-#define PRECANNED "/usr/lib/sudoku/precanned"
|
||||||
|
+#define PRECANNED "!!PREFIX!!/share/sudoku/precanned"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const char * program; /* argv[0] */
|
||||||
|
@@ -1837,7 +1837,7 @@
|
||||||
|
|
||||||
|
/* Read character input (raw processing mode) */
|
||||||
|
i = strlen( userfile );
|
||||||
|
- while( '\r' != ( ch = getkey( ) ) )
|
||||||
|
+ while( '\n' != ( ch = getkey( ) ) )
|
||||||
|
{
|
||||||
|
if( 0x08 == ch || VKEY_LEFT == ch ) /* destructive backspace */
|
||||||
|
{
|
7
games/sudoku/pkg/DESCR
Normal file
7
games/sudoku/pkg/DESCR
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
A sudoku game with:
|
||||||
|
* a curses interface;
|
||||||
|
* generates hints upon request;
|
||||||
|
* several levels of difficulty;
|
||||||
|
* generation of new boards;
|
||||||
|
* easy entry of boards published in newspapers, internet, etc...;
|
||||||
|
* multiple output formats (text,csv,html,postscript).
|
6
games/sudoku/pkg/PLIST
Normal file
6
games/sudoku/pkg/PLIST
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/05/29 19:32:08 alek Exp $
|
||||||
|
bin/sudoku
|
||||||
|
@man man/man6/sudoku.6
|
||||||
|
share/sudoku/
|
||||||
|
share/sudoku/sudoku.html
|
||||||
|
share/sudoku/template
|
Loading…
Reference in New Issue
Block a user