summaryrefslogtreecommitdiff
path: root/games-misc/bsd-games
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-misc/bsd-games
reinit the tree, so we can have metadata
Diffstat (limited to 'games-misc/bsd-games')
-rw-r--r--games-misc/bsd-games/Manifest11
-rw-r--r--games-misc/bsd-games/bsd-games-2.17-r5.ebuild132
-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-headers.patch16
-rw-r--r--games-misc/bsd-games/files/config.params-gentoo39
-rw-r--r--games-misc/bsd-games/metadata.xml8
8 files changed, 283 insertions, 0 deletions
diff --git a/games-misc/bsd-games/Manifest b/games-misc/bsd-games/Manifest
new file mode 100644
index 000000000000..b08f10987685
--- /dev/null
+++ b/games-misc/bsd-games/Manifest
@@ -0,0 +1,11 @@
+AUX bsd-games-2.17-64bitutmp.patch 681 SHA256 992f8602661cc41c3253317bfc157abe0b2041cd7d32f5a31811708e2f8c4e23 SHA512 ba5a261950bd0f5f5b6aae0ee961a84f06bc6b68504c859db387d9c32875cb4f849c555c56c52f66b00af85d44d9a2324a2d1cccc6811acf6f980cefe9508258 WHIRLPOOL c91c4d6bdd6d4b4d97ed4e132de21a057ad9adb21e9e9eb0b204ea84e2cfc9f6eec009c2e77c46b94ae32144c1c819f314cbe208556a25863944277d84544193
+AUX bsd-games-2.17-bg.patch 732 SHA256 d25eb2b0e6790b6a852bce08f384994fed7b37a9d33d12d01b65e67fbd8f67d7 SHA512 006ce0aa632c1ff671bc98584307fcfabed62e81a4680271fcbbaebf93e0f6f7c89cb1fbe311ffa472facd02991c456ced6b198c02753958b1178aa9ef16d8ba WHIRLPOOL cf2c7d51bdb2d731901f632bf99de94ccab2e2d1c08595b41e05f84b047eb23209fdabcdd27cb9962bdeddf5c2bcf01d2bf67ee9fe87ab50c4afcc60c7fe2211
+AUX bsd-games-2.17-gcc4.patch 893 SHA256 96639f25206401c0dde3f9f28ac287c9e26c3efb526481fa48b482f8c9ab4ac0 SHA512 fca57d3887f202b973bf5c03eb0d9a8e62a0ef8f746ccec0cb6e3ad2494bdf1208a1a8833bd3b762281289802b8c58d90cab62fe2642915acaf1ff87233329c5 WHIRLPOOL b86f4fadc82bc2d8588f3d6311882f624b32e5232f814226eb89c5947a9548fe208d73d04dd7f9efde2d868000b8f017f3977a34526ec6e050a968c6756a67f4
+AUX bsd-games-2.17-headers.patch 268 SHA256 c21d06479c6758b6091b04676d636298c01d9709dabd5587111c74ad1db662d7 SHA512 cc7c62109e835b31db0dfbb84de35fcb962bebee04b901c727b7ff087c194bfb12e4edac6b7e2f3ca0e414bd486c18962e8f5ad1f33a997e2782f58b9b62469f WHIRLPOOL bf219252c4c3b743b90504db7ce8d57213d857dcc6011b49d60149b8905142478630a064b9fb7ec6b631574bb4d670328345befa108a40b0fc2871ba5c8525ac
+AUX config.params-gentoo 1204 SHA256 74737471f9fa6a3f523d8e91af65a175cccfa94ce162eb8e5ecef08372047414 SHA512 b6734409235caec3deb531bbcdb37527b3090c41b803ccc11895ea403543722437f84bdfa044c6aa70b306384ce94a40979a347e6031bc1d937841c7222d6618 WHIRLPOOL 0e4dc8250d7dc190a8eeaa7829d3386eb1c3a53018905502005058a7b947ebefa97df9fd96689d9850983a3758c8bf0b128d51ad1374116c098824b745eb7867
+DIST bsd-games-2.17.tar.gz 2563311 SHA256 066f924aef6c1c5ea946f588e36f303021f5dfc093944738f025d8edbc6fff60 SHA512 cb2ee60474f164d42e3d47700270bbeeda3c8279d64da409c9cc05e36437ef95b92d0a85543298e97604635fcf3e068f3a5cc812e90b5c61fb8d146cf35bc38f WHIRLPOOL 4a8e4bcbf040997645d1b88ef17a3f0df6414a5ad922ea68045759eeafb09ff473ad3ed1a95304a82a4eace02ebc05c1c3966bfe46a204f22e29d4d945ad2566
+DIST bsdgames_2.17-22.debian.tar.xz 32268 SHA256 dd7457368e5b4cb5b223e91a2919aefae72237fa6ab840f162a779c209163d3e SHA512 902d86557dd3813c31333fe18437d8046ae100814c9c1b340ab1f8266c817545f21e000702b1ca93babb9d632896ea5bada1e146436abfa7916b469681fceed5 WHIRLPOOL e0b7214cafecd471c059d8a097d5df4706b41c2f4dcb0658522d65f7e0ddea7bdfcfdcb86d1b0dab0703b9182d63115b246a7dc3e77a715aaf53d7d59b48e0a6
+EBUILD bsd-games-2.17-r5.ebuild 4330 SHA256 21fe938d71e285875be56b27f1ae9bf824d42848739c07cb98949e2e3b1eddd6 SHA512 4378cf8cb62d2cfb9ab67f16ea5de7454742ba16ddf17576228e4bfbb0f440724fff50b3ce8ee3098a3acab0a7729a4ce417d0af790b868de441a01f3aff99a2 WHIRLPOOL 6c303104f9e80c6101b45d1403f8cea05b1ebf9840e0d796941e0fb1aa152bfe4d310f8377a051ee03e9c30b5b988d7a88054b330f2a48af39b3a4e68421329f
+MISC ChangeLog 3121 SHA256 f7f3dae3895ead7786461033aee10887790c7139fded5d9e1e9df6bcda5174e2 SHA512 3d82a977d487b82b78f645ba159004832268c7bef7b24e2770f71100e6f6ac6501f9d662f77a44f550f671ea9c3baf2eb39cc3281715cffd214322b60a61457e WHIRLPOOL 33de7ef91a50c64d672a380e28ee5dccded7fe3e0358725bcf8e4c90f890f0e8ef7f70cd653a8a7b8d077572f308e29fba46d9c236db333bfed9fc2056b62354
+MISC ChangeLog-2015 7943 SHA256 d3a893deb9f9049dfadb56946cdebd8c579538a191c11dc3e1b339abc0575080 SHA512 67e06247efd0bc2971f0f5f4e53067adb081aa730c11ebd6d98f7de5d249f9f58ffa321bd5b1e6fa73c8988f31674479f5cd3e207567f5cc6b562ec03abe06da WHIRLPOOL 6f8431fe5de55bbadd6b121f07725f4c8de99391e28247fbb77dda05cad7277bedabde04f6ad14af6d590b8abcc9bf0ce826fcfa50daf4b852c0b7bb5aea33b0
+MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088
diff --git a/games-misc/bsd-games/bsd-games-2.17-r5.ebuild b/games-misc/bsd-games/bsd-games-2.17-r5.ebuild
new file mode 100644
index 000000000000..bead3a2573b5
--- /dev/null
+++ b/games-misc/bsd-games/bsd-games-2.17-r5.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+DEB_PATCH_VER=22
+DESCRIPTION="collection of games from NetBSD"
+HOMEPAGE="http://www.advogato.org/proj/bsd-games/"
+SRC_URI="ftp://metalab.unc.edu/pub/Linux/games/${P}.tar.gz
+ mirror://debian/pool/main/b/bsdgames/bsdgames_${PV}-${DEB_PATCH_VER}.debian.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 x86"
+IUSE=""
+
+RDEPEND="!games-misc/wtf
+ !app-misc/banner
+ !games-puzzle/hangman
+ sys-libs/ncurses:0
+ sys-apps/miscfiles"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ virtual/pkgconfig"
+
+# Set GAMES_TO_BUILD variable to whatever you want
+GAMES_TO_BUILD=${GAMES_TO_BUILD:=adventure arithmetic atc
+backgammon banner battlestar bcd boggle caesar canfield countmail cribbage
+dab dm factor fish gomoku hack hangman hunt mille monop morse
+number phantasia pig pom ppt primes quiz rain random robots sail snake
+tetris trek wargames worm worms wtf}
+
+src_prepare() {
+ local d="${WORKDIR}"/debian/patches
+ EPATCH_SOURCE="${d}" epatch $(<"${d}"/series)
+
+ # Used by gentoo config.params. See bug 531200
+ export GAMES_BINDIR GAMES_DATADIR GAMES_STATEDIR
+
+ epatch \
+ "${FILESDIR}"/${P}-64bitutmp.patch \
+ "${FILESDIR}"/${P}-headers.patch \
+ "${FILESDIR}"/${P}-bg.patch \
+ "${FILESDIR}"/${P}-gcc4.patch
+
+ # Use pkg-config to query Libs: from ncurses.pc (for eg. -ltinfo) wrt #459652
+ sed -i \
+ -e "/ncurses_lib/s:-lncurses:'$($(tc-getPKG_CONFIG) --libs-only-l ncurses)':" \
+ configure || die
+
+ sed -i \
+ -e "s:/usr/games:${GAMES_BINDIR}:" \
+ wargames/wargames || die
+
+ sed -i \
+ -e '/^CC :=/d' \
+ -e '/^CXX :=/d' \
+ -e '/^CFLAGS/s/OPTIMIZE/CFLAGS/' \
+ -e '/^CXXFLAGS/s/OPTIMIZE/CXXFLAGS/' \
+ -e '/^LDFLAGS/s/LDFLAGS := /LDFLAGS := \$(LDFLAGS) /' \
+ Makeconfig.in || die
+
+ cp "${FILESDIR}"/config.params-gentoo config.params || die
+ echo bsd_games_cfg_usrlibdir=\"$(games_get_libdir)\" >> ./config.params || die
+ echo bsd_games_cfg_build_dirs=\"${GAMES_TO_BUILD}\" >> ./config.params || die
+ echo bsd_games_cfg_docdir=\"/usr/share/doc/${PF}\" >> ./config.params || die
+}
+
+src_test() {
+ addwrite /dev/full
+ emake -j1 check
+}
+
+build_game() {
+ has ${1} ${GAMES_TO_BUILD}
+}
+
+do_statefile() {
+ touch "${D}/${GAMES_STATEDIR}/${1}" || die
+ chmod ug+rw "${D}/${GAMES_STATEDIR}/${1}" || die
+}
+
+src_install() {
+ dodir "${GAMES_BINDIR}" "${GAMES_STATEDIR}" /usr/share/man/man{1,6}
+ emake -j1 DESTDIR="${D}" install
+
+ dodoc AUTHORS BUGS ChangeLog ChangeLog.0 \
+ README PACKAGING SECURITY THANKS TODO YEAR2000
+
+ # set some binaries to run as games group (+S)
+ build_game atc && fperms g+s "${GAMES_BINDIR}"/atc
+ build_game battlestar && fperms g+s "${GAMES_BINDIR}"/battlestar
+ build_game canfield && fperms g+s "${GAMES_BINDIR}"/canfield
+ build_game cribbage && fperms g+s "${GAMES_BINDIR}"/cribbage
+ build_game phantasia && fperms g+s "${GAMES_BINDIR}"/phantasia
+ build_game robots && fperms g+s "${GAMES_BINDIR}"/robots
+ build_game sail && fperms g+s "${GAMES_BINDIR}"/sail
+ build_game snake && fperms g+s "${GAMES_BINDIR}"/snake
+ build_game tetris && fperms g+s "${GAMES_BINDIR}"/tetris-bsd
+
+ # state files
+ build_game atc && do_statefile atc_score
+ build_game battlestar && do_statefile battlestar.log
+ build_game canfield && do_statefile cfscores
+ build_game cribbage && do_statefile criblog
+ build_game hack && keepdir "${GAMES_STATEDIR}"/hack
+ build_game robots && do_statefile robots_roll
+ build_game sail && do_statefile saillog
+ build_game snake && do_statefile snake.log && do_statefile snakerawscores
+ build_game tetris && do_statefile tetris-bsd.scores
+
+ # extra docs
+ build_game atc && { docinto atc ; dodoc atc/BUGS; }
+ build_game boggle && { docinto boggle ; dodoc boggle/README; }
+ build_game hack && { docinto hack ; dodoc hack/{OWNER,Original_READ_ME,READ_ME,help}; }
+ build_game hunt && { docinto hunt ; dodoc hunt/README; }
+ build_game phantasia && { docinto phantasia ; dodoc phantasia/{OWNER,README}; }
+
+ # Since factor is usually not installed, and primes.6 is a symlink to
+ # factor.6, make sure that primes.6 is ok ...
+ if build_game primes && [[ ! $(build_game factor) ]] ; then
+ rm -f "${D}"/usr/share/man/man6/{factor,primes}.6
+ newman factor/factor.6 primes.6
+ fi
+
+ prepgamesdirs
+
+ # state dirs
+ chmod -R ug+rw "${D}/${GAMES_STATEDIR}"/* || die
+}
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 000000000000..3be1b3de074b
--- /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 000000000000..07dc520b77e4
--- /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 000000000000..7de07effc25d
--- /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-headers.patch b/games-misc/bsd-games/files/bsd-games-2.17-headers.patch
new file mode 100644
index 000000000000..953a5d35765a
--- /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 000000000000..9d246d1865e9
--- /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
+
diff --git a/games-misc/bsd-games/metadata.xml b/games-misc/bsd-games/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-misc/bsd-games/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>