summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2015-10-08 22:04:15 +0200
committerUlrich Müller <ulm@gentoo.org>2015-10-08 22:04:15 +0200
commit1dd953cb30b8bbb68ded6669e93f2a7f4ff8ab9d (patch)
treeca9b79e5ad62a242baa23544708984d3c5846e46
parentgames-board/egtb-syzygy: Check disk space for both settings of the tb6 flag. (diff)
downloadulm-1dd953cb30b8bbb68ded6669e93f2a7f4ff8ab9d.tar.gz
ulm-1dd953cb30b8bbb68ded6669e93f2a7f4ff8ab9d.tar.bz2
ulm-1dd953cb30b8bbb68ded6669e93f2a7f4ff8ab9d.zip
games-board/egtb-*: Calculation of SRC_URI refurbished.
-rw-r--r--games-board/egtb-nalimov/ChangeLog3
-rw-r--r--games-board/egtb-nalimov/egtb-nalimov-20131213.ebuild30
-rw-r--r--games-board/egtb-syzygy/ChangeLog3
-rw-r--r--games-board/egtb-syzygy/egtb-syzygy-20131213.ebuild34
4 files changed, 40 insertions, 30 deletions
diff --git a/games-board/egtb-nalimov/ChangeLog b/games-board/egtb-nalimov/ChangeLog
index 0d184e0..059d550 100644
--- a/games-board/egtb-nalimov/ChangeLog
+++ b/games-board/egtb-nalimov/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
# $Id$
+ 08 Oct 2015; Ulrich Müller <ulm@gentoo.org> egtb-nalimov-20131213.ebuild:
+ Calculation of SRC_URI refurbished.
+
01 Oct 2015; Ulrich Müller <ulm@gentoo.org> egtb-nalimov-20131213.ebuild:
Install under /usr/share/ instead of /usr/share/games/.
diff --git a/games-board/egtb-nalimov/egtb-nalimov-20131213.ebuild b/games-board/egtb-nalimov/egtb-nalimov-20131213.ebuild
index 78dec48..1cfda55 100644
--- a/games-board/egtb-nalimov/egtb-nalimov-20131213.ebuild
+++ b/games-board/egtb-nalimov/egtb-nalimov-20131213.ebuild
@@ -9,28 +9,32 @@ inherit check-reqs
DESCRIPTION="Nalimov endgame tablebases for up to 5 pieces"
HOMEPAGE="http://tablebase.sesse.net/"
-pc=(q r b n p)
-for ((i=0; i<5; i++)); do
- tb4+=(k${pc[i]}k) # 2+1
- for ((j=i; j<5; j++)); do
- tb4+=(k${pc[i]}k${pc[j]} k${pc[i]}${pc[j]}k) # 2+2, 3+1
- for ((k=0; k<5; k++)); do
- tb5+=(k${pc[i]}${pc[j]}k${pc[k]}) # 3+2
- ((k>=j)) && tb5+=(k${pc[i]}${pc[j]}${pc[k]}k) # 4+1
+tb34=()
+tb5=()
+m=(p n b r q k)
+for ((i=4; i>=0; i--)); do
+ tb34+=(k${m[i]}k) # 2+1
+ for ((j=i; j>=0; j--)); do
+ tb34+=(k${m[i]}k${m[j]} k${m[i]}${m[j]}k) # 2+2, 3+1
+ for ((k=4; k>=0; k--)); do
+ tb5+=(k${m[i]}${m[j]}k${m[k]}) # 3+2
+ ((k<=j)) && tb5+=(k${m[i]}${m[j]}${m[k]}k) # 4+1
done
done
done
SRC_URI="http://tablebase.sesse.net/README -> ${P}-README"
-for i in "${tb4[@]/%/.nbw}" "${tb4[@]/%/.nbb}"; do
- SRC_URI+=" http://tablebase.sesse.net/3-4-5/${i}.emd"
+for i in "${tb34[@]}"; do
+ SRC_URI+=" http://tablebase.sesse.net/3-4-5/${i}.nbw.emd"
+ SRC_URI+=" http://tablebase.sesse.net/3-4-5/${i}.nbb.emd"
done
SRC_URI+=" tb5? ("
-for i in "${tb5[@]/%/.nbw}" "${tb5[@]/%/.nbb}"; do
- SRC_URI+=" http://tablebase.sesse.net/3-4-5/${i}.emd"
+for i in "${tb5[@]}"; do
+ SRC_URI+=" http://tablebase.sesse.net/3-4-5/${i}.nbw.emd"
+ SRC_URI+=" http://tablebase.sesse.net/3-4-5/${i}.nbb.emd"
done
SRC_URI+=" )"
-unset i j k pc tb4 tb5
+unset i j k m tb34 tb5
LICENSE="public-domain"
SLOT="0"
diff --git a/games-board/egtb-syzygy/ChangeLog b/games-board/egtb-syzygy/ChangeLog
index 2c29e7f..a627e64 100644
--- a/games-board/egtb-syzygy/ChangeLog
+++ b/games-board/egtb-syzygy/ChangeLog
@@ -3,6 +3,9 @@
# $Id$
08 Oct 2015; Ulrich Müller <ulm@gentoo.org> egtb-syzygy-20131213.ebuild:
+ Calculation of SRC_URI refurbished.
+
+ 08 Oct 2015; Ulrich Müller <ulm@gentoo.org> egtb-syzygy-20131213.ebuild:
Check disk space for both settings of the tb6 flag.
01 Oct 2015; Ulrich Müller <ulm@gentoo.org> egtb-syzygy-20131213.ebuild:
diff --git a/games-board/egtb-syzygy/egtb-syzygy-20131213.ebuild b/games-board/egtb-syzygy/egtb-syzygy-20131213.ebuild
index 85d9487..4c1a1ac 100644
--- a/games-board/egtb-syzygy/egtb-syzygy-20131213.ebuild
+++ b/games-board/egtb-syzygy/egtb-syzygy-20131213.ebuild
@@ -9,24 +9,24 @@ inherit check-reqs
DESCRIPTION="Syzygy endgame tablebases for up to 6 pieces"
HOMEPAGE="http://tablebase.sesse.net/"
-pc=(Q R B N P)
tb345=()
tb6=()
-for ((i=0; i<5; i++)); do
- tb345+=(K${pc[i]}vK) # 2+1
- for ((j=i; j<5; j++)); do
- tb345+=(K${pc[i]}vK${pc[j]} K${pc[i]}${pc[j]}vK) # 2+2, 3+1
- for ((k=0; k<5; k++)); do
- tb345+=(K${pc[i]}${pc[j]}vK${pc[k]}) # 3+2
- ((k>=j)) && tb345+=(K${pc[i]}${pc[j]}${pc[k]}vK) # 4+1
- for ((l=0; l<5; l++)); do
- if ((k>=i && l>=k)) && ((k>i || l>=j)); then
- tb6+=(K${pc[i]}${pc[j]}vK${pc[k]}${pc[l]}) # 3+3
- fi
- if ((k>=j)); then
- tb6+=(K${pc[i]}${pc[j]}${pc[k]}vK${pc[l]}) # 4+2
- ((l>=k)) && tb6+=(K${pc[i]}${pc[j]}${pc[k]}${pc[l]}vK) # 5+1
- fi
+m=(P N B R Q K)
+for ((i=4; i>=0; i--)); do
+ tb345+=(K${m[i]}vK) # 2+1
+ for ((j=i; j>=0; j--)); do
+ tb345+=(K${m[i]}vK${m[j]} K${m[i]}${m[j]}vK) # 2+2, 3+1
+ for ((k=4; k>=0; k--)); do
+ tb345+=(K${m[i]}${m[j]}vK${m[k]}) # 3+2
+ ((k<=i)) || continue
+ for ((l=k; l>=0; l--)); do
+ ((k<i || l<=j)) && tb6+=(K${m[i]}${m[j]}vK${m[k]}${m[l]}) # 3+3
+ done
+ ((k<=j)) || continue
+ tb345+=(K${m[i]}${m[j]}${m[k]}vK) # 4+1
+ for ((l=4; l>=0; l--)); do
+ tb6+=(K${m[i]}${m[j]}${m[k]}vK${m[l]}) # 4+2
+ ((l<=k)) && tb6+=(K${m[i]}${m[j]}${m[k]}${m[l]}vK) # 5+1
done
done
done
@@ -43,7 +43,7 @@ for i in "${tb6[@]}"; do
SRC_URI+=" http://tablebase.sesse.net/syzygy/6-DTZ/${i}.rtbz"
done
SRC_URI+=" )"
-unset i j k l pc tb345 tb6
+unset i j k l m tb345 tb6
LICENSE="public-domain"
SLOT="0"