diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2013-10-22 22:03:28 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2013-10-22 22:03:28 +0000 |
commit | e496edf8b6242e28b359cae6958e6b4927aa1666 (patch) | |
tree | 7a403317bdefd4c7d4a7d0973a6da6af48e07a0d /graphics/opencv | |
parent | d7192bb8e4a1ca64b7037f5d71f981d92e323a92 (diff) | |
download | ports-e496edf8b6242e28b359cae6958e6b4927aa1666.tar.gz ports-e496edf8b6242e28b359cae6958e6b4927aa1666.zip |
Notes
Diffstat (limited to 'graphics/opencv')
4 files changed, 69 insertions, 10 deletions
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile index f42a00c87863..ccb34c0a19d0 100644 --- a/graphics/opencv/Makefile +++ b/graphics/opencv/Makefile @@ -17,7 +17,8 @@ LICENSE_FILE= ${WRKSRC}/doc/license.txt WANT_GSTREAMER= yes MAKE_JOBS_UNSAFE= yes USE_BZIP2= yes -USES= cmake pkgconfig +USES= compiler:features cmake pkgconfig +USE_DOS2UNIX= yes USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/OpenCV-${DISTVERSION} @@ -28,12 +29,6 @@ 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+= libopencv_core.so.2:${PORTSDIR}/graphics/opencv-core @@ -41,14 +36,14 @@ LDFLAGS+= -L${LOCALBASE}/lib -lopencv_core PORTDOCS= * -OPTIONS_DEFINE= EIGEN2 FFMPEG GSTREAMER GTK2 JASPER JPEG OPENEXR PNG \ +OPTIONS_DEFINE= EIGEN3 FFMPEG GSTREAMER GTK2 JASPER JPEG OPENEXR PNG \ QT4 TBB TIFF V4L XINE EXAMPLES OPTIONS_DEFAULT= EIGEN3 JASPER JPEG PNG TIFF V4L EIGEN3_DESC= Eigen 3 support EIGEN3_BUILD_DEPENDS= ${LOCALBASE}/include/eigen3/Eigen/Eigen:${PORTSDIR}/math/eigen3 EIGEN3_CMAKE_ON= -DWITH_EIGEN:BOOL=On -EIGEN3_CMAKE_OFF= -DDWITH_EIGEN:BOOL=Off +EIGEN3_CMAKE_OFF= -DWITH_EIGEN:BOOL=Off FFMPEG_LIB_DEPENDS= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0 FFMPEG_CMAKE_ON= -DWITH_FFMPEG:BOOL=On @@ -143,7 +138,7 @@ RUN_DEPENDS+= ${PYNUMPY} CMAKE_ARGS+= -DBUILD_EXAMPLES:BOOL=Off \ -DINSTALL_PYTHON_EXAMPLES:BOOL=Off \ -DBUILD_TESTS:BOOL=Off \ - -DDWITH_EIGEN2:BOOL=Off \ + -DWITH_EIGEN:BOOL=Off \ -DWITH_FFMPEG:BOOL=Off \ -DWITH_GSTREAMER:BOOL=Off \ -DWITH_GTK:BOOL=Off \ @@ -169,6 +164,11 @@ CMAKE_ARGS+= -DBUILD_NEW_PYTHON_SUPPORT:BOOL=Off .include <bsd.port.pre.mk> +.if ${COMPILER_TYPE}=="clang" +USE_CXXSTD= c++11 +CXXFLAGS+= -stdlib=libc++ -Wno-error -Wno-c++11-narrowing +.endif + post-patch: @${MKDIR} ${CONFIGURE_WRKSRC} @${REINPLACE_CMD} -e 's:set(OPENCV_SOVERSION.*:set(OPENCV_SOVERSION "$${OPENCV_VERSION_MAJOR}"):' \ diff --git a/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp b/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp new file mode 100644 index 000000000000..51b0ad576920 --- /dev/null +++ b/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp @@ -0,0 +1,37 @@ +--- ./modules/contrib/src/spinimages.cpp.orig 2013-10-22 07:55:31.000000000 -0400 ++++ ./modules/contrib/src/spinimages.cpp 2013-10-22 07:55:51.000000000 -0400 +@@ -85,7 +85,7 @@ + }; + size_t colors_mum = sizeof(colors)/sizeof(colors[0]); + +-template<class FwIt, class T> void iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; } ++template<class FwIt, class T> void _iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; } + + void computeNormals( const Octree& Octree, const vector<Point3f>& centers, vector<Point3f>& normals, + vector<uchar>& mask, float normalRadius, int minNeighbors = 20) +@@ -790,14 +790,14 @@ + else if (setSize == vtxSize) + { + subset.resize(vtxSize); +- iota(subset.begin(), subset.end(), 0); ++ _iota(subset.begin(), subset.end(), 0); + } + else + { + RNG& rnd = theRNG(); + + vector<size_t> left(vtxSize); +- iota(left.begin(), left.end(), (size_t)0); ++ _iota(left.begin(), left.end(), (size_t)0); + + subset.resize(setSize); + for(size_t i = 0; i < setSize; ++i) +@@ -870,7 +870,7 @@ + { + mesh.computeNormals(normalRadius, minNeighbors); + subset.resize(mesh.vtx.size()); +- iota(subset.begin(), subset.end(), 0); ++ _iota(subset.begin(), subset.end(), 0); + } + else + mesh.computeNormals(subset, normalRadius, minNeighbors); diff --git a/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp b/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp new file mode 100644 index 000000000000..291e01174ea4 --- /dev/null +++ b/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp @@ -0,0 +1,11 @@ +--- ./modules/highgui/src/window_QT.cpp.orig 2013-10-22 11:01:57.000000000 -0400 ++++ ./modules/highgui/src/window_QT.cpp 2013-10-22 11:03:10.000000000 -0400 +@@ -46,6 +46,8 @@ + #ifdef _WIN32 + #include <windows.h> + #define usleep Sleep ++#else ++#include <unistd.h> + #endif + + #ifndef M_PI diff --git a/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp b/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp new file mode 100644 index 000000000000..94780cc36351 --- /dev/null +++ b/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp @@ -0,0 +1,11 @@ +--- ./modules/python/src2/cv2.cv.hpp.orig 2013-10-22 17:54:10.000000000 -0400 ++++ ./modules/python/src2/cv2.cv.hpp 2013-10-22 17:55:03.000000000 -0400 +@@ -2169,7 +2169,7 @@ + static int convert_to_CvNextEdgeType(PyObject *o, CvNextEdgeType *dst, const char *name = "no_name") + { + if (!PyInt_Check(o)) { +- *dst = (CvNextEdgeType)NULL; ++ *dst = (CvNextEdgeType)0; + return failmsg("Expected number for CvNextEdgeType argument '%s'", name); + } else { + *dst = (CvNextEdgeType)PyInt_AsLong(o); |