* [gentoo-commits] proj/sci:master commit in: sci-biology/proda/, sci-biology/proda/files/
@ 2014-11-10 15:14 Justin Lecher
0 siblings, 0 replies; only message in thread
From: Justin Lecher @ 2014-11-10 15:14 UTC (permalink / raw
To: gentoo-commits
commit: 45e9860a0fc44c1194202dc3c0a45db80187f338
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 10 14:21:03 2014 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Nov 10 14:21:03 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=45e9860a
sci-biology/proda: Bump EAPI; Update for newer compiler
Package-Manager: portage-2.2.14
---
sci-biology/proda/ChangeLog | 6 +-
.../proda/files/proda-1.0-buildsystem.patch | 35 ++++++
sci-biology/proda/files/proda-1.0-newgcc.patch | 136 +++++++++++++++++++++
sci-biology/proda/proda-1.0.ebuild | 27 ++--
4 files changed, 191 insertions(+), 13 deletions(-)
diff --git a/sci-biology/proda/ChangeLog b/sci-biology/proda/ChangeLog
index 46cc65f..cedee64 100644
--- a/sci-biology/proda/ChangeLog
+++ b/sci-biology/proda/ChangeLog
@@ -1,7 +1,11 @@
# ChangeLog for sci-biology/proda
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 10 Nov 2014; Justin Lecher <jlec@gentoo.org> proda-1.0.ebuild,
+ +files/proda-1.0-buildsystem.patch, +files/proda-1.0-newgcc.patch:
+ Bump EAPI; Update for newer compiler
+
25 Jun 2011; Justin Lecher <jlec@gentoo.org> metadata.xml:
Fixed herd entry in metadata.xml
diff --git a/sci-biology/proda/files/proda-1.0-buildsystem.patch b/sci-biology/proda/files/proda-1.0-buildsystem.patch
new file mode 100644
index 0000000..71836c4
--- /dev/null
+++ b/sci-biology/proda/files/proda-1.0-buildsystem.patch
@@ -0,0 +1,35 @@
+ Makefile | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 76824c4..746b925 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@
+ # 1) Choose C++ compiler.
+ ################################################################################
+
+-CXX = g++
++CXX ?= g++
+
+ ################################################################################
+ # 2) Set C++ flags.
+@@ -18,7 +18,8 @@ CXX = g++
+ OTHERFLAGS = -DVERSION="\"1.00\""
+
+ # debug mode
+-CXXFLAGS = -g -W -Wall -pedantic $(OTHERFLAGS)
++CXXFLAGS ?= -g -W -Wall -pedantic
++CXXFLAGS += $(OTHERFLAGS)
+
+ # profile mode
+ #CXXFLAGS = -pg -W -Wall -pedantic $(OTHERFLAGS)
+@@ -38,7 +39,7 @@ OBJECTS = AlignedFragment.o Assert.o Block.o Consistency.o GlobalAlign.o LocalAl
+ all : $(TARGETS)
+
+ proda : $(OBJECTS)
+- $(CXX) $(CXXFLAGS) -lm $(OBJECTS) -o proda
++ $(CXX) $(CXXFLAGS) $(OBJECTS) -lm -o proda
+
+ Assert.o: Assert.h
+ AlignedFragment.o: AlignedFragment.h Utilities.h
diff --git a/sci-biology/proda/files/proda-1.0-newgcc.patch b/sci-biology/proda/files/proda-1.0-newgcc.patch
new file mode 100644
index 0000000..3ac199a
--- /dev/null
+++ b/sci-biology/proda/files/proda-1.0-newgcc.patch
@@ -0,0 +1,136 @@
+ AlignedFragment.cc | 1 +
+ AlignedFragment.h | 2 ++
+ Assert.cc | 2 +-
+ Assert.h | 4 ++--
+ Block.cc | 1 +
+ Main.cc | 1 +
+ MultiSequence.cc | 2 +-
+ PairAligner.cc | 2 ++
+ ProbModel.cc | 3 ++-
+ 9 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/AlignedFragment.cc b/AlignedFragment.cc
+index b553862..9c734b9 100644
+--- a/AlignedFragment.cc
++++ b/AlignedFragment.cc
+@@ -2,6 +2,7 @@
+ //
+ //////////////////////////////////////////////////////////////////////
+
++#include <stdlib.h>
+ #include "AlignedFragment.h"
+ #include "Assert.h"
+ #include "Utilities.h"
+diff --git a/AlignedFragment.h b/AlignedFragment.h
+index ffc4642..17ae615 100644
+--- a/AlignedFragment.h
++++ b/AlignedFragment.h
+@@ -8,6 +8,8 @@
+ #define ALIGNFRAGMENT_H
+
+ #include <vector>
++#include <string.h>
++#include <stdio.h>
+
+ class Fragment;
+ class AlignedFragment;
+diff --git a/Assert.cc b/Assert.cc
+index ac9a7df..449e00a 100644
+--- a/Assert.cc
++++ b/Assert.cc
+@@ -10,7 +10,7 @@
+ // Write out assertion error message
+ //////////////////////////////////////////////////////////////////////
+
+-int _ASSERT_FAILED (char *filename, int line_number, const char *error_msg){
++int _ASSERT_FAILED (const char *filename, int line_number, const char *error_msg){
+ fprintf (stderr, "Assertion failed in file \"%s\", line %d: %s\n",
+ filename, line_number, error_msg);
+ abort();
+diff --git a/Assert.h b/Assert.h
+index 0222d17..069705b 100644
+--- a/Assert.h
++++ b/Assert.h
+@@ -10,9 +10,9 @@
+ int _ASSERT_FAILED (char *filename, int line_number, const char *error_msg);
+
+ #ifdef NDEBUG
+-#define ASSERT(test,error_msg)
++#define ASSERT(test, error_msg)
+ #else
+-#define ASSERT(test,error_msg) (test ? 0 : _ASSERT_FAILED(__FILE__, __LINE__, error_msg))
++#define ASSERT(test, error_msg) (test ? 0 : _ASSERT_FAILED(__FILE__, __LINE__, error_msg))
+ #endif
+
+ #endif
+diff --git a/Block.cc b/Block.cc
+index 35b050d..a24ad0e 100644
+--- a/Block.cc
++++ b/Block.cc
+@@ -2,6 +2,7 @@
+ //
+ //////////////////////////////////////////////////////////////////////
+
++#include <stdlib.h>
+ #include "Block.h"
+ #include "AlignedFragment.h"
+ #include "Sequence.h"
+diff --git a/Main.cc b/Main.cc
+index 8ceded3..7cf1b75 100644
+--- a/Main.cc
++++ b/Main.cc
+@@ -5,6 +5,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <limits.h>
+ #include <vector>
+ #include "Assert.h"
+ #include "MultiSequence.h"
+diff --git a/MultiSequence.cc b/MultiSequence.cc
+index 86e493f..2b70723 100644
+--- a/MultiSequence.cc
++++ b/MultiSequence.cc
+@@ -386,7 +386,7 @@ void MultiSequence::WriteMFA (FILE *file) const {
+ //////////////////////////////////////////////////////////////////////
+
+ const char MultiSequence::ComputeAnnotation (const char *data, const int size) const {
+- static char *groups[47] = {
++ static const char *groups[47] = {
+
+ // Identities
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
+diff --git a/PairAligner.cc b/PairAligner.cc
+index 7fdc21f..8bbc4a5 100644
+--- a/PairAligner.cc
++++ b/PairAligner.cc
+@@ -4,6 +4,8 @@
+ // Implementation of PairAligner class
+ ////////////////////////////////////////////////////////////////////
+
++#include <string.h>
++#include <stdlib.h>
+ #include "PairAligner.h"
+ #include "Utilities.h"
+ #include "LocalAlign.h"
+diff --git a/ProbModel.cc b/ProbModel.cc
+index 6d74e3d..5d5a838 100644
+--- a/ProbModel.cc
++++ b/ProbModel.cc
+@@ -4,6 +4,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
+ #include "ProbModel.h"
+ #include "Utilities.h"
+
+@@ -30,7 +31,7 @@ const int TRANSITIONS[NUM_STATES][NUM_STATES] = {
+ { 0, 0, 0, 0, 0, 0, 1 }
+ };
+
+-char *ALPHABET = "ARNDCQEGHILKMFPSTWYV";
++const char *ALPHABET = "ARNDCQEGHILKMFPSTWYV";
+
+
+ float INIT_A = 0.9860202074;
diff --git a/sci-biology/proda/proda-1.0.ebuild b/sci-biology/proda/proda-1.0.ebuild
index 7365765..5a35693 100644
--- a/sci-biology/proda/proda-1.0.ebuild
+++ b/sci-biology/proda/proda-1.0.ebuild
@@ -2,7 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-inherit versionator
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs versionator
MY_PV=$(replace_all_version_separators '_')
@@ -12,21 +14,22 @@ SRC_URI="http://proda.stanford.edu/proda_${MY_PV}.tar.gz"
LICENSE="public-domain"
SLOT="0"
-IUSE=""
-KEYWORDS="~x86"
+IUSE="debug "
+KEYWORDS="~amd64 ~x86"
-DEPEND=""
-RDEPEND=""
+S="${WORKDIR}"/${PN}
-S="${WORKDIR}/${PN}"
+PATCHES=(
+ "${FILESDIR}"/${P}-newgcc.patch
+ "${FILESDIR}"/${P}-buildsystem.patch
+ )
-src_unpack() {
- unpack ${A}
- sed -i -e 's/^\(CXXFLAGS =\)/#\1/' \
- -e 's/#CXXFLAGS = \(-O3.*$(OTHERFLAGS) -funroll-loops\)/CXXFLAGS := ${CXXFLAGS} \1/' \
- "${S}/Makefile" || die "sed failed"
+src_prepare() {
+ epatch ${PATCHES[@]}
+ use debug || append-flags -DNDEBUG
+ tc-export CXX
}
src_install() {
- dobin proda
+ dobin ${PN}
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-10 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 15:14 [gentoo-commits] proj/sci:master commit in: sci-biology/proda/, sci-biology/proda/files/ Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox