From 2cdc63b10bc8fb4e9ca8d73578fa400fc5ddbb23 Mon Sep 17 00:00:00 2001 From: bentley Date: Fri, 5 Aug 2016 05:44:10 +0000 Subject: [PATCH] Import nonolib-4.3.1. nonolib is a C library to solve nonogram puzzles, written by Dr. Steven Simpson. ok juanfra@ --- math/nonolib/Makefile | 28 ++++++++++++++++++++++++++++ math/nonolib/distinfo | 2 ++ math/nonolib/patches/patch-puzzle_c | 21 +++++++++++++++++++++ math/nonolib/pkg/DESCR | 2 ++ math/nonolib/pkg/PLIST | 4 ++++ 5 files changed, 57 insertions(+) create mode 100644 math/nonolib/Makefile create mode 100644 math/nonolib/distinfo create mode 100644 math/nonolib/patches/patch-puzzle_c create mode 100644 math/nonolib/pkg/DESCR create mode 100644 math/nonolib/pkg/PLIST diff --git a/math/nonolib/Makefile b/math/nonolib/Makefile new file mode 100644 index 00000000000..dbde30e1ee2 --- /dev/null +++ b/math/nonolib/Makefile @@ -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 + +# 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 diff --git a/math/nonolib/distinfo b/math/nonolib/distinfo new file mode 100644 index 00000000000..bda34ead232 --- /dev/null +++ b/math/nonolib/distinfo @@ -0,0 +1,2 @@ +SHA256 (nonolib-4.3.1.zip) = EJE/S1COZ5hVuJ9Ll4eQwrJpnbm3oMHUNTitdFww2FA= +SIZE (nonolib-4.3.1.zip) = 72294 diff --git a/math/nonolib/patches/patch-puzzle_c b/math/nonolib/patches/patch-puzzle_c new file mode 100644 index 00000000000..d8b8770a5a5 --- /dev/null +++ b/math/nonolib/patches/patch-puzzle_c @@ -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++; + diff --git a/math/nonolib/pkg/DESCR b/math/nonolib/pkg/DESCR new file mode 100644 index 00000000000..ee1f620638c --- /dev/null +++ b/math/nonolib/pkg/DESCR @@ -0,0 +1,2 @@ +nonolib is a C library to solve nonogram puzzles, written by Dr. Steven +Simpson. diff --git a/math/nonolib/pkg/PLIST b/math/nonolib/pkg/PLIST new file mode 100644 index 00000000000..f2c9d86b357 --- /dev/null +++ b/math/nonolib/pkg/PLIST @@ -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