pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/sudoku-cli Initial import of sudoku-cli 1.0.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7bce625985b7
branches:  trunk
changeset: 528881:7bce625985b7
user:      heinz <heinz%pkgsrc.org@localhost>
date:      Sat May 19 01:10:17 2007 +0000

description:
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).

diffstat:

 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(+), 0 deletions(-)

diffs (144 lines):

diff -r d786fba1d001 -r 7bce625985b7 games/sudoku-cli/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/sudoku-cli/DESCR    Sat May 19 01:10:17 2007 +0000
@@ -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 -r d786fba1d001 -r 7bce625985b7 games/sudoku-cli/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/sudoku-cli/Makefile Sat May 19 01:10:17 2007 +0000
@@ -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@localhost
+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 -r d786fba1d001 -r 7bce625985b7 games/sudoku-cli/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/sudoku-cli/PLIST    Sat May 19 01:10:17 2007 +0000
@@ -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 -r d786fba1d001 -r 7bce625985b7 games/sudoku-cli/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/sudoku-cli/distinfo Sat May 19 01:10:17 2007 +0000
@@ -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 -r d786fba1d001 -r 7bce625985b7 games/sudoku-cli/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/sudoku-cli/patches/patch-aa Sat May 19 01:10:17 2007 +0000
@@ -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 -r d786fba1d001 -r 7bce625985b7 games/sudoku-cli/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/sudoku-cli/patches/patch-ab Sat May 19 01:10:17 2007 +0000
@@ -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 */
+         {



Home | Main Index | Thread Index | Old Index