cilk-5.4.6-r2.ebuild 970 B

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