htslib-1.0.ebuild 836 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib toolchain-funcs
  5. DESCRIPTION="C library for high-throughput sequencing data formats"
  6. HOMEPAGE="http://www.htslib.org/"
  7. SRC_URI="mirror://sourceforge/samtools/${PV}/${P}.tar.bz2"
  8. SLOT="0"
  9. LICENSE="MIT"
  10. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  11. IUSE="static-libs"
  12. src_prepare() {
  13. sed \
  14. -e "/libdir/s:lib$:$(get_libdir):g" \
  15. -i Makefile || die
  16. }
  17. src_compile() {
  18. emake \
  19. AR="$(tc-getAR)" \
  20. CC="$(tc-getCC)" \
  21. CFLAGS="${CFLAGS}" \
  22. LDFLAGS="${LDFLAGS}"
  23. }
  24. src_install() {
  25. emake \
  26. DESTDIR="${D}" \
  27. prefix="${EPREFIX}/usr" \
  28. install
  29. rm "${ED}/usr/share/man/man1/libhts.so.1" || die
  30. if ! use static-libs; then
  31. find "${ED}" -type f -name "*.a" -delete || die
  32. fi
  33. dodoc README
  34. }