diff options
author | David Seifert <soap@gentoo.org> | 2016-10-09 16:52:52 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-10-09 17:14:23 +0200 |
commit | 895b3abfbdacf52dbd7a0e817eb7ebf101ce55a7 (patch) | |
tree | 7cafda14d91b81beace2f8dfdbfdcf343e314ce4 /sci-biology | |
parent | sci-biology/hmmer: Version bump to 3.1_beta2 (diff) | |
download | gentoo-895b3abfbdacf52dbd7a0e817eb7ebf101ce55a7.tar.gz gentoo-895b3abfbdacf52dbd7a0e817eb7ebf101ce55a7.tar.bz2 gentoo-895b3abfbdacf52dbd7a0e817eb7ebf101ce55a7.zip |
sci-biology/hmmer: Properly SLOT=2 hmmer-2.3.2
Gentoo-bug: 328911, 586960
* EAPI=6
* Introduce SLOT=2 and rename binaries and
static libraries
Package-Manager: portage-2.3.1
Diffstat (limited to 'sci-biology')
3 files changed, 205 insertions, 0 deletions
diff --git a/sci-biology/hmmer/files/hmmer-2.3.2-fix-build-system-destdir.patch b/sci-biology/hmmer/files/hmmer-2.3.2-fix-build-system-destdir.patch new file mode 100644 index 000000000000..110c61f11821 --- /dev/null +++ b/sci-biology/hmmer/files/hmmer-2.3.2-fix-build-system-destdir.patch @@ -0,0 +1,22 @@ +Make the build system respect DESTDIR, in order to allow staged builds. + +--- a/Makefile.in ++++ b/Makefile.in +@@ -109,13 +109,13 @@ + # installs man pages in MANDIR/man1/ (e.g. if MANSUFFIX is 1) + # Creates these directories if they don't exist. + install: +- mkdir -p ${BINDIR} +- -mkdir -p ${MANDIR}/man${MANSUFFIX} ++ mkdir -p ${DESTDIR}${BINDIR} ++ -mkdir -p ${DESTDIR}${MANDIR}/man${MANSUFFIX} + for file in $(PROGS) $(PVMPROGS); do\ +- cp src/$$file $(BINDIR)/;\ ++ cp src/$$file ${DESTDIR}$(BINDIR)/;\ + done + -for file in hmmer $(PROGS); do\ +- $(INSTMAN) documentation/man/$$file.man $(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\ ++ $(INSTMAN) documentation/man/$$file.man ${DESTDIR}$(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\ + done + + # uninstall: Reverses the steps of "make install". diff --git a/sci-biology/hmmer/files/hmmer-2.3.2-fix-perl-shebangs.patch b/sci-biology/hmmer/files/hmmer-2.3.2-fix-perl-shebangs.patch new file mode 100644 index 000000000000..783d0530aa7a --- /dev/null +++ b/sci-biology/hmmer/files/hmmer-2.3.2-fix-perl-shebangs.patch @@ -0,0 +1,108 @@ +* Fix ancient perl 4 modules that are long gone. +* Fix perl shebangs to be portable and usable on Prefix. +See also: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/ + +--- a/squid/Testsuite/bug-1-sfetch-paths ++++ b/squid/Testsuite/bug-1-sfetch-paths +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + # Test for bug #1: sfetch/SSI path bug. + # sfetch can't follow paths out of current directory if it's using +--- a/squid/Testsuite/x-base-afetch ++++ b/squid/Testsuite/x-base-afetch +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/squid/Testsuite/x-base-alistat ++++ b/squid/Testsuite/x-base-alistat +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/squid/Testsuite/x-base-seqstat ++++ b/squid/Testsuite/x-base-seqstat +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/squid/Testsuite/x-base-sfetch ++++ b/squid/Testsuite/x-base-sfetch +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/squid/Testsuite/x-base-shuffle ++++ b/squid/Testsuite/x-base-shuffle +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/squid/Testsuite/x-base-sindex ++++ b/squid/Testsuite/x-base-sindex +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/squid/Testsuite/x-base-sreformat ++++ b/squid/Testsuite/x-base-sreformat +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + use testsuite; + +--- a/testsuite/sqc ++++ b/testsuite/sqc +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + # sqc + # quality control script for exercising code, regression testing, +@@ -176,12 +176,11 @@ + # SRE, Tue Aug 6 11:16:39 2002 + # CVS $Id: sqc,v 1.3 2003/01/05 23:40:57 eddy Exp $ + +-require "getopts.pl"; +-require "importenv.pl"; ++use Getopt::Std; + + # Parse our command line + # +-&Getopts('mp:r:v'); ++getopts('mp:r:v'); + if ($opt_m) { $do_memtest = 1; } + if ($opt_p) { push @prepdirs, $opt_p; } + if ($opt_r) { push @olddirs, $opt_r; } +@@ -506,7 +505,7 @@ + # + sub tempname { + my ($dir, $name, $suffix); +- if ($TMPDIR) { $dir = $TMPDIR."/"; } else {$dir = "";} ++ if ($ENV{TMPDIR}) { $dir = $ENV{TMPDIR}."/"; } else {$dir = "";} + + foreach $suffix ("aa".."zz") { + $name = "$dir"."sre".$suffix.$$; +--- a/testsuite/test1-conversion.pl ++++ b/testsuite/test1-conversion.pl +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/env perl + + # Test hmmconvert. + # diff --git a/sci-biology/hmmer/hmmer-2.3.2-r4.ebuild b/sci-biology/hmmer/hmmer-2.3.2-r4.ebuild new file mode 100644 index 000000000000..7cecfe624732 --- /dev/null +++ b/sci-biology/hmmer/hmmer-2.3.2-r4.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="Sequence analysis using profile hidden Markov models" +LICENSE="GPL-2" +HOMEPAGE="http://hmmer.org/" +SRC_URI="http://eddylab.org/software/${PN}/${PV}/${P}.tar.gz" + +SLOT="2" +IUSE="altivec test threads" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +DEPEND="test? ( dev-lang/perl )" +RDEPEND="" + +PATCHES=( + "${FILESDIR}/${P}-fix-perl-shebangs.patch" + "${FILESDIR}/${P}-fix-build-system-destdir.patch" +) + +src_configure() { + # prevent stray environmental variable + # from causing issues in the test phase + unset TMPDIR + + econf \ + --enable-lfs \ + $(use_enable altivec) \ + $(use_enable threads) +} + +src_install() { + default + + newlib.a src/libhmmer.a libhmmer2.a + insinto /usr/include/hmmer2 + doins src/*.h + + dobin squid/{afetch,alistat,compalign,compstruct,revcomp,seqstat,seqsplit,sfetch,shuffle,sreformat,sindex,weight,translate} + dolib.a squid/libsquid.a + insinto /usr/include/hmmer2 + doins squid/*.h + + dodoc NOTES Userguide.pdf + newdoc 00README README + + # rename files due to collisions with hmmer-3 + # in order to make SLOTing possible + local i + + # first rename man pages... + pushd "${ED%/}"/usr/share/man/man1/ >/dev/null || die + for i in hmm*.1; do + mv ${i%.1}{,2}.1 || die + done + popd >/dev/null || die + + # ... then rename binaries + pushd "${ED%/}"/usr/bin/ >/dev/null || die + for i in hmm*; do + mv ${i}{,2} || die + done + popd >/dev/null || die +} + +pkg_postinst() { + elog "All ${P} binaries have been renamed, in order" + elog "to avoid collisions with hmmer-3. For instance" + elog + elog " hmmalign -> hmmalign2" + elog +} |