commit: ff1f336ee9eca341588d9a65f137d46c72be3db4 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Thu Jun 16 13:38:38 2022 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Thu Jun 16 13:42:45 2022 +0000 URL: https://gitweb.gentoo.org/repo/dev/ulm.git/commit/?id=ff1f336e
games-board/tablebase-nalimov: EAPI 8 and simplify Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> games-board/tablebase-nalimov/metadata.xml | 2 +- .../tablebase-nalimov-0_pre20131213-r100.ebuild | 44 ---------------------- ...=> tablebase-nalimov-0_pre20131213-r101.ebuild} | 33 ++++++++-------- 3 files changed, 19 insertions(+), 60 deletions(-) diff --git a/games-board/tablebase-nalimov/metadata.xml b/games-board/tablebase-nalimov/metadata.xml index c97efbb..71231d9 100644 --- a/games-board/tablebase-nalimov/metadata.xml +++ b/games-board/tablebase-nalimov/metadata.xml @@ -4,8 +4,8 @@ <maintainer type="person"> <email>u...@gentoo.org</email> </maintainer> +<stabilize-allarches/> <use> - <flag name='5-pieces'>Install tablebases for 5 pieces</flag> <flag name='6-pieces'>Install tablebases for 6 pieces (huge!)</flag> </use> </pkgmetadata> diff --git a/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213-r100.ebuild b/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213-r100.ebuild deleted file mode 100644 index 8aecd0e..0000000 --- a/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213-r100.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Nalimov chess endgame tablebases for up to 6 pieces" -HOMEPAGE="http://tablebase.sesse.net/ - http://kirill-kryukov.com/chess/tablebases-online/" - -tb34=() -m=(p n b r q k) -for ((i=4; i>=0; i--)); do - tb34+=(k${m[i]}k.nb{w,b}) # 2+1 - for ((j=i; j>=0; j--)); do - tb34+=(k${m[i]}k${m[j]}.nb{w,b} k${m[i]}${m[j]}k.nb{w,b}) # 2+2, 3+1 - done -done - -SRC_URI="" -for i in "${tb34[@]}"; do - SRC_URI+="http://tablebase.sesse.net/3-4-5/${i}.emd " -done -unset i j m tb34 - -LICENSE="public-domain" # machine-generated tables -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="5-pieces 6-pieces" -RESTRICT="mirror" # not on Gentoo mirrors - -PDEPEND="5-pieces? ( ~${CATEGORY}/${P}:nofetch ) - 6-pieces? ( ~${CATEGORY}/${P}:nofetch[6-pieces] )" - -S="${WORKDIR}" - -src_unpack() { :; } - -src_install() { - local f - insinto /usr/share/${PN} - for f in ${A}; do - [[ ${f} = *.emd ]] && echo "${DISTDIR}"/${f} - done | xargs doins -} diff --git a/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213.ebuild b/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213-r101.ebuild similarity index 82% rename from games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213.ebuild rename to games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213-r101.ebuild index 0fec05e..ea6e506 100644 --- a/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213.ebuild +++ b/games-board/tablebase-nalimov/tablebase-nalimov-0_pre20131213-r101.ebuild @@ -1,21 +1,23 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit check-reqs DESCRIPTION="Nalimov chess endgame tablebases for up to 6 pieces" HOMEPAGE="http://tablebase.sesse.net/ - http://kirill-kryukov.com/chess/tablebases-online/" + https://kirill-kryukov.com/chess/tablebases-online/" -tb5=() +tb345=() tb6=() m=(p n b r q k) for ((i=4; i>=0; i--)); do + tb345+=(k${m[i]}k.nb{w,b}) # 2+1 for ((j=i; j>=0; j--)); do + tb345+=(k${m[i]}k${m[j]}.nb{w,b} k${m[i]}${m[j]}k.nb{w,b}) # 2+2, 3+1 for ((k=4; k>=0; k--)); do - tb5+=(k${m[i]}${m[j]}k${m[k]}.nb{w,b}) # 3+2 + tb345+=(k${m[i]}${m[j]}k${m[k]}.nb{w,b}) # 3+2 ((k<=i)) || continue for ((l=k; l>=0; l--)); do ((k<i || l<=j)) || continue @@ -23,7 +25,7 @@ for ((i=4; i>=0; i--)); do ((k!=i || l!=j)) && tb6+=(k${m[i]}${m[j]}k${m[k]}${m[l]}.nbb) done ((k<=j)) || continue - tb5+=(k${m[i]}${m[j]}${m[k]}k.nb{w,b}) # 4+1 + tb345+=(k${m[i]}${m[j]}${m[k]}k.nb{w,b}) # 4+1 for ((l=4; l>=0; l--)); do tb6+=(k${m[i]}${m[j]}${m[k]}k${m[l]}.nb{w,b}) # 4+2 done @@ -59,27 +61,28 @@ for ((i=0; i<${#tb6[@]}; i++)); do fi done -SRC_URI="${tb5[@]/%/.emd} 6-pieces? ( ${tb6n[@]/%/.emd} )" -unset i j k l m nfiles s tb5 tb6 tb6n +SRC_URI="${tb345[@]/%/.emd} + 6-pieces? ( ${tb6n[@]/%/.emd} )" +unset i j k l m nfiles s tb345 tb6 tb6n + +S="${WORKDIR}" LICENSE="public-domain" # machine-generated tables -SLOT="nofetch" +SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="6-pieces" RESTRICT="fetch" -RDEPEND="~${CATEGORY}/${P}:0" - -S="${WORKDIR}" +RDEPEND="!${CATEGORY}/${PN}:nofetch" pkg_pretend() { - CHECKREQS_DISK_USR=$(usex 6-pieces "1155G" "7200M") + CHECKREQS_DISK_USR="$(usex 6-pieces 1155G 7230M)" CHECKREQS_DISK_BUILD="${CHECKREQS_DISK_USR}" check-reqs_pkg_pretend } pkg_setup() { - CHECKREQS_DISK_USR=$(usex 6-pieces "1155G" "7200M") + CHECKREQS_DISK_USR="$(usex 6-pieces 1155G 7230M)" CHECKREQS_DISK_BUILD="${CHECKREQS_DISK_USR}" check-reqs_pkg_setup } @@ -103,6 +106,6 @@ src_install() { local f insinto /usr/share/${PN} for f in ${A}; do - [[ ${f} = *.emd ]] && echo "${DISTDIR}"/${f} + [[ ${f} == *.emd ]] && echo "${DISTDIR}"/${f} done | xargs doins }