molscript-2.1.2-r2.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Display molecular 3D structures, such as proteins, in both schematic and detailed representations"
  6. HOMEPAGE="http://www.avatar.se/molscript/"
  7. SRC_URI="${P}.tar.gz"
  8. LICENSE="glut molscript"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
  11. IUSE=""
  12. DEPEND="
  13. media-libs/freeglut
  14. media-libs/gd:2=
  15. media-libs/libpng:0=
  16. virtual/jpeg:0=
  17. || (
  18. x11-libs/libXmu
  19. x11-libs/libXext
  20. x11-libs/libX11
  21. )"
  22. RDEPEND="${DEPEND}"
  23. RESTRICT="fetch"
  24. pkg_nofetch() {
  25. elog "Please visit ${HOMEPAGE}"
  26. elog "and get ${A}."
  27. elog "Place it in ${DISTDIR}"
  28. }
  29. src_prepare() {
  30. epatch \
  31. "${FILESDIR}"/fix-makefile-shared.patch \
  32. "${FILESDIR}"/${PV}-ldflags.patch \
  33. "${FILESDIR}"/${PV}-prll.patch \
  34. "${FILESDIR}"/${PV}-libpng15.patch
  35. # Provide glutbitmap.h, because freeglut doesn't have it
  36. cp "${FILESDIR}"/glutbitmap.h "${S}"/clib/ || die
  37. # Stop an incredibly hacky include
  38. sed \
  39. -e 's:<../lib/glut/glutbitmap.h>:"glutbitmap.h":g' \
  40. -i "${S}"/clib/ogl_bitmap_character.c || die
  41. }
  42. src_compile() {
  43. # Prefix of programs it links with
  44. export FREEWAREDIR="${EPREFIX}/usr"
  45. ln -s Makefile.complete Makefile || die
  46. emake \
  47. CC="$(tc-getCC)" \
  48. COPT="${CFLAGS}"
  49. }
  50. src_install() {
  51. dobin molscript molauto
  52. dohtml "${S}"/doc/*.html
  53. }