diff options
author | fhajny <fhajny> | 2015-10-17 10:28:43 +0000 |
---|---|---|
committer | fhajny <fhajny> | 2015-10-17 10:28:43 +0000 |
commit | c6896300b2ffe9c2343a78206b402f1d9ec5ff56 (patch) | |
tree | 48952031b196399d35affdbf3de3e54bb7727943 /graphics | |
parent | 76e4f884b6eeeb30052e7540c188cf0bae33e553 (diff) | |
download | pkgsrc-c6896300b2ffe9c2343a78206b402f1d9ec5ff56.tar.gz |
Import the last state of graphics/opencv before the update to 3.0.0 and
update it to the latest version on the 2.4 branch. The graphics/opencv
base package doesn't yet provide the same range of modules, as upstream
split off some experimental modules into a separate contrib repo.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/opencv2/DESCR | 12 | ||||
-rw-r--r-- | graphics/opencv2/Makefile | 56 | ||||
-rw-r--r-- | graphics/opencv2/PLIST | 256 | ||||
-rw-r--r-- | graphics/opencv2/buildlink3.mk | 13 | ||||
-rw-r--r-- | graphics/opencv2/distinfo | 13 | ||||
-rw-r--r-- | graphics/opencv2/hacks.mk | 19 | ||||
-rw-r--r-- | graphics/opencv2/options.mk | 29 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_contrib_src_inputoutput.cpp | 60 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_contrib_src_spinimages.cpp | 12 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_core_include_opencv2_core_types_c.h | 15 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_core_src_system.cpp | 12 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_flann_include_opencv2_flann_defines.h | 16 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_ocl_src_gftt.cpp | 16 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_python_src2_cv2.cv.hpp | 16 | ||||
-rw-r--r-- | graphics/opencv2/patches/patch-modules_ts_src_ts.cpp | 24 |
15 files changed, 569 insertions, 0 deletions
diff --git a/graphics/opencv2/DESCR b/graphics/opencv2/DESCR new file mode 100644 index 00000000000..f3eb010f008 --- /dev/null +++ b/graphics/opencv2/DESCR @@ -0,0 +1,12 @@ +OpenCV means Intel(R) Open Source Computer Vision Library. It is a +collection of C functions and a few C++ classes that implement many +popular Image Processing and Computer Vision algorithms. + +OpenCV provides cross-platform middle-to-high level API that includes +about 300 C functions and a few C++ classes. Also there are Python +bindings to OpenCV. OpenCV has no strict dependencies on external +libraries, though it can use some (such as libjpeg, ffmpeg, GTK+ etc.) + +OpenCV provides transparent interface to Intel(R) Integrated Performance +Primitives (IPP). That is, it loads automatically IPP libraries optimized +for specific processor at runtime, if they are available. diff --git a/graphics/opencv2/Makefile b/graphics/opencv2/Makefile new file mode 100644 index 00000000000..4a308882e80 --- /dev/null +++ b/graphics/opencv2/Makefile @@ -0,0 +1,56 @@ +# $NetBSD: Makefile,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +DISTNAME= opencv-2.4.11 +CATEGORIES= graphics devel +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opencvlibrary/} +EXTRACT_SUFX= .zip + +MAINTAINER= anthony.mallet@laas.fr +HOMEPAGE= http://code.opencv.org/projects/OpenCV/wiki/WikiStart +COMMENT= Library for computer vision problems +LICENSE= modified-bsd + +USE_CMAKE= yes +USE_LANGUAGES= c c++ +USE_LIBTOOL= yes +USE_PKGLOCALEDIR= yes +USE_TOOLS+= gmake pkg-config + +INSTALLATION_DIRS+= share/doc/opencv/papers +INSTALLATION_DIRS+= share/doc/opencv/ref/pics +INSTALLATION_DIRS+= share/OpenCV/haarcascades + +PKGCONFIG_OVERRIDE+= opencv.pc.cmake.in + +REPLACE_PYTHON+= samples/python/*.py + +WRKSRC= ${WRKDIR}/${DISTNAME:S/a$//} + +# includes configure output and paths to gmake etc. +CHECK_WRKREF_SKIP= ${PREFIX}/lib/libopencv_core.* + +.include "options.mk" + +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +CXXFLAGS+= -std=c++11 +.endif + +OPSYSVARS+= CMAKE_ARGS +CMAKE_ARGS+= -DZLIB_ROOT=${BUILDLINK_PREFIX.zlib} +CMAKE_ARGS.SunOS+= -DENABLE_PRECOMPILED_HEADERS=NO + +PLIST_VARS+= opencl + +.if ${OPSYS} == "Darwin" || ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS" || ${OPSYS} == "Linux" || ${OPSYS} == "FreeBSD" +PLIST.opencl= yes +.endif + +.include "../../devel/zlib/buildlink3.mk" +.include "../../graphics/jasper/buildlink3.mk" +.include "../../graphics/openexr/buildlink3.mk" +.include "../../graphics/png/buildlink3.mk" +.include "../../graphics/tiff/buildlink3.mk" +.include "../../mk/jpeg.buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/graphics/opencv2/PLIST b/graphics/opencv2/PLIST new file mode 100644 index 00000000000..efd332cf2f3 --- /dev/null +++ b/graphics/opencv2/PLIST @@ -0,0 +1,256 @@ +@comment $NetBSD: PLIST,v 1.1 2015/10/17 10:28:43 fhajny Exp $ +bin/opencv_annotation +bin/opencv_createsamples +bin/opencv_haartraining +bin/opencv_performance +bin/opencv_traincascade +include/opencv/cv.h +include/opencv/cv.hpp +include/opencv/cvaux.h +include/opencv/cvaux.hpp +include/opencv/cvwimage.h +include/opencv/cxcore.h +include/opencv/cxcore.hpp +include/opencv/cxeigen.hpp +include/opencv/cxmisc.h +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/core/affine.hpp +include/opencv2/core/core.hpp +include/opencv2/core/core_c.h +include/opencv2/core/cuda_devptrs.hpp +include/opencv2/core/devmem2d.hpp +include/opencv2/core/eigen.hpp +include/opencv2/core/gpumat.hpp +include/opencv2/core/internal.hpp +include/opencv2/core/mat.hpp +include/opencv2/core/opengl_interop.hpp +include/opencv2/core/opengl_interop_deprecated.hpp +include/opencv2/core/operations.hpp +include/opencv2/core/types_c.h +include/opencv2/core/version.hpp +include/opencv2/core/wimage.hpp +include/opencv2/features2d/features2d.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/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/imgproc/imgproc.hpp +include/opencv2/imgproc/imgproc_c.h +include/opencv2/imgproc/types_c.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 +include/opencv2/nonfree/features2d.hpp +include/opencv2/nonfree/gpu.hpp +include/opencv2/nonfree/nonfree.hpp +include/opencv2/nonfree/ocl.hpp +include/opencv2/objdetect/objdetect.hpp +${PLIST.opencl}include/opencv2/ocl/matrix_operations.hpp +${PLIST.opencl}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.4 +lib/libopencv_calib3d.so.${PKGVERSION} +lib/libopencv_contrib.so +lib/libopencv_contrib.so.2.4 +lib/libopencv_contrib.so.${PKGVERSION} +lib/libopencv_core.so +lib/libopencv_core.so.2.4 +lib/libopencv_core.so.${PKGVERSION} +lib/libopencv_features2d.so +lib/libopencv_features2d.so.2.4 +lib/libopencv_features2d.so.${PKGVERSION} +lib/libopencv_flann.so +lib/libopencv_flann.so.2.4 +lib/libopencv_flann.so.${PKGVERSION} +lib/libopencv_gpu.so +lib/libopencv_gpu.so.2.4 +lib/libopencv_gpu.so.${PKGVERSION} +lib/libopencv_highgui.so +lib/libopencv_highgui.so.2.4 +lib/libopencv_highgui.so.${PKGVERSION} +lib/libopencv_imgproc.so +lib/libopencv_imgproc.so.2.4 +lib/libopencv_imgproc.so.${PKGVERSION} +lib/libopencv_legacy.so +lib/libopencv_legacy.so.2.4 +lib/libopencv_legacy.so.${PKGVERSION} +lib/libopencv_ml.so +lib/libopencv_ml.so.2.4 +lib/libopencv_ml.so.${PKGVERSION} +lib/libopencv_nonfree.so +lib/libopencv_nonfree.so.2.4 +lib/libopencv_nonfree.so.${PKGVERSION} +lib/libopencv_objdetect.so +lib/libopencv_objdetect.so.2.4 +lib/libopencv_objdetect.so.${PKGVERSION} +${PLIST.opencl}lib/libopencv_ocl.so +${PLIST.opencl}lib/libopencv_ocl.so.2.4 +${PLIST.opencl}lib/libopencv_ocl.so.${PKGVERSION} +lib/libopencv_photo.so +lib/libopencv_photo.so.2.4 +lib/libopencv_photo.so.${PKGVERSION} +lib/libopencv_stitching.so +lib/libopencv_stitching.so.2.4 +lib/libopencv_stitching.so.${PKGVERSION} +lib/libopencv_superres.so +lib/libopencv_superres.so.2.4 +lib/libopencv_superres.so.${PKGVERSION} +lib/libopencv_ts.a +lib/libopencv_video.so +lib/libopencv_video.so.2.4 +lib/libopencv_video.so.${PKGVERSION} +lib/libopencv_videostab.so +lib/libopencv_videostab.so.2.4 +lib/libopencv_videostab.so.${PKGVERSION} +lib/pkgconfig/opencv.pc +${PLIST.python}${PYSITELIB}/cv.py +${PLIST.python}${PYSITELIB}/cv2.so +share/OpenCV/OpenCVConfig-version.cmake +share/OpenCV/OpenCVConfig.cmake +share/OpenCV/OpenCVModules-release.cmake +share/OpenCV/OpenCVModules.cmake +share/OpenCV/haarcascades/haarcascade_eye.xml +share/OpenCV/haarcascades/haarcascade_eye_tree_eyeglasses.xml +share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml +share/OpenCV/haarcascades/haarcascade_frontalface_alt2.xml +share/OpenCV/haarcascades/haarcascade_frontalface_alt_tree.xml +share/OpenCV/haarcascades/haarcascade_frontalface_default.xml +share/OpenCV/haarcascades/haarcascade_fullbody.xml +share/OpenCV/haarcascades/haarcascade_lefteye_2splits.xml +share/OpenCV/haarcascades/haarcascade_licence_plate_rus_16stages.xml +share/OpenCV/haarcascades/haarcascade_lowerbody.xml +share/OpenCV/haarcascades/haarcascade_mcs_eyepair_big.xml +share/OpenCV/haarcascades/haarcascade_mcs_eyepair_small.xml +share/OpenCV/haarcascades/haarcascade_mcs_leftear.xml +share/OpenCV/haarcascades/haarcascade_mcs_lefteye.xml +share/OpenCV/haarcascades/haarcascade_mcs_mouth.xml +share/OpenCV/haarcascades/haarcascade_mcs_nose.xml +share/OpenCV/haarcascades/haarcascade_mcs_rightear.xml +share/OpenCV/haarcascades/haarcascade_mcs_righteye.xml +share/OpenCV/haarcascades/haarcascade_mcs_upperbody.xml +share/OpenCV/haarcascades/haarcascade_profileface.xml +share/OpenCV/haarcascades/haarcascade_righteye_2splits.xml +share/OpenCV/haarcascades/haarcascade_russian_plate_number.xml +share/OpenCV/haarcascades/haarcascade_smile.xml +share/OpenCV/haarcascades/haarcascade_upperbody.xml +share/OpenCV/lbpcascades/lbpcascade_frontalface.xml +share/OpenCV/lbpcascades/lbpcascade_profileface.xml +share/OpenCV/lbpcascades/lbpcascade_silverware.xml diff --git a/graphics/opencv2/buildlink3.mk b/graphics/opencv2/buildlink3.mk new file mode 100644 index 00000000000..5fabec8e96b --- /dev/null +++ b/graphics/opencv2/buildlink3.mk @@ -0,0 +1,13 @@ +# $NetBSD: buildlink3.mk,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +BUILDLINK_TREE+= opencv + +.if !defined(OPENCV_BUILDLINK3_MK) +OPENCV_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.opencv+= opencv>=1.0.0nb3<3 +BUILDLINK_PKGSRCDIR.opencv?= ../../graphics/opencv2 + +.endif # OPENCV_BUILDLINK3_MK + +BUILDLINK_TREE+= -opencv diff --git a/graphics/opencv2/distinfo b/graphics/opencv2/distinfo new file mode 100644 index 00000000000..57b7df94592 --- /dev/null +++ b/graphics/opencv2/distinfo @@ -0,0 +1,13 @@ +$NetBSD: distinfo,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +SHA1 (opencv-2.4.11.zip) = d6e3048416d42213c204f89b9dfe39742f9a708c +RMD160 (opencv-2.4.11.zip) = 793391b05b571859005b98612cb176c02352a94f +Size (opencv-2.4.11.zip) = 91671436 bytes +SHA1 (patch-modules_contrib_src_inputoutput.cpp) = 57255cda71854e490d83602828299f0ab6420887 +SHA1 (patch-modules_contrib_src_spinimages.cpp) = b3e465700059616be991d597230bc8dc42f15be1 +SHA1 (patch-modules_core_include_opencv2_core_types_c.h) = c056068c01c417dc262f21c00324da7f86c0cd8e +SHA1 (patch-modules_core_src_system.cpp) = 3b7ac545585a430d28c7077f360357079f127580 +SHA1 (patch-modules_flann_include_opencv2_flann_defines.h) = ab848e67c4e03219670598ac2d21071a617a5c33 +SHA1 (patch-modules_ocl_src_gftt.cpp) = fe1107c1613881d050ec5a87fad12b916ac8b8fc +SHA1 (patch-modules_python_src2_cv2.cv.hpp) = 477bc2dd2090fd2aa955a7335717e7a0f23ebdf8 +SHA1 (patch-modules_ts_src_ts.cpp) = 61e4ab59f2ca57f75212743bf869616dfc9e5f13 diff --git a/graphics/opencv2/hacks.mk b/graphics/opencv2/hacks.mk new file mode 100644 index 00000000000..548176a7e3a --- /dev/null +++ b/graphics/opencv2/hacks.mk @@ -0,0 +1,19 @@ +# $NetBSD: hacks.mk,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +.if !defined(OPENCV_HACKS_MK) +OPENCV_HACKS_MK= defined + +.include "../../mk/bsd.fast.prefs.mk" +.include "../../mk/compiler.mk" + +# PR toolchain/47051: gcc-4.5.4 breaks opencv on amd64 +.if !empty(PKGSRC_COMPILER:Mgcc) && !empty(CC_VERSION:Mgcc-4.5.4*) && !empty(MACHINE_PLATFORM:M*-*-x86_64) +PKG_HACKS+= tree-pre +SUBST_CLASSES+= opt-hack +SUBST_STAGE.opt-hack= post-configure +SUBST_MESSAGE.opt-hack= Working around gcc-4.5.4 bug. +SUBST_FILES.opt-hack= ${WRKSRC}/modules/calib3d/CMakeFiles/opencv_calib3d.dir/build.make +SUBST_SED.opt-hack= -e '/stereosgbm.cpp.o/s/-o /-fno-tree-pre -o /' +.endif + +.endif # OPENCV_HACKS_MK diff --git a/graphics/opencv2/options.mk b/graphics/opencv2/options.mk new file mode 100644 index 00000000000..093c0f1872a --- /dev/null +++ b/graphics/opencv2/options.mk @@ -0,0 +1,29 @@ +# $NetBSD: options.mk,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.opencv +PKG_SUPPORTED_OPTIONS= python ffmpeg + +.include "../../mk/bsd.options.mk" + +PLIST_VARS+= python +.if !empty(PKG_OPTIONS:Mpython) +CMAKE_ARGS+= -DPYTHON_EXECUTABLE:FILEPATH=${PYTHONBIN} +PY_PATCHPLIST= yes +.include "../../lang/python/extension.mk" +.include "../../math/py-numpy/buildlink3.mk" +PLIST.python= yes +.else +CMAKE_ARGS+= -D BUILD_NEW_PYTHON_SUPPORT=OFF +.endif + +.if !empty(PKG_OPTIONS:Mffmpeg) +CMAKE_ARGS+= -D WITH_FFMPEG=ON +CMAKE_ARGS+= -D FFMPEG_INCLUDE_DIR=${PREFIX}/include/ffmpeg2 +CMAKE_ARGS+= -D FFMPEG_LIB_DIR=${PREFIX}/lib/ffmpeg2 +.include "../../multimedia/ffmpeg2/buildlink3.mk" +.else +CMAKE_ARGS+= -D WITH_FFMPEG=OFF +.endif + +# FIXME: should be option.mk'ed instead +CMAKE_ARGS+= -D BUILD_DOCS=OFF diff --git a/graphics/opencv2/patches/patch-modules_contrib_src_inputoutput.cpp b/graphics/opencv2/patches/patch-modules_contrib_src_inputoutput.cpp new file mode 100644 index 00000000000..22c7b91b3de --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_contrib_src_inputoutput.cpp @@ -0,0 +1,60 @@ +$NetBSD: patch-modules_contrib_src_inputoutput.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +SunOS does not have dirent d_type. + +--- modules/contrib/src/inputoutput.cpp.orig 2015-02-25 12:10:31.000000000 +0000 ++++ modules/contrib/src/inputoutput.cpp +@@ -6,6 +6,9 @@ + #include <windows.h> + #include <tchar.h> + #else ++#ifdef __sun ++ #include <sys/stat.h> ++#endif + #include <dirent.h> + #endif + +@@ -72,6 +75,10 @@ namespace cv + (void)addPath; + DIR *dp; + struct dirent *dirp; ++#ifdef __sun ++ struct stat sb; ++ char buf[PATH_MAX]; ++#endif + if((dp = opendir(path.c_str())) == NULL) + { + return list; +@@ -96,6 +103,10 @@ namespace cv + extra = _DEXTRA_NEXT(extra), + extra_stat = reinterpret_cast<dirent_extra_stat *>(extra)) + if ((extra->d_type != _DTYPE_NONE) && S_ISREG(extra_stat->d_stat.st_mode)) ++ #elif defined(__sun) ++ snprintf(buf, PATH_MAX, "%s/%s", path.c_str(), dirp->d_name); ++ stat(buf, &sb); ++ if (S_ISREG(sb.st_mode)) + #else + if (dirp->d_type == DT_REG) + #endif +@@ -181,6 +192,10 @@ namespace cv + (void)addPath; + DIR *dp; + struct dirent *dirp; ++#ifdef __sun ++ struct stat sb; ++ char buf[PATH_MAX]; ++#endif + if((dp = opendir(path_f.c_str())) == NULL) + { + return list; +@@ -206,6 +221,10 @@ namespace cv + extra_stat = reinterpret_cast<dirent_extra_stat *>(extra)) + if ((extra->d_type != _DTYPE_NONE) && + S_ISDIR(extra_stat->d_stat.st_mode) && ++ #elif defined(__sun) ++ snprintf(buf, PATH_MAX, "%s/%s", path.c_str(), dirp->d_name); ++ stat(buf, &sb); ++ if (S_ISDIR(sb.st_mode) && + #else + if (dirp->d_type == DT_DIR && + #endif diff --git a/graphics/opencv2/patches/patch-modules_contrib_src_spinimages.cpp b/graphics/opencv2/patches/patch-modules_contrib_src_spinimages.cpp new file mode 100644 index 00000000000..0a70f66029f --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_contrib_src_spinimages.cpp @@ -0,0 +1,12 @@ +$NetBSD: patch-modules_contrib_src_spinimages.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +--- modules/contrib/src/spinimages.cpp.orig 2013-05-05 18:32:00.000000000 +0000 ++++ modules/contrib/src/spinimages.cpp +@@ -46,6 +46,7 @@ + #include <functional> + #include <fstream> + #include <limits> ++#include <numeric> + #include <set> + + using namespace cv; diff --git a/graphics/opencv2/patches/patch-modules_core_include_opencv2_core_types_c.h b/graphics/opencv2/patches/patch-modules_core_include_opencv2_core_types_c.h new file mode 100644 index 00000000000..e0803dafd06 --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_core_include_opencv2_core_types_c.h @@ -0,0 +1,15 @@ +$NetBSD: patch-modules_core_include_opencv2_core_types_c.h,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +Define 'depth' as unsigned int, or IPL_DEPTH_SIGN=0x8000000 won't fit in int. + +--- modules/core/include/opencv2/core/types_c.h.orig 2012-12-07 21:15:58.000000000 +0000 ++++ modules/core/include/opencv2/core/types_c.h +@@ -473,7 +473,7 @@ typedef struct _IplImage + int ID; /* version (=0)*/ + int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */ + int alphaChannel; /* Ignored by OpenCV */ +- int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S, ++ unsigned int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S, + IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported. */ + char colorModel[4]; /* Ignored by OpenCV */ + char channelSeq[4]; /* ditto */ diff --git a/graphics/opencv2/patches/patch-modules_core_src_system.cpp b/graphics/opencv2/patches/patch-modules_core_src_system.cpp new file mode 100644 index 00000000000..3e606748cc7 --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_core_src_system.cpp @@ -0,0 +1,12 @@ +$NetBSD: patch-modules_core_src_system.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +--- modules/core/src/system.cpp.orig 2013-04-28 15:15:06.000000000 +0000 ++++ modules/core/src/system.cpp +@@ -79,6 +79,7 @@ + #include <pthread.h> + #include <sys/time.h> + #include <time.h> ++#include <unistd.h> + + #if defined __MACH__ && defined __APPLE__ + #include <mach/mach.h> diff --git a/graphics/opencv2/patches/patch-modules_flann_include_opencv2_flann_defines.h b/graphics/opencv2/patches/patch-modules_flann_include_opencv2_flann_defines.h new file mode 100644 index 00000000000..55eee364e3a --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_flann_include_opencv2_flann_defines.h @@ -0,0 +1,16 @@ +$NetBSD: patch-modules_flann_include_opencv2_flann_defines.h,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +Avoid CS conflict on SunOS. + +--- modules/flann/include/opencv2/flann/defines.h.orig 2012-09-27 22:55:06.000000000 +0000 ++++ modules/flann/include/opencv2/flann/defines.h +@@ -71,6 +71,9 @@ + #define FLANN_PLATFORM_32_BIT + #endif + ++#ifdef __sun ++#undef CS ++#endif + + #undef FLANN_ARRAY_LEN + #define FLANN_ARRAY_LEN(a) (sizeof(a)/sizeof(a[0])) diff --git a/graphics/opencv2/patches/patch-modules_ocl_src_gftt.cpp b/graphics/opencv2/patches/patch-modules_ocl_src_gftt.cpp new file mode 100644 index 00000000000..d62933ba057 --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_ocl_src_gftt.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-modules_ocl_src_gftt.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +Avoid GS define from sys/regset.h on SunOS. + +--- modules/ocl/src/gftt.cpp.orig 2014-04-11 10:15:26.000000000 +0000 ++++ modules/ocl/src/gftt.cpp +@@ -69,6 +69,9 @@ struct DefCornerCompare + } + }; + ++#if defined(__sun) ++#undef GS ++#endif + // sort corner point using opencl bitonicosrt implementation + static void sortCorners_caller(oclMat& corners, const int count) + { diff --git a/graphics/opencv2/patches/patch-modules_python_src2_cv2.cv.hpp b/graphics/opencv2/patches/patch-modules_python_src2_cv2.cv.hpp new file mode 100644 index 00000000000..95d94d0812f --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_python_src2_cv2.cv.hpp @@ -0,0 +1,16 @@ +$NetBSD: patch-modules_python_src2_cv2.cv.hpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +Fix build under clang. +"error: C-style cast from 'nullprt_t' to 'CvNextEdgeType' is not allowed." + +--- modules/python/src2/cv2.cv.hpp.orig 2014-04-11 10:15:26.000000000 +0000 ++++ modules/python/src2/cv2.cv.hpp +@@ -2155,7 +2155,7 @@ static int convert_to_CvSubdiv2DPTR(PyOb + 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); diff --git a/graphics/opencv2/patches/patch-modules_ts_src_ts.cpp b/graphics/opencv2/patches/patch-modules_ts_src_ts.cpp new file mode 100644 index 00000000000..0fd3731fc33 --- /dev/null +++ b/graphics/opencv2/patches/patch-modules_ts_src_ts.cpp @@ -0,0 +1,24 @@ +$NetBSD: patch-modules_ts_src_ts.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $ + +Avoid std::foo conflict. + +--- modules/ts/src/ts.cpp.orig 2013-04-05 09:00:20.000000000 +0000 ++++ modules/ts/src/ts.cpp +@@ -562,7 +562,7 @@ void TS::vprintf( int streams, const cha + 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 @@ void smoothBorder(Mat& img, const Scalar + 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++) |