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 45DEE139085 for ; Tue, 10 Jan 2017 01:00:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86035E0CE7; Tue, 10 Jan 2017 01:00:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 65E05E0CE7 for ; Tue, 10 Jan 2017 01:00:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AF9E5341142 for ; Tue, 10 Jan 2017 01:00:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 20314261C for ; Tue, 10 Jan 2017 01:00:48 +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: <1484010037.cbe0d928b5c7dbe615e129da4d5079f46324aef8.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 X-VCS-Directories: sci-biology/megahit/ X-VCS-Committer: mmokrejs X-VCS-Committer-Name: Martin Mokrejs X-VCS-Revision: cbe0d928b5c7dbe615e129da4d5079f46324aef8 X-VCS-Branch: master Date: Tue, 10 Jan 2017 01:00:48 +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: b94d8992-b8f9-402b-860a-9265b0b7366d X-Archives-Hash: 92ee562b8bdac147cf8820658de73ca7 commit: cbe0d928b5c7dbe615e129da4d5079f46324aef8 Author: Martin Mokrejš fold natur cuni cz> AuthorDate: Tue Jan 10 01:00:37 2017 +0000 Commit: Martin Mokrejs fold natur cuni cz> CommitDate: Tue Jan 10 01:00:37 2017 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=cbe0d928 sci-biology/megahit: distinguish openmp compiler switches Package-Manager: Portage-2.3.3, Repoman-2.3.1 sci-biology/megahit/megahit-9999.ebuild | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sci-biology/megahit/megahit-9999.ebuild b/sci-biology/megahit/megahit-9999.ebuild index def7fd6..a23d2c2 100644 --- a/sci-biology/megahit/megahit-9999.ebuild +++ b/sci-biology/megahit/megahit-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -23,8 +23,20 @@ RDEPEND="${DEPEND} # use make use_gpu=1 to compile it and turn on --use-gpu to activate GPU acceleration when running megahit +pkg_setup() { + use openmp && ! tc-has-openmp && die "Please switch to an openmp compatible compiler" +} + src_prepare(){ default + if [[ $(tc-getCXX) =~ g++ ]]; then + local eopenmp=-fopenmp + elif [[ $(tc-getCXX) =~ cxx ]]; then + local eopenmp=-openmp + sed -e "s#-fopenmp#-openmp#" -i Makefile || die + else + elog "Cannot detect compiler type so not setting openmp support" + fi sed -e "s#^CXXFLAGS = -g -O2#CXXFLAGS = ${CFLAGS}#" -i Makefile || die }