diff options
Diffstat (limited to 'graphics/opencv')
29 files changed, 599 insertions, 545 deletions
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile index 43357496efd7..b794b7c03e57 100644 --- a/graphics/opencv/Makefile +++ b/graphics/opencv/Makefile @@ -2,28 +2,21 @@ # $FreeBSD$ PORTNAME?= opencv -PORTVERSION= 2.3.1 -PORTREVISION= 9 +PORTVERSION= 2.4.7 +PORTREVISION?= 0 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}library/${PORTNAME}-unix/${PORTVERSION} -DISTNAME= OpenCV-${DISTVERSION}a MAINTAINER= jhale@FreeBSD.org -COMMENT= Open Source Computer Vision library from Intel +COMMENT= Open Source Computer Vision library LICENSE= BSD LICENSE_FILE= ${WRKSRC}/doc/license.txt -WANT_GSTREAMER= yes -MAKE_JOBS_UNSAFE= yes -USE_BZIP2= yes USES= cmake pkgconfig -USE_DOS2UNIX= yes USE_LDCONFIG= yes - -WRKSRC= ${WRKDIR}/OpenCV-${DISTVERSION} - -CXXFLAGS+= -DGTEST_USE_OWN_TR1_TUPLE=1 +WANT_GSTREAMER= yes +MAKE_JOBS_UNSAFE= yes NOT_FOR_ARCHS= sparc64 NOT_FOR_ARCHS_REASON_sparc64= does not compile on sparc64 @@ -31,182 +24,242 @@ NOT_FOR_ARCHS_REASON_sparc64= does not compile on sparc64 DATADIR= ${PREFIX}/share/OpenCV PLIST_SUB+= VERSION=${DISTVERSION} -.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 -LDFLAGS+= -L${LOCALBASE}/lib -lopencv_core - -PORTDOCS= * - -OPTIONS_DEFINE= EIGEN3 FFMPEG GSTREAMER GTK2 JASPER JPEG OPENEXR PNG \ - QT4 TBB TIFF V4L XINE EXAMPLES +CMAKE_ARGS+= -DWITH_CUDA:BOOL=Off \ + -DWITH_PVAPI:BOOL=Off \ + -DWITH_UNICAP:BOOL=Off \ + -DBUILD_TESTS:BOOL=Off \ + -DBUILD_DOCS:BOOL=Off \ + -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_CMD} +CFLAGS+= -I${LOCALBASE}/include + +SUB_FILES= FindOpenCVCore.cmake +SUB_LIST= OCV_VERSION=${PORTVERSION} + +OCV_CORE_MODS= core imgproc +OCV_MODS= calib3d contrib features2d flann gpu \ + highgui legacy ml ocl objdetect photo \ + stitching superres ts video videostab +OCV_NONFREE_MODS= nonfree +OCV_JAVA_MODS= java +OCV_PYTHON_MODS= python + +OPTIONS_DEFINE= EXAMPLES DC1394 NONFREE +OPTIONS_GROUP= GUI IMAGE PERFORMANCE VIDEO +OPTIONS_GROUP_GUI= GTK2 QT4 +OPTIONS_GROUP_IMAGE= JASPER JPEG OPENEXR PNG TIFF +OPTIONS_GROUP_PERFORMANCE= EIGEN3 TBB +OPTIONS_GROUP_VIDEO= FFMPEG GSTREAMER V4L XINE OPTIONS_DEFAULT= EIGEN3 JASPER JPEG PNG TIFF V4L +OPTIONS_SUB= yes +.if defined(OCV_CORE) +OPTIONS_EXCLUDE= DC1394 EXAMPLES GTK2 QT4 JASPER JPEG NONFREE OPENEXR \ + PNG TIFF FFMPEG GSTREAMER V4L XINE +.elif defined(OCV_PYTHON) +OPTIONS_EXCLUDE= DC1394 GTK2 QT4 JASPER JPEG NONFREE OPENEXR \ + PNG TIFF TBB EIGEN3 FFMPEG GSTREAMER V4L XINE +.endif +DC1394_DESC= IEEE 1394 camera support 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= -DWITH_EIGEN:BOOL=Off +IMAGE_DESC= Image format support +NONFREE_DESC= Build functionality that has possible limitations of use +PERFORMANCE_DESC= Performance enhancing libraries +TBB_DESC= TBB support -FFMPEG_LIB_DEPENDS= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0 -FFMPEG_CMAKE_ON= -DWITH_FFMPEG:BOOL=On -FFMPEG_CMAKE_OFF= -DWITH_FFMPEG:BOOL=Off -FFMPEG_CXXFLAGS= -I${LOCALBASE}/include/ffmpeg0 +.include <bsd.port.options.mk> -GSTREAMER_USE= GSTREAMER=yes -GSTREAMER_CMAKE_ON= -DWITH_GSTREAMER:BOOL=On -GSTREAMER_CMAKE_OFF= -DWITH_GSTREAMER:BOOL=Off +.if ${PORT_OPTIONS:MDC1394} +LIB_DEPENDS+= libdc1394.so:${PORTSDIR}/multimedia/libdc1394 +CMAKE_ARGS+= -DWITH_1394:BOOL=On +.else +CMAKE_ARGS+= -DWITH_1394:BOOL=Off +.endif -GTK2_USE= GNOME=gtk20 -GTK2_CMAKE_ON= -DWITH_GTK:BOOL=On -GTK2_CMAKE_OFF= -DWITH_GTK:BOOL=Off +.if ${PORT_OPTIONS:MEIGEN3} +BUILD_DEPENDS+= ${LOCALBASE}/include/eigen3/Eigen/Eigen:${PORTSDIR}/math/eigen3 +CMAKE_ARGS+= -DWITH_EIGEN:BOOL=On +.else +CMAKE_ARGS= -DWITH_EIGEN:BOOL=Off +.endif -JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper -JASPER_CMAKE_ON= -DWITH_JASPER:BOOL=On -JASPER_CMAKE_OFF= -DWITH_JASPER:BOOL=Off +.if ${PORT_OPTIONS:MEXAMPLES} +PORTEXAMPLES= * +. if !defined(OCV_SLAVE) +CMAKE_ARGS+= -DBUILD_EXAMPLES:BOOL=On \ + -DINSTALL_C_EXAMPLES:BOOL=On +. endif +.endif -JPEG_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg -JPEG_CMAKE_ON= -DWITH_JPEG:BOOL=On -JPEG_CMAKE_OFF= -DWITH_JPEG:BOOL=Off +.if ${PORT_OPTIONS:MFFMPEG} +LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg +CMAKE_ARGS+= -DWITH_FFMPEG:BOOL=On +.else +CMAKE_ARGS+= -DWITH_FFMPEG:BOOL=Off +.endif -OPENEXR_DESC= OpenEXR support -OPENEXR_LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR -OPENEXR_CMAKE_ON= -DWITH_OPENEXR:BOOL=On -OPENEXR_CMAKE_OFF= -DWITH_OPENEXR:BOOL=Off +.if ${PORT_OPTIONS:MGSTREAMER} +USE_GSTREAMER= yes +CMAKE_ARGS+= -DWITH_GSTREAMER:BOOL=On +.else +CMAKE_ARGS+= -DWITH_GSTREAMER:BOOL=Off +.endif -PNG_LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png -PNG_CMAKE_ON= -DWITH_PNG:BOOL=On -PNG_CMAKE_OFF= -DWITH_PNG:BOOL=Off +.if ${PORT_OPTIONS:MGTK2} +USE_GNOME+= gtk20 +CMAKE_ARGS+= -DWITH_GTK:BOOL=On +.else +CMAKE_ARGS+= -DWITH_GTK:BOOL=Off +.endif -QT4_USE= QT4=opengl moc_build qmake_build rcc_build uic_build qtestlib -QT4_CMAKE_ON= -DWITH_QT:BOOL=On -DWITH_QT_OPENGL:BOOL=On -QT4_CMAKE_OFF= -DWITH_QT:BOOL=Off +.if ${PORT_OPTIONS:MJASPER} +LIB_DEPENDS+= libjasper.so:${PORTSDIR}/graphics/jasper +CMAKE_ARGS+= -DWITH_JASPER:BOOL=On +.else +CMAKE_ARGS+= -DWITH_JASPER:BOOL=Off +.endif -TBB_DESC= TBB support -TBB_LIB_DEPENDS= libtbb.so:${PORTSDIR}/devel/tbb -TBB_CMAKE_ON= -DWITH_TBB:BOOL=On \ - -DTBBLIB_FOUND:BOOL=1 -DTBB_FOUND:BOOL=On \ - -DTBB_INCLUDE_DIRS:STRING="${LOCALBASE}/include" \ - -DTBB_LIBRARY_DIRS:STRING="${LOCALBASE}/lib" \ - -DTBB_LIBRARIES:STRING="tbb" -TBB_CMAKE_OFF= -DWITH_TBB:BOOL=Off - -TIFF_LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff -TIFF_CMAKE_ON= -DWITH_TIFF:BOOL=On -TIFF_CMAKE_OFF= -DWITH_TIFF:BOOL=Off - -V4L_LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l -V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat -V4L_CMAKE_ON= -DWITH_V4L:BOOL=On \ - -DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include" -V4L_CMAKE_OFF= -DWITH_V4L:BOOL=Off - -XINE_LIB_DEPENDS= libxine.so:${PORTSDIR}/multimedia/libxine -XINE_CMAKE_ON= -DWITH_XINE:BOOL=On -XINE_CMAKE_OFF= -DWITH_XINE:BOOL=Off - -NO_STAGE= yes -.include <bsd.port.options.mk> +.if ${PORT_OPTIONS:MJPEG} +LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg +CMAKE_ARGS+= -DWITH_JPEG:BOOL=On +.else +CMAKE_ARGS+= -DWITH_JPEG:BOOL=Off +.endif -.if ${PORT_OPTIONS:MEXAMPLES} -CMAKE_ARGS+= -DBUILD_EXAMPLES:BOOL=On -DINSTALL_C_EXAMPLES:BOOL=On -PORTEXAMPLES+= c cpp gpu +.if ${PORT_OPTIONS:MNONFREE} +CMAKE_ARGS+= -DBUILD_opencv_nonfree:BOOL=On +.else +CMAKE_ARGS+= -DBUILD_opencv_nonfree:BOOL=Off .endif -.else # defined(_BUILDING_OPENCV_CORE) || defined(_BUILDING_OPENCV_PYTHON) +.if ${PORT_OPTIONS:MOPENEXR} +LIB_DEPENDS+= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR +CMAKE_ARGS+= -DWITH_OPENEXR:BOOL=On +.else +CMAKE_ARGS+= -DWITH_OPENEXR:BOOL=Off +.endif -. if defined(_BUILDING_OPENCV_CORE) -COMMENT= OpenCV core libraries -PLIST= ${PKGDIR}/pkg-plist.oc -PKGNAMESUFFIX= -core -LATEST_LINK= ${PORTNAME}-core -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-opencv-core +.if ${PORT_OPTIONS:MPNG} +LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png +CMAKE_ARGS+= -DWITH_PNG:BOOL=On +.else +CMAKE_ARGS+= -DWITH_PNG:BOOL=Off +.endif -. elif defined(_BUILDING_OPENCV_PYTHON) -COMMENT= OpenCV Python library -CATEGORIES= graphics python -PLIST= ${PKGDIR}/pkg-plist.python -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -PKGNAMESUFFIX= # no suffix +.if ${PORT_OPTIONS:MQT4} +USE_QT4+= opengl moc_build qmake_build rcc_build uic_build qtestlib +CMAKE_ARGS+= -DWITH_QT:BOOL=On \ + -DWITH_OPENGL:BOOL=On +.else +CMAKE_ARGS+= -DWITH_QT:BOOL=Off +.endif -LIB_DEPENDS+= libopencv_legacy.so.2:${PORTSDIR}/graphics/opencv -CMAKE_ENV+= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" -INSTALL_WRKSRC= ${WRKSRC}/modules/python -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-opencv-python +.if ${PORT_OPTIONS:MTBB} +LIB_DEPENDS+= libtbb.so:${PORTSDIR}/devel/tbb +CMAKE_ARGS+= -DWITH_TBB:BOOL=On \ + -DTBB_INCLUDE_DIR:STRING="${LOCALBASE}/include" +.else +CMAKE_ARGS+= -DWITH_TBB:BOOL=Off +.endif -USE_PYTHON= yes -BUILD_DEPENDS+= ${PYNUMPY} -RUN_DEPENDS+= ${PYNUMPY} -. endif # defined(_BUILDING_OPENCV_PYTHON) -CMAKE_ARGS+= -DBUILD_EXAMPLES:BOOL=Off \ - -DINSTALL_PYTHON_EXAMPLES:BOOL=Off \ - -DBUILD_TESTS:BOOL=Off \ - -DWITH_EIGEN:BOOL=Off \ - -DWITH_FFMPEG:BOOL=Off \ - -DWITH_GSTREAMER:BOOL=Off \ - -DWITH_GTK:BOOL=Off \ - -DWITH_JASPER:BOOL=Off \ - -DWITH_JPEG:BOOL=Off \ - -DWITH_OPENEXR:BOOL=Off \ - -DWITH_PNG:BOOL=Off \ - -DWITH_QT:BOOL=Off \ - -DWITH_TBB:BOOL=Off \ - -DWITH_V4L:BOOL=Off \ - -DWITH_TIFF:BOOL=Off \ - -DWITH_XINE:BOOL=Off \ - -DWITH_PVAPI:BOOL=Off \ - -DWITH_1394:BOOL=Off \ - -DWITH_CUDA:BOOL=Off +.if ${PORT_OPTIONS:MTIFF} +LIB_DEPENDS+= libtiff.so:${PORTSDIR}/graphics/tiff +CMAKE_ARGS+= -DWITH_TIFF:BOOL=On +.else +CMAKE_ARGS+= -DWITH_TIFF:BOOL=Off +.endif -.include <bsd.port.options.mk> +.if ${PORT_OPTIONS:MV4L} +LIB_DEPENDS+= libv4l2.so:${PORTSDIR}/multimedia/libv4l +BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat +CMAKE_ARGS+= -DWITH_V4L:BOOL=On \ + -DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include" +.else +CMAKE_ARGS+= -DWITH_V4L:BOOL=Off +.endif -.endif # defined(_BUILDING_OPENCV_CORE) || defined(_BUILDING_OPENCV_PYTHON) +.if ${PORT_OPTIONS:MXINE} +LIB_DEPENDS+= libxine.so:${PORTSDIR}/multimedia/libxine +CMAKE_ARGS+= -DWITH_XINE:BOOL=On +.else +CMAKE_ARGS+= -DWITH_XINE:BOOL=Off +.endif -.if defined(_BUILDING_OPENCV_PYTHON) -CMAKE_ARGS+= -DBUILD_NEW_PYTHON_SUPPORT:BOOL=On +.if defined(OCV_CORE) +. for module in ${OCV_MODS} ${OCV_JAVA_MODS} ${OCV_PYTHON_MODS} +CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off +. endfor +.elif defined(OCV_PYTHON) +LIB_DEPENDS+= libopencv_legacy.so:${PORTSDIR}/graphics/opencv +BUILD_DEPENDS+= ${PYNUMPY} +RUN_DEPENDS+= ${PYNUMPY} +USE_PYTHON= yes +CMAKE_ARGS+= -DBUILD_opencv_python:BOOL=On +. for module in ${OCV_MODS} ${OCV_CORE_MODS} ${OCV_JAVA_MODS} +CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off +. endfor +CMAKE_ENV+= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" +INSTALL_WRKSRC= ${WRKSRC}/modules/python +.elif defined(OCV_JAVA) +BUILD_DEPENDS+= ant:${PORTSDIR}/devel/apache-ant +LIB_DEPENDS+= libopencv_legacy.so:${PORTSDIR}/graphics/opencv +USE_JAVA= yes +USE_PYTHON_BUILD= yes +CMAKE_ARGS+= -DBUILD_opencv_java:BOOL=On +. for module in apps python stitching superres videostab +CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off +. endfor +CMAKE_ENV+= JAVA_HOME="${JAVA_HOME}" +INSTALL_WRKSRC= ${WRKSRC}/modules/java .else -CMAKE_ARGS+= -DBUILD_NEW_PYTHON_SUPPORT:BOOL=Off +LIB_DEPENDS+= libopencv_core.so:${PORTSDIR}/graphics/opencv-core +. for module in ${OCV_JAVA_MODS} ${OCV_PYTHON_MODS} +CMAKE_ARGS+= -DBUILD_opencv_${module}:BOOL=Off +. endfor .endif post-patch: @${MKDIR} ${CONFIGURE_WRKSRC} - @${REINPLACE_CMD} -e 's:set(OPENCV_SOVERSION.*:set(OPENCV_SOVERSION "$${OPENCV_VERSION_MAJOR}"):' \ - -e 's:-pthread:${PTHREAD_LIBS}:g' \ - -e 's:$${OPENCV_LIB_INSTALL_PATH}/pkgconfig:$${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig:g' \ - -e 's:share/OpenCV/doc:share/doc/opencv:g' \ - -e 's:-mcpu=G3::g' \ + @${REINPLACE_CMD} -e '/pkgconfig/s|$${OPENCV_LIB_INSTALL_PATH}|libdata|' \ + ${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake + @${REINPLACE_CMD} -e 's|share/OpenCV/doc|share/doc/${PORTNAME}|g' \ ${WRKSRC}/CMakeLists.txt - @${REINPLACE_CMD} -e 's|${PORTNAME}/samples|examples/${PORTNAME}|g' \ + @${REINPLACE_CMD} -e 's|[Oo]pen[Cc][Vv]/samples|examples/${PORTNAME}|g' \ ${WRKSRC}/samples/*/CMakeLists.txt \ ${WRKSRC}/samples/*/*/CMakeLists.txt @${FIND} ${WRKSRC} -name '*.orig' -exec ${RM} {} \; - @${REINPLACE_CMD} \ - -e 's,libavcodec ,libavcodec0 ,g' \ - -e 's,libavformat ,libavformat0 ,g' \ - -e 's,libswscale ,libswscale0 ,g' \ - -e 's,libavutil ,libavutil0 ,g' \ - ${WRKSRC}/CMakeLists.txt +.if defined(OCV_CORE) + @${REINPLACE_CMD} -e 's|opencv.pc|opencv-core.pc|g' \ + ${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake + @${REINPLACE_CMD} -e 's|Name:.*|Name: OpenCV-core|' \ + ${WRKSRC}/cmake/templates/opencv-XXX.pc.cmake.in +.endif +.if defined(OCV_PYTHON) +. for module in ${OCV_CORE_MODS} ${OCV_MODS} ${OCV_NONFREE_MODS} + @${REINPLACE_CMD} -e 's|opencv_${module} | |' \ + -e 's|opencv_${module}$$||' \ + -e 's|opencv_${module})|)|' \ + ${WRKSRC}/modules/*/CMakeLists.txt +. endfor + ${REINPLACE_CMD} -e '/[Ee][Xx][Pp][Oo][Rr][Tt]/d' \ + ${WRKSRC}/cmake/OpenCVGenConfig.cmake +.endif -.if defined(_BUILDING_OPENCV_CORE) && !defined(_BUILDING_OPENCV_PYTHON) - @${REINPLACE_CMD} -e '/add_subdirectory(data)/ d' \ - -e '/add_subdirectory(include)/ d' \ - -e 's|opencv.pc|opencv-core.pc|g' \ - -e 's|OpenCVConfig.cmake|OpenCVConfig-core.cmake|g' \ - -e 's|OpenCVConfig-version.cmake|OpenCVConfig-core-version.cmake|g' \ - -e 's| set(root_files README)||g' \ - -e 's| install(CODE "exec_program.*||g' \ - ${WRKSRC}/CMakeLists.txt - @${SED} -E -e \ - 's|Name:.*|Name: OpenCV-core|' -e \ - 's|Libs:.*|Libs: -L$${libdir} -lopencv_core@OPENCV_DLLVERSION@ -lopencv_imgproc@OPENCV_DLLVERSION@ -lopencv_video@OPENCV_DLLVERSION@ -lopencv_flann@OPENCV_DLLVERSION@|' \ - ${WRKSRC}/opencv.pc.cmake.in > ${WRKSRC}/opencv-core.pc.cmake.in - @${SED} -E -e \ - 's| set\(OPENCV_LIB_COMPONENTS .*| set\(OPENCV_LIB_COMPONENTS opencv_core opencv_imgproc opencv_video opencv_ml opencv_flann\)|g' \ - ${WRKSRC}/OpenCVConfig.cmake.in > ${WRKSRC}/OpenCVConfig-core.cmake.in - @${LN} -sf OpenCVConfig-version.cmake.in ${WRKSRC}/OpenCVConfig-core-version.cmake.in -.endif -.if ! ${PORT_OPTIONS:MDOCS} || defined(_BUILDING_OPENCV_CORE) || defined(_BUILDING_OPENCV_PYTHON) - @${REINPLACE_CMD} -e '/add_subdirectory(doc)/ d' \ - ${WRKSRC}/CMakeLists.txt +post-install: +.if defined(OCV_CORE) + ${MKDIR} ${STAGEDIR}${PREFIX}/share/cmake/Modules + ${INSTALL_DATA} ${WRKDIR}/FindOpenCVCore.cmake ${STAGEDIR}${PREFIX}/share/cmake/Modules +.endif +.if defined(OCV_PYTHON) + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC}/samples/python && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/python + cd ${WRKSRC}/samples/python2 && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/python2 +.endif +.if defined(OCV_JAVA) + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC}/samples/java && \ + ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/java .endif .include <bsd.port.mk> diff --git a/graphics/opencv/distinfo b/graphics/opencv/distinfo index 451c1c6880ad..65415bbd75e7 100644 --- a/graphics/opencv/distinfo +++ b/graphics/opencv/distinfo @@ -1,2 +1,2 @@ -SHA256 (OpenCV-2.3.1a.tar.bz2) = a9a2f529101c04eb2b606eee8c80f3ad93190b36f91ac09ee0ec5aa1eed1450c -SIZE (OpenCV-2.3.1a.tar.bz2) = 32669613 +SHA256 (opencv-2.4.7.tar.gz) = c48d6c735bfa40c76cadcc0106051e095d8b492b05ac7d2cc9647be807dd2a43 +SIZE (opencv-2.4.7.tar.gz) = 85587316 diff --git a/graphics/opencv/files/FindOpenCVCore.cmake.in b/graphics/opencv/files/FindOpenCVCore.cmake.in new file mode 100644 index 000000000000..ee278d78fcd6 --- /dev/null +++ b/graphics/opencv/files/FindOpenCVCore.cmake.in @@ -0,0 +1,38 @@ +# Module for finding the core components of OpenCV installed by +# graphics/opencv-core. Use for projects that require only +# opencv_core or opencv_imgproc. Others should use the +# standard OpenCV CMake find routines provided by graphics/opencv. +# +# This module provides: +# OPENCVCORE_FOUND - defined if the required OpenCV components are found +# OpenCV_INCLUDE_DIRS - the path to the OpenCV headers +# OpenCV_LIBS - the OpenCV libraries to link to +# OpenCV_VERSION - the version of OpenCV +# +# Example usage: find_package( OpenCVCore COMPONENTS core imgproc REQUIRED ) + +include( FindPackageHandleStandardArgs ) + +set( OpenCV_VERSION %%OCV_VERSION%% ) + +find_path( OpenCV_INCLUDE_DIRS NAMES opencv2/core/core.hpp ) + +if( OpenCVCore_FIND_COMPONENTS ) + foreach( component ${OpenCVCore_FIND_COMPONENTS} ) + string( TOUPPER ${component} _COMPONENT ) + set( OPENCV_USE_${_COMPONENT} 1 ) + endforeach() +endif() + +# opencv_core is always required +find_library( OPENCV_CORE_LIBRARY NAMES opencv_core ) + +if( OPENCV_USE_IMGPROC OR NOT OpenCVCore_FIND_COMPONENTS ) + find_library( OPENCV_IMGPROC_LIBRARY NAMES opencv_imgproc ) +endif() + +set( OpenCV_LIBS ${OPENCV_CORE_LIBRARY} ${OPENCV_IMGPROC_LIBRARY} ) + +find_package_handle_standard_args( OpenCVCore DEFAULT_MSG OpenCV_LIBS OpenCV_INCLUDE_DIRS ) + +mark_as_advanced( ${OpenCV_LIBS} ${OpenCV_INCLUDE_DIRS} ${OpenCV_VERSION} ) diff --git a/graphics/opencv/files/extra-patch-opencv b/graphics/opencv/files/extra-patch-opencv deleted file mode 100644 index 17a8b438a1e2..000000000000 --- a/graphics/opencv/files/extra-patch-opencv +++ /dev/null @@ -1,37 +0,0 @@ ---- modules/CMakeLists.txt.orig 2011-08-02 14:48:41.000000000 +0200 -+++ modules/CMakeLists.txt 2011-08-22 13:17:48.167347755 +0200 -@@ -10,18 +10,18 @@ - endif() - - add_subdirectory(calib3d) --add_subdirectory(core) -+#add_subdirectory(core) - add_subdirectory(features2d) --add_subdirectory(flann) -+#add_subdirectory(flann) - --if(BUILD_TESTS) -- add_subdirectory(ts) --endif() -+#if(BUILD_TESTS) -+# add_subdirectory(ts) -+#endif() - add_subdirectory(highgui) --add_subdirectory(imgproc) -+#add_subdirectory(imgproc) - add_subdirectory(legacy) - add_subdirectory(contrib) --add_subdirectory(ml) -+#add_subdirectory(ml) - add_subdirectory(objdetect) - - if(PYTHONLIBS_FOUND AND BUILD_NEW_PYTHON_SUPPORT AND PYTHON_USE_NUMPY) -@@ -32,7 +32,7 @@ - add_subdirectory(java) - endif() - --add_subdirectory(video) -+#add_subdirectory(video) - add_subdirectory(traincascade) - add_subdirectory(haartraining) - diff --git a/graphics/opencv/files/extra-patch-opencv-core b/graphics/opencv/files/extra-patch-opencv-core deleted file mode 100644 index c91ba07eac3d..000000000000 --- a/graphics/opencv/files/extra-patch-opencv-core +++ /dev/null @@ -1,58 +0,0 @@ ---- modules/CMakeLists.txt.orig 2011-08-02 14:48:41.000000000 +0200 -+++ modules/CMakeLists.txt 2011-08-22 12:12:01.825347584 +0200 -@@ -9,34 +9,34 @@ - endif() - endif() - --add_subdirectory(calib3d) -+#add_subdirectory(calib3d) - add_subdirectory(core) --add_subdirectory(features2d) -+#add_subdirectory(features2d) - add_subdirectory(flann) - --if(BUILD_TESTS) -+#if(BUILD_TESTS) - add_subdirectory(ts) --endif() --add_subdirectory(highgui) -+#endif() -+#add_subdirectory(highgui) - add_subdirectory(imgproc) --add_subdirectory(legacy) --add_subdirectory(contrib) -+#add_subdirectory(legacy) -+#add_subdirectory(contrib) - add_subdirectory(ml) --add_subdirectory(objdetect) -+#add_subdirectory(objdetect) - --if(PYTHONLIBS_FOUND AND BUILD_NEW_PYTHON_SUPPORT AND PYTHON_USE_NUMPY) -- add_subdirectory(python) --endif() -- --if(BUILD_JAVA_SUPPORT) -- add_subdirectory(java) --endif() -+#if(PYTHONLIBS_FOUND AND BUILD_NEW_PYTHON_SUPPORT AND PYTHON_USE_NUMPY) -+# add_subdirectory(python) -+#endif() -+ -+#if(BUILD_JAVA_SUPPORT) -+# add_subdirectory(java) -+#endif() - - add_subdirectory(video) --add_subdirectory(traincascade) --add_subdirectory(haartraining) -+#add_subdirectory(traincascade) -+#add_subdirectory(haartraining) - --if(NOT ANDROID) -- add_subdirectory(gpu) -- add_subdirectory(stitching) --endif() -+#if(NOT ANDROID) -+# add_subdirectory(gpu) -+# add_subdirectory(stitching) -+#endif() diff --git a/graphics/opencv/files/extra-patch-opencv-python b/graphics/opencv/files/extra-patch-opencv-python deleted file mode 100644 index 1e48c6406bf2..000000000000 --- a/graphics/opencv/files/extra-patch-opencv-python +++ /dev/null @@ -1,45 +0,0 @@ ---- modules/CMakeLists.txt.orig 2011-08-22 18:34:10.458995645 +0200 -+++ modules/CMakeLists.txt 2011-08-22 18:34:30.560542908 +0200 -@@ -1,42 +1,3 @@ --if(ANDROID) -- ADD_DEFINITIONS(-DGTEST_HAS_STD_WSTRING=0) -- if(ANDROID_API_LEVEL LESS 8) -- ADD_DEFINITIONS(-DGTEST_HAS_CLONE=0) -- endif() -- -- IF(WITH_ANDROID_CAMERA) -- add_subdirectory(androidcamera) -- endif() --endif() -- --add_subdirectory(calib3d) --add_subdirectory(core) --add_subdirectory(features2d) --add_subdirectory(flann) -- --if(BUILD_TESTS) -- add_subdirectory(ts) --endif() --add_subdirectory(highgui) --add_subdirectory(imgproc) --add_subdirectory(legacy) --add_subdirectory(contrib) --add_subdirectory(ml) --add_subdirectory(objdetect) -- - if(PYTHONLIBS_FOUND AND BUILD_NEW_PYTHON_SUPPORT AND PYTHON_USE_NUMPY) - add_subdirectory(python) - endif() -- --if(BUILD_JAVA_SUPPORT) -- add_subdirectory(java) --endif() -- --add_subdirectory(video) --add_subdirectory(traincascade) --add_subdirectory(haartraining) -- --if(NOT ANDROID) -- add_subdirectory(gpu) -- add_subdirectory(stitching) --endif() diff --git a/graphics/opencv/files/patch-apps__traincascade__imagestorage.h b/graphics/opencv/files/patch-apps__traincascade__imagestorage.h new file mode 100644 index 000000000000..61dcf175de25 --- /dev/null +++ b/graphics/opencv/files/patch-apps__traincascade__imagestorage.h @@ -0,0 +1,10 @@ +--- ./apps/traincascade/imagestorage.h.orig 2013-07-10 07:49:00.000000000 -0400 ++++ ./apps/traincascade/imagestorage.h 2013-10-23 23:52:32.000000000 -0400 +@@ -1,6 +1,7 @@ + #ifndef _OPENCV_IMAGESTORAGE_H_ + #define _OPENCV_IMAGESTORAGE_H_ + ++#include <cstdio> + #include "highgui.h" + + using namespace cv; diff --git a/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake b/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake new file mode 100644 index 000000000000..b6c66a3ae2ec --- /dev/null +++ b/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake @@ -0,0 +1,27 @@ +--- ./cmake/OpenCVCompilerOptions.cmake.orig 2013-11-06 09:26:39.000000000 -0500 ++++ ./cmake/OpenCVCompilerOptions.cmake 2013-11-30 05:56:46.000000000 -0500 +@@ -122,7 +122,7 @@ + add_extra_compiler_option(-ffast-math) + endif() + if(ENABLE_POWERPC) +- add_extra_compiler_option("-mcpu=G3 -mtune=G5") ++ add_extra_compiler_option("-mtune=G5") + endif() + if(ENABLE_SSE) + add_extra_compiler_option(-msse) +@@ -158,6 +158,7 @@ + endif(NOT MINGW) + + if(X86 OR X86_64) ++ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4) + if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)") + add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers +@@ -165,6 +166,7 @@ + add_extra_compiler_option(-mfpmath=387) + endif() + endif() ++ endif() + endif() + + # Profiling? diff --git a/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake b/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake new file mode 100644 index 000000000000..d77f4b0b5511 --- /dev/null +++ b/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake @@ -0,0 +1,11 @@ +--- ./cmake/OpenCVVersion.cmake.orig 2013-10-24 00:12:48.000000000 -0400 ++++ ./cmake/OpenCVVersion.cmake 2013-10-24 00:13:06.000000000 -0400 +@@ -11,7 +11,7 @@ + set(OPENCV_VERSION "${OPENCV_VERSION}.${OPENCV_VERSION_TWEAK}") + endif() + +-set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}") ++set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}") + set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}") + + # create a dependency on version file diff --git a/graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in b/graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in new file mode 100644 index 000000000000..a4796f178c39 --- /dev/null +++ b/graphics/opencv/files/patch-cmake__templates__OpenCVConfig.cmake.in @@ -0,0 +1,11 @@ +--- ./cmake/templates/OpenCVConfig.cmake.in.orig 2013-12-01 09:56:12.000000000 -0500 ++++ ./cmake/templates/OpenCVConfig.cmake.in 2013-12-01 09:56:42.000000000 -0500 +@@ -195,7 +195,7 @@ + set(OpenCV_LIB_SUFFIX "") + endif() + +-SET(OpenCV_LIBS "${OpenCV_LIB_COMPONENTS}") ++SET(OpenCV_LIBS "${OpenCV_FIND_COMPONENTS}") + + foreach(__opttype OPT DBG) + SET(OpenCV_LIBS_${__opttype} "${OpenCV_LIBS}") diff --git a/graphics/opencv/files/patch-modules-flann-include-opencv2-flann-any.h b/graphics/opencv/files/patch-modules-flann-include-opencv2-flann-any.h deleted file mode 100644 index 02e70e5a59dc..000000000000 --- a/graphics/opencv/files/patch-modules-flann-include-opencv2-flann-any.h +++ /dev/null @@ -1,17 +0,0 @@ -Index: modules/flann/include/opencv2/flann/any.h -=================================================================== ---- modules/flann/include/opencv2/flann/any.h (revision 6880) -+++ modules/flann/include/opencv2/flann/any.h (revision 6881) -@@ -30,6 +30,12 @@ - { - }; - -+inline std::ostream& operator <<(std::ostream& out, const empty_any&) -+{ -+ out << "[empty_any]"; -+ return out; -+} -+ - struct base_any_policy - { - virtual void static_delete(void** x) = 0; diff --git a/graphics/opencv/files/patch-modules-flann-include-opencv2-flann-lsh_index.h b/graphics/opencv/files/patch-modules-flann-include-opencv2-flann-lsh_index.h deleted file mode 100644 index fa7a76110192..000000000000 --- a/graphics/opencv/files/patch-modules-flann-include-opencv2-flann-lsh_index.h +++ /dev/null @@ -1,13 +0,0 @@ -Index: modules/flann/include/opencv2/flann/lsh_index.h -=================================================================== ---- modules/flann/include/opencv2/flann/lsh_index.h (revision 6880) -+++ modules/flann/include/opencv2/flann/lsh_index.h (revision 6881) -@@ -56,7 +56,7 @@ - - struct LshIndexParams : public IndexParams - { -- LshIndexParams(unsigned int table_number, unsigned int key_size, unsigned int multi_probe_level) -+ LshIndexParams(unsigned int table_number = 12, unsigned int key_size = 20, unsigned int multi_probe_level = 2) - { - (* this)["algorithm"] = FLANN_INDEX_LSH; - // The number of hash tables to use diff --git a/graphics/opencv/files/patch-modules-highgui-src-cap_ffmpeg_impl.hpp b/graphics/opencv/files/patch-modules-highgui-src-cap_ffmpeg_impl.hpp deleted file mode 100644 index 41a9e9c944c1..000000000000 --- a/graphics/opencv/files/patch-modules-highgui-src-cap_ffmpeg_impl.hpp +++ /dev/null @@ -1,12 +0,0 @@ ---- modules/highgui/src/cap_ffmpeg_impl.hpp.orig 2011-07-11 09:39:11.188904113 +0200 -+++ modules/highgui/src/cap_ffmpeg_impl.hpp 2011-07-11 09:39:41.732624055 +0200 -@@ -57,7 +57,8 @@ - #define UINT64_C - #define __STDC_CONSTANT_MACROS - // force re-inclusion of stdint.h to get INT64_C macro --#undef _STDINT_H -+#undef _SYS_STDINT_H_ -+#undef _MACHINE__STDINT_H_ - #include <stdint.h> - #endif - #include <errno.h> diff --git a/graphics/opencv/files/patch-modules-highgui-src-cap_v4l.cpp b/graphics/opencv/files/patch-modules-highgui-src-cap_v4l.cpp deleted file mode 100644 index b70a409b23b0..000000000000 --- a/graphics/opencv/files/patch-modules-highgui-src-cap_v4l.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- modules/highgui/src/cap_v4l.cpp.orig 2011-06-21 15:24:06.000000000 +0200 -+++ modules/highgui/src/cap_v4l.cpp 2011-06-27 08:38:16.221682985 +0200 -@@ -218,7 +218,6 @@ - - #include <string.h> - #include <stdlib.h> --#include <asm/types.h> /* for videodev2.h */ - #include <assert.h> - #include <sys/stat.h> - #include <sys/ioctl.h> -@@ -649,8 +648,7 @@ - - static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) - { -- -- __u32 ctrl_id; -+ uint32_t ctrl_id; - - for (ctrl_id = V4L2_CID_BASE; - ctrl_id < V4L2_CID_LASTP1; diff --git a/graphics/opencv/files/patch-modules-traincascade-imagestorage.h b/graphics/opencv/files/patch-modules-traincascade-imagestorage.h deleted file mode 100644 index 405e3dc3c6ca..000000000000 --- a/graphics/opencv/files/patch-modules-traincascade-imagestorage.h +++ /dev/null @@ -1,10 +0,0 @@ ---- modules/traincascade/imagestorage.h.orig 2011-06-27 08:30:19.212006174 +0200 -+++ modules/traincascade/imagestorage.h 2011-06-27 08:30:50.325671316 +0200 -@@ -1,6 +1,7 @@ - #ifndef _OPENCV_IMAGESTORAGE_H_ - #define _OPENCV_IMAGESTORAGE_H_ - -+#include <cstdio> - #include "highgui.h" - - using namespace cv; diff --git a/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp b/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp index 51b0ad576920..d44b043812a7 100644 --- a/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp +++ b/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp @@ -1,37 +1,10 @@ ---- ./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); +--- ./modules/contrib/src/spinimages.cpp.orig 2013-10-26 07:55:45.000000000 -0400 ++++ ./modules/contrib/src/spinimages.cpp 2013-10-26 07:56:13.000000000 -0400 +@@ -46,6 +46,7 @@ + #include <functional> + #include <fstream> + #include <limits> ++#include <numeric> + #include <set> + + using namespace cv; diff --git a/graphics/opencv/files/patch-modules__core__src__system.cpp b/graphics/opencv/files/patch-modules__core__src__system.cpp new file mode 100644 index 000000000000..52d8857f72da --- /dev/null +++ b/graphics/opencv/files/patch-modules__core__src__system.cpp @@ -0,0 +1,41 @@ +--- ./modules/core/src/system.cpp.orig 2013-11-25 05:42:32.000000000 -0500 ++++ ./modules/core/src/system.cpp 2013-11-25 05:42:42.000000000 -0500 +@@ -126,7 +126,7 @@ + + #include <stdarg.h> + +-#if defined __linux__ || defined __APPLE__ ++#if defined __linux__ || defined __APPLE__ || defined __FreeBSD__ + #include <unistd.h> + #include <stdio.h> + #include <sys/types.h> +@@ -897,14 +897,23 @@ + + struct Mutex::Impl + { +- Impl() { pthread_mutex_init(&sl, 0); refcount = 1; } +- ~Impl() { pthread_mutex_destroy(&sl); } ++ Impl() ++ { ++ pthread_mutexattr_t attr; ++ pthread_mutexattr_init(&attr); ++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); ++ pthread_mutex_init(&mt, &attr); ++ pthread_mutexattr_destroy(&attr); + +- void lock() { pthread_mutex_lock(&sl); } +- bool trylock() { return pthread_mutex_trylock(&sl) == 0; } +- void unlock() { pthread_mutex_unlock(&sl); } ++ refcount = 1; ++ } ++ ~Impl() { pthread_mutex_destroy(&mt); } + +- pthread_mutex_t sl; ++ void lock() { pthread_mutex_lock(&mt); } ++ bool trylock() { return pthread_mutex_trylock(&mt) == 0; } ++ void unlock() { pthread_mutex_unlock(&mt); } ++ ++ pthread_mutex_t mt; + int refcount; + }; + diff --git a/graphics/opencv/files/patch-modules-highgui-src-cap_libv4l.cpp b/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp index 95ebcaa7deaf..33a6ec871e13 100644 --- a/graphics/opencv/files/patch-modules-highgui-src-cap_libv4l.cpp +++ b/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp @@ -1,6 +1,6 @@ ---- modules/highgui/src/cap_libv4l.cpp.orig 2011-06-21 15:24:06.000000000 +0200 -+++ modules/highgui/src/cap_libv4l.cpp 2011-06-27 08:39:17.750223439 +0200 -@@ -236,7 +236,6 @@ +--- ./modules/highgui/src/cap_libv4l.cpp.orig 2013-07-10 07:49:00.000000000 -0400 ++++ ./modules/highgui/src/cap_libv4l.cpp 2013-10-23 23:52:32.000000000 -0400 +@@ -237,7 +237,6 @@ #include <sys/mman.h> #include <string.h> #include <stdlib.h> @@ -8,7 +8,7 @@ #include <assert.h> #include <sys/stat.h> #include <sys/ioctl.h> -@@ -568,7 +567,7 @@ +@@ -574,7 +573,7 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) { diff --git a/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp b/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp new file mode 100644 index 000000000000..b8ad1a3fdfa3 --- /dev/null +++ b/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp @@ -0,0 +1,19 @@ +--- ./modules/highgui/src/cap_v4l.cpp.orig 2013-10-23 23:54:06.000000000 -0400 ++++ ./modules/highgui/src/cap_v4l.cpp 2013-10-23 23:55:25.000000000 -0400 +@@ -232,7 +232,6 @@ + #include <sys/ioctl.h> + + #ifdef HAVE_CAMV4L2 +-#include <asm/types.h> /* for videodev2.h */ + #include <linux/videodev2.h> + #endif + +@@ -663,7 +662,7 @@ + static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) + { + +- __u32 ctrl_id; ++ uint32_t ctrl_id; + + for (ctrl_id = V4L2_CID_BASE; + ctrl_id < V4L2_CID_LASTP1; diff --git a/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp b/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp deleted file mode 100644 index 291e01174ea4..000000000000 --- a/graphics/opencv/files/patch-modules__highgui__src__window_QT.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ./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__ts__include__opencv2__ts__ts_gtest.h b/graphics/opencv/files/patch-modules__ts__include__opencv2__ts__ts_gtest.h deleted file mode 100644 index 488fae36dcd0..000000000000 --- a/graphics/opencv/files/patch-modules__ts__include__opencv2__ts__ts_gtest.h +++ /dev/null @@ -1,10 +0,0 @@ ---- modules/ts/include/opencv2/ts/ts_gtest.h.orig 2013-10-05 20:21:38.114793865 +0000 -+++ modules/ts/include/opencv2/ts/ts_gtest.h 2013-10-05 20:21:32.318782942 +0000 -@@ -53,6 +53,7 @@ - - #include <limits> - #include <vector> -+#include <unistd.h> - - // Copyright 2005, Google Inc. - // All rights reserved. diff --git a/graphics/opencv/files/patch-modules__ts__src__ts.cpp b/graphics/opencv/files/patch-modules__ts__src__ts.cpp new file mode 100644 index 000000000000..44151a8a0e3d --- /dev/null +++ b/graphics/opencv/files/patch-modules__ts__src__ts.cpp @@ -0,0 +1,20 @@ +--- ./modules/ts/src/ts.cpp.orig 2013-10-26 08:01:35.000000000 -0400 ++++ ./modules/ts/src/ts.cpp 2013-10-26 08:02:28.000000000 -0400 +@@ -562,7 +562,7 @@ + for( int i = 0; i < MAX_IDX; i++ ) + if( (streams & (1 << i)) ) + { +- output_buf[i] += std::string(str); ++ output_buf[i] += ::std::string(str); + // in the new GTest-based framework we do not use + // any output files (except for the automatically generated xml report). + // if a test fails, all the buffers are printed, so we do not want to duplicate the information and +@@ -617,7 +617,7 @@ + Scalar s; + uchar *p = NULL; + int n = 100/delta; +- int nR = std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2); ++ int nR = ::std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2); + + int r, c, i; + for(r=0; r<nR; r++) diff --git a/graphics/opencv/files/patch-samples-cpp-image.cpp b/graphics/opencv/files/patch-samples-cpp-image.cpp deleted file mode 100644 index bb12d1310d30..000000000000 --- a/graphics/opencv/files/patch-samples-cpp-image.cpp +++ /dev/null @@ -1,7 +0,0 @@ ---- samples/cpp/image.cpp.orig 2011-06-21 15:24:12.000000000 +0200 -+++ samples/cpp/image.cpp 2011-06-27 08:32:11.174032625 +0200 -@@ -1,3 +1,4 @@ -+#include <cstdio> - #include "cv.h" // include standard OpenCV headers, same as before - #include "highgui.h" - #include "ml.h" diff --git a/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp b/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp new file mode 100644 index 000000000000..8c0e72703f52 --- /dev/null +++ b/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp @@ -0,0 +1,15 @@ +--- ./samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp.orig 2013-10-26 09:51:39.000000000 -0400 ++++ ./samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp 2013-10-26 09:51:47.000000000 -0400 +@@ -1,4 +1,4 @@ +-#include <opencv2/core/core.hpp> ++#include <opencv2/core/core.hpp> + #include <opencv2/highgui/highgui.hpp> + #include <iostream> + #include <sstream> +@@ -213,4 +213,4 @@ + } + + return I; +-} +\ No newline at end of file ++} diff --git a/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp b/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp deleted file mode 100644 index 45e93d010363..000000000000 --- a/graphics/opencv/files/patch-samples_cpp_bagofwords_classification.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- 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(); diff --git a/graphics/opencv/pkg-descr b/graphics/opencv/pkg-descr index 430f2491b6ec..688822e99384 100644 --- a/graphics/opencv/pkg-descr +++ b/graphics/opencv/pkg-descr @@ -1,6 +1,20 @@ -The Open Computer Vision Library is a collection of algorithms and sample -code for various computer vision problems. The library is compatible with -IPL and utilizes Intel Integrated Performance Primitives for better -performance. +OpenCV (Open Source Computer Vision Library) is an open source +computer vision and machine learning software library. OpenCV was +built to provide a common infrastructure for computer vision +applications and to accelerate the use of machine perception in the +commercial products. Being a BSD-licensed product, OpenCV makes it +easy for businesses to utilize and modify the code. + +The library has more than 2500 optimized algorithms, which includes +a comprehensive set of both classic and state-of-the-art computer +vision and machine learning algorithms. These algorithms can be +used to detect and recognize faces, identify objects, classify human +actions in videos, track camera movements, track moving objects, +extract 3D models of objects, produce 3D point clouds from stereo +cameras, stitch images together to produce a high resolution image +of an entire scene, find similar images from an image database, +remove red eyes from images taken using flash, follow eye movements, +recognize scenery and establish markers to overlay it with augmented +reality, etc. WWW: http://www.opencv.org diff --git a/graphics/opencv/pkg-plist b/graphics/opencv/pkg-plist index 74ca77e3ad8e..fbc316e4c901 100644 --- a/graphics/opencv/pkg-plist +++ b/graphics/opencv/pkg-plist @@ -1,7 +1,6 @@ bin/opencv_createsamples bin/opencv_haartraining bin/opencv_performance -bin/opencv_stitching bin/opencv_traincascade include/opencv/cv.h include/opencv/cv.hpp @@ -16,23 +15,136 @@ include/opencv/highgui.h include/opencv/ml.h include/opencv2/calib3d/calib3d.hpp include/opencv2/contrib/contrib.hpp +include/opencv2/contrib/detection_based_tracker.hpp +include/opencv2/contrib/hybridtracker.hpp +include/opencv2/contrib/openfabmap.hpp include/opencv2/contrib/retina.hpp include/opencv2/features2d/features2d.hpp -include/opencv2/gpu/NCV.hpp -include/opencv2/gpu/NPP_staging.hpp +include/opencv2/flann/all_indices.h +include/opencv2/flann/allocator.h +include/opencv2/flann/any.h +include/opencv2/flann/autotuned_index.h +include/opencv2/flann/composite_index.h +include/opencv2/flann/config.h +include/opencv2/flann/defines.h +include/opencv2/flann/dist.h +include/opencv2/flann/dummy.h +include/opencv2/flann/dynamic_bitset.h +include/opencv2/flann/flann.hpp +include/opencv2/flann/flann_base.hpp +include/opencv2/flann/general.h +include/opencv2/flann/ground_truth.h +include/opencv2/flann/hdf5.h +include/opencv2/flann/heap.h +include/opencv2/flann/hierarchical_clustering_index.h +include/opencv2/flann/index_testing.h +include/opencv2/flann/kdtree_index.h +include/opencv2/flann/kdtree_single_index.h +include/opencv2/flann/kmeans_index.h +include/opencv2/flann/linear_index.h +include/opencv2/flann/logger.h +include/opencv2/flann/lsh_index.h +include/opencv2/flann/lsh_table.h +include/opencv2/flann/matrix.h +include/opencv2/flann/miniflann.hpp +include/opencv2/flann/nn_index.h +include/opencv2/flann/object_factory.h +include/opencv2/flann/params.h +include/opencv2/flann/random.h +include/opencv2/flann/result_set.h +include/opencv2/flann/sampling.h +include/opencv2/flann/saving.h +include/opencv2/flann/simplex_downhill.h +include/opencv2/flann/timer.h +include/opencv2/gpu/device/block.hpp +include/opencv2/gpu/device/border_interpolate.hpp +include/opencv2/gpu/device/color.hpp +include/opencv2/gpu/device/common.hpp +include/opencv2/gpu/device/datamov_utils.hpp +include/opencv2/gpu/device/detail/color_detail.hpp +include/opencv2/gpu/device/detail/reduce.hpp +include/opencv2/gpu/device/detail/reduce_key_val.hpp +include/opencv2/gpu/device/detail/transform_detail.hpp +include/opencv2/gpu/device/detail/type_traits_detail.hpp +include/opencv2/gpu/device/detail/vec_distance_detail.hpp +include/opencv2/gpu/device/dynamic_smem.hpp +include/opencv2/gpu/device/emulation.hpp +include/opencv2/gpu/device/filters.hpp +include/opencv2/gpu/device/funcattrib.hpp +include/opencv2/gpu/device/functional.hpp +include/opencv2/gpu/device/limits.hpp +include/opencv2/gpu/device/reduce.hpp +include/opencv2/gpu/device/saturate_cast.hpp +include/opencv2/gpu/device/scan.hpp +include/opencv2/gpu/device/simd_functions.hpp +include/opencv2/gpu/device/static_check.hpp +include/opencv2/gpu/device/transform.hpp +include/opencv2/gpu/device/type_traits.hpp +include/opencv2/gpu/device/utility.hpp +include/opencv2/gpu/device/vec_distance.hpp +include/opencv2/gpu/device/vec_math.hpp +include/opencv2/gpu/device/vec_traits.hpp +include/opencv2/gpu/device/warp.hpp +include/opencv2/gpu/device/warp_reduce.hpp +include/opencv2/gpu/device/warp_shuffle.hpp include/opencv2/gpu/devmem2d.hpp include/opencv2/gpu/gpu.hpp include/opencv2/gpu/gpumat.hpp -include/opencv2/gpu/matrix_operations.hpp include/opencv2/gpu/stream_accessor.hpp +include/opencv2/highgui/cap_ios.h include/opencv2/highgui/highgui.hpp include/opencv2/highgui/highgui_c.h +include/opencv2/highgui/ios.h include/opencv2/legacy/blobtrack.hpp include/opencv2/legacy/compat.hpp include/opencv2/legacy/legacy.hpp include/opencv2/legacy/streams.hpp +include/opencv2/ml/ml.hpp +%%NONFREE%%include/opencv2/nonfree/features2d.hpp +%%NONFREE%%include/opencv2/nonfree/gpu.hpp +%%NONFREE%%include/opencv2/nonfree/nonfree.hpp +%%NONFREE%%include/opencv2/nonfree/ocl.hpp include/opencv2/objdetect/objdetect.hpp +include/opencv2/ocl/matrix_operations.hpp +include/opencv2/ocl/ocl.hpp include/opencv2/opencv.hpp +include/opencv2/opencv_modules.hpp +include/opencv2/photo/photo.hpp +include/opencv2/photo/photo_c.h +include/opencv2/stitching/detail/autocalib.hpp +include/opencv2/stitching/detail/blenders.hpp +include/opencv2/stitching/detail/camera.hpp +include/opencv2/stitching/detail/exposure_compensate.hpp +include/opencv2/stitching/detail/matchers.hpp +include/opencv2/stitching/detail/motion_estimators.hpp +include/opencv2/stitching/detail/seam_finders.hpp +include/opencv2/stitching/detail/util.hpp +include/opencv2/stitching/detail/util_inl.hpp +include/opencv2/stitching/detail/warpers.hpp +include/opencv2/stitching/detail/warpers_inl.hpp +include/opencv2/stitching/stitcher.hpp +include/opencv2/stitching/warpers.hpp +include/opencv2/superres/optical_flow.hpp +include/opencv2/superres/superres.hpp +include/opencv2/ts/gpu_perf.hpp +include/opencv2/ts/gpu_test.hpp +include/opencv2/ts/ts.hpp +include/opencv2/ts/ts_gtest.h +include/opencv2/ts/ts_perf.hpp +include/opencv2/video/background_segm.hpp +include/opencv2/video/tracking.hpp +include/opencv2/video/video.hpp +include/opencv2/videostab/deblurring.hpp +include/opencv2/videostab/fast_marching.hpp +include/opencv2/videostab/fast_marching_inl.hpp +include/opencv2/videostab/frame_source.hpp +include/opencv2/videostab/global_motion.hpp +include/opencv2/videostab/inpainting.hpp +include/opencv2/videostab/log.hpp +include/opencv2/videostab/motion_stabilizing.hpp +include/opencv2/videostab/optical_flow.hpp +include/opencv2/videostab/stabilizer.hpp +include/opencv2/videostab/videostab.hpp lib/libopencv_calib3d.so lib/libopencv_calib3d.so.2 lib/libopencv_calib3d.so.%%VERSION%% @@ -42,6 +154,9 @@ lib/libopencv_contrib.so.%%VERSION%% lib/libopencv_features2d.so lib/libopencv_features2d.so.2 lib/libopencv_features2d.so.%%VERSION%% +lib/libopencv_flann.so +lib/libopencv_flann.so.2 +lib/libopencv_flann.so.%%VERSION%% lib/libopencv_gpu.so lib/libopencv_gpu.so.2 lib/libopencv_gpu.so.%%VERSION%% @@ -51,12 +166,39 @@ lib/libopencv_highgui.so.%%VERSION%% lib/libopencv_legacy.so lib/libopencv_legacy.so.2 lib/libopencv_legacy.so.%%VERSION%% +lib/libopencv_ml.so +lib/libopencv_ml.so.2 +lib/libopencv_ml.so.%%VERSION%% +%%NONFREE%%lib/libopencv_nonfree.so +%%NONFREE%%lib/libopencv_nonfree.so.2 +%%NONFREE%%lib/libopencv_nonfree.so.%%VERSION%% lib/libopencv_objdetect.so lib/libopencv_objdetect.so.2 lib/libopencv_objdetect.so.%%VERSION%% +lib/libopencv_ocl.so +lib/libopencv_ocl.so.2 +lib/libopencv_ocl.so.%%VERSION%% +lib/libopencv_photo.so +lib/libopencv_photo.so.2 +lib/libopencv_photo.so.%%VERSION%% +lib/libopencv_stitching.so +lib/libopencv_stitching.so.2 +lib/libopencv_stitching.so.%%VERSION%% +lib/libopencv_superres.so +lib/libopencv_superres.so.2 +lib/libopencv_superres.so.%%VERSION%% +lib/libopencv_ts.a +lib/libopencv_video.so +lib/libopencv_video.so.2 +lib/libopencv_video.so.%%VERSION%% +lib/libopencv_videostab.so +lib/libopencv_videostab.so.2 +lib/libopencv_videostab.so.%%VERSION%% libdata/pkgconfig/opencv.pc -%%DATADIR%%/OpenCVConfig.cmake %%DATADIR%%/OpenCVConfig-version.cmake +%%DATADIR%%/OpenCVConfig.cmake +%%DATADIR%%/OpenCVModules-%%CMAKE_BUILD_TYPE%%.cmake +%%DATADIR%%/OpenCVModules.cmake %%DATADIR%%/haarcascades/haarcascade_eye.xml %%DATADIR%%/haarcascades/haarcascade_eye_tree_eyeglasses.xml %%DATADIR%%/haarcascades/haarcascade_frontalface_alt.xml @@ -77,14 +219,31 @@ libdata/pkgconfig/opencv.pc %%DATADIR%%/haarcascades/haarcascade_mcs_upperbody.xml %%DATADIR%%/haarcascades/haarcascade_profileface.xml %%DATADIR%%/haarcascades/haarcascade_righteye_2splits.xml +%%DATADIR%%/haarcascades/haarcascade_smile.xml %%DATADIR%%/haarcascades/haarcascade_upperbody.xml %%DATADIR%%/lbpcascades/lbpcascade_frontalface.xml +%%DATADIR%%/lbpcascades/lbpcascade_profileface.xml +%%DATADIR%%/lbpcascades/lbpcascade_silverware.xml @dirrm %%DATADIR%%/lbpcascades @dirrm %%DATADIR%%/haarcascades +@dirrmtry %%DATADIR%% +@dirrm include/opencv2/videostab +@dirrm include/opencv2/video +@dirrm include/opencv2/ts +@dirrm include/opencv2/superres +@dirrm include/opencv2/stitching/detail +@dirrm include/opencv2/stitching +@dirrm include/opencv2/photo +@dirrm include/opencv2/ocl @dirrm include/opencv2/objdetect +%%NONFREE%%@dirrm include/opencv2/nonfree +@dirrm include/opencv2/ml @dirrm include/opencv2/legacy @dirrm include/opencv2/highgui +@dirrm include/opencv2/gpu/device/detail +@dirrm include/opencv2/gpu/device @dirrm include/opencv2/gpu +@dirrm include/opencv2/flann @dirrm include/opencv2/features2d @dirrm include/opencv2/contrib @dirrm include/opencv2/calib3d diff --git a/graphics/opencv/pkg-plist.oc b/graphics/opencv/pkg-plist.oc deleted file mode 100644 index c788596c66f0..000000000000 --- a/graphics/opencv/pkg-plist.oc +++ /dev/null @@ -1,83 +0,0 @@ -include/opencv2/core/core.hpp -include/opencv2/core/core_c.h -include/opencv2/core/eigen.hpp -include/opencv2/core/internal.hpp -include/opencv2/core/mat.hpp -include/opencv2/core/operations.hpp -include/opencv2/core/types_c.h -include/opencv2/core/version.hpp -include/opencv2/core/wimage.hpp -include/opencv2/flann/all_indices.h -include/opencv2/flann/allocator.h -include/opencv2/flann/any.h -include/opencv2/flann/autotuned_index.h -include/opencv2/flann/composite_index.h -include/opencv2/flann/config.h -include/opencv2/flann/defines.h -include/opencv2/flann/dist.h -include/opencv2/flann/dummy.h -include/opencv2/flann/dynamic_bitset.h -include/opencv2/flann/flann.hpp -include/opencv2/flann/flann_base.hpp -include/opencv2/flann/general.h -include/opencv2/flann/ground_truth.h -include/opencv2/flann/hdf5.h -include/opencv2/flann/heap.h -include/opencv2/flann/hierarchical_clustering_index.h -include/opencv2/flann/index_testing.h -include/opencv2/flann/kdtree_index.h -include/opencv2/flann/kdtree_single_index.h -include/opencv2/flann/kmeans_index.h -include/opencv2/flann/linear_index.h -include/opencv2/flann/logger.h -include/opencv2/flann/lsh_index.h -include/opencv2/flann/lsh_table.h -include/opencv2/flann/matrix.h -include/opencv2/flann/miniflann.hpp -include/opencv2/flann/nn_index.h -include/opencv2/flann/object_factory.h -include/opencv2/flann/params.h -include/opencv2/flann/random.h -include/opencv2/flann/result_set.h -include/opencv2/flann/sampling.h -include/opencv2/flann/saving.h -include/opencv2/flann/simplex_downhill.h -include/opencv2/flann/timer.h -include/opencv2/imgproc/imgproc.hpp -include/opencv2/imgproc/imgproc_c.h -include/opencv2/imgproc/types_c.h -include/opencv2/ml/ml.hpp -include/opencv2/ts/ts.hpp -include/opencv2/ts/ts_gtest.h -include/opencv2/video/background_segm.hpp -include/opencv2/video/tracking.hpp -include/opencv2/video/video.hpp -lib/libopencv_core.so -lib/libopencv_core.so.2 -lib/libopencv_core.so.%%VERSION%% -lib/libopencv_flann.so -lib/libopencv_flann.so.2 -lib/libopencv_flann.so.%%VERSION%% -lib/libopencv_imgproc.so -lib/libopencv_imgproc.so.2 -lib/libopencv_imgproc.so.%%VERSION%% -lib/libopencv_ml.so -lib/libopencv_ml.so.2 -lib/libopencv_ml.so.%%VERSION%% -lib/libopencv_ts.so -lib/libopencv_ts.so.2 -lib/libopencv_ts.so.%%VERSION%% -lib/libopencv_video.so -lib/libopencv_video.so.2 -lib/libopencv_video.so.%%VERSION%% -libdata/pkgconfig/opencv-core.pc -%%DATADIR%%/OpenCVConfig-core.cmake -%%DATADIR%%/OpenCVConfig-core-version.cmake -@dirrm %%DATADIR%% -@dirrm include/opencv2/video -@dirrm include/opencv2/ts -@dirrm include/opencv2/ml -@dirrm include/opencv2/imgproc -@dirrm include/opencv2/flann -@dirrm include/opencv2/core -@dirrm include/opencv2 diff --git a/graphics/opencv/pkg-plist.python b/graphics/opencv/pkg-plist.python deleted file mode 100644 index 7d1e8570c345..000000000000 --- a/graphics/opencv/pkg-plist.python +++ /dev/null @@ -1,3 +0,0 @@ -%%PYTHON_SITELIBDIR%%/cv2.so -%%PYTHON_SITELIBDIR%%/cv.py -@dirrmtry %%PYTHON_SITELIBDIR%% |