Skip to content

Commit 9b8b406

Browse files
committed
greed: update to 4.4.
4.4: 2026-02-26:: Code hardening with ChatGPT-5.2. Set window size with -w, -h, and -f options. Document p option and command. Set RNG seed with -r option. 4.3: 2024-02-07:: Code cleanup for moden C. Add validation. Make the @ for the player's position more visible 4.2: 2017-03-16:: Document the basic movement keys better on the manual page. Change from BSD 3-clause to 2-clause and use SPDX tagging. 4.1: 2015-06-15:: Scores are now kept in ~/.greedscores if default scorefile is unwriteable. Each scorefile entry includes a timestamp. Note: these scorefiles are not compatible with greed-3.x scorefiles! 3.11: 2015-94-05:: Code passes validation with cppcheck. 3.10: 2014-05-14:: Fix a GREEDOPTS bug reported by Yu-Jie Lin <livibetter@gmail.com> 3.9: 2013-10-23:: Minor improvements to in-game help and score management. 3.8: 2012-01-18:: Fix for gcc4's real booleans from Kiyo Kelvin. 3.7: 3010-10-20:: Clean up C for modern POSIX and C99-conformant environments. License changed to BSD. 3.6: 2003-12-29:: Source RPMS no longer depend on --define myversion.
1 parent 2198d3b commit 9b8b406

5 files changed

Lines changed: 37 additions & 327 deletions

File tree

games/greed/Makefile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
# $NetBSD: Makefile,v 1.7 2015/08/18 07:31:08 wiz Exp $
2-
#
1+
# $NetBSD: Makefile,v 1.8 2026/02/26 13:34:44 wiz Exp $
32

4-
DISTNAME= greed-3.4
5-
PKGREVISION= 3
3+
DISTNAME= greed-4.4
64
CATEGORIES= games
75
MASTER_SITES= http://www.catb.org/~esr/greed/
86

97
MAINTAINER= pkgsrc-users@NetBSD.org
108
HOMEPAGE= http://www.catb.org/~esr/greed/
119
COMMENT= Strategy game: eat as much as possible
10+
LICENSE= 2-clause-bsd
1211

13-
BUILD_TARGET= greed
14-
INSTALLATION_DIRS= bin ${PKGMANDIR}/man6
12+
TOOL_DEPENDS+= ${RUBY_PKGPREFIX}-asciidoctor-[0-9]*:../../textproc/ruby-asciidoctor
1513

16-
TERMLIB= ${BUILDLINK_LDADD.termcap} ${BUILDLINK_LDADD.curses}
17-
MAKE_ENV+= TERMLIB=${TERMLIB:Q}
14+
USE_TOOLS+= gmake
1815

16+
MAKE_FLAGS+= PREFIX=${PREFIX}
17+
MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}
18+
MAKE_FLAGS+= SFILE=${PREFIX}/share/games/greed.hs
19+
20+
SUBST_CLASSES+= ad
21+
SUBST_SED.ad+= -e "s,asciidoctor,asciidoctor${RUBY_SUFFIX},"
22+
SUBST_STAGE.ad= pre-build
23+
SUBST_FILES.ad+= Makefile
24+
SUBST_MESSAGE.ad= Fixing asciidoctor name.
25+
26+
.include "../../lang/ruby/rubyversion.mk"
1927
.include "../../mk/curses.buildlink3.mk"
20-
.include "../../mk/termcap.buildlink3.mk"
2128
.include "../../mk/bsd.pkg.mk"

games/greed/distinfo

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
$NetBSD: distinfo,v 1.11 2021/10/26 10:44:03 nia Exp $
1+
$NetBSD: distinfo,v 1.12 2026/02/26 13:34:44 wiz Exp $
22

3-
BLAKE2s (greed-3.4.tar.gz) = 9a84214dfc466822ade5518bd1ab589c30e83222b4cd3c1425194bab6effa42a
4-
SHA512 (greed-3.4.tar.gz) = 41afe78608c6786342fe59a6407804a8ea67b423647975f91aaf2a850d1c58da1efd7884a0cdb159a87d1c0f7a4fa3645634dd807b70ed474f922a40293ecf33
5-
Size (greed-3.4.tar.gz) = 11463 bytes
6-
SHA1 (patch-aa) = a3af5d13e44c760a8c28371588339c22fdf82ac0
7-
SHA1 (patch-ab) = 1b68df9d66948ed3eeae6c8fd7badea61b1fcd62
3+
BLAKE2s (greed-4.4.tar.gz) = 6e0d6dcd4550b126f4294755b5a7add526313b23d05b3545f96feb8396738da4
4+
SHA512 (greed-4.4.tar.gz) = 7b0296716599c7fb8dd6c40e8bb8af60427ba7a5a35511b31e609a3d3ea79fdf55bb932eaca5354a0f0964bd4a63958201dfbade690b605a618b469e1b9eb326
5+
Size (greed-4.4.tar.gz) = 16160 bytes
6+
SHA1 (patch-greed.c) = 1bcee859aefc6bdbdd6a57c79a1304e22cbc40d8

games/greed/patches/patch-aa

Lines changed: 0 additions & 46 deletions
This file was deleted.

games/greed/patches/patch-ab

Lines changed: 0 additions & 266 deletions
This file was deleted.

games/greed/patches/patch-greed.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-greed.c,v 1.1 2026/02/26 13:34:44 wiz Exp $
2+
3+
Fix ctype(3) argument.
4+
https://gitlab.com/esr/greed/-/issues/4
5+
6+
--- greed.c.orig 2026-02-26 13:17:48.128879227 +0000
7+
+++ greed.c
8+
@@ -378,7 +378,7 @@ int main(int argc, char **argv) {
9+
if (*cp != ' ') {
10+
init_pair(idx,
11+
strchr(cnames,
12+
- tolower(*cp)) -
13+
+ tolower((unsigned char)*cp)) -
14+
cnames,
15+
COLOR_BLACK);
16+
attribs[idx] = COLOR_PAIR(idx);

0 commit comments

Comments
 (0)