sudognu is a command line sudoku solver and creator.
This commit is contained in:
parent
76cd1c0a1d
commit
f0bf461965
31
games/sudognu/Makefile
Normal file
31
games/sudognu/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/10/04 07:17:40 steven Exp $
|
||||
|
||||
COMMENT= sudoku solver and creator
|
||||
|
||||
DISTNAME= sudognu-1.05
|
||||
CATEGORIES= games
|
||||
|
||||
HOMEPAGE= http://sudognu.sourceforge.net/
|
||||
|
||||
MAINTAINER= Steven Mestdagh <ajacoutot@openbsd.org>
|
||||
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB= c m z pthread
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sudognu/}
|
||||
|
||||
USE_GMAKE= Yes
|
||||
NO_REGRESS= Yes
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/sudognu ${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKBUILD}/sudognu.1 ${PREFIX}/man/man1
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sudognu
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/*.cgi ${PREFIX}/share/examples/sudognu
|
||||
|
||||
.include <bsd.port.mk>
|
5
games/sudognu/distinfo
Normal file
5
games/sudognu/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (sudognu-1.05.tar.gz) = 2jdAt5ALbUSPcAAL/J+6Ig==
|
||||
RMD160 (sudognu-1.05.tar.gz) = yI8EU6W2JaU7bOVksbikg4oTFJs=
|
||||
SHA1 (sudognu-1.05.tar.gz) = SsXAkHH0+W/pYFR0rlA2M1UMC54=
|
||||
SHA256 (sudognu-1.05.tar.gz) = 8WyJ+4hN97hRlD0OKX1h6i7/jWAKNgUva6F8aw2LFQ8=
|
||||
SIZE (sudognu-1.05.tar.gz) = 40031
|
33
games/sudognu/patches/patch-Makefile
Normal file
33
games/sudognu/patches/patch-Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2007/10/04 07:17:40 steven Exp $
|
||||
--- Makefile.orig Sat Sep 22 20:21:19 2007
|
||||
+++ Makefile Sat Sep 29 15:04:07 2007
|
||||
@@ -14,12 +14,12 @@ CGI_DIR=$(HOME)/public_html/cgi-bin
|
||||
# libharu include files and library.
|
||||
#
|
||||
# to build without pdf support use the following
|
||||
-#HARULIB_LDFLAG=
|
||||
-#HARULIB_CFLAG=
|
||||
+HARULIB_LDFLAG=
|
||||
+HARULIB_CFLAG=
|
||||
|
||||
# use the following, if you have libharu in standard location
|
||||
-HARULIB_LDFLAG=-lhpdf
|
||||
-HARULIB_CFLAG=-D HARULIB
|
||||
+#HARULIB_LDFLAG=-lhpdf
|
||||
+#HARULIB_CFLAG=-D HARULIB
|
||||
|
||||
# use this to specify location of library and include files explicitly
|
||||
#HARULIB_LDFLAG=-L$(HOME)/lib -lhpdf
|
||||
@@ -39,9 +39,9 @@ CGIBINS=$(wildcard *.cgi)
|
||||
MANPAGE=$(PROGNAME).1
|
||||
DOCS=$(wildcard *.html) COPYING README INSTALL
|
||||
|
||||
-CC=gcc
|
||||
-LDFLAGS=$(HARULIB_LDFLAG) -lm -lz -lpthread
|
||||
-CFLAGS=-g -I. $(HARULIB_CFLAG) -Wall
|
||||
+#CC=gcc
|
||||
+LDFLAGS=$(HARULIB_LDFLAG) -lm -lz -pthread
|
||||
+CFLAGS+= -I. $(HARULIB_CFLAG) -Wall -pthread
|
||||
|
||||
all: $(PROGNAME)
|
||||
|
12
games/sudognu/patches/patch-getopt_c
Normal file
12
games/sudognu/patches/patch-getopt_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-getopt_c,v 1.1.1.1 2007/10/04 07:17:40 steven Exp $
|
||||
--- getopt.c.orig Sat Sep 29 15:02:33 2007
|
||||
+++ getopt.c Sat Sep 29 15:02:42 2007
|
||||
@@ -76,7 +76,7 @@ int getoptions(int argc, char *argv[]) {
|
||||
symmgrid = 1;
|
||||
break;
|
||||
case 't':
|
||||
- nthread = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
+ nthread = 0;
|
||||
break;
|
||||
case 'w':
|
||||
action = 4;
|
29
games/sudognu/patches/patch-print_svg_c
Normal file
29
games/sudognu/patches/patch-print_svg_c
Normal file
@ -0,0 +1,29 @@
|
||||
$OpenBSD: patch-print_svg_c,v 1.1.1.1 2007/10/04 07:17:40 steven Exp $
|
||||
--- print_svg.c.orig Sat Sep 22 20:21:19 2007
|
||||
+++ print_svg.c Sat Sep 29 15:29:03 2007
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
+#include <err.h>
|
||||
#include "sudoku.h"
|
||||
|
||||
/*
|
||||
@@ -35,6 +36,7 @@ void sudokus_to_svg(char *fn, t_sudoku sudokus[4]) {
|
||||
float pagePadH = (pageHeight - 6) - squareSize * (2*size+5);
|
||||
|
||||
float x0, y0;
|
||||
+ FILE *f;
|
||||
|
||||
// svg file name
|
||||
if (fn == NULL)
|
||||
@@ -42,7 +44,8 @@ void sudokus_to_svg(char *fn, t_sudoku sudokus[4]) {
|
||||
else
|
||||
strcat(fn,".svg");
|
||||
|
||||
- FILE *f=fopen(fn,"w");
|
||||
+ if ((f=fopen(fn,"w")) == NULL)
|
||||
+ err(1, "fopen: %s", fn);
|
||||
|
||||
// print xml / svg head
|
||||
fprintf(f,"<?xml version=\"1.0\" standalone=\"no\"?>\n\
|
4
games/sudognu/pkg/DESCR
Normal file
4
games/sudognu/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
Sudognu is a command line sudoku solver and creator. Sudognu can display
|
||||
the logical steps it uses to find the solution. It can print four
|
||||
sudokus to a PDF page and it comes with example CGI scripts for
|
||||
integration into web sites.
|
8
games/sudognu/pkg/PLIST
Normal file
8
games/sudognu/pkg/PLIST
Normal file
@ -0,0 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/10/04 07:17:40 steven Exp $
|
||||
bin/sudognu
|
||||
@man man/man1/sudognu.1
|
||||
share/examples/sudognu/
|
||||
share/examples/sudognu/csudognu.cgi
|
||||
share/examples/sudognu/psudognu.cgi
|
||||
share/examples/sudognu/ssudognu.cgi
|
||||
share/examples/sudognu/wsudognu.cgi
|
Loading…
Reference in New Issue
Block a user