frobby-0.9.0-r2.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs
  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:0=[cxx]"
  13. DEPEND="${RDEPEND}
  14. doc? ( virtual/latex-base )"
  15. S="${WORKDIR}/frobby_v${PV}"
  16. PATCHES=(
  17. "${FILESDIR}/${PN}-cflags-no-strip-soname.patch"
  18. "${FILESDIR}/${PN}-gcc-4.7.patch"
  19. "${FILESDIR}/${PN}-gmp-5.1.patch"
  20. )
  21. src_prepare() {
  22. default
  23. # CXXFLAGS are called CPPFLAGS
  24. sed "s/CPPFLAGS/CXXFLAGS/" -i Makefile || die
  25. }
  26. src_configure() {
  27. default
  28. # Makefile uses the value of CXX which may be defined in /etc/env,
  29. # breaking cross-compile.
  30. tc-export CXX
  31. }
  32. src_compile() {
  33. emake
  34. MODE=shared emake library
  35. use static-libs && emake library
  36. use doc && emake docPdf
  37. }
  38. src_install() {
  39. dobin bin/frobby
  40. dolib.so bin/libfrobby.so
  41. dosym libfrobby.so "${PREFIX}/usr/$(get_libdir)/libfrobby.so.0"
  42. use static-libs && dolib.a bin/libfrobby.a
  43. insinto /usr/include
  44. doins src/frobby.h
  45. insinto /usr/include/"${PN}"
  46. doins src/stdinc.h
  47. use doc && dodoc bin/manual.pdf
  48. }