dev-lang/erlang: bump up to 22.3.4
[gentoo.git] / dev-lang / ispc / ispc-9999.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit toolchain-funcs python-any-r1
9
10 DESCRIPTION="Intel SPMD Program Compiler"
11 HOMEPAGE="https://ispc.github.com/"
12
13 if [[ ${PV} = *9999 ]]; then
14         inherit git-r3
15         EGIT_REPO_URI="https://github.com/ispc/ispc.git"
16         KEYWORDS=""
17 else
18         SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19         KEYWORDS="~amd64 ~x86"
20 fi
21
22 LICENSE="BSD BSD-2 UoI-NCSA"
23 SLOT="0"
24 IUSE="examples"
25
26 RDEPEND="
27         >=sys-devel/clang-3.0:*
28         >=sys-devel/llvm-3.0:*
29         "
30 DEPEND="
31         ${RDEPEND}
32         ${PYTHON_DEPS}
33         sys-devel/bison
34         sys-devel/flex
35         "
36
37 src_compile() {
38         #make all slient commands ("@") verbose and remove -Werror (ispc/ispc#1295)
39         sed -e '/^\t@/s/@//' -e 's/-Werror//' -i Makefile || die
40         emake LDFLAGS="${LDFLAGS}" OPT="${CXXFLAGS}" CXX="$(tc-getCXX)" CPP="$(tc-getCPP)"
41 }
42
43 src_install() {
44         dobin ispc
45         dodoc README.rst
46
47         if use examples; then
48                 insinto "/usr/share/doc/${PF}/examples"
49                 docompress -x "/usr/share/doc/${PF}/examples"
50                 doins -r examples/*
51         fi
52 }