From owner-svn-ports-head@FreeBSD.ORG Tue Oct 22 22:03:29 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E92DAB8; Tue, 22 Oct 2013 22:03:29 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6932BCD; Tue, 22 Oct 2013 22:03:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9MM3TjE070693; Tue, 22 Oct 2013 22:03:29 GMT (envelope-from jhale@svn.freebsd.org) Received: (from jhale@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9MM3SVx070688; Tue, 22 Oct 2013 22:03:28 GMT (envelope-from jhale@svn.freebsd.org) Message-Id: <201310222203.r9MM3SVx070688@svn.freebsd.org> From: "Jason E. Hale" Date: Tue, 22 Oct 2013 22:03:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r331331 - in head/graphics/opencv: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2013 22:03:29 -0000 Author: jhale Date: Tue Oct 22 22:03:28 2013 New Revision: 331331 URL: http://svnweb.freebsd.org/changeset/ports/331331 Log: - Fix typos in EIGEN option - Fix build with modern compilers in the contrib module [1] - Fix build of opencv-core with clang in the ts module [2] - Fix build with QT option [3] - Fix build of py-opencv with clang [4] Reported by: avg [1], Robert Huff [2] PR: ports/182443 [3], ports/182837 [4] Submitted by: O. Hartmann [3], pawel [4] Added: head/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp (contents, props changed) head/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp (contents, props changed) head/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp (contents, props changed) Modified: head/graphics/opencv/Makefile Modified: head/graphics/opencv/Makefile ============================================================================== --- head/graphics/opencv/Makefile Tue Oct 22 22:00:04 2013 (r331330) +++ head/graphics/opencv/Makefile Tue Oct 22 22:03:28 2013 (r331331) @@ -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 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+= libopencv_core.so.2:${PORTSDIR}/graphics/opencv-core @@ -41,14 +36,14 @@ LDFLAGS+= -L${LOCALBASE}/lib -lopencv_co 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: .include +.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}"):' \ Added: head/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp Tue Oct 22 22:03:28 2013 (r331331) @@ -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 void iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; } ++template void _iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; } + + void computeNormals( const Octree& Octree, const vector& centers, vector& normals, + vector& 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 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); Added: head/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp Tue Oct 22 22:03:28 2013 (r331331) @@ -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 + #define usleep Sleep ++#else ++#include + #endif + + #ifndef M_PI Added: head/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp Tue Oct 22 22:03:28 2013 (r331331) @@ -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);