svn commit: r327060 - in head/graphics: opencv opencv-core opencv/files
Baptiste Daroussin
bapt at FreeBSD.org
Thu Sep 12 13:00:13 UTC 2013
Author: bapt
Date: Thu Sep 12 13:00:12 2013
New Revision: 327060
URL: http://svnweb.freebsd.org/changeset/ports/327060
Log:
Fix build of opencv with libc++
share the CXXFLAGS between opencv-core and opencv
Added:
head/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp (contents, props changed)
Modified:
head/graphics/opencv-core/Makefile
head/graphics/opencv/Makefile
Modified: head/graphics/opencv-core/Makefile
==============================================================================
--- head/graphics/opencv-core/Makefile Thu Sep 12 12:25:25 2013 (r327059)
+++ head/graphics/opencv-core/Makefile Thu Sep 12 13:00:12 2013 (r327060)
@@ -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"
Modified: head/graphics/opencv/Makefile
==============================================================================
--- head/graphics/opencv/Makefile Thu Sep 12 12:25:25 2013 (r327059)
+++ head/graphics/opencv/Makefile Thu Sep 12 13:00:12 2013 (r327060)
@@ -28,6 +28,12 @@ NOT_FOR_ARCHS_REASON_sparc64= does not c
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
Added: head/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp Thu Sep 12 13:00:12 2013 (r327060)
@@ -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();
More information about the svn-ports-all
mailing list