commit:     da0ccdb61002b260e0c2a8acf67b1646fc072ab0
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 21 21:33:13 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Apr 21 21:34:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da0ccdb6

sci-libs/flann: Force C++11

Bug: https://bugs.gentoo.org/show_bug.cgi?id=614552
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sci-libs/flann/flann-1.9.1.ebuild | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/sci-libs/flann/flann-1.9.1.ebuild 
b/sci-libs/flann/flann-1.9.1.ebuild
index a625b8cdeed..cc7583379a9 100644
--- a/sci-libs/flann/flann-1.9.1.ebuild
+++ b/sci-libs/flann/flann-1.9.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-inherit cmake-utils cuda toolchain-funcs
+inherit cmake-utils cuda flag-o-matic toolchain-funcs
 
 DESCRIPTION="Fast approximate nearest neighbor searches in high dimensional 
spaces"
 HOMEPAGE="http://www.cs.ubc.ca/research/flann/";
@@ -29,13 +29,12 @@ DEPEND="${RDEPEND}
 # readd dependencies for test suite,
 # requires multiple ruby dependencies
 
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 pkg_setup() {
-       if use openmp; then
-               if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp ; then
-                       ewarn "OpenMP is not available in your current selected 
gcc"
-                       die "need openmp capable gcc"
-               fi
-       fi
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 }
 
 src_prepare() {
@@ -56,6 +55,8 @@ src_prepare() {
 }
 
 src_configure() {
+       append-cxxflags -std=c++11
+
        # python bindings are split
        # off into dev-python/pyflann
        local mycmakeargs=(

Reply via email to