* [gentoo-commits] proj/sci:master commit in: sci-biology/yaha/, sci-biology/yaha/files/
@ 2017-02-19 18:53 Justin Lecher
0 siblings, 0 replies; only message in thread
From: Justin Lecher @ 2017-02-19 18:53 UTC (permalink / raw
To: gentoo-commits
commit: b5c5e0e2e15acebc0982ededc771f6d22fee5f5c
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 19 18:53:34 2017 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 18:53:47 2017 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=b5c5e0e2
sci-biology/yaha: Fix build with gcc-5 and respect build tools
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
sci-biology/yaha/files/yaha-9999-buildsystem.patch | 61 ++++++++++++++++++++++
sci-biology/yaha/files/yaha-9999-fpermissive.patch | 16 ++++++
sci-biology/yaha/yaha-9999.ebuild | 18 +++++--
3 files changed, 90 insertions(+), 5 deletions(-)
diff --git a/sci-biology/yaha/files/yaha-9999-buildsystem.patch b/sci-biology/yaha/files/yaha-9999-buildsystem.patch
new file mode 100644
index 000000000..1f205ef16
--- /dev/null
+++ b/sci-biology/yaha/files/yaha-9999-buildsystem.patch
@@ -0,0 +1,61 @@
+diff --git a/Makefile b/Makefile
+index 44fa872..b844ba6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,24 +10,27 @@ SDIR := src
+ ODIR := obj
+ BDIR := bin
+
++CC ?= gcc
++CXX ?= g++
++CFLAGS ?= -Wall -O3
++CXXFLAGS ?= -Wall -O3
++LDFLAGS ?=
++
++CFLAGS += -MMD -MP -std=gnu99
++CXXFLAGS += -MMD -MP
++LDFLAGS += -pthread
++
+ # Set up flags depending on mode
+ ifdef USERMODE
+ PROG := yaha
+-CCFLAGS := -Wall -O3 -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM)
++CFLAGS += -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM)
++CXXFLAGS += -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM)
+ else
+ PROG := yaha$(BUILDNUM)
+-CCFLAGS := -Wall -Winline -O3 -g -D BUILDNUM=$(BUILDNUM)
++CFLAGS += -g -D BUILDNUM=$(BUILDNUM)
++CXXFLAGS += -g -D BUILDNUM=$(BUILDNUM)
+ endif
+
+-# Auto build dependency files.
+-CCFLAGS += -MMD -MP
+-
+-CC := gcc
+-CPP := g++
+-CFLAGS := $(CCFLAGS) -std=gnu99
+-CPPFLAGS := $(CCFLAGS)
+-LDFLAGS := -pthread
+-
+ # The list of object files.
+ OBJfiles := Main.o AlignArgs.o AlignHelpers.o AlignExtFrag.o AlignOutput.o BaseSeq.o Compress.o \
+ FileHelpers.o GraphPath.o Index.o Query.o QueryMatch.o QueryState.o SW.o Math.o
+@@ -45,7 +48,7 @@ $(BDIR):
+
+ # Link the program
+ $(BDIR)/$(PROG): $(OBJS)
+- $(CPP) $(LDFLAGS) -o $@ $(OBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(OBJS)
+
+ # Include the dependencies.
+ # The actual objects will be built by the below generic rules based on these dependencies.
+@@ -58,7 +61,7 @@ $(ODIR)/%.o: $(SDIR)/%.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+ $(ODIR)/%.o: $(SDIR)/%.cpp
+- $(CPP) $(CPPFLAGS) -c $< -o $@
++ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ .PHONY: clean
+ clean:
diff --git a/sci-biology/yaha/files/yaha-9999-fpermissive.patch b/sci-biology/yaha/files/yaha-9999-fpermissive.patch
new file mode 100644
index 000000000..bb9e4217c
--- /dev/null
+++ b/sci-biology/yaha/files/yaha-9999-fpermissive.patch
@@ -0,0 +1,16 @@
+ src/SW.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/SW.cpp b/src/SW.cpp
+index 57d2773..3a9c225 100644
+--- a/src/SW.cpp
++++ b/src/SW.cpp
+@@ -796,7 +796,7 @@ int findAGSBackwardExtensionCarefully(QueryState_t * QS, ROFF rOff, char * qStr
+ ////////////////////////
+
+ template <BOOL banded, BOOL extension, BOOL reverse, BOOL XCutoff>
+-int findAffineGapScore(QueryState_t * QS, char * qStr, SUINT qLen, char * rStr, SUINT rLen, EditOpList_t * list, SUINT * addedQLen = NULL, SUINT * addedRLen = NULL)
++int findAffineGapScore(QueryState_t * QS, char * qStr, SUINT qLen, char * rStr, SUINT rLen, EditOpList_t * list, SUINT * addedQLen, SUINT * addedRLen)
+ {
+ // As we will go row by row, then column by column, we do not need to store all of the V, E, and F arrays.
+ // Instead we will store only the previous row and column for each.
diff --git a/sci-biology/yaha/yaha-9999.ebuild b/sci-biology/yaha/yaha-9999.ebuild
index 699e0276e..c2186db3b 100644
--- a/sci-biology/yaha/yaha-9999.ebuild
+++ b/sci-biology/yaha/yaha-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=6
-inherit git-r3
+inherit flag-o-matic git-r3 toolchain-funcs
DESCRIPTION="DNA mapper for single-end reads to detect structural variants (SV)"
HOMEPAGE="https://github.com/GregoryFaust/yaha"
@@ -15,11 +15,19 @@ SLOT="0"
KEYWORDS=""
IUSE=""
-DEPEND=""
-RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${P}-fpermissive.patch
+ "${FILESDIR}"/${P}-buildsystem.patch
+)
-# TODO: respect CFLAGS/CXXFLAGS
-# https://github.com/GregoryFaust/yaha/issues/5
+src_prepare() {
+ default
+ append-cflags '-DCOMPILE_USER_MODE' '-DBUILDNUM=$(BUILDNUM)' -std=gnu99
+ append-cxxflags '-DCOMPILE_USER_MODE' '-DBUILDNUM=$(BUILDNUM)'
+ tc-export CC CXX
+ export CFLAGS
+ export CXXFLAGS
+}
src_install(){
dobin bin/yaha
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-19 18:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-19 18:53 [gentoo-commits] proj/sci:master commit in: sci-biology/yaha/, sci-biology/yaha/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