From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6B0C01382C5 for ; Sun, 22 Apr 2018 22:34:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B062CE07E2; Sun, 22 Apr 2018 22:34:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7E44CE07E2 for ; Sun, 22 Apr 2018 22:34:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C73A6335C73 for ; Sun, 22 Apr 2018 22:34:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3AEB227C for ; Sun, 22 Apr 2018 22:34:30 +0000 (UTC) From: "Martin Mokrejs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Martin Mokrejs" Message-ID: <1524436463.42f362924ffcccf2cecfbd18f52bbb7eabf9f28e.mmokrejs@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/megahit/ X-VCS-Repository: proj/sci X-VCS-Files: sci-biology/megahit/megahit-9999.ebuild sci-biology/megahit/metadata.xml X-VCS-Directories: sci-biology/megahit/ X-VCS-Committer: mmokrejs X-VCS-Committer-Name: Martin Mokrejs X-VCS-Revision: 42f362924ffcccf2cecfbd18f52bbb7eabf9f28e X-VCS-Branch: master Date: Sun, 22 Apr 2018 22:34:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6f012d2a-f76f-41ca-a538-1e0192f4b416 X-Archives-Hash: ecb9409b19dfc4237a2a67061f869454 commit: 42f362924ffcccf2cecfbd18f52bbb7eabf9f28e Author: Martin Mokrejs fold natur cuni cz> AuthorDate: Sun Apr 22 22:34:23 2018 +0000 Commit: Martin Mokrejs fold natur cuni 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 @@ voutcn/megahit + + Enable NVIDIA GTX680 (4G memory) and Tesla K40c (12G memory) with CUDA 5.5, 6.0 and 6.5 +