1 |
commit: 81b7f2c2f3cccfa1d8d51eab895d2bc2b52526d5 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 24 23:54:16 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 24 23:54:34 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81b7f2c2 |
7 |
|
8 |
games-board/stockfish: new version 7 that respects $CC; remove old ones. |
9 |
|
10 |
There is a new version of this that compiles fine with the existing |
11 |
ebuilds. But the build system for this package has a whitelist of |
12 |
compilers that makes it hard to get it to respect $CC. Fortunately, |
13 |
there's a hack in the makefile to allow the package to build with |
14 |
Travis CI, and we can hijack it to force our compiler of choice to be |
15 |
used. |
16 |
|
17 |
The version 6 ebuilds have been removed, since they were never |
18 |
stabilized. |
19 |
|
20 |
Gentoo-Bug: 542932 |
21 |
|
22 |
Package-Manager: portage-2.2.28 |
23 |
|
24 |
games-board/stockfish/Manifest | 2 +- |
25 |
games-board/stockfish/stockfish-6-r1.ebuild | 60 ---------------------- |
26 |
.../{stockfish-6-r2.ebuild => stockfish-7.ebuild} | 38 ++++++++------ |
27 |
3 files changed, 24 insertions(+), 76 deletions(-) |
28 |
|
29 |
diff --git a/games-board/stockfish/Manifest b/games-board/stockfish/Manifest |
30 |
index 9142b4d..e3fc501 100644 |
31 |
--- a/games-board/stockfish/Manifest |
32 |
+++ b/games-board/stockfish/Manifest |
33 |
@@ -1 +1 @@ |
34 |
-DIST stockfish-6-src.zip 161183 SHA256 a69a371d3f84338cefde4575669bd930d186b046a10fa5ab0f8d1aed6cb204c3 SHA512 8381b7a8616281629f04c6dc4cbe5a279b06067f7af3faff271461f694122eeba9d83a0c4a295b9064142bcaa3b31eca8139b58eb9441684845aad45888402dc WHIRLPOOL 56672a5730ce1f9adef13b658e960f808a990752b749ab3c658e1dbdd54e81bbee9c32ab91c892cd6f8b91ad4d8fe5bcff2c5d0942616b5dda5e77c196ad5092 |
35 |
+DIST stockfish-7-src.zip 158788 SHA256 89f1bb855c9251c1c644156d82960c71aa68e837390367f5111aa756e0785f36 SHA512 e5f2bb5e1309db9bf8e89ed35d69c7cf1c63b9da5158dfb32faea33113569c337781e40ec3f4fc03760f1e17acfbb671ecc2eaf57dec1fd018173fe0ae6d70d1 WHIRLPOOL 201d405b977355be3326f21567b2b836522d8d021fdab028d74fb3dd21b5eb281825f28df56d35f6a85b0e91cad9f2f674775180715a96f11e85ad4a06f0d663 |
36 |
|
37 |
diff --git a/games-board/stockfish/stockfish-6-r1.ebuild b/games-board/stockfish/stockfish-6-r1.ebuild |
38 |
deleted file mode 100644 |
39 |
index df819ce..00000000 |
40 |
--- a/games-board/stockfish/stockfish-6-r1.ebuild |
41 |
+++ /dev/null |
42 |
@@ -1,60 +0,0 @@ |
43 |
-# Copyright 1999-2015 Gentoo Foundation |
44 |
-# Distributed under the terms of the GNU General Public License v2 |
45 |
-# $Id$ |
46 |
- |
47 |
-EAPI=5 |
48 |
-if [[ ${PV} == *9999* ]]; then |
49 |
- inherit git-r3 |
50 |
- EGIT_REPO_URI="git://github.com/official-stockfish/Stockfish.git" |
51 |
- KEYWORDS="" |
52 |
- S=${WORKDIR}/${P}/src |
53 |
-else |
54 |
- SRC_URI="https://stockfish.s3.amazonaws.com/${P}-src.zip" |
55 |
- KEYWORDS="~amd64 ~x86" |
56 |
- S=${WORKDIR}/${P}-src/src |
57 |
-fi |
58 |
- |
59 |
-DESCRIPTION="Free UCI chess engine, claimed to be the strongest in the world" |
60 |
-HOMEPAGE="http://stockfishchess.org/" |
61 |
- |
62 |
-LICENSE="GPL-3" |
63 |
-SLOT="0" |
64 |
-IUSE="armv7 cpu_flags_x86_avx2 cpu_flags_x86_popcnt cpu_flags_x86_sse debug |
65 |
- general-32 general-64 +optimize" |
66 |
- |
67 |
-DEPEND="|| ( app-arch/unzip |
68 |
- app-arch/zip )" |
69 |
-RDEPEND="" |
70 |
- |
71 |
-src_prepare() { |
72 |
- # prevent pre-stripping |
73 |
- sed -e 's:-strip $(BINDIR)/$(EXE)::' -i Makefile || die |
74 |
-} |
75 |
- |
76 |
-src_compile() { |
77 |
- local my_arch |
78 |
- # generic unoptimized first |
79 |
- use general-32 && my_arch=general-32 |
80 |
- use general-64 && my_arch=general-64 |
81 |
- # x86 |
82 |
- use x86 && my_arch=x86-32-old |
83 |
- use cpu_flags_x86_sse && my_arch=x86-32 |
84 |
- # amd64 |
85 |
- use amd64 && my_arch=x86-64 |
86 |
- use cpu_flags_x86_popcnt && my_arch=x86-64-modern |
87 |
- # both bmi2 and avx2 are part of hni (haswell new instructions) |
88 |
- use cpu_flags_x86_avx2 && my_arch=x86-64-bmi2 |
89 |
- # other architectures |
90 |
- use armv7 && my_arch=armv7 |
91 |
- use ppc && my_arch=ppc |
92 |
- use ppc64 && my_arch=ppc64 |
93 |
- |
94 |
- emake build ARCH=${my_arch} \ |
95 |
- debug=$(usex debug "yes" "no") \ |
96 |
- optimize=$(usex optimize "yes" "no") |
97 |
-} |
98 |
- |
99 |
-src_install() { |
100 |
- emake PREFIX="${D}/usr" install |
101 |
- dodoc ../AUTHORS ../Readme.md |
102 |
-} |
103 |
|
104 |
diff --git a/games-board/stockfish/stockfish-6-r2.ebuild b/games-board/stockfish/stockfish-7.ebuild |
105 |
similarity index 60% |
106 |
rename from games-board/stockfish/stockfish-6-r2.ebuild |
107 |
rename to games-board/stockfish/stockfish-7.ebuild |
108 |
index c38f33f..ff0852b 100644 |
109 |
--- a/games-board/stockfish/stockfish-6-r2.ebuild |
110 |
+++ b/games-board/stockfish/stockfish-7.ebuild |
111 |
@@ -3,60 +3,68 @@ |
112 |
# $Id$ |
113 |
|
114 |
EAPI=6 |
115 |
-if [[ ${PV} == *9999* ]]; then |
116 |
- inherit git-r3 |
117 |
- EGIT_REPO_URI="git://github.com/official-stockfish/Stockfish.git" |
118 |
- KEYWORDS="" |
119 |
- S=${WORKDIR}/${P}/src |
120 |
-else |
121 |
- SRC_URI="https://stockfish.s3.amazonaws.com/${P}-src.zip" |
122 |
- KEYWORDS="~amd64 ~x86" |
123 |
- S=${WORKDIR}/${P}-src/src |
124 |
-fi |
125 |
+ |
126 |
+inherit toolchain-funcs |
127 |
|
128 |
DESCRIPTION="Free UCI chess engine, claimed to be the strongest in the world" |
129 |
HOMEPAGE="http://stockfishchess.org/" |
130 |
|
131 |
+SRC_URI="https://stockfish.s3.amazonaws.com/${P}-src.zip" |
132 |
LICENSE="GPL-3" |
133 |
SLOT="0" |
134 |
+KEYWORDS="~amd64 ~x86" |
135 |
IUSE="armv7 cpu_flags_x86_avx2 cpu_flags_x86_popcnt cpu_flags_x86_sse debug |
136 |
general-32 general-64 +optimize" |
137 |
|
138 |
-DEPEND="|| ( app-arch/unzip |
139 |
- app-arch/zip )" |
140 |
+DEPEND="|| ( app-arch/unzip app-arch/zip )" |
141 |
RDEPEND="" |
142 |
|
143 |
+S="${WORKDIR}/${P}-src/src" |
144 |
+ |
145 |
src_prepare() { |
146 |
default |
147 |
|
148 |
# prevent pre-stripping |
149 |
- sed -e 's:-strip $(BINDIR)/$(EXE)::' -i Makefile || die |
150 |
+ sed -e 's:-strip $(BINDIR)/$(EXE)::' -i Makefile \ |
151 |
+ || die 'failed to disable stripping in the Makefile' |
152 |
} |
153 |
|
154 |
src_compile() { |
155 |
local my_arch |
156 |
+ |
157 |
# generic unoptimized first |
158 |
use general-32 && my_arch=general-32 |
159 |
use general-64 && my_arch=general-64 |
160 |
+ |
161 |
# x86 |
162 |
use x86 && my_arch=x86-32-old |
163 |
use cpu_flags_x86_sse && my_arch=x86-32 |
164 |
+ |
165 |
# amd64 |
166 |
use amd64 && my_arch=x86-64 |
167 |
use cpu_flags_x86_popcnt && my_arch=x86-64-modern |
168 |
+ |
169 |
# both bmi2 and avx2 are part of hni (haswell new instructions) |
170 |
use cpu_flags_x86_avx2 && my_arch=x86-64-bmi2 |
171 |
+ |
172 |
# other architectures |
173 |
use armv7 && my_arch=armv7 |
174 |
use ppc && my_arch=ppc |
175 |
use ppc64 && my_arch=ppc64 |
176 |
|
177 |
- emake build ARCH=${my_arch} \ |
178 |
+ # Skip the "build" target and use "all" instead to avoid the config |
179 |
+ # sanity check (which would throw a fit about our compiler). There's |
180 |
+ # a nice hack in the Makefile that overrides the value of CXX with |
181 |
+ # COMPILER to support Travis CI and we abuse it to make sure that we |
182 |
+ # build with our compiler of choice. |
183 |
+ emake all ARCH="${my_arch}" \ |
184 |
+ COMP=$(tc-getCXX) \ |
185 |
+ COMPILER=$(tc-getCXX) \ |
186 |
debug=$(usex debug "yes" "no") \ |
187 |
optimize=$(usex optimize "yes" "no") |
188 |
} |
189 |
|
190 |
src_install() { |
191 |
- emake PREFIX="${D}/usr" install |
192 |
+ dobin "${PN}" |
193 |
dodoc ../AUTHORS ../Readme.md |
194 |
} |