sci-libs/flann: Force C++11
authorDavid Seifert <soap@gentoo.org>
Fri, 21 Apr 2017 21:33:13 +0000 (23:33 +0200)
committerDavid Seifert <soap@gentoo.org>
Fri, 21 Apr 2017 21:34:00 +0000 (23:34 +0200)
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

index a625b8cdeed02fdcf229aefc04c0b12182717dc6..cc7583379a9be83d38aa2496d940e3cab04eb530 100644 (file)
@@ -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=(