Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 686802
Collapse All | Expand All

(-)ispc-1.11.0.ebuild (-74 / +17 lines)
Lines 1-11 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 1999-2018 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=7
4
EAPI=6
5
5
6
PYTHON_COMPAT=( python2_7 )
6
PYTHON_COMPAT=( python2_7 )
7
7
8
inherit cmake-utils python-any-r1
8
inherit toolchain-funcs python-any-r1
9
9
10
DESCRIPTION="Intel SPMD Program Compiler"
10
DESCRIPTION="Intel SPMD Program Compiler"
11
HOMEPAGE="https://ispc.github.com/"
11
HOMEPAGE="https://ispc.github.com/"
Lines 21-109 Link Here
21
21
22
LICENSE="BSD BSD-2 UoI-NCSA"
22
LICENSE="BSD BSD-2 UoI-NCSA"
23
SLOT="0"
23
SLOT="0"
24
24
IUSE="examples"
25
# FIXME:
26
# - add NVPTX support: fails to compile
27
# - re-add examples: fails to compile
28
IUSE="doc llvm_targets_AArch64 llvm_targets_ARM sanitize test"
29
30
# only one out of 10 tests passes
31
RESTRICT="test"
32
25
33
RDEPEND="
26
RDEPEND="
34
	sys-devel/clang:=[llvm_targets_AArch64=,llvm_targets_ARM=]
27
	>=sys-devel/clang-3.0:*
35
	sys-libs/ncurses:0=
28
	>=sys-devel/llvm-3.0:*
36
	sys-libs/zlib:=
29
	"
37
"
38
DEPEND="
30
DEPEND="
39
	${RDEPEND}
31
	${RDEPEND}
40
	${PYTHON_DEPS}
32
	${PYTHON_DEPS}
41
	doc? (
42
		app-doc/doxygen[dot(+)]
43
		media-fonts/freefont
44
	)
45
"
46
BDEPEND="
47
	sys-devel/bison
33
	sys-devel/bison
48
	sys-devel/flex
34
	sys-devel/flex
49
"
35
	"
50
51
DOCS=( README.md "${S}"/docs/{ReleaseNotes.txt,faq.rst,ispc.rst,news.rst,perf.rst,perfguide.rst} )
52
53
src_prepare() {
54
	# drop -Werror
55
	sed -e 's/-Werror//' -i CMakeLists.txt || die
56
57
	# fix path for dot binary
58
	if use doc; then
59
		sed -e 's|/usr/local/bin/dot|/usr/bin/dot|' -i "${S}"/doxygen.cfg || die
60
	fi
61
62
	cmake-utils_src_prepare
63
}
64
65
src_configure() {
66
	local mycmakeargs=(
67
		-DARM_ENABLED=$(usex llvm_targets_AArch64 $(usex llvm_targets_ARM))
68
		-DNVPTX_ENABLED=OFF
69
		-DISPC_INCLUDE_EXAMPLES=OFF
70
		-DISPC_INCLUDE_TESTS=$(usex test)
71
		-DISPC_INCLUDE_UTILS=ON
72
		-DISPC_NO_DUMPS=OFF
73
		-DISPC_PREPARE_PACKAGE=OFF
74
		-DISPC_STATIC_STDCXX_LINK=OFF
75
		-DISPC_STATIC_LINK=OFF
76
		-DISPC_USE_ASAN=$(usex sanitize)
77
	)
78
	cmake-utils_src_configure
79
}
80
36
81
src_compile() {
37
src_compile() {
82
	cmake-utils_src_compile
38
	#make all slient commands ("@") verbose and remove -Werror (ispc/ispc#1295)
83
39
	sed -e '/^\t@/s/@//' -e 's/-Werror//' -i Makefile || die
84
	if use doc; then
40
	emake LDFLAGS="${LDFLAGS}" OPT="${CXXFLAGS}" CXX="$(tc-getCXX)" CPP="$(tc-getCPP)"
85
		pushd "${S}" >/dev/null || die
86
		doxygen -u doxygen.cfg || die "failed to update doxygen.cfg"
87
		doxygen doxygen.cfg || die "failed to build documentation"
88
		popd >/dev/null || die
89
	fi
90
}
41
}
91
42
92
src_install() {
43
src_install() {
93
	cmake-utils_src_install
44
	dobin ispc
45
	dodoc README.rst
94
46
95
	if use doc; then
47
	if use examples; then
96
		local HTML_DOCS=( docs/doxygen/html/. )
48
		insinto "/usr/share/doc/${PF}/examples"
49
		docompress -x "/usr/share/doc/${PF}/examples"
50
		doins -r examples/*
97
	fi
51
	fi
98
	einstalldocs
99
100
#	if use examples; then
101
#		insinto "/usr/share/doc/${PF}/examples"
102
#		docompress -x "/usr/share/doc/${PF}/examples"
103
#		doins -r examples/*
104
#	fi
105
}
106
107
src_test() {
108
	eninja check-all
109
}
52
}

Return to bug 686802