From b29db15f32a071722e90713c3abc6d165c3b202f Mon Sep 17 00:00:00 2001 From: heinz Date: Sat, 19 May 2007 01:10:17 +0000 Subject: Initial import of sudoku-cli 1.0.1. This is a commandline version of the sudoku board game. The sudoku board game is played on a 9x9 grid, divided into rows, columns, and 9 blocks of 3x3 squares. The objective is to fill the empty squares with the digits 1-9, so that each row, column, and block contains each of the digits 1-9 (and hence, it is not possible for any digit to appear twice in the same row, column or block). --- games/sudoku-cli/DESCR | 7 ++++++ games/sudoku-cli/Makefile | 43 ++++++++++++++++++++++++++++++++++++ games/sudoku-cli/PLIST | 4 ++++ games/sudoku-cli/distinfo | 7 ++++++ games/sudoku-cli/patches/patch-aa | 46 +++++++++++++++++++++++++++++++++++++++ games/sudoku-cli/patches/patch-ab | 13 +++++++++++ 6 files changed, 120 insertions(+) create mode 100644 games/sudoku-cli/DESCR create mode 100644 games/sudoku-cli/Makefile create mode 100644 games/sudoku-cli/PLIST create mode 100644 games/sudoku-cli/distinfo create mode 100644 games/sudoku-cli/patches/patch-aa create mode 100644 games/sudoku-cli/patches/patch-ab (limited to 'games/sudoku-cli') diff --git a/games/sudoku-cli/DESCR b/games/sudoku-cli/DESCR new file mode 100644 index 00000000000..3a343fefebc --- /dev/null +++ b/games/sudoku-cli/DESCR @@ -0,0 +1,7 @@ +This is a commandline version of the sudoku board game. + +The sudoku board game is played on a 9x9 grid, divided into rows, columns, +and 9 blocks of 3x3 squares. The objective is to fill the empty squares +with the digits 1-9, so that each row, column, and block contains each +of the digits 1-9 (and hence, it is not possible for any digit to +appear twice in the same row, column or block). diff --git a/games/sudoku-cli/Makefile b/games/sudoku-cli/Makefile new file mode 100644 index 00000000000..8c14f297aaf --- /dev/null +++ b/games/sudoku-cli/Makefile @@ -0,0 +1,43 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/05/19 01:10:17 heinz Exp $ +# + +DISTNAME= sudoku-1.0.1 +PKGNAME= ${DISTNAME:S/sudoku/sudoku-cli/} +CATEGORIES= games +MASTER_SITES= http://www.laurasia.com.au/downloads/ +EXTRACT_SUFX= .tgz + +MAINTAINER= heinz@NetBSD.org +HOMEPAGE= http://www.laurasia.com.au/downloads/ +COMMENT= Commandline version of sudoku board game + +PKG_DESTDIR_SUPPORT= user-destdir + +BUILD_TARGET= sudoku + +INSTALLATION_DIRS+= bin ${PKGMANDIR}/man6 ${SHARE_SUBDIR} + +SHARE_SUBDIR= share/sudoku-cli +SHARE_DIR= ${PREFIX}/${SHARE_SUBDIR} + +MAKE_FLAGS+= INSTALL_BIN=${INSTALL_PROGRAM:Q} +MAKE_FLAGS+= INSTALL_DATADIR=${INSTALL_DATA_DIR:Q} +MAKE_FLAGS+= INSTALL_DATA=${INSTALL_DATA:Q} +MAKE_FLAGS+= INSTALL_MAN=${INSTALL_MAN:Q} +MAKE_FLAGS+= BINDIR=${PREFIX:Q}/bin +MAKE_FLAGS+= LIBDIR=${SHARE_DIR:Q} +MAKE_FLAGS+= MAN6DIR=${PREFIX:Q}/${PKGMANDIR:Q}/man6 +MAKE_FLAGS+= DEFS=${CFLAGS:Q} +MAKE_FLAGS+= SUDOKUNAME=sudoku-cli + +CFLAGS+= -DTEMPLATE="${SHARE_DIR:Q}/template" +CFLAGS+= -DPRECANNED="${SHARE_DIR:Q}/precanned" + +SUBST_CLASSES+= sudoku-cli +SUBST_STAGE.sudoku-cli= pre-build +SUBST_MESSAGE.sudoku-cli=Correcting path names in man page +SUBST_FILES.sudoku-cli+=sudoku.6 +SUBST_SED.sudoku-cli+= -e s,/usr/lib/sudoku,${SHARE_DIR:Q}, + +.include "../../devel/ncurses/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/games/sudoku-cli/PLIST b/games/sudoku-cli/PLIST new file mode 100644 index 00000000000..c043f36b028 --- /dev/null +++ b/games/sudoku-cli/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/05/19 01:10:17 heinz Exp $ +bin/sudoku-cli +man/man6/sudoku-cli.6 +share/sudoku-cli/template diff --git a/games/sudoku-cli/distinfo b/games/sudoku-cli/distinfo new file mode 100644 index 00000000000..c91010c478e --- /dev/null +++ b/games/sudoku-cli/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/05/19 01:10:17 heinz Exp $ + +SHA1 (sudoku-1.0.1.tgz) = ee5f8e392bd5fda758f982a793576ff9d24a15fd +RMD160 (sudoku-1.0.1.tgz) = 77ddc4069c4736fda0285936ae9ecde47f9d46f8 +Size (sudoku-1.0.1.tgz) = 31576 bytes +SHA1 (patch-aa) = 2bd5169bb9901ca54573cd2aecde46b582344692 +SHA1 (patch-ab) = 7e6a6d63cb3367e21d49ce7e2db613dd439b7197 diff --git a/games/sudoku-cli/patches/patch-aa b/games/sudoku-cli/patches/patch-aa new file mode 100644 index 00000000000..518fe743df5 --- /dev/null +++ b/games/sudoku-cli/patches/patch-aa @@ -0,0 +1,46 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/05/19 01:10:17 heinz Exp $ + +--- Makefile.orig 2005-07-25 03:13:53.000000000 +0200 ++++ Makefile +@@ -7,6 +7,16 @@ + OWN=-o bin + GRP=-g operator + ++INSTALL_BIN?=install -s $(OWN) $(GRP) -m 755 ++INSTALL_DATADIR?=install -d $(OWN) $(GRP) -m 755 ++INSTALL_DATA?=install $(OWN) $(GRP) -m 644 ++INSTALL_MAN?=install $(OWN) $(GRP) -m 644 ++BINDIR?=/usr/bin ++SUDOKUNAME?=sudoku ++LIBDIR?=/usr/lib/sudoku ++MAN6DIR?=/usr/man/man6 ++SHAREMAN6DIR?=/usr/share/man/man6 ++ + # Minix requires compilation flags for a clean compile + sudoku: sudoku.c + if [ -x /usr/bin/uname -a `/usr/bin/uname` = Minix ] ; then \ +@@ -19,16 +29,16 @@ clean: + # Simple support for alternate systems + install: sudoku sudoku.6 + if [ -x /usr/bin/uname -a `/usr/bin/uname` = Minix ] ; then \ +- install -s -S 8kw $(OWN) $(GRP) -m 755 sudoku /usr/bin/sudoku ; \ ++ install -s -S 8kw $(OWN) $(GRP) -m 755 sudoku /usr/bin/${SUDOKUNAME} ; \ + else \ +- install -s $(OWN) $(GRP) -m 755 sudoku /usr/bin/sudoku ; \ ++ ${INSTALL_BIN} sudoku ${DESTDIR}${BINDIR}/${SUDOKUNAME} ; \ + fi +- install -d $(OWN) $(GRP) -m 755 /usr/lib/sudoku +- install $(OWN) $(GRP) -m 644 template /usr/lib/sudoku/template +- if [ -d /usr/man/man6 ] ; then \ +- install $(OWN) $(GRP) -m 644 sudoku.6 /usr/man/man6/sudoku.6 ; \ +- elif [ -d /usr/share/man/man6 ] ; then \ +- install $(OWN) $(GRP) -m 644 sudoku.6 /usr/share/man/man6/sudoku.6 ; \ ++ ${INSTALL_DATADIR} ${DESTDIR}${LIBDIR} ++ ${INSTALL_DATA} template ${DESTDIR}${LIBDIR}/template ++ if [ -d ${DESTDIR}${MAN6DIR} ] ; then \ ++ ${INSTALL_MAN} sudoku.6 ${DESTDIR}${MAN6DIR}/${SUDOKUNAME}.6 ; \ ++ elif [ -d ${DESTDIR}${SHAREMAN6DIR} ] ; then \ ++ ${INSTALL_MAN} sudoku.6 ${DESTDIR}${SHAREMAN6DIR}/${SUDOKUNAME}.6 ; \ + else \ + echo Warning: Manual page not installed ; \ + fi diff --git a/games/sudoku-cli/patches/patch-ab b/games/sudoku-cli/patches/patch-ab new file mode 100644 index 00000000000..2aea9744853 --- /dev/null +++ b/games/sudoku-cli/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/05/19 01:10:17 heinz Exp $ + +--- sudoku.c.orig 2005-07-25 03:13:53.000000000 +0200 ++++ sudoku.c +@@ -1837,7 +1837,7 @@ save_board( void ) + + /* 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 */ + { -- cgit v1.2.3