herwig++-2.7.1-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. AUTOTOOLS_AUTORECONF=1
  5. AUTOTOOLS_IN_SOURCE_BUILD=1
  6. inherit autotools-utils eutils flag-o-matic multilib
  7. MYP=Herwig++-${PV}
  8. DESCRIPTION="High-Energy Physics event generator"
  9. HOMEPAGE="http://herwig.hepforge.org/"
  10. SRC_URI="http://www.hepforge.org/archive/herwig/${MYP}.tar.bz2"
  11. SLOT="0/15"
  12. LICENSE="GPL-2"
  13. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  14. IUSE="c++11 fastjet static-libs"
  15. # >sci-physics/looptools-2.8 leads to misoperation
  16. # and failing tests (it lacks some symbols)
  17. RDEPEND="
  18. dev-libs/boost:0=
  19. sci-libs/gsl:0=
  20. <=sci-physics/looptools-2.8:0=
  21. ~sci-physics/thepeg-1.9.2:0=
  22. fastjet? ( sci-physics/fastjet:0= )"
  23. DEPEND="${RDEPEND}
  24. >=sys-devel/boost-m4-0.4_p20160328"
  25. S="${WORKDIR}/${MYP}"
  26. src_prepare() {
  27. epatch "${FILESDIR}"/${PN}-2.6.3-looptools.patch
  28. # fixes bug 570458, which is due to an outdated bundled boost.m4
  29. rm m4/boost.m4 || die
  30. find -name 'Makefile.am' -exec \
  31. sed -i -e '1ipkgdatadir=$(datadir)/herwig++' {} \; || die
  32. autotools-utils_src_prepare
  33. }
  34. src_configure() {
  35. use prefix && \
  36. append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/ThePEG
  37. local myeconfargs=(
  38. --with-boost="${EPREFIX}"/usr
  39. --with-thepeg="${EPREFIX}"/usr
  40. $(use_enable c++11 stdcxx11)
  41. $(use_with fastjet fastjet "${EPREFIX}"/usr)
  42. )
  43. autotools-utils_src_configure
  44. }
  45. src_install() {
  46. autotools-utils_src_install
  47. sed -i -e "s|${ED}||g" "${ED}"/usr/share/herwig++/defaults/PDF.in || die
  48. sed -i -e "s|${ED}||g" "${ED}"/usr/share/herwig++/HerwigDefaults.rpo || die
  49. }