Import nonolib-4.3.1.

nonolib is a C library to solve nonogram puzzles, written by Dr. Steven
Simpson.

ok juanfra@
This commit is contained in:
bentley 2016-08-05 05:44:10 +00:00
parent d2a2c9dbe4
commit 2cdc63b10b
5 changed files with 57 additions and 0 deletions

28
math/nonolib/Makefile Normal file
View File

@ -0,0 +1,28 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/08/05 05:44:10 bentley Exp $
COMMENT = nonogram solver library
DISTNAME = nonolib-4.3.1
CATEGORIES = math
HOMEPAGE = https://www.lancs.ac.uk/~simpsons/software/pkg-nonowimp
MAINTAINER = Anthony J. Bentley <anthony@anjbe.name>
# LGPLv2.1+
PERMIT_PACKAGE_CDROM = Yes
MASTER_SITES = https://www.lancs.ac.uk/~simpsons/archives/
EXTRACT_SUFX = .zip
MAKE_FLAGS = PREFIX="${DESTDIR}${PREFIX}" \
CC="${CC}" \
CFLAGS="-std=c99 ${CFLAGS}"
USE_GMAKE = Yes
NO_TEST = Yes
.include <bsd.port.mk>

2
math/nonolib/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (nonolib-4.3.1.zip) = EJE/S1COZ5hVuJ9Ll4eQwrJpnbm3oMHUNTitdFww2FA=
SIZE (nonolib-4.3.1.zip) = 72294

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-puzzle_c,v 1.1.1.1 2016/08/05 05:44:10 bentley Exp $
--- puzzle.c.orig Wed Jan 13 19:33:36 2016
+++ puzzle.c Wed Jan 13 19:33:42 2016
@@ -110,7 +110,7 @@ int nonogram_fscanpuzzle_ef(nonogram_puzzle *p, FILE *
return 0;
}
-static const char *getline(const char **s, const char *e,
+static const char *getline_(const char **s, const char *e,
const char **st, const char **en)
{
if (*s >= e || !**s)
@@ -152,7 +152,7 @@ int nonogram_spscanpuzzle_ef(nonogram_puzzle *p,
while (((ctxt.noheight || ctxt.rowno < p->height) ||
(ctxt.nowidth || ctxt.colno < p->width)) &&
- getline(s, e, &line, &end) &&
+ getline_(s, e, &line, &end) &&
(rc = scanline(p, &ctxt, line, end, ef, eh)))
ctxt.lineno++;

2
math/nonolib/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
nonolib is a C library to solve nonogram puzzles, written by Dr. Steven
Simpson.

4
math/nonolib/pkg/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/08/05 05:44:10 bentley Exp $
include/nonogram.h
include/nonogram_version.h
lib/libnonogram.a