frobby-0.9.0-r1.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils
  5. DESCRIPTION="Software system and project for computations with monomial ideals"
  6. HOMEPAGE="http://www.broune.com/frobby/"
  7. SRC_URI="http://www.broune.com/frobby/frobby_v${PV}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~arm x86"
  11. IUSE="doc static-libs"
  12. RDEPEND="dev-libs/gmp[cxx]"
  13. DEPEND="${RDEPEND}
  14. doc? ( virtual/latex-base )"
  15. S="${WORKDIR}/frobby_v${PV}"
  16. src_prepare() {
  17. epatch \
  18. "${FILESDIR}/${PN}-cflags-no-strip-soname.patch" \
  19. "${FILESDIR}/${PN}-gcc-4.7.patch" \
  20. "${FILESDIR}/${PN}-gmp-5.1.patch"
  21. # CXXFLAGS are called CPPFLAGS
  22. sed "s/CPPFLAGS/CXXFLAGS/" -i Makefile || die
  23. }
  24. src_compile() {
  25. # Makefile uses the value of CXX which may be defined in /etc/env,
  26. # breaking cross-compile.
  27. CXX=$(tc-getCXX) emake
  28. MODE=shared CXX=$(tc-getCXX) emake library
  29. use static-libs && CXX=$(tc-getCXX) emake library
  30. use doc && emake docPdf
  31. }
  32. src_install() {
  33. dobin bin/frobby
  34. dolib.so bin/libfrobby.so
  35. dosym libfrobby.so "${PREFIX}/usr/$(get_libdir)/libfrobby.so.0"
  36. use static-libs && dolib.a bin/libfrobby.a
  37. insinto /usr/include
  38. doins src/frobby.h
  39. insinto /usr/include/"${PN}"
  40. doins src/stdinc.h
  41. use doc && dodoc bin/manual.pdf
  42. }