reduce-3.13.080428-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=3
  4. inherit eutils toolchain-funcs
  5. MY_P="${PN}.${PV}.src"
  6. DESCRIPTION="Adds hydrogens to a Protein Data Bank (PDB) molecule structure file"
  7. HOMEPAGE="http://kinemage.biochem.duke.edu/software/reduce.php"
  8. SRC_URI="http://kinemage.biochem.duke.edu/downloads/software/reduce31/${MY_P}.tgz"
  9. LICENSE="richardson"
  10. SLOT="0"
  11. KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
  12. IUSE=""
  13. RDEPEND=""
  14. DEPEND="${RDEPEND}
  15. app-arch/unzip"
  16. S="${WORKDIR}/${MY_P}"
  17. src_prepare() {
  18. epatch \
  19. "${FILESDIR}"/${PV}-LDFLAGS.patch \
  20. "${FILESDIR}"/${PV}-CFLAGS.patch
  21. }
  22. src_compile() {
  23. DICT_DIR="/usr/share/reduce"
  24. DICT_FILE="reduce_het_dict.txt"
  25. emake \
  26. CC="$(tc-getCC)" \
  27. CXX="$(tc-getCXX)" \
  28. OPT="${CXXFLAGS}" \
  29. DICT_HOME="${EPREFIX}/${DICT_DIR}/${DICT_FILE}" \
  30. || die "make failed"
  31. }
  32. src_install() {
  33. dobin "${S}"/reduce_src/reduce || die
  34. insinto ${DICT_DIR}
  35. doins "${S}"/${DICT_FILE} "${S}"/reduce_wwPDB_het_dict.txt || die
  36. dodoc README.usingReduce.txt || die
  37. }
  38. pkg_postinst() {
  39. elog "To use the PDBv3 dictionary instead of PDBv2, set the environment"
  40. elog "variable REDUCE_HET_DICT to ${EPREFIX}/usr/share/reduce/reduce_wwPDB_het_dict.txt"
  41. }