public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/trnascan-se/, sci-biology/trnascan-se/files/
Date: Sat,  9 Jul 2022 09:54:04 +0000 (UTC)	[thread overview]
Message-ID: <1657360437.911c75e69d537dd9384a29f76a57fe9af143f13e.soap@gentoo> (raw)

commit:     911c75e69d537dd9384a29f76a57fe9af143f13e
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  9 09:53:57 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jul  9 09:53:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=911c75e6

sci-biology/trnascan-se: improve makefile

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/trnascan-se-1.31-makefile.patch          | 140 +++++++++++++++++++++
 .../trnascan-se-1.31-portable-perl-shebangs.patch  |  32 +++++
 ...e-1.31-r1.ebuild => trnascan-se-1.31-r2.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
similarity index 55%
rename from sci-biology/trnascan-se/trnascan-se-1.31-r1.ebuild
rename to 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
 }


             reply	other threads:[~2022-07-09  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09  9:54 David Seifert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-09  9:54 [gentoo-commits] repo/gentoo:master commit in: sci-biology/trnascan-se/, sci-biology/trnascan-se/files/ David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1657360437.911c75e69d537dd9384a29f76a57fe9af143f13e.soap@gentoo \
    --to=soap@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox