summaryrefslogtreecommitdiff
path: root/games-misc/bsd-games/files
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-misc/bsd-games/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-misc/bsd-games/files')
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-64bit.patch43
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch21
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-bg.patch22
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-gcc4.patch34
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-gcc43.patch16
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-glibc2.10.patch185
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-headers.patch16
-rw-r--r--games-misc/bsd-games/files/config.params-gentoo39
8 files changed, 376 insertions, 0 deletions
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-64bit.patch b/games-misc/bsd-games/files/bsd-games-2.17-64bit.patch
new file mode 100644
index 00000000000..a56ea8454bc
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-64bit.patch
@@ -0,0 +1,43 @@
+David Leverton writes about adventure/crc.c:
+
+The 'adventure' game from the games-misc/bsd-games-2.13 package crashes
+when saving the game on AMD64 (and probably other 64-bit systems, but I
+haven't checked). Find attached to fix this.
+
+http://bugs.gentoo.org/show_bug.cgi?id=77032
+
+
+About utmpentry.c:
+
+the utmpx structure defines the ut_tv member a little differently on
+64bit hosts so that a 32bit and 64bit structure can be shared. So the
+ut_tv is a custom 32bit structure rather than the native 64bit timeval
+structure. Work around is to assign the submembers instead.
+
+http://bugs.gentoo.org/show_bug.cgi?id=102667
+
+--- bsd-games/adventure/crc.c
++++ bsd-games/adventure/crc.c
+@@ -134,7 +134,8 @@
+ if (step >= sizeof(crctab) / sizeof(crctab[0]))
+ step = 0;
+ }
+- crcval = (crcval << 8) ^ crctab[i];
++ /* Mask to 32 bits. */
++ crcval = ((crcval << 8) ^ crctab[i]) & 0xffffffff;
+ }
+- return crcval & 0xffffffff; /* Mask to 32 bits. */
++ return crcval;
+ }
+--- bsd-games/dm/utmpentry.c
++++ bsd-games/dm/utmpentry.c
+@@ -291,7 +291,8 @@
+ e->line[sizeof(e->line) - 1] = '\0';
+ (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
+ e->name[sizeof(e->host) - 1] = '\0';
+- e->tv = up->ut_tv;
++ e->tv.tv_sec = up->ut_tv.tv_sec;
++ e->tv.tv_usec = up->ut_tv.tv_usec;
+ adjust_size(e);
+ }
+ #endif
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch b/games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch
new file mode 100644
index 00000000000..3be1b3de074
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch
@@ -0,0 +1,21 @@
+About utmpentry.c:
+
+the utmpx structure defines the ut_tv member a little differently on
+64bit hosts so that a 32bit and 64bit structure can be shared. So the
+ut_tv is a custom 32bit structure rather than the native 64bit timeval
+structure. Work around is to assign the submembers instead.
+
+http://bugs.gentoo.org/show_bug.cgi?id=102667
+
+--- bsd-games/dm/utmpentry.c
++++ bsd-games/dm/utmpentry.c
+@@ -291,7 +291,8 @@
+ e->line[sizeof(e->line) - 1] = '\0';
+ (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
+ e->name[sizeof(e->host) - 1] = '\0';
+- e->tv = up->ut_tv;
++ e->tv.tv_sec = up->ut_tv.tv_sec;
++ e->tv.tv_usec = up->ut_tv.tv_usec;
+ adjust_size(e);
+ }
+ #endif
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-bg.patch b/games-misc/bsd-games/files/bsd-games-2.17-bg.patch
new file mode 100644
index 00000000000..07dc520b77e
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-bg.patch
@@ -0,0 +1,22 @@
+--- backgammon/common_source/fancy.c.old 2007-05-16 20:16:46.000000000 +0200
++++ backgammon/common_source/fancy.c 2007-05-16 20:19:00.000000000 +0200
+@@ -58,7 +58,7 @@
+ int lUP; /* length of UP */
+ int CO; /* number of columns */
+ int LI; /* number of lines */
+-int *linect; /* array of lengths of lines on screen (the
++static int linect[25]; /* array of lengths of lines on screen (the
+ * actual screen is not stored) */
+
+ /* two letter codes */
+@@ -728,10 +728,5 @@
+ lND = strlen(ND);
+ if (LI < 24 || CO < 72 || !(CL && UP && ND))
+ return (0);
+- linect = (int *) calloc(LI + 1, sizeof(int));
+- if (linect == NULL) {
+- write(2, "\r\nOut of memory!\r\n", 18);
+- getout(0);
+- }
+ return (1);
+ }
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-gcc4.patch b/games-misc/bsd-games/files/bsd-games-2.17-gcc4.patch
new file mode 100644
index 00000000000..7de07effc25
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-gcc4.patch
@@ -0,0 +1,34 @@
+--- trek/getpar.h.orig 2005-08-14 19:45:29.000000000 -0400
++++ trek/getpar.h 2005-08-14 19:46:33.000000000 -0400
+@@ -31,6 +31,9 @@
+ * @(#)getpar.h 8.1 (Berkeley) 5/31/93
+ */
+
++#ifndef __GETPAR_H_
++#define __GETPAR_H_
++
+ typedef void (*cmdfun)(int);
+ struct cvntab /* used for getcodpar() parameter list */
+ {
+@@ -51,3 +54,5 @@
+ int testnl(void);
+ void skiptonl(int);
+ int readdelim(int);
++
++#endif /*__GETPAR_H_*/
+--- trek/trek.h.orig 2005-08-14 19:45:37.000000000 -0400
++++ trek/trek.h 2005-08-14 19:48:17.000000000 -0400
+@@ -31,6 +31,13 @@
+ * @(#)trek.h 8.1 (Berkeley) 5/31/93
+ */
+
++/* For struct cvntab definition, which is now required for
++ * Skitab and Lentab below. gcc 4.0 and later will emit
++ * "array type has incomplete element type" errors otherwise.
++ * -- Jason Bucata (jbucata@tulsaconnect.com), 12-AUG-2005
++ */
++#include "getpar.h"
++
+ /*
+ ** Global Declarations
+ **
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-gcc43.patch b/games-misc/bsd-games/files/bsd-games-2.17-gcc43.patch
new file mode 100644
index 00000000000..8009454e55a
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-gcc43.patch
@@ -0,0 +1,16 @@
+--- dab/gamescreen.h.orig
++++ dab/gamescreen.h
+@@ -70,9 +70,9 @@
+ virtual void redraw(void) = 0; // Refresh
+ virtual int getinput(void) = 0; // Get user input
+ virtual void bell(void) = 0; // Beep
+- virtual void score(size_t p, const PLAYER& p) = 0; // Post current score
+- virtual void games(size_t p, const PLAYER& p) = 0; // Post games won
+- virtual void total(size_t p, const PLAYER& p) = 0; // Post total score
++ virtual void score(size_t s, const PLAYER& p) = 0; // Post current score
++ virtual void games(size_t s, const PLAYER& p) = 0; // Post games won
++ virtual void total(size_t s, const PLAYER& p) = 0; // Post total score
+ virtual void ties(const PLAYER& p) = 0; // Post tie games
+ };
+
+
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-glibc2.10.patch b/games-misc/bsd-games/files/bsd-games-2.17-glibc2.10.patch
new file mode 100644
index 00000000000..2efdc57490d
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-glibc2.10.patch
@@ -0,0 +1,185 @@
+--- boggle/boggle/bog.c
++++ boggle/boggle/bog.c
+@@ -336,7 +336,7 @@
+ }
+
+ while (1) {
+- if (getline(buf) == NULL) {
++ if (get_line(buf) == NULL) {
+ if (feof(stdin))
+ clearerr(stdin);
+ break;
+--- boggle/boggle/extern.h
++++ boggle/boggle/extern.h
+@@ -43,7 +43,7 @@
+ long dictseek(FILE *, long, int);
+ void findword(void);
+ void flushin(FILE *);
+-char *getline(char *);
++char *get_line(char *);
+ void getword(char *);
+ int help(void);
+ int inputch(void);
+--- boggle/boggle/mach.c
++++ boggle/boggle/mach.c
+@@ -168,7 +168,7 @@
+ * - doesn't accept words longer than MAXWORDLEN or containing caps
+ */
+ char *
+-getline(q)
++get_line(q)
+ char *q;
+ {
+ int ch, done;
+--- cribbage/cribbage.h
++++ cribbage/cribbage.h
+@@ -77,7 +77,7 @@
+ int fifteens(const CARD [], int);
+ void game(void);
+ void gamescore(void);
+-char *getline(void);
++char *get_line(void);
+ int getuchar(void);
+ int incard(CARD *);
+ int infrom(const CARD [], int, const char *);
+--- cribbage/crib.c
++++ cribbage/crib.c
+@@ -221,7 +221,7 @@
+ if (!rflag) { /* player cuts deck */
+ msg(quiet ? "Cut for crib? " :
+ "Cut to see whose crib it is -- low card wins? ");
+- getline();
++ get_line();
+ }
+ i = (rand() >> 4) % CARDS; /* random cut */
+ do { /* comp cuts deck */
+@@ -397,7 +397,7 @@
+ if (!rflag) { /* random cut */
+ msg(quiet ? "Cut the deck? " :
+ "How many cards down do you wish to cut the deck? ");
+- getline();
++ get_line();
+ }
+ i = (rand() >> 4) % (CARDS - pos);
+ turnover = deck[i + pos];
+--- cribbage/io.c
++++ cribbage/io.c
+@@ -245,7 +245,7 @@
+
+ retval = FALSE;
+ rnk = sut = EMPTY;
+- if (!(line = getline()))
++ if (!(line = get_line()))
+ goto gotit;
+ p = p1 = line;
+ while (*p1 != ' ' && *p1 != '\0')
+@@ -346,7 +346,7 @@
+
+ for (sum = 0;;) {
+ msg(prompt);
+- if (!(p = getline()) || *p == '\0') {
++ if (!(p = get_line()) || *p == '\0') {
+ msg(quiet ? "Not a number" :
+ "That doesn't look like a number");
+ continue;
+@@ -528,12 +528,12 @@
+ }
+
+ /*
+- * getline:
++ * get_line:
+ * Reads the next line up to '\n' or EOF. Multiple spaces are
+ * compressed to one space; a space is inserted before a ','
+ */
+ char *
+-getline()
++get_line()
+ {
+ char *sp;
+ int c, oy, ox;
+--- gomoku/bdisp.c
++++ gomoku/bdisp.c
+@@ -241,7 +241,7 @@
+ }
+
+ int
+-getline(buf, size)
++get_line(buf, size)
+ char *buf;
+ int size;
+ {
+--- gomoku/gomoku.h
++++ gomoku/gomoku.h
+@@ -263,7 +263,7 @@
+
+ void bdinit(struct spotstr *);
+ void init_overlap(void);
+-int getline(char *, int);
++int get_line(char *, int);
+ void ask(const char *);
+ void dislog(const char *);
+ void bdump(FILE *);
+--- gomoku/main.c
++++ gomoku/main.c
+@@ -155,7 +155,7 @@
+ if (inputfp == NULL && test == 0) {
+ for (;;) {
+ ask("black or white? ");
+- getline(buf, sizeof(buf));
++ get_line(buf, sizeof(buf));
+ if (buf[0] == 'b' || buf[0] == 'B') {
+ color = BLACK;
+ break;
+@@ -172,7 +172,7 @@
+ }
+ } else {
+ setbuf(stdout, 0);
+- getline(buf, sizeof(buf));
++ get_line(buf, sizeof(buf));
+ if (strcmp(buf, "black") == 0)
+ color = BLACK;
+ else if (strcmp(buf, "white") == 0)
+@@ -244,7 +244,7 @@
+ getinput:
+ if (interactive)
+ ask("move? ");
+- if (!getline(buf, sizeof(buf))) {
++ if (!get_line(buf, sizeof(buf))) {
+ curmove = RESIGN;
+ break;
+ }
+@@ -256,7 +256,7 @@
+ FILE *fp;
+
+ ask("save file name? ");
+- (void)getline(buf, sizeof(buf));
++ (void)get_line(buf, sizeof(buf));
+ if ((fp = fopen(buf, "w")) == NULL) {
+ glog("cannot create save file");
+ goto getinput;
+@@ -309,14 +309,14 @@
+ if (i != RESIGN) {
+ replay:
+ ask("replay? ");
+- if (getline(buf, sizeof(buf)) &&
++ if (get_line(buf, sizeof(buf)) &&
+ (buf[0] == 'y' || buf[0] == 'Y'))
+ goto again;
+ if (strcmp(buf, "save") == 0) {
+ FILE *fp;
+
+ ask("save file name? ");
+- (void)getline(buf, sizeof(buf));
++ (void)get_line(buf, sizeof(buf));
+ if ((fp = fopen(buf, "w")) == NULL) {
+ glog("cannot create save file");
+ goto replay;
+@@ -367,7 +367,7 @@
+ quit();
+ top:
+ ask("cmd? ");
+- if (!getline(fmtbuf, sizeof(fmtbuf)))
++ if (!get_line(fmtbuf, sizeof(fmtbuf)))
+ quit();
+ switch (*fmtbuf) {
+ case '\0':
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-headers.patch b/games-misc/bsd-games/files/bsd-games-2.17-headers.patch
new file mode 100644
index 00000000000..953a5d35765
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-headers.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/128348
+
+--- include/stdio.h
++++ include/stdio.h
+@@ -35,5 +35,11 @@
+ #include_next <stdio.h>
+
+ #ifndef HAVE_fgetln
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern char *fgetln(FILE *stream, size_t *len);
++#ifdef __cplusplus
++}
++#endif
+ #endif
diff --git a/games-misc/bsd-games/files/config.params-gentoo b/games-misc/bsd-games/files/config.params-gentoo
new file mode 100644
index 00000000000..9d246d1865e
--- /dev/null
+++ b/games-misc/bsd-games/files/config.params-gentoo
@@ -0,0 +1,39 @@
+
+# This file is read by configure for the Gentoo ebuild
+
+# Don't run configure interactively.
+bsd_games_cfg_non_interactive=y
+
+bsd_games_cfg_install_prefix=${D}
+
+# For gentoo,
+# banner used to be in util-linux. Gentoo might have an ebuild
+# fortune is "app-games/fortune-mod"
+# factor is in "sys-apps/sh-utils"
+# dm is not installed by debian, I don't know why
+bsd_games_cfg_no_build_dirs="dm banner fortune factor"
+
+# Gentoo's games eclass want everything in these places
+bsd_games_cfg_gamesdir=${GAMES_BINDIR}
+bsd_games_cfg_sbindir=${GAMES_BINDIR}
+bsd_games_cfg_sharedir=${GAMES_DATADIR}/${PN}
+bsd_games_cfg_varlibdir=${GAMES_STATEDIR}
+
+# We'll control all the permissions during install (via games eclass)
+bsd_games_cfg_do_chown=n
+
+# .so or symlink??? (Debian perfers symlinks for manpages)
+bsd_games_cfg_use_dot_so=symlinks
+
+# Gentoo'll handle manpage compressing.
+bsd_games_cfg_gzip_manpages=n
+
+# sys-apps/less is in system (even though more is in /bin)
+bsd_games_cfg_pager=/usr/bin/less
+
+# sys-apps/miscfiles might have too many words for boggle
+bsd_games_cfg_dictionary_src=/usr/share/dict/words
+
+# Acronym file for "wft"
+bsd_games_cfg_wtf_acronymfile=${GAMES_DATADIR}/${PN}/acronyms
+