molmol-2k_p2-r4.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib prefix toolchain-funcs
  5. MY_PV="${PV/_p/.}.0"
  6. MY_P="${PN}-${MY_PV}"
  7. DESCRIPTION="Publication-quality molecular visualization package"
  8. HOMEPAGE="http://hugin.ethz.ch/wuthrich/software/molmol/index.html"
  9. SRC_URI="
  10. ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip/${MY_P}-src.tar.gz
  11. ftp://ftp.mol.biol.ethz.ch/software/MOLMOL/unix-gzip/${MY_P}-doc.tar.gz"
  12. LICENSE="molmol"
  13. SLOT="0"
  14. KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
  15. IUSE=""
  16. DEPEND="
  17. || (
  18. ( media-libs/mesa
  19. x11-libs/libGLw )
  20. media-libs/mesa[motif] )
  21. media-libs/libpng:0
  22. media-libs/tiff:0
  23. sys-libs/zlib
  24. virtual/glu
  25. virtual/jpeg:0
  26. x11-libs/libXpm
  27. x11-libs/motif:0
  28. x11-apps/xdpyinfo"
  29. RDEPEND="${DEPEND}"
  30. S="${WORKDIR}"
  31. MAKEOPTS="${MAKEOPTS} -j1"
  32. pkg_setup() {
  33. MMDIR="/usr/$(get_libdir)/molmol"
  34. }
  35. src_prepare() {
  36. rm -rf tiff*
  37. # Patch from http://pjf.net/science/molmol.html, where src.rpm is provided
  38. epatch "${FILESDIR}"/pjf_RH9_molmol2k2.diff
  39. epatch "${FILESDIR}"/prefix.patch
  40. eprefixify molmol
  41. epatch "${FILESDIR}"/ldflags.patch
  42. ln -s makedef.lnx "${S}"/makedef || die
  43. sed \
  44. -e "s:/bin/ksh:${EPREFIX}/bin/sh:" \
  45. -e "s:^MOLMOLHOME.*:MOLMOLHOME=${EPREFIX}/${MMDIR}:" \
  46. -i "${S}"/molmol || die
  47. sed \
  48. -e "s:^MCFLAGS.*:MCFLAGS = ${CFLAGS}:" \
  49. -e "s:^CC.*:CC = $(tc-getCC):" \
  50. -i "${S}"/makedef || die
  51. epatch "${FILESDIR}"/cast.patch
  52. epatch "${FILESDIR}"/libpng15.patch
  53. # patch from fink
  54. # fixes numerous bad bracings and hopefully the OGL bug 429974
  55. epatch "${FILESDIR}"/${P}-fink.patch
  56. tc-export AR
  57. }
  58. src_install() {
  59. dobin molmol
  60. exeinto ${MMDIR}
  61. newexe src/main/molmol molmol.lnx
  62. insinto ${MMDIR}
  63. doins -r auxil help macros man setup tips
  64. dodoc HISTORY README
  65. }