media-libs/ffmpegsource: add compiler check for C++11 support
authorIlya Tumaykin <itumaykin@gmail.com>
Sat, 9 Jan 2016 19:40:23 +0000 (22:40 +0300)
committerIan Delaney <idella4@gentoo.org>
Sun, 10 Jan 2016 01:58:52 +0000 (09:58 +0800)
Package-Manager: portage-2.2.26

media-libs/ffmpegsource/ffmpegsource-9999.ebuild

index 56009a4e259c35ebc03407433c5500ffb4e591b3..f057f8af19356171c94464d56a3758184367b0dd 100644 (file)
@@ -6,7 +6,7 @@ EAPI=5
 
 AUTOTOOLS_AUTORECONF=1
 
-inherit autotools-utils git-r3
+inherit autotools-utils flag-o-matic git-r3
 
 DESCRIPTION="A libav/ffmpeg based source library for easy frame accurate access"
 HOMEPAGE="https://github.com/FFMS/ffms2"
@@ -25,3 +25,9 @@ RDEPEND="
 DEPEND="${RDEPEND}
        virtual/pkgconfig
 "
+
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
+               die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
+       fi
+}