summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-07-09 11:53:57 +0200
committerDavid Seifert <soap@gentoo.org>2022-07-09 11:53:57 +0200
commit911c75e69d537dd9384a29f76a57fe9af143f13e (patch)
treeaec37f35f64af7af7156ff6ef537599a2068b72d /sci-biology
parentdev-java/jnr-netdb: Stabilize 1.2.0 arm64, #856901 (diff)
downloadgentoo-911c75e69d537dd9384a29f76a57fe9af143f13e.tar.gz
gentoo-911c75e69d537dd9384a29f76a57fe9af143f13e.tar.bz2
gentoo-911c75e69d537dd9384a29f76a57fe9af143f13e.zip
sci-biology/trnascan-se: improve makefile
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/trnascan-se/files/trnascan-se-1.31-makefile.patch140
-rw-r--r--sci-biology/trnascan-se/files/trnascan-se-1.31-portable-perl-shebangs.patch32
-rw-r--r--sci-biology/trnascan-se/trnascan-se-1.31-r2.ebuild (renamed from sci-biology/trnascan-se/trnascan-se-1.31-r1.ebuild)30
3 files changed, 182 insertions, 20 deletions
diff --git a/sci-biology/trnascan-se/files/trnascan-se-1.31-makefile.patch b/sci-biology/trnascan-se/files/trnascan-se-1.31-makefile.patch
new file mode 100644
index 000000000000..acf3c2a6d862
--- /dev/null
+++ b/sci-biology/trnascan-se/files/trnascan-se-1.31-makefile.patch
@@ -0,0 +1,140 @@
+--- a/Makefile
++++ b/Makefile
+@@ -20,9 +20,9 @@
+ PERLBIN = perl
+
+ ## where you want things installed
+-BINDIR = $(HOME)/bin
+-LIBDIR = $(HOME)/lib/tRNAscan-SE
+-MANDIR = $(HOME)/man
++BINDIR = $(EPREFIX)/usr/bin
++LIBDIR = $(EPREFIX)/usr/share/trnascan-se
++MANDIR = $(EPREFIX)/usr/share/man
+
+ ## NOTE !! If you later manually move the location of
+ ## binaries or data files in the BINDIR or LIBDIR directories,
+@@ -33,10 +33,8 @@
+ TEMPDIR = /tmp
+
+ ## your compiler
+-CC = gcc # GNU cc (if available) otherwise use vendor's cc
+
+ ## any special compiler flags you want
+-CFLAGS = -O # ok for most machines (remove -O for DEC OSF/1 cc compiler)
+
+ ## machine specific definitions
+ # You shouldn't need any. The specific #define's in squid are historical.
+@@ -58,7 +56,7 @@
+ #######
+
+ SHELL = /bin/sh
+-LIBS = -lm
++LIBS += -lm
+ .SUFFIXES : .c .o
+
+ DOCS = README MANUAL INSTALL COPYING GNULICENSE FILES Release.history
+@@ -109,20 +107,20 @@
+ all: $(PROGS) tRNAscan-SE setpaths
+
+ covels-SE: $(OBJ) scan_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o covels-SE scan_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o covels-SE scan_main.o $(OBJ) $(LIBS)
+
+ coves-SE: $(OBJ) score_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o coves-SE score_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o coves-SE score_main.o $(OBJ) $(LIBS)
+
+ eufindtRNA: $(SQUIDOBJ) pavesi.o eufind_main.o
+- $(CC) $(CFLAGS) -o eufindtRNA eufind_main.o \
++ $(CC) $(LDFLAGS) $(CFLAGS) -o eufindtRNA eufind_main.o \
+ pavesi.o $(SQUIDOBJ) $(LIBS)
+
+-trnascan-1.4: trnascan.o
+- $(CC) $(CFLAGS) -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4 trnascan.c
++trnascan-1.4: trnascan.c
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4 trnascan.c
+
+ tRNAscan-SE:
+- $(PERLDIR)/$(PERLBIN) checkversion.pl
++ $(PERLBIN) checkversion.pl
+ sed 's#/tmp#$(TEMPDIR)#g' tRNAscan-SE.src | \
+ sed 's#bindir = ""#bindir =\"$(BINDIR)/"#g' | \
+ sed 's#/usr/local/lib/tRNAscanSE#$(LIBDIR)#g' | \
+@@ -200,11 +198,11 @@
+ noambig: trnascan-1.4-NA eufindtRNA-NA
+
+ trnascan-1.4-NA: trnascan.o
+- $(CC) $(CFLAGS) -DNO_AMBIG -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4-NA trnascan.c
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -DNO_AMBIG -DTSCANDIR=\"$(LIBDIR)\" -o trnascan-1.4-NA trnascan.c
+
+ eufindtRNA-NA: $(SQUIDOBJ) eufind_main.o
+- $(CC) $(CFLAGS) -DNO_AMBIG -c -o pavesi-NA.o pavesi.c
+- $(CC) $(CFLAGS) -o eufindtRNA-NA eufind_main.o \
++ $(CC) $(CFLAGS) $(CPPFLAGS) -DNO_AMBIG -c -o pavesi-NA.o pavesi.c
++ $(CC) $(LDFLAGS) $(CFLAGS) -o eufindtRNA-NA eufind_main.o \
+ pavesi-NA.o $(SQUIDOBJ) $(LIBS)
+
+
+@@ -220,7 +218,7 @@
+ rmdir -ps $(MANDIR)
+
+ .c.o:
+- $(CC) $(CFLAGS) $(MDEFS) -c $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(MDEFS) -c $<
+
+ ## programs from Sean Eddy's sequence i/o function library not
+ ## needed for tRNAscan-SE but included for their utility
+@@ -233,16 +231,16 @@
+ cp $(UTILS) $(BINDIR)/.
+
+ reformat: $(SQUIDOBJ) reformat_main.o
+- $(CC) $(CFLAGS) $(MDEFS) -o reformat $(SQUIDOBJ) reformat_main.o $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(MDEFS) -o reformat $(SQUIDOBJ) reformat_main.o $(LIBS)
+
+ revcomp: $(SQUIDOBJ) revcomp_main.o
+- $(CC) $(CFLAGS) $(MDEFS) -o revcomp $(SQUIDOBJ) revcomp_main.o $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(MDEFS) -o revcomp $(SQUIDOBJ) revcomp_main.o $(LIBS)
+
+ seqstat: $(SQUIDOBJ) seqstat_main.o
+- $(CC) $(CFLAGS) $(MDEFS) -o seqstat $(SQUIDOBJ) seqstat_main.o $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(MDEFS) -o seqstat $(SQUIDOBJ) seqstat_main.o $(LIBS)
+
+ shuffle: $(SQUIDOBJ) shuffle_main.o
+- $(CC) $(CFLAGS) $(MDEFS) -o shuffle $(SQUIDOBJ) shuffle_main.o $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(MDEFS) -o shuffle $(SQUIDOBJ) shuffle_main.o $(LIBS)
+
+ ## other programs in Cove package (below) not needed for
+ ## tRNAscan-SE, but are included for users who wish to apply
+@@ -255,25 +253,25 @@
+ cp $(COVE_SUITE) $(BINDIR)/.
+
+ covea: $(OBJ) align_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o covea align_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o covea align_main.o $(OBJ) $(LIBS)
+
+ coveb: $(OBJ) build_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o coveb build_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o coveb build_main.o $(OBJ) $(LIBS)
+
+ covee: $(OBJ) emit_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o covee emit_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o covee emit_main.o $(OBJ) $(LIBS)
+
+ covet: $(OBJ) train_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o covet train_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o covet train_main.o $(OBJ) $(LIBS)
+
+ covels: $(OBJ) scan_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o covels scan_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o covels scan_main.o $(OBJ) $(LIBS)
+
+ coves: $(OBJ) score_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o coves score_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o coves score_main.o $(OBJ) $(LIBS)
+
+ structcheck: $(OBJ) structcheck_main.o
+- $(CC) $(CFLAGS) $(RFLAGS) -o structcheck structcheck_main.o $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(RFLAGS) -o structcheck structcheck_main.o $(OBJ) $(LIBS)
+
+
+ ## Maspar memory limits
diff --git a/sci-biology/trnascan-se/files/trnascan-se-1.31-portable-perl-shebangs.patch b/sci-biology/trnascan-se/files/trnascan-se-1.31-portable-perl-shebangs.patch
new file mode 100644
index 000000000000..187705e8b3a0
--- /dev/null
+++ b/sci-biology/trnascan-se/files/trnascan-se-1.31-portable-perl-shebangs.patch
@@ -0,0 +1,32 @@
+--- a/fasta2gsi.pl
++++ b/fasta2gsi.pl
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl
++#!/usr/bin/env perl
+
+ # Usage: fasta2gsi.perl <seqfile>
+ # Creates seqfile.gsi
+--- a/instman.pl
++++ b/instman.pl
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl
++#!/usr/bin/env perl
+
+ # Sean Eddy, Wed Jul 29 15:24:43 1992
+
+--- a/sstofa.pl
++++ b/sstofa.pl
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl
++#!/usr/bin/env perl
+
+
+ if ($#ARGV < 0) {
+--- a/tRNAscan-SE.src
++++ b/tRNAscan-SE.src
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl
++#!/usr/bin/env perl
+ #
+ # --------------------------------------------------------------------
+ # tRNAscan-SE: a program for improved detection of transfer RNA
diff --git a/sci-biology/trnascan-se/trnascan-se-1.31-r1.ebuild b/sci-biology/trnascan-se/trnascan-se-1.31-r2.ebuild
index cbbcb5f0e11e..f35c31b22798 100644
--- a/sci-biology/trnascan-se/trnascan-se-1.31-r1.ebuild
+++ b/sci-biology/trnascan-se/trnascan-se-1.31-r2.ebuild
@@ -14,22 +14,16 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
+RDEPEND="dev-lang/perl:="
+BDEPEND="${RDEPEND}"
+
PATCHES=(
- "${FILESDIR}"/${P}-ldflags.patch
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-portable-perl-shebangs.patch
)
-src_prepare() {
- default
-
- sed \
- -e "s:BINDIR = \$(HOME)/bin:BINDIR = ${EPREFIX}/usr/bin:" \
- -e "s:LIBDIR = \$(HOME)/lib/tRNAscan-SE:LIBDIR = ${EPRFIX}/usr/share/${PN}:" \
- -e "s:MANDIR = \$(HOME)/man:MANDIR = ${EPREFIX}/usr/share/man:" \
- -e "s:CC = gcc:CC = $(tc-getCC):" \
- -e "s;CFLAGS = -O;CFLAGS = ${CFLAGS};" \
- -i Makefile || die
-
- perl_set_version
+src_configure() {
+ tc-export CC
}
src_test() {
@@ -40,14 +34,10 @@ src_install() {
dobin covels-SE coves-SE eufindtRNA tRNAscan-SE trnascan-1.4
newman tRNAscan-SE.man tRNAscan-SE.man.1
+ dodoc MANUAL Manual.ps README Release.history
- dodoc MANUAL README Release.history
-
- insinto /usr/share/${PN}/
+ insinto /usr/share/trnascan-se
doins *.cm gcode.* Dsignal TPCsignal
- dodoc Manual.ps
-
- insinto ${VENDOR_LIB}
- doins -r tRNAscanSE
+ perl_domodule -r tRNAscanSE
}