diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-09-12 13:00:12 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2013-09-12 13:00:12 +0000 |
commit | 18e111e32f4c3e15178be68a9104753a900c0cca (patch) | |
tree | e1eb47eb6d033d2cca8636cc5e033f7c088e2b78 /graphics | |
parent | Fix build with libc++ (diff) |
Fix build of opencv with libc++
share the CXXFLAGS between opencv-core and opencv
Notes
Notes:
svn path=/head/; revision=327060
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/opencv-core/Makefile | 5 | ||||
-rw-r--r-- | graphics/opencv/Makefile | 6 | ||||
-rw-r--r-- | graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp | 11 |
3 files changed, 17 insertions, 5 deletions
diff --git a/graphics/opencv-core/Makefile b/graphics/opencv-core/Makefile index f8c078f2d49a..50dd345f984d 100644 --- a/graphics/opencv-core/Makefile +++ b/graphics/opencv-core/Makefile @@ -4,9 +4,4 @@ _BUILDING_OPENCV_CORE= yes MASTERDIR= ${.CURDIR}/../opencv -_COMPVERSION!= ${CC} --version -.if ${_COMPVERSION:Mclang} -CXXFLAGS+= -std=gnu++11 -Wno-error -Wno-c++11-narrowing -.endif - .include "${MASTERDIR}/Makefile" diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile index f5e7ecc192d2..7d6203567997 100644 --- a/graphics/opencv/Makefile +++ b/graphics/opencv/Makefile @@ -28,6 +28,12 @@ NOT_FOR_ARCHS_REASON_sparc64= does not compile on sparc64 DATADIR= ${PREFIX}/share/OpenCV PLIST_SUB+= VERSION=${DISTVERSION} +_COMPVERSION!= ${CC} --version +.if ${_COMPVERSION:Mclang} +USE_CXXSTD= gnu++11 +CXXFLAGS+= -Wno-error -Wno-c++11-narrowing +.endif + .if !defined(_BUILDING_OPENCV_CORE) && !defined(_BUILDING_OPENCV_PYTHON) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-opencv LIB_DEPENDS+= opencv_core.2:${PORTSDIR}/graphics/opencv-core diff --git a/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp b/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp new file mode 100644 index 000000000000..45e93d010363 --- /dev/null +++ b/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp @@ -0,0 +1,11 @@ +--- samples/cpp/bagofwords_classification.cpp.orig 2011-09-12 20:20:43.000000000 +0200 ++++ samples/cpp/bagofwords_classification.cpp 2013-09-12 14:57:38.068066669 +0200 +@@ -1814,7 +1814,7 @@ + void VocData::readFileToString(const string filename, string& file_contents) + { + std::ifstream ifs(filename.c_str()); +- if (ifs == false) CV_Error(CV_StsError,"could not open text file"); ++ if (!ifs.is_open()) CV_Error(CV_StsError,"could not open text file"); + + stringstream oss; + oss << ifs.rdbuf(); |