diff options
author | leot <leot> | 2016-01-11 19:37:43 +0000 |
---|---|---|
committer | leot <leot> | 2016-01-11 19:37:43 +0000 |
commit | 8fb3d9f48a3ef1204e551e6f1c06032179360624 (patch) | |
tree | 4fe95a731ea78386dd481de4c68e243a09f00234 /games | |
parent | 430315190407d348225ea04ee07c0fa17eba6903 (diff) | |
download | pkgsrc-8fb3d9f48a3ef1204e551e6f1c06032179360624.tar.gz |
Update games/vms-empire to 1.14.
Patch based on PR pkg/50624 provided by Ben Gergely.
Thanks to riastradh@, joerg@ and dholland@ for misc suggestions and review.
pkgsrc changes:
o Add LICENSE
o Instead of define a do-install use the install target provided by upstream
Changes:
1.14: 2016-01-05 06:49:17Z
Add an identifying magic cookie and version to save files.
Full ANSI prototypes for private functions as well as public.
Markup fix for probability table.
1.13: 2014-12-14T17:06:26Z
Comment on entry to and exit from edit mode.
Cleaned up packaging and install/uninstall productions.
1.12: 2014-05-20T09:03:09Z
Incorporated Dennis Pinckard's fix for a Mac OS/X port bug.
Added desktop file.
1.11: 2013-12-31T17:31:04Z
Clean up code to modern C, apply cppcheck.
Fix code typo reported as Debian bug #593434
1.10: 2013-08-22T23:47:21Z
Fix core dump when a satellite bounced off the world edge.
Full ANSIfication of function prototypes (which fixed the
sat bug - the code appears to have been tickling some obscure
bug in the compilation of function calls with K&R-style prototypes).
1.9: 2012-02-16T22:59:22Z
Drop RPM packaging. Documentation cleanups.
1.8: 2010-10-21T12:47:33Z
Joe Wells's patch to enable different-sized worlds. Minor fixes to
map functions by Andrew Morrow. More on the history of the game.
Enable arrow keys in edit mode.
License changed from Chuck Simmons's cosmetically tweaked clone
of the GPL to GPL proper, so the classifier systems that forge
and archive sites use will be less confused.
Diffstat (limited to 'games')
-rw-r--r-- | games/vms-empire/DESCR | 4 | ||||
-rw-r--r-- | games/vms-empire/Makefile | 19 | ||||
-rw-r--r-- | games/vms-empire/PLIST | 5 | ||||
-rw-r--r-- | games/vms-empire/distinfo | 18 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-aa | 25 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-ab | 17 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-edit.c | 33 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-game.c | 15 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-object.c | 15 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-term.c | 26 | ||||
-rw-r--r-- | games/vms-empire/patches/patch-usermove.c | 60 |
11 files changed, 192 insertions, 45 deletions
diff --git a/games/vms-empire/DESCR b/games/vms-empire/DESCR index d4de9b70c15..8574db083ce 100644 --- a/games/vms-empire/DESCR +++ b/games/vms-empire/DESCR @@ -1,5 +1,5 @@ VMS-Empire is a simulation of a full-scale war between two emperors, the computer and you. Naturally, there is only room for one, so the object of the game is to destroy the other. The computer plays by the same rules that -you do. This game is the ancestor of all the multiplayer Empire simulations -out there. +you do. This game was ancestral to all later expand/explore/exploit/exterminate +games, including Civilization and Master of Orion. diff --git a/games/vms-empire/Makefile b/games/vms-empire/Makefile index 1ac3c79755e..25312e08aac 100644 --- a/games/vms-empire/Makefile +++ b/games/vms-empire/Makefile @@ -1,20 +1,23 @@ -# $NetBSD: Makefile,v 1.15 2015/08/18 07:31:09 wiz Exp $ +# $NetBSD: Makefile,v 1.16 2016/01/11 19:37:43 leot Exp $ # -DISTNAME= vms-empire-1.7 -PKGREVISION= 2 +DISTNAME= vms-empire-1.14 CATEGORIES= games MASTER_SITES= http://www.catb.org/~esr/vms-empire/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.catb.org/~esr/vms-empire/ COMMENT= Solitaire Empire (sometimes called "VMS Empire") +LICENSE= gnu-gpl-v2 -INSTALLATION_DIRS= bin ${PKGMANDIR}/man6 - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/vms-empire ${DESTDIR}${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/vms-empire.6 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man6/vms-empire.6 +SUBST_CLASSES+= makefile +SUBST_STAGE.makefile= pre-patch +SUBST_MESSAGE.makefile= Fixing hardcoded paths +SUBST_FILES.makefile= Makefile +SUBST_SED.makefile= -e 's,/usr,${PREFIX},g' +SUBST_SED.makefile+= -e 's,share/man,${PKGMANDIR},g' +.include "../../graphics/hicolor-icon-theme/buildlink3.mk" +.include "../../sysutils/desktop-file-utils/desktopdb.mk" .include "../../mk/curses.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/games/vms-empire/PLIST b/games/vms-empire/PLIST index 60a6f87fc45..3c99f39361a 100644 --- a/games/vms-empire/PLIST +++ b/games/vms-empire/PLIST @@ -1,3 +1,6 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2003/06/02 14:09:48 jmmv Exp $ +@comment $NetBSD: PLIST,v 1.2 2016/01/11 19:37:43 leot Exp $ bin/vms-empire man/man6/vms-empire.6 +share/appdata/vms-empire.xml +share/applications/vms-empire.desktop +share/icons/hicolor/48x48/apps/vms-empire.png diff --git a/games/vms-empire/distinfo b/games/vms-empire/distinfo index ae07e96b321..4a78b6b1c80 100644 --- a/games/vms-empire/distinfo +++ b/games/vms-empire/distinfo @@ -1,8 +1,12 @@ -$NetBSD: distinfo,v 1.7 2015/11/03 20:57:06 agc Exp $ +$NetBSD: distinfo,v 1.8 2016/01/11 19:37:43 leot Exp $ -SHA1 (vms-empire-1.7.tar.gz) = 3a9d697f333269ed486f93e77c54f3e688c96edc -RMD160 (vms-empire-1.7.tar.gz) = 931d4377c315643b1edde2d5f6a058cffaaf3da1 -SHA512 (vms-empire-1.7.tar.gz) = 429a8c34c24eaf2d1d26fc1fbe6cf610b1f1fa05ca723e29d4d84713b5a55156f6285d193ca2d4500d6696f652914954c1cf09a795466f6f25f3bfb8600b6261 -Size (vms-empire-1.7.tar.gz) = 84726 bytes -SHA1 (patch-aa) = eda2153945c51e89d1ff5e177b130535f528dd4e -SHA1 (patch-ab) = 2cf492e58273942670e5f1b7d526895b40898a61 +SHA1 (vms-empire-1.14.tar.gz) = 7f2957a5c79933bf4a191bdf9d8cb16727491111 +RMD160 (vms-empire-1.14.tar.gz) = 4136d9baeed8e34921fa08bd065356a1e9f618e6 +SHA512 (vms-empire-1.14.tar.gz) = 459b69c63814c4d343a780587653f6e96048d57369a6933612d9c7c7b1bf755af615c2a08514065d9e80047f28b9d9b1b559f26c41205bd9021e2f395ebfc1ab +Size (vms-empire-1.14.tar.gz) = 109870 bytes +SHA1 (patch-aa) = 4898d433cb15bf8321bbfc1a8bf612838f9a2bdc +SHA1 (patch-edit.c) = 9d30f6dc22928b6e63a8e16f7630716f5b7bf410 +SHA1 (patch-game.c) = ea3bdb6db9daa6620d1d433066d6a5763e49313b +SHA1 (patch-object.c) = 7a9bea57bcf57e80142041605464cd6c84509da3 +SHA1 (patch-term.c) = 0427a7a616e97b5be17ca532cdb2ff140c4f0015 +SHA1 (patch-usermove.c) = 8bd7127cdc4b2a156ae9937f637829a6edccd76e diff --git a/games/vms-empire/patches/patch-aa b/games/vms-empire/patches/patch-aa index 1896b3e6772..5c06607e031 100644 --- a/games/vms-empire/patches/patch-aa +++ b/games/vms-empire/patches/patch-aa @@ -1,11 +1,15 @@ -$NetBSD: patch-aa,v 1.4 2013/10/17 16:28:02 roy Exp $ +$NetBSD: patch-aa,v 1.5 2016/01/11 19:37:43 leot Exp $ ---- Makefile.orig 2004-09-27 15:32:07.000000000 +0000 +o Turn off optimizations present in DEBUG +o Link against (generic) curses +o Honors user's CFLAGS and LDFLAGS + +--- Makefile.orig 2016-01-11 18:19:51.000000000 +0000 +++ Makefile -@@ -18,17 +18,17 @@ SYS = LINUX - # Use -g to compile the program for debugging. +@@ -8,18 +8,18 @@ VERS=1.14 - #DEBUG = -g -DDEBUG -Wall + # Use -g to compile the program for debugging. + #DEBUG = -g -DDEBUG -DEBUG = -O2 +#DEBUG = -O2 @@ -18,17 +22,18 @@ $NetBSD: patch-aa,v 1.4 2013/10/17 16:28:02 roy Exp $ # You shouldn't have to modify anything below this line. --CFLAGS = $(DEBUG) $(PROFILE) -D$(SYS) -+CFLAGS += $(DEBUG) $(PROFILE) -D$(SYS) + # There's a dynamic format in the object-display routines; suppress the warning +-CFLAGS = $(DEBUG) $(PROFILE) -Wall -Wno-format-security ++CFLAGS += $(DEBUG) $(PROFILE) -Wall -Wno-format-security FILES = \ attack.c \ -@@ -67,7 +67,7 @@ OFILES = \ +@@ -58,7 +58,7 @@ OFILES = \ all: vms-empire vms-empire: $(OFILES) - $(CC) $(PROFILE) -o vms-empire $(OFILES) $(LIBS) + $(CC) $(PROFILE) -o vms-empire $(OFILES) $(LIBS) $(LDFLAGS) - TAGS: $(HEADERS) $(FILES) - etags $(HEADERS) $(FILES) + attack.o:: extern.h empire.h + compmove.o:: extern.h empire.h diff --git a/games/vms-empire/patches/patch-ab b/games/vms-empire/patches/patch-ab deleted file mode 100644 index 0bcef06a6e3..00000000000 --- a/games/vms-empire/patches/patch-ab +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2006/08/02 16:15:49 kristerw Exp $ - ---- game.c.orig 2006-08-02 18:11:35.000000000 +0200 -+++ game.c 2006-08-02 18:12:56.000000000 +0200 -@@ -404,11 +404,10 @@ - - static long ncity, nland, nshore; - -+static void mark_cont(); - int good_cont (mapi) - long mapi; - { -- static void mark_cont(); -- - long val; - - ncity = 0; /* nothing seen yet */ diff --git a/games/vms-empire/patches/patch-edit.c b/games/vms-empire/patches/patch-edit.c new file mode 100644 index 00000000000..54fcbcc4336 --- /dev/null +++ b/games/vms-empire/patches/patch-edit.c @@ -0,0 +1,33 @@ +$NetBSD: patch-edit.c,v 1.1 2016/01/11 19:37:43 leot Exp $ + +Fix ctype(3) functions usage. + +--- edit.c.orig 2014-12-15 00:46:31.000000000 +0000 ++++ edit.c +@@ -316,7 +316,7 @@ static char dirs[] = "WEDCXZAQ"; + void + e_stasis(loc_t loc) + { +- if (!isupper (user_map[loc].contents)) ++ if (!isupper ((unsigned char)user_map[loc].contents)) + huh (); /* no object here */ + else if (user_map[loc].contents == 'X') + huh (); +@@ -437,7 +437,7 @@ Beginning of move to location. + void + e_move(loc_t *path_start, loc_t loc) + { +- if (!isupper(user_map[loc].contents)) huh (); /* nothing there? */ ++ if (!isupper((unsigned char)user_map[loc].contents)) huh (); /* nothing there? */ + else if (user_map[loc].contents == 'X') huh (); /* enemy city? */ + else *path_start = loc; + } +@@ -509,7 +509,7 @@ e_piece_info(loc_t edit_cursor, char ab) + int type; + char *p; + +- ab = toupper (ab); ++ ab = toupper ((unsigned char)ab); + p = strchr (type_chars, ab); + type = p - type_chars; + diff --git a/games/vms-empire/patches/patch-game.c b/games/vms-empire/patches/patch-game.c new file mode 100644 index 00000000000..c56b12d2a12 --- /dev/null +++ b/games/vms-empire/patches/patch-game.c @@ -0,0 +1,15 @@ +$NetBSD: patch-game.c,v 1.1 2016/01/11 19:37:43 leot Exp $ + +Fix ctype(3) functions usage. + +--- game.c.orig 2014-12-15 16:36:24.000000000 +0000 ++++ game.c +@@ -745,7 +745,7 @@ save_movie_screen(void) + if (!p) mapbuf[i] = map[i].contents; + else if (p->owner == USER) + mapbuf[i] = piece_attr[p->type].sname; +- else mapbuf[i] = tolower (piece_attr[p->type].sname); ++ else mapbuf[i] = tolower ((unsigned char)piece_attr[p->type].sname); + } + } + wbuf (mapbuf); diff --git a/games/vms-empire/patches/patch-object.c b/games/vms-empire/patches/patch-object.c new file mode 100644 index 00000000000..41cf87f5b75 --- /dev/null +++ b/games/vms-empire/patches/patch-object.c @@ -0,0 +1,15 @@ +$NetBSD: patch-object.c,v 1.1 2016/01/11 19:37:43 leot Exp $ + +Fix ctype(3) functions usage. + +--- object.c.orig 2014-12-15 00:57:48.000000000 +0000 ++++ object.c +@@ -568,7 +568,7 @@ update(view_map_t vmap[], loc_t loc) + else if (p->owner == USER) + vmap[loc].contents = piece_attr[p->type].sname; + else +- vmap[loc].contents = tolower (piece_attr[p->type].sname); ++ vmap[loc].contents = tolower ((unsigned char)piece_attr[p->type].sname); + } + if (vmap == comp_map) + display_locx (COMP, comp_map, loc); diff --git a/games/vms-empire/patches/patch-term.c b/games/vms-empire/patches/patch-term.c new file mode 100644 index 00000000000..a5fde89ac61 --- /dev/null +++ b/games/vms-empire/patches/patch-term.c @@ -0,0 +1,26 @@ +$NetBSD: patch-term.c,v 1.1 2016/01/11 19:37:43 leot Exp $ + +Fix ctype(3) functions usage. + +--- term.c.orig 2014-12-15 16:26:35.000000000 +0000 ++++ term.c +@@ -249,8 +249,8 @@ get_chx(void) + + c = get_cq (); + +- if (islower(c)) +- return (toupper(c)); ++ if (islower((unsigned char)c)) ++ return (toupper((unsigned char)c)); + else + return (c); + } +@@ -390,7 +390,7 @@ help(char **text, int nlines) + pos_str (r + text_lines + NUMTOPS + 3, c,"%-12s%c %c%6d%5d%6d", + piece_attr[i].nickname, + piece_attr[i].sname, +- tolower (piece_attr[i].sname), ++ tolower ((unsigned char)piece_attr[i].sname), + piece_attr[i].speed, + piece_attr[i].max_hits, + piece_attr[i].build_time,0,0); //FLAG diff --git a/games/vms-empire/patches/patch-usermove.c b/games/vms-empire/patches/patch-usermove.c new file mode 100644 index 00000000000..e5113fe4b1c --- /dev/null +++ b/games/vms-empire/patches/patch-usermove.c @@ -0,0 +1,60 @@ +$NetBSD: patch-usermove.c,v 1.1 2016/01/11 19:37:43 leot Exp $ + +Fix ctype(3) functions usage. + +--- usermove.c.orig 2014-12-15 16:26:35.000000000 +0000 ++++ usermove.c +@@ -878,7 +878,7 @@ user_dir_army(piece_info_t *obj, loc_t l + ksend ("Your army marched dutifully into the sea and drowned.\n"); + } + else { /* attack something at sea */ +- enemy_killed = islower (user_map[loc].contents); ++ enemy_killed = islower ((unsigned char)user_map[loc].contents); + attack (obj, loc); + + if (obj->hits > 0) /* ship won? */ +@@ -894,7 +894,7 @@ user_dir_army(piece_info_t *obj, loc_t l + } + } + +- else if (isupper (user_map[loc].contents) ++ else if (isupper ((unsigned char)user_map[loc].contents) + && user_map[loc].contents != 'X') { /* attacking self */ + if (!getyn ( + "Sir, those are our men! Do you really want to attack them? ")) +@@ -919,7 +919,7 @@ user_dir_fighter(piece_info_t *obj, loc_ + "That's never worked before, sir. Do you really want to try? ", + "Your fighter was shot down."); + +- else if (isupper (user_map[loc].contents)) { ++ else if (isupper ((unsigned char)user_map[loc].contents)) { + if (!getyn ("Sir, those are our men! " + "Do you really want to attack them? ")) + return; +@@ -959,7 +959,7 @@ user_dir_ship(piece_info_t *obj, loc_t l + ksend ("Your %s broke up on shore.", piece_attr[obj->type].name); + } + else { /* attack something on shore */ +- enemy_killed = islower (user_map[loc].contents); ++ enemy_killed = islower ((unsigned char)user_map[loc].contents); + attack (obj, loc); + + if (obj->hits > 0) /* ship won? */ +@@ -975,7 +975,7 @@ user_dir_ship(piece_info_t *obj, loc_t l + } + } + +- else if (isupper (user_map[loc].contents)) { /* attacking self */ ++ else if (isupper ((unsigned char)user_map[loc].contents)) { /* attacking self */ + if (!getyn ( + "Sir, those are our men! Do you really want to attack them? ")) + return; +@@ -1062,7 +1062,7 @@ awake(piece_info_t *obj) + for (i = 0; i < 8; i++) { /* for each surrounding cell */ + char c = user_map[obj->loc+dir_offset[i]].contents; + +- if (islower (c) || c == MAP_CITY || c == 'X') { ++ if (islower ((unsigned char)c) || c == MAP_CITY || c == 'X') { + if (obj->func < 0) obj->func = NOFUNC; /* awaken */ + return (true); + } |