public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Martin Mokrejs" <mmokrejs@fold.natur.cuni.cz>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/megahit/
Date: Sun, 22 Apr 2018 22:34:30 +0000 (UTC)	[thread overview]
Message-ID: <1524436463.42f362924ffcccf2cecfbd18f52bbb7eabf9f28e.mmokrejs@gentoo> (raw)

commit:     42f362924ffcccf2cecfbd18f52bbb7eabf9f28e
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sun Apr 22 22:34:23 2018 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sun Apr 22 22:34:23 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=42f36292

sci-biology/megahit: respect cuda USE flag

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 sci-biology/megahit/megahit-9999.ebuild | 27 +++++++++++++++++++++------
 sci-biology/megahit/metadata.xml        |  3 +++
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/sci-biology/megahit/megahit-9999.ebuild b/sci-biology/megahit/megahit-9999.ebuild
index 2fd8fa242..e403604ca 100644
--- a/sci-biology/megahit/megahit-9999.ebuild
+++ b/sci-biology/megahit/megahit-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-inherit git-r3 toolchain-funcs
+inherit git-r3 toolchain-funcs eutils
 
 DESCRIPTION="Metagenome assembler using succinct de Bruijn graph approach with CUDA"
 HOMEPAGE="https://github.com/voutcn/megahit
@@ -13,14 +13,14 @@ EGIT_REPO_URI="https://github.com/voutcn/megahit.git"
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS=""
-IUSE="+openmp"
+IUSE="+openmp cuda"
 
 DEPEND=""
 RDEPEND="${DEPEND}
-	sys-libs/zlib"
+	sys-libs/zlib
+	cuda? ( >=dev-util/nvidia-cuda-toolkit-5 dev-libs/cudnn )"
 # >=gcc-4.4
-
-# use make use_gpu=1 to compile it and turn on --use-gpu to activate GPU acceleration when running megahit
+# contains bundled copy og idba from https://github.com/loneknightpy/idba
 
 pkg_setup() {
 	use openmp && ! tc-has-openmp && die "Please switch to an openmp compatible compiler"
@@ -36,10 +36,25 @@ src_prepare(){
 	else
 		elog "Cannot detect compiler type so not setting openmp support"
 	fi
+	if use cuda; then
+		local makeopts="use_gpu=1"
+	else
+		local makeopts=""
+	fi
 	sed -e "s#^CXXFLAGS = -g -O2#CXXFLAGS = ${CFLAGS}#" -i Makefile || die
 }
 
+src_compile(){
+	emake $makeopts
+}
+
 src_install(){
 	dobin megahit megahit_toolkit megahit_sdbg_build megahit_asm_core
 	dodoc README.md
 }
+
+pkg_postinst(){
+	einfo "The maximum k-mer size is 255. You can edit kMaxK in definitions.h"
+	einfo "and recompile, eventually"
+	einfo "If you enabled GPU then use 'megahit --use-gpu' to activate it."
+}

diff --git a/sci-biology/megahit/metadata.xml b/sci-biology/megahit/metadata.xml
index bbab8b46d..a4779f691 100644
--- a/sci-biology/megahit/metadata.xml
+++ b/sci-biology/megahit/metadata.xml
@@ -12,4 +12,7 @@
 	<upstream>
 		<remote-id type="github">voutcn/megahit</remote-id>
 	</upstream>
+	<use>
+		<flag name="cuda">Enable NVIDIA GTX680 (4G memory) and Tesla K40c (12G memory) with CUDA 5.5, 6.0 and 6.5</flag>
+	</use>
 </pkgmetadata>


             reply	other threads:[~2018-04-22 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22 22:34 Martin Mokrejs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-06 12:17 [gentoo-commits] proj/sci:master commit in: sci-biology/megahit/ Andrew Ammerlaan
2017-01-10  1:00 Martin Mokrejs
2016-04-10 21:23 Martin Mokrejs

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=1524436463.42f362924ffcccf2cecfbd18f52bbb7eabf9f28e.mmokrejs@gentoo \
    --to=mmokrejs@fold.natur.cuni.cz \
    --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