Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o, yngwin@g.o
Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in games-board/stockfish: stockfish-6.ebuild metadata.xml Manifest ChangeLog
Date: Fri, 06 Feb 2015 16:59:57
Message-Id: 54D4F2FB.9020300@gentoo.org
1 Ben de Groot (yngwin):
2 > yngwin 15/02/05 20:09:33
3 >
4 > Added: stockfish-6.ebuild metadata.xml Manifest ChangeLog
5 > Log:
6 > Initial commit (bug #318337)
7 >
8
9 >
10 > EAPI=5
11 > inherit toolchain-funcs
12 >
13
14 This breaks consistency. Now users cannot rely on games.eclass anymore.
15 We should either abandon it completely or follow it consistently.
16
17
18 > DESCRIPTION="The strongest chess engine in the world"
19
20 This isn't very informative. I'd suggest
21 DESCRIPTION="Free UCI chess engine derived from Glaurung 2.1"
22
23 > HOMEPAGE="http://stockfishchess.org/"
24
25 Probably add the github link here too.
26
27 > SRC_URI="https://stockfish.s3.amazonaws.com/${P}-src.zip"
28 >
29 > LICENSE="GPL-3"
30 > SLOT="0"
31 > KEYWORDS="~amd64 ~x86"
32 > IUSE="cpu_flags_x86_avx2 cpu_flags_x86_popcnt cpu_flags_x86_sse"
33 >
34 > DEPEND=""
35
36 unzip is missing from DEPEND
37
38 > RDEPEND=""
39 >
40 > S=${WORKDIR}/${P}-src/src
41 >
42 > src_prepare() {
43 > sed -e 's:-strip $(BINDIR)/$(EXE)::' -i Makefile
44 > }
45 >
46
47 missing "|| die"... I'd also rather make this a patch, so it doesn't
48 silently break on version bump
49
50 > src_compile() {
51 > local my_arch
52 > use x86 && my_arch=x86-32-old
53 > use cpu_flags_x86_sse && my_arch=x86-32
54 > use amd64 && my_arch=x86-64
55 > use cpu_flags_x86_popcnt && my_arch=x86-64-modern
56 > use cpu_flags_x86_avx2 && my_arch=x86-64-bmi2
57 >
58 > emake build ARCH=${my_arch} CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}"
59
60 This currently breaks all cpu flags, because it overwrites anything the
61 Makefile does to CXXFLAGS, including -msse and -DIS_64BIT and even other
62 flags that are not CPU specific (e.g. -DNDEBUG).
63
64 Fixing this should definitely be done in a revbump.
65
66 > }
67 >
68 > src_install() {
69 > emake PREFIX="${D}/usr" install
70 > dodoc ../AUTHORS ../Readme.md
71 > }

Replies