summaryrefslogtreecommitdiff
path: root/games-misc/bsd-games
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /games-misc/bsd-games
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'games-misc/bsd-games')
-rw-r--r--games-misc/bsd-games/Manifest6
-rw-r--r--games-misc/bsd-games/bsd-games-3.1-r2.ebuild6
-rw-r--r--games-misc/bsd-games/bsd-games-3.2.ebuild153
-rw-r--r--games-misc/bsd-games/files/bsd-games-3.2-no-strip.patch32
-rw-r--r--games-misc/bsd-games/files/bsd-games-3.2-no-which.patch30
5 files changed, 225 insertions, 2 deletions
diff --git a/games-misc/bsd-games/Manifest b/games-misc/bsd-games/Manifest
index 5656629539fe..a469cffed01c 100644
--- a/games-misc/bsd-games/Manifest
+++ b/games-misc/bsd-games/Manifest
@@ -3,11 +3,15 @@ AUX bsd-games-2.17-bg.patch 660 BLAKE2B 7852051346beb6c33ef0728a64570a8a02c3883e
AUX bsd-games-2.17-gcc4.patch 747 BLAKE2B ce3fdad6643efd29c5dd63e82241b5e2f209a682cebed2e696791580491c275c739c2e82e24469fb6efe26e75204bb7ad368db393f27f2beeb58d79f7d2903a7 SHA512 3ac710726807d2893befd0a3ef24ca9d329123c79b68880c2cb18ca4ccd63ceaaf7cf798d77b1026a440e4ed4e6de9d4745d0f5d6b4280a6c963d9b397b398f7
AUX bsd-games-2.17-rename-getdate-clash.patch 767 BLAKE2B 164e73f598583f46df09b3b5f8651839d4fe878cd57a84830fc25596ae1b9752b0a6b1f7eee13f57b6e06101105a85114fb0574bc4491e7171205fc703460454 SHA512 50338cda948f4186ab9a6590b7177cce74c466a4098b06b396f893e1c63281f99e14a968ae38ce739148a4aeb930dcba2e9ee8ee7689174d14aad4c1f626ff2b
AUX bsd-games-3.1-no-install-manpages-automatically.patch 295 BLAKE2B e0c02a1fda3a79e6263a52a2155075b286239ac58da3b84bab14d1e3c203806b75928968e89db80f02661011b19ee12758e6f2c6a848661ef7219ee704ca6d59 SHA512 266f523c7bdf46599f99f3bbbf728705a7fa6fbf71548033198dd361468dfe5e233e40c975235b166a099cba5fa4fe0fa88b05825935c3449c2c7e5f884198fd
+AUX bsd-games-3.2-no-strip.patch 1054 BLAKE2B 38d65b9f2b9357d0b2e95fb59bfa331586eafb0494694333e72f5eb36694ff4c40e8d2cbcab195432045018b989a7685a0f578aa23f0e928b37438151c507d3e SHA512 f0eef9ea37174de638389abc7c8751db80bc5ced7d406fab82be54f92af4cfadc58e2485187a928120f422d857e77c416fd578334425de12be27c23bb8f1519f
+AUX bsd-games-3.2-no-which.patch 1037 BLAKE2B 2d105e334d7a4f5248bd6dde0260c6a4e9267efce52f6fa5cf65591873ec1d25fb5c9ab33c9fe53e96b9cfa6f7b80ac0b98771ec1e0276073e69a986e0fa81c3 SHA512 e5a1362fb7260f6dc84ced322433d11b28d0e33055614296b0c5a73ae21b7145aa0dd37b3d9543f90fe3959d91d577cf132bfec6afa38b6d1893d07b6804d64a
AUX config.params-gentoo 1204 BLAKE2B 638b52df3c92928a78a0e0833c2bc84a76906144b36d5a6b3523f4de24452aeeab355268afadb9d32933e5c0c19ab4145062bf3968a9d440af1a659a403b32c4 SHA512 b6734409235caec3deb531bbcdb37527b3090c41b803ccc11895ea403543722437f84bdfa044c6aa70b306384ce94a40979a347e6031bc1d937841c7222d6618
DIST bsd-games-3.1-verbose-build.patch.gz 4633 BLAKE2B cc75175ac2ef9d476c03bdb08b8c054d13090d6cdd1a14dd44022d13290112c68a7663d0c03f9ca7535ea10f2bb5e49a84acca4f782f0ced59685f762efd5151 SHA512 120c0859bb73a026dae017bcc2bc7505ca156b454bf5f87c91b4887417d5ac62f3dec706af91b22b11be8b5bce11d168f9205d722a9fd30dea654f682a66b1c8
DIST bsd-games-3.1.tar.gz 267636 BLAKE2B 116b340e383430fc56e9d2379a398494b43664aa124157bfa01f2c6a76ebdc90128cc676abae83b6d74680b0ad9396d24f1c0d11adcff1f552a3e68717b8cc8f SHA512 3f311e89481913b734a21fc7d0765628637af8251228d5a38349c27cc702c307240e81711785bbd7428e208a142bd07597630d29e97e2c7bf5bd9cac1ebc6ada
+DIST bsd-games-3.2.tar.gz 270345 BLAKE2B 3d984601a71e157dd65e4102e68b3cddc9552d13ec546c599d26a501361616e6223f5fba8990ad8c7ba4559b3982e89a7f1064ff7de2422d1eb71f6c8838bcf1 SHA512 cf5f5a9e5d215ee553486580f9a7dfc9801d254a2806172df201dfc42ecbb05326db7bc25b7624eb8a8e541ad61ec319d258687609bddae2bc07edcbade2291a
DIST bsdgames_2.17-28.debian.tar.xz 58464 BLAKE2B 3f5a70322341b153a8b3cb8df81fea1e773971d0f3b79ba8fb0c0877e95c61c8e8689952333f8ac4263948d781c2dc64c8178f9dac6a1c09ae702f91794b9583 SHA512 7e2db9f830c0657f3fcd1371635bda4a87e7a68180e486e44752904740c0710c02271522ff2d4b606542b3c502dd28795fcecf883360c3ac5bea78c148281f6a
DIST bsdgames_2.17.orig.tar.gz 2563311 BLAKE2B 9dfff4e70929e14a422c536c661cd95c5f1ac81d9112494525b9ef13d7a39b66bd59b6a264e614cfb29784fdb63364f56b12b4d284b125b5b3c12e92def07fb0 SHA512 cb2ee60474f164d42e3d47700270bbeeda3c8279d64da409c9cc05e36437ef95b92d0a85543298e97604635fcf3e068f3a5cc812e90b5c61fb8d146cf35bc38f
EBUILD bsd-games-2.17_p28-r2.ebuild 4692 BLAKE2B 870cb4508d184ede3772dbe890fc146ef0c92d84f7e5db563f52b8087b5caac4c0b0dbf91e6fcc1d910e921624000aad06b3080f5c8026d628d15985cba971f1 SHA512 23d1e06cb44a363e2865563d40b795383e4e824c63e861cd0ac0361c4a0f4f125c3122d2ec1e76dc50bc524b735b8bbfde8f49fae4a37476bcfd70f6af2114d5
-EBUILD bsd-games-3.1-r2.ebuild 4525 BLAKE2B 6b69f897c94e8a438bd32587f0a96ba63c698a3ffa3294524c99141af065c716a08360142bc87dcbd38acb224ec3d1a84492d8340fe4a259e51bc6a787631153 SHA512 f1eeecdd34d5352bff0bb797ff93757b836bd9b666b5d96b18fe96f7a2a2d49e1edffe93de08b570edaa8388d5e8ebd8ccbc9b531e67586276e1a67e15c08206
+EBUILD bsd-games-3.1-r2.ebuild 4668 BLAKE2B f4f760e9239a68139469ebcc4456795d07831f36aa5b89113017fc65209f3505a5959dfa4d938386240f43f672d069e7687eb4db860bfbb12b279ce61dbf6b66 SHA512 0d964cfdf826320471801519ad61e50ad2e6aa0488a77ee5877b180be957632b2b1cbdbed4c2967e6d71ddaea7b1da48162071f6ecae4da5bf30df36e6e9df67
+EBUILD bsd-games-3.2.ebuild 4778 BLAKE2B 9d14e6646eb9a052a39b83d03af53b81ac109380f6be85c31759b9eaca233d3928454008269893aebe4c78e6dc00999e97f665efe79be32ea6d41b7c6f166da0 SHA512 c717297e6d3e1a490b080ef5aaa2efa53c7ba4467eec67a381cdfd7534c0fccd2c4a6f1137612db9ed45d71b7acb30b2efc810cda8440f8a5a08de6753dba01b
MISC metadata.xml 327 BLAKE2B 89325403c47583b762175ec639c9183287ba2c38b14238a38536ab2084412efadb28bd89d0bee8fcada3b55f8691a096965f8fff0add08f157d4a2d723206045 SHA512 710f729c47be0e809ba982ed6d1845b8ccc374705e60ca7a85145d439e130496c7cd9ebcbe70fc0d4770bad5b420f815eb57cae25734d399bd93c38d61fd9352
diff --git a/games-misc/bsd-games/bsd-games-3.1-r2.ebuild b/games-misc/bsd-games/bsd-games-3.1-r2.ebuild
index 748268ebe63e..71f27640e016 100644
--- a/games-misc/bsd-games/bsd-games-3.1-r2.ebuild
+++ b/games-misc/bsd-games/bsd-games-3.1-r2.ebuild
@@ -14,7 +14,7 @@ LICENSE="BSD"
# Subslot indicates the fork / new version
# 3 doesn't include the same games as the classic variant, etc
SLOT="0/3"
-KEYWORDS="~alpha ~amd64 ~hppa ~mips ~x86"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~riscv ~x86"
# 'check' target doesn't exist, nor do any actual tests
# bug #779649
@@ -31,6 +31,7 @@ RDEPEND="
acct-group/gamestat
"
BDEPEND="
+ sys-apps/which
sys-devel/bison
sys-devel/flex
virtual/pkgconfig
@@ -67,6 +68,9 @@ src_prepare() {
echo bsd_games_cfg_usrlibdir=\"$(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
+ if use riscv; then
+ sed -i 's/${CC} ${ldflags} -o $@ $^/${CC} ${ldflags} -o $@ $^ -latomic/' ./*/Module.mk || die
+ fi
}
src_configure() {
diff --git a/games-misc/bsd-games/bsd-games-3.2.ebuild b/games-misc/bsd-games/bsd-games-3.2.ebuild
new file mode 100644
index 000000000000..a4e1f68fde8e
--- /dev/null
+++ b/games-misc/bsd-games/bsd-games-3.2.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="collection of games from NetBSD"
+HOMEPAGE="https://www.polyomino.org.uk/computer/software/bsd-games/"
+SRC_URI="https://github.com/msharov/bsd-games/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-3.1-verbose-build.patch.gz"
+
+LICENSE="BSD"
+# Subslot indicates the fork / new version
+# 3 doesn't include the same games as the classic variant, etc
+SLOT="0/3"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~riscv ~x86"
+
+# 'check' target doesn't exist, nor do any actual tests
+# bug #779649
+RESTRICT="test"
+
+DEPEND="
+ sys-apps/miscfiles
+ sys-libs/ncurses:=[unicode(+)]
+ !games-puzzle/hangman
+ !games-misc/wumpus
+"
+RDEPEND="
+ ${DEPEND}
+ acct-group/gamestat
+"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${WORKDIR}"/${PN}-3.1-verbose-build.patch
+ "${FILESDIR}"/${PN}-3.1-no-install-manpages-automatically.patch
+ "${FILESDIR}"/${PN}-3.2-no-which.patch
+ "${FILESDIR}"/${P}-no-strip.patch
+)
+
+# Set GAMES_TO_BUILD variable to whatever you want
+GAMES_TO_BUILD=${GAMES_TO_BUILD:=adventure atc battlestar caesar cribbage
+dab drop4 gofish gomoku hangman klondike robots sail snake spirhunt
+worm wump}
+
+src_prepare() {
+ default
+
+ # Use completely our own CFLAGS/LDFLAGS, no stripping and so on
+ sed -i \
+ -e 's/+= -std=c11 @pkgcflags@ ${CFLAGS}/= -std=c11 @pkgcflags@ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}/' \
+ -e 's/+= @pkgldflags@ ${LDFLAGS}/= @pkgldflags@ ${LDFLAGS}/' \
+ -e s'/${INSTALL} -m 755 -s/${INSTALL} -m 755/' \
+ -e '/man[6]dir/d' \
+ Config.mk.in || die
+
+ # Yes, this stinks.
+ # Right now, the custom configure script calls pkg-config manually
+ # and seds it a bunch, and this is easier.
+ # Force looking for both ncurses and ncursesw
+ sed -i -e 's/pkgs="ncurses"/pkgs="ncursesw"/' configure || die
+
+ cp "${FILESDIR}"/config.params-gentoo config.params || die
+ echo bsd_games_cfg_usrlibdir=\"$(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
+ if use riscv; then
+ sed -i 's/${CC} ${ldflags} -o $@ $^/${CC} ${ldflags} -o $@ $^ -latomic/' ./*/Module.mk || die
+ fi
+}
+
+src_configure() {
+ tc-export AR CC RANLIB
+
+ econf
+}
+
+src_compile() {
+ emake CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dodir /var/games
+ emake DESTDIR="${D}" install
+
+ _build_game() {
+ has ${1} ${GAMES_TO_BUILD}
+ }
+
+ _do_statefile() {
+ touch "${ED}"/var/games/${1} || die
+ chmod ug+rw "${ED}"/var/games/${1} || die
+ }
+
+ # set some binaries to run as games group (+S)
+ _build_game atc && fperms g+s /usr/bin/atc
+ _build_game battlestar && fperms g+s /usr/bin/battlestar
+ _build_game canfield && fperms g+s /usr/bin/canfield
+ _build_game cribbage && fperms g+s /usr/bin/cribbage
+ _build_game phantasia && fperms g+s /usr/bin/phantasia
+ _build_game robots && fperms g+s /usr/bin/robots
+ _build_game sail && fperms g+s /usr/bin/sail
+ _build_game snake && fperms g+s /usr/bin/snake
+ _build_game tetris && fperms g+s /usr/bin/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 /var/games/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
+ _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}; }
+
+ # Install the man pages manually to make life easier (circumventing compression)
+ local game
+ for game in ${GAMES_TO_BUILD[@]} ; do
+ if [[ -e ${game}/${game}.1 ]] ; then
+ doman ${game}/${game}.1
+ else
+ doman ${game}/${game}.6
+ fi
+ done
+
+ # 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 "${ED}"/usr/share/man/man6/{factor,primes}.6 || die
+ newman factor/factor.6 primes.6
+ fi
+
+ # All of this needs to be owned by the gamestat group
+ fowners -R :gamestat /var/games/
+ # ... and so do the binaries
+ fowners -R :gamestat /usr/bin/
+
+ # State dirs
+ fperms -R ug+rw /var/games/
+}
diff --git a/games-misc/bsd-games/files/bsd-games-3.2-no-strip.patch b/games-misc/bsd-games/files/bsd-games-3.2-no-strip.patch
new file mode 100644
index 000000000000..1afd6772a8f3
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-3.2-no-strip.patch
@@ -0,0 +1,32 @@
+https://github.com/msharov/bsd-games/commit/b3d60ff0f7aa377594e6b9a2e1d1d8a509501beb
+
+From: Mike Sharov <msharov@users.sourceforge.net>
+Date: Sun, 3 Apr 2022 09:16:27 -0400
+Subject: [PATCH] Remove -s arg to install program
+
+If configure was not called with --with-debug, executables are already
+built stripped. Additional stripping during installation is not needed.
+--- a/Config.mk.in
++++ b/Config.mk.in
+@@ -7,7 +7,7 @@ AR := @AR@
+ RANLIB := @RANLIB@
+ INSTALL := @INSTALL@
+ INSTALL_DATA := ${INSTALL} -m 644
+-INSTALL_PROGRAM := ${INSTALL} -m 755 -s
++INSTALL_PROGRAM := ${INSTALL} -m 755
+ INSTALL_SCORE := ${INSTALL} -m 664 -g users /dev/null
+
+ ################ Destination #########################################
+
+diff --git a/Config.mk.in b/Config.mk.in
+index e069054..d9ee2cb 100644
+--- a/Config.mk.in
++++ b/Config.mk.in
+@@ -30,7 +30,6 @@ ifdef debug
+ ldflags := -g -rdynamic
+ else
+ cflags := -Os -g0 -DNDEBUG=1
+- ldflags := -s
+ endif
+ CFLAGS := -Wall -Wextra -Wstrict-prototypes -Wshadow
+ cflags += -std=c11 @pkg_cflags@ ${CFLAGS}
diff --git a/games-misc/bsd-games/files/bsd-games-3.2-no-which.patch b/games-misc/bsd-games/files/bsd-games-3.2-no-which.patch
new file mode 100644
index 000000000000..c38dda4ef462
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-3.2-no-which.patch
@@ -0,0 +1,30 @@
+https://github.com/msharov/bsd-games/pull/12
+--- a/configure
++++ b/configure
+@@ -145,7 +145,7 @@ s/@builddir@/\$\{TMPDIR\}\/make/g"
+
+ #### Find headers, libs, programs, and subs ##########################
+
+-# Programs found using which
++# Programs found using command -v
+ for i in $progs; do
+ pname=$(expr $i : '\([^=]*\)')
+ pcall=$(expr $i : '[^=]*=\([^=]*\)')
+@@ -153,7 +153,7 @@ for i in $progs; do
+ # First check if an environment variable is set
+ [ -n "$ppath" ] && sub "s/@$pname@/$ppath/g"
+ # Check if the program exists
+- ppath=$(which $pcall 2>/dev/null)
++ ppath=$(command -v $pcall 2>/dev/null)
+ [ -n "$ppath" ] && [ -x "$ppath" ] && sub "s/@$pname@/$pcall/g"
+ done
+ # If nothing found in first loop, set the first pair anyway
+@@ -164,7 +164,7 @@ for i in $progs; do
+ done
+
+ # Packages found using pkg-config
+-pkgconfig=$(which pkg-config 2>/dev/null)
++pkgconfig=$(command -v pkg-config 2>/dev/null)
+ if [ -n "$pkgconfig" ] && [ -x "$pkgconfig" ]; then
+ faildeps=""
+ for i in $pkgs; do