consed-29.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit flag-o-matic toolchain-funcs
  5. DESCRIPTION="A genome sequence finishing program"
  6. HOMEPAGE="http://bozeman.mbt.washington.edu/consed/consed.html"
  7. SRC_URI="
  8. ${P}-sources.tar.gz
  9. ${P}-linux.tar.gz"
  10. LICENSE="phrap"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="examples"
  14. COMMON_DEPEND="
  15. x11-libs/libX11
  16. x11-libs/motif:0
  17. sci-biology/samtools:0.1-legacy
  18. "
  19. DEPEND="
  20. ${COMMON_DEPEND}
  21. virtual/pkgconfig
  22. "
  23. RDEPEND="
  24. ${COMMON_DEPEND}
  25. dev-lang/perl
  26. >=sci-biology/phred-071220-r1
  27. >=sci-biology/phrap-1.080812-r2
  28. "
  29. S="${WORKDIR}"
  30. RESTRICT="fetch"
  31. PATCHES=(
  32. "${FILESDIR}/${PN}-29-fix-build-system.patch"
  33. "${FILESDIR}/${PN}-29-fix-c++14.patch"
  34. "${FILESDIR}/${PN}-29-fix-qa.patch"
  35. "${FILESDIR}/${PN}-29-fix-perl-shebang.patch"
  36. )
  37. pkg_nofetch() {
  38. einfo "Please visit ${HOMEPAGE} and obtain the file"
  39. einfo "\"sources.tar.gz\", then rename it to \"${P}-sources.tar.gz\""
  40. einfo "and place it in ${DISTDIR},"
  41. einfo "obtain the file"
  42. einfo "\"consed_linux.tar.gz\", then rename it to \"${P}-linux.tar.gz\""
  43. einfo "and place it in ${DISTDIR}"
  44. }
  45. src_prepare() {
  46. default
  47. sed \
  48. -e "s!\$szPhredParameterFile = .*!\$szPhredParameterFile = \$ENV{'PHRED_PARAMETER_FILE'} || \'"${EPREFIX}"/usr/share/phred/phredpar.dat\';!" \
  49. -e "s:/usr/local/genome:${EPREFIX}/usr:" \
  50. -e "s:niceExe = \"/bin/nice\":niceExe = \"${EPREFIX}/usr/bin/nice\":" \
  51. -e "s:/wt1/gordon/genome:${EPREFIX}/usr/bin:" \
  52. -i scripts/* contributions/* || die
  53. }
  54. src_configure() {
  55. append-cflags -std=gnu99
  56. append-lfs-flags
  57. }
  58. src_compile() {
  59. emake \
  60. CC="$(tc-getCC)" \
  61. CXX="$(tc-getCXX)" \
  62. CFLAGS="${CFLAGS}" \
  63. CXXFLAGS="${CXXFLAGS}" \
  64. CPPFLAGS="${CPPFLAGS}" \
  65. LDFLAGS="${LDFLAGS}" \
  66. SAMTOOLS_CPPFLAGS="-I${EPREFIX}/usr/include/bam-0.1-legacy" \
  67. LIBS="-L${EPREFIX}/usr/$(get_libdir)" \
  68. X11_LIBS="$($(tc-getPKG_CONFIG) --libs x11)" \
  69. SAMTOOLS_LIBS="-lbam-0.1-legacy"
  70. }
  71. src_install() {
  72. dobin consed misc/{mktrace/mktrace,phd2fasta/phd2fasta,454/sff2scf} scripts/* contributions/*
  73. insinto /usr/lib/screenLibs
  74. doins misc/*.{fa*,seq}
  75. if use examples; then
  76. insinto /usr/share/${PN}/examples
  77. doins -r \
  78. standard polyphred autofinish assembly_view 454_newbler \
  79. align454reads align454reads_answer solexa_example \
  80. solexa_example_answer selectRegions selectRegionsAnswer
  81. fi
  82. cat > 99consed <<-_EOF_ || die
  83. CONSED_HOME=${EPREFIX}/usr
  84. CONSED_PARAMETERS=${EPREFIX}/etc/consedrc
  85. _EOF_
  86. doenvd 99consed
  87. dodoc README.txt *_announcement.txt
  88. }
  89. pkg_postinst() {
  90. einfo "Package documentation is available at"
  91. einfo "http://www.phrap.org/consed/distributions/README.${PV}.0.txt"
  92. }