Drop $Id$ per council decision in bug #611234.
[gentoo.git] / dev-lang / cilk / cilk-5.4.6-r2.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools flag-o-matic
6
7 DESCRIPTION="Language for multithreaded parallel programming based on ANSI C"
8 HOMEPAGE="http://supertech.csail.mit.edu/cilk"
9 SRC_URI="http://supertech.csail.mit.edu/${PN}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
14 IUSE="doc examples static-libs"
15
16 PATCHES=(
17         "${FILESDIR}/${P}-autotools.patch"
18 )
19
20 src_prepare() {
21         # fix #571060 by restoring pre-GCC5 inline semantics
22         append-cflags -std=gnu89
23         append-cppflags -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200809L
24         replace-flags -O[2-9] -O1
25
26         default
27         eautoreconf
28 }
29
30 src_configure() {
31         econf \
32                 --with-perfctr=no \
33                 $(use_enable static-libs static)
34 }
35
36 src_install() {
37         emake DESTDIR="${D}" install
38         dodoc NEWS README THANKS
39         use doc && dodoc doc/manual.pdf
40         if use examples; then
41                 insinto /usr/share/doc/${PF}
42                 doins -r examples
43         fi
44 }