Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2018 01:10:12 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r469420 - in head: astro/libkgeomap graphics/cimg graphics/cimg/files graphics/digikam graphics/digikam-kde4 graphics/facedetect graphics/frei0r graphics/gimp-gmic-plugin graphics/kipi-...
Message-ID:  <201805090110.w491ACu3076228@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Wed May  9 01:10:11 2018
New Revision: 469420
URL: https://svnweb.freebsd.org/changeset/ports/469420

Log:
  graphics/opencv: Update to 3.4.1
  
  PR:		210505
  Submitted by:	rozhuk.im@gmail.com (partially, further work was done)
  Exp-run by:	antoine

Added:
  head/graphics/opencv/files/extra-patch-modules_dnn__modern_CMakeLists.txt   (contents, props changed)
  head/graphics/opencv/files/extra-patch-modules_sfm_CMakeLists.txt   (contents, props changed)
  head/graphics/opencv/files/extra-patch-modules_sfm_src__libmv__light_libmv_numeric_numeric.h   (contents, props changed)
  head/graphics/opencv/files/extra-patch-modules_sfm_src_libmv__light_libmv_numeric_numeric.cc   (contents, props changed)
  head/graphics/opencv/files/patch-modules_core_include_opencv2_core_cvdef.h   (contents, props changed)
  head/graphics/opencv/files/patch-modules_core_include_opencv2_core_types__c.h   (contents, props changed)
  head/graphics/opencv/files/patch-modules_core_src_utils_filesystem.cpp   (contents, props changed)
  head/graphics/opencv/files/patch-modules_highgui_include_opencv2_highgui_highgui__c.h   (contents, props changed)
  head/graphics/opencv/files/patch-modules_highgui_src_window.cpp   (contents, props changed)
  head/graphics/opencv/files/patch-modules_highgui_src_window__gtk.cpp   (contents, props changed)
  head/graphics/opencv/files/patch-modules_videoio_src_cap__libv4l.cpp   (contents, props changed)
  head/graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs   (contents, props changed)
  head/graphics/php-facedetect/files/
  head/graphics/php-facedetect/files/patch-facedetect.c   (contents, props changed)
  head/graphics/waifu2x-converter-cpp/files/
  head/graphics/waifu2x-converter-cpp/files/patch-CMakeLists.txt   (contents, props changed)
  head/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.c   (contents, props changed)
  head/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfaceblur.h   (contents, props changed)
  head/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.c   (contents, props changed)
  head/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gstfacedetect.h   (contents, props changed)
  head/multimedia/gstreamer-plugins-bad/files/patch-ext_opencv_gsttemplatematch.c   (contents, props changed)
  head/multimedia/gstreamer1-plugins-bad/files/
  head/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstfacedetect.h   (contents, props changed)
  head/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsthanddetect.h   (contents, props changed)
  head/multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gsttemplatematch.cpp   (contents, props changed)
Deleted:
  head/graphics/opencv/files/patch-cmake__OpenCVCompilerOptions.cmake
  head/graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake
  head/graphics/opencv/files/patch-cmake__OpenCVVersion.cmake
  head/graphics/opencv/files/patch-modules__contrib__src__spinimages.cpp
  head/graphics/opencv/files/patch-modules__core__src__system.cpp
  head/graphics/opencv/files/patch-modules__highgui__src__cap_libv4l.cpp
  head/graphics/opencv/files/patch-modules__highgui__src__cap_v4l.cpp
  head/graphics/opencv/files/patch-modules__python__src2__cv2.cv.hpp
  head/graphics/opencv/files/patch-modules__ts__src__ts.cpp
  head/graphics/opencv/files/patch-modules_highgui_src_cap__ffmpeg__impl.hpp
  head/graphics/opencv/files/patch-samples__cpp__tutorial_code__core__how_to_scan_images__how_to_scan_images.cpp
Modified:
  head/astro/libkgeomap/Makefile   (contents, props changed)
  head/graphics/cimg/Makefile   (contents, props changed)
  head/graphics/cimg/files/patch-examples__Makefile   (contents, props changed)
  head/graphics/digikam-kde4/Makefile   (contents, props changed)
  head/graphics/digikam-kde4/Makefile.common   (contents, props changed)
  head/graphics/digikam/Makefile   (contents, props changed)
  head/graphics/facedetect/Makefile   (contents, props changed)
  head/graphics/frei0r/Makefile   (contents, props changed)
  head/graphics/gimp-gmic-plugin/Makefile   (contents, props changed)
  head/graphics/kipi-plugin-removeredeyes/Makefile   (contents, props changed)
  head/graphics/libkface/Makefile   (contents, props changed)
  head/graphics/opencv-core/Makefile   (contents, props changed)
  head/graphics/opencv-core/pkg-plist   (contents, props changed)
  head/graphics/opencv-java/Makefile   (contents, props changed)
  head/graphics/opencv/Makefile   (contents, props changed)
  head/graphics/opencv/distinfo   (contents, props changed)
  head/graphics/opencv/pkg-plist   (contents, props changed)
  head/graphics/py-opencv/Makefile   (contents, props changed)
  head/graphics/py-opencv/pkg-plist   (contents, props changed)
  head/graphics/rubygem-objectdetect/Makefile   (contents, props changed)
  head/math/scilab-toolbox-sivp/Makefile   (contents, props changed)
  head/multimedia/libav/Makefile   (contents, props changed)
  head/www/mod_pagespeed/Makefile   (contents, props changed)
  head/x11-toolkits/py-kivy/Makefile   (contents, props changed)

Modified: head/astro/libkgeomap/Makefile
==============================================================================
--- head/astro/libkgeomap/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/astro/libkgeomap/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -11,7 +11,7 @@ LICENSE=	GPLv2+ LGPL20+
 LICENSE_COMB=	multi
 
 BUILD_DEPENDS=	${LOCALBASE}/include/boost/graph/buffer_concepts.hpp:devel/boost-libs
-LIB_DEPENDS=	libopencv_legacy.so:graphics/opencv
+LIB_DEPENDS=	libopencv_video.so:graphics/opencv
 
 USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
 USE_KDE=	config coreaddons ecm i18n kio marble service textwidgets

Modified: head/graphics/cimg/Makefile
==============================================================================
--- head/graphics/cimg/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/cimg/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -62,7 +62,7 @@ LIB_DEPENDS+=	libcurl.so:ftp/curl			\
 		libIlmImf.so:graphics/OpenEXR		\
 		libgimp-2.0.so:graphics/gimp-app	\
 		libfftw3.so:math/fftw3			\
-		libopencv_legacy.so:graphics/opencv	\
+		libopencv_video.so:graphics/opencv	\
 		libopencv_core.so:graphics/opencv-core	\
 		libGraphicsMagick.so:graphics/GraphicsMagick
 USES+=		jpeg

Modified: head/graphics/cimg/files/patch-examples__Makefile
==============================================================================
--- head/graphics/cimg/files/patch-examples__Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/cimg/files/patch-examples__Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -85,7 +85,7 @@
  BOARD_LIBS = -lboard
  
 +# Flags to compile on FreeBSD
-+FREEBSD_LDFLAGS = $(LDFLAGS) -ansi -ffast-math  -I$(X11PATH)/include $(EXTRA_FLAGS) -lX11 -L$(X11PATH)/lib
++FREEBSD_LDFLAGS = $(LDFLAGS) -ffast-math  -I$(X11PATH)/include $(EXTRA_FLAGS) -lX11 -L$(X11PATH)/lib
 +
  # Flags to compile on Sun Solaris
  SOLARIS_LIBS = -R$(X11PATH)/lib -lrt -lnsl -lsocket

Modified: head/graphics/digikam-kde4/Makefile
==============================================================================
--- head/graphics/digikam-kde4/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/digikam-kde4/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -19,7 +19,7 @@ LIB_DEPENDS=	libtiff.so:graphics/tiff \
 		libjasper.so:graphics/jasper \
 		liblensfun.so:graphics/lensfun \
 		liblqr-1.so:graphics/liblqr-1 \
-		libkface.so:graphics/libkface \
+		libopencv_video.so:graphics/opencv \
 		libpgf.so:graphics/libpgf \
 		libkgeomap.so:astro/libkgeomap-kde4 \
 		libboost_graph.so:devel/boost-libs
@@ -28,7 +28,7 @@ USES+=		eigen:3 pkgconfig shebangfix
 USE_KDE+=	libkdcraw libkexiv2 libkipi runtime_run
 USE_QT4+=	sql-sqlite3_run
 USE_LDCONFIG=	yes
-CMAKE_ARGS+=	-DWITH_Sqlite2:BOOL=OFF
+CMAKE_ARGS+=	-DWITH_Sqlite2:BOOL=OFF -DENABLE_OPENCV3:BOOL=true
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/core
 SHEBANG_FILES=	data/scripts/digitaglinktree/digitaglinktree

Modified: head/graphics/digikam-kde4/Makefile.common
==============================================================================
--- head/graphics/digikam-kde4/Makefile.common	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/digikam-kde4/Makefile.common	Wed May  9 01:10:11 2018	(r469420)
@@ -6,7 +6,6 @@
 #	graphics/digikam-kde4-l10n
 #	graphics/kipi-plugin-*
 #	graphics/kipi-plugins-kde4
-#	graphics/libkface
 #	graphics/libkipiplugins
 # These ports now lead independent lives:
 #	astro/libkgeomap-kde4 (part of KDE Applications)

Modified: head/graphics/digikam/Makefile
==============================================================================
--- head/graphics/digikam/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/digikam/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -23,7 +23,7 @@ LIB_DEPENDS=	libKF5KGeoMap.so:astro/libkgeomap \
 		liblcms2.so:graphics/lcms2 \
 		liblensfun.so:graphics/lensfun \
 		liblqr-1.so:graphics/liblqr-1 \
-		libopencv_contrib.so:graphics/opencv \
+		libopencv_video.so:graphics/opencv \
 		libopencv_core.so:graphics/opencv-core \
 		libpgf.so:graphics/libpgf \
 		libpng.so:graphics/png \
@@ -49,9 +49,8 @@ SHEBANG_FILES=	core/data/scripts/digitaglinktree/digit
 
 # Disable kipiplugins, as they are built in their own port: graphics/kipiplugins.
 # Remember to keep that port in sync with this one.
-CMAKE_ON=	DIGIKAMSC_COMPILE_DIGIKAM
-CMAKE_OFF=	DIGIKAMSC_COMPILE_KIPIPLUGINS \
-		ENABLE_OPENCV3
+CMAKE_ON=	DIGIKAMSC_COMPILE_DIGIKAM ENABLE_OPENCV3
+CMAKE_OFF=	DIGIKAMSC_COMPILE_KIPIPLUGINS
 
 OPTIONS_DEFINE=		DOCS MULTIMEDIA MYSQL NLS
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE}

Modified: head/graphics/facedetect/Makefile
==============================================================================
--- head/graphics/facedetect/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/facedetect/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -13,7 +13,7 @@ COMMENT=	Simple face detector for batch processing
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING.txt
 
-RUN_DEPENDS=	${PYTHON_SITELIBDIR}/cv.py:graphics/py-opencv
+RUN_DEPENDS=	${PYTHON_SITELIBDIR}/cv2.so:graphics/py-opencv
 
 USES=		python:2.7,run shebangfix
 USE_GITHUB=	yes

Modified: head/graphics/frei0r/Makefile
==============================================================================
--- head/graphics/frei0r/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/frei0r/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -33,7 +33,7 @@ PORTREVISION=	0
 COMMENT=	Frei0r OpenCV plugins
 PKGNAMESUFFIX=	-plugins-opencv
 LIB_DEPENDS+=	libopencv_core.so:graphics/opencv-core \
-		libopencv_legacy.so:graphics/opencv
+		libopencv_video.so:graphics/opencv
 FREI0R_PLUGINS=	facebl0r facedetect
 
 CMAKE_ARGS+=	-DWITHOUT_OPENCV:BOOL=OFF \

Modified: head/graphics/gimp-gmic-plugin/Makefile
==============================================================================
--- head/graphics/gimp-gmic-plugin/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/gimp-gmic-plugin/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -14,7 +14,7 @@ COMMENT=	GREYC's Magic Image Converter
 
 LIB_DEPENDS=	libGraphicsMagick++.so:graphics/GraphicsMagick \
 		libIlmImf.so:graphics/OpenEXR \
-		libopencv_legacy.so:graphics/opencv \
+		libopencv_video.so:graphics/opencv \
 		libMagick++-6.so:graphics/ImageMagick \
 		libavcodec.so:multimedia/ffmpeg \
 		libfftw3.so:math/fftw3 \

Modified: head/graphics/kipi-plugin-removeredeyes/Makefile
==============================================================================
--- head/graphics/kipi-plugin-removeredeyes/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/kipi-plugin-removeredeyes/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -8,11 +8,12 @@ CATEGORIES=	graphics kde
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${KIPI_PLUGIN}_DESC}
 
-LIB_DEPENDS=	libopencv_legacy.so:graphics/opencv
+LIB_DEPENDS=	libopencv_video.so:graphics/opencv
 # Ensure -L${LOCALBASE}/lib is in the linker flags, as 
 # the cmake files do not properly handle opencv with tbb
 # enabled.
 USES+=		localbase:ldflags
+CMAKE_ON=	ENABLE_OPENCV3
 
 KIPI_PLUGIN=	removeredeyes
 .include "${.CURDIR}/../digikam-kde4/Makefile.common"

Modified: head/graphics/libkface/Makefile
==============================================================================
--- head/graphics/libkface/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/libkface/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -10,6 +10,9 @@ DIST_SUBDIR=	KDE/${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE4 library for face recognition
 
+DEPRECATED=	No longer maintained upstream
+EXPIRATION_DATE=	2018-06-07
+
 LICENSE=	GPLv2+ LGPL20+
 LICENSE_COMB=	multi
 

Modified: head/graphics/opencv-core/Makefile
==============================================================================
--- head/graphics/opencv-core/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/opencv-core/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -1,7 +1,7 @@
 # Created by: Martin Matuska <mm@FreeBSD.org>
 # $FreeBSD$
 
-PORTREVISION=	1
+PORTREVISION=	0
 PKGNAMESUFFIX=	-${OCV_SLAVE}
 
 COMMENT=	OpenCV core libraries

Modified: head/graphics/opencv-core/pkg-plist
==============================================================================
--- head/graphics/opencv-core/pkg-plist	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/opencv-core/pkg-plist	Wed May  9 01:10:11 2018	(r469420)
@@ -1,30 +1,119 @@
 include/opencv2/core.hpp
 include/opencv2/core/affine.hpp
-include/opencv2/core/core.hpp
+include/opencv2/core/base.hpp
+include/opencv2/core/bufferpool.hpp
 include/opencv2/core/core_c.h
-include/opencv2/core/cuda_devptrs.hpp
-include/opencv2/core/devmem2d.hpp
+include/opencv2/core/core.hpp
+include/opencv2/core/cuda_stream_accessor.hpp
+include/opencv2/core/cuda_types.hpp
+include/opencv2/core/cuda.hpp
+include/opencv2/core/cuda.inl.hpp
+include/opencv2/core/cuda/block.hpp
+include/opencv2/core/cuda/border_interpolate.hpp
+include/opencv2/core/cuda/color.hpp
+include/opencv2/core/cuda/common.hpp
+include/opencv2/core/cuda/datamov_utils.hpp
+include/opencv2/core/cuda/detail/color_detail.hpp
+include/opencv2/core/cuda/detail/reduce_key_val.hpp
+include/opencv2/core/cuda/detail/reduce.hpp
+include/opencv2/core/cuda/detail/transform_detail.hpp
+include/opencv2/core/cuda/detail/type_traits_detail.hpp
+include/opencv2/core/cuda/detail/vec_distance_detail.hpp
+include/opencv2/core/cuda/dynamic_smem.hpp
+include/opencv2/core/cuda/emulation.hpp
+include/opencv2/core/cuda/filters.hpp
+include/opencv2/core/cuda/funcattrib.hpp
+include/opencv2/core/cuda/functional.hpp
+include/opencv2/core/cuda/limits.hpp
+include/opencv2/core/cuda/reduce.hpp
+include/opencv2/core/cuda/saturate_cast.hpp
+include/opencv2/core/cuda/scan.hpp
+include/opencv2/core/cuda/simd_functions.hpp
+include/opencv2/core/cuda/transform.hpp
+include/opencv2/core/cuda/type_traits.hpp
+include/opencv2/core/cuda/utility.hpp
+include/opencv2/core/cuda/vec_distance.hpp
+include/opencv2/core/cuda/vec_math.hpp
+include/opencv2/core/cuda/vec_traits.hpp
+include/opencv2/core/cuda/warp_reduce.hpp
+include/opencv2/core/cuda/warp_shuffle.hpp
+include/opencv2/core/cuda/warp.hpp
+include/opencv2/core/cv_cpu_dispatch.h
+include/opencv2/core/cv_cpu_helper.h
+include/opencv2/core/cvdef.h
+include/opencv2/core/cvstd.hpp
+include/opencv2/core/cvstd.inl.hpp
+include/opencv2/core/directx.hpp
 include/opencv2/core/eigen.hpp
-include/opencv2/core/gpumat.hpp
-include/opencv2/core/internal.hpp
+include/opencv2/core/fast_math.hpp
+include/opencv2/core/hal/hal.hpp
+include/opencv2/core/hal/interface.h
+include/opencv2/core/hal/intrin_cpp.hpp
+include/opencv2/core/hal/intrin_neon.hpp
+include/opencv2/core/hal/intrin_sse.hpp
+include/opencv2/core/hal/intrin_vsx.hpp
+include/opencv2/core/hal/intrin.hpp
+include/opencv2/core/opencl/ocl_defs.hpp
+include/opencv2/core/opencl/opencl_info.hpp
+include/opencv2/core/opencl/opencl_svm.hpp
+include/opencv2/core/opencl/runtime/autogenerated/opencl_clamdblas.hpp
+include/opencv2/core/opencl/runtime/autogenerated/opencl_clamdfft.hpp
+include/opencv2/core/opencl/runtime/autogenerated/opencl_core.hpp
+include/opencv2/core/opencl/runtime/autogenerated/opencl_core_wrappers.hpp
+include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp
+include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp
+include/opencv2/core/opencl/runtime/opencl_clamdblas.hpp
+include/opencv2/core/opencl/runtime/opencl_clamdfft.hpp
+include/opencv2/core/opencl/runtime/opencl_core.hpp
+include/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp
+include/opencv2/core/opencl/runtime/opencl_gl.hpp
+include/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp
+include/opencv2/core/opencl/runtime/opencl_svm_20.hpp
+include/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp
+include/opencv2/core/opencl/runtime/opencl_svm_hsa_extension.hpp
+include/opencv2/core/ippasync.hpp
 include/opencv2/core/mat.hpp
-include/opencv2/core/opengl_interop.hpp
-include/opencv2/core/opengl_interop_deprecated.hpp
+include/opencv2/core/mat.inl.hpp
+include/opencv2/core/matx.hpp
+include/opencv2/core/neon_utils.hpp
+include/opencv2/core/ocl_genbase.hpp
+include/opencv2/core/ocl.hpp
+include/opencv2/core/opengl.hpp
 include/opencv2/core/operations.hpp
+include/opencv2/core/optim.hpp
+include/opencv2/core/ovx.hpp
+include/opencv2/core/persistence.hpp
+include/opencv2/core/ptr.inl.hpp
+include/opencv2/core/saturate.hpp
+include/opencv2/core/softfloat.hpp
+include/opencv2/core/sse_utils.hpp
+include/opencv2/core/traits.hpp
 include/opencv2/core/types_c.h
+include/opencv2/core/types.hpp
+include/opencv2/core/utility.hpp
+include/opencv2/core/utils/filesystem.hpp
+include/opencv2/core/utils/logger.defines.hpp
+include/opencv2/core/utils/logger.hpp
+include/opencv2/core/utils/trace.hpp
+include/opencv2/core/va_intel.hpp
 include/opencv2/core/version.hpp
+include/opencv2/core/vsx_utils.hpp
 include/opencv2/core/wimage.hpp
+include/opencv2/cvconfig.h
 include/opencv2/imgproc.hpp
-include/opencv2/imgproc/imgproc.hpp
+include/opencv2/imgproc/detail/distortion_model.hpp
+include/opencv2/imgproc/hal/hal.hpp
+include/opencv2/imgproc/hal/interface.h
 include/opencv2/imgproc/imgproc_c.h
+include/opencv2/imgproc/imgproc.hpp
 include/opencv2/imgproc/types_c.h
 @comment include/opencv2/opencv.hpp
 @comment include/opencv2/opencv_modules.hpp
 lib/libopencv_core.so
-lib/libopencv_core.so.2
+lib/libopencv_core.so.%%SOVERSION%%
 lib/libopencv_core.so.%%VERSION%%
 lib/libopencv_imgproc.so
-lib/libopencv_imgproc.so.2
+lib/libopencv_imgproc.so.%%SOVERSION%%
 lib/libopencv_imgproc.so.%%VERSION%%
 libdata/pkgconfig/opencv-core.pc
 share/cmake/Modules/FindOpenCVCore.cmake

Modified: head/graphics/opencv-java/Makefile
==============================================================================
--- head/graphics/opencv-java/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/opencv-java/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-PORTREVISION=	1
+PORTREVISION=	0
 CATEGORIES=	graphics java
 PKGNAMESUFFIX=	-${OCV_SLAVE}
 
@@ -11,6 +11,6 @@ OCV_JAVA=	yes
 MASTERDIR=	${.CURDIR:H}/opencv
 PLIST=		${.CURDIR}/pkg-plist
 
-PLIST_SUB+=	OCV_VER=${DISTVERSION:R:S|.||g}
+PLIST_SUB+=	OCV_VER=${DISTVERSION:S|.||g}
 
 .include "${MASTERDIR}/Makefile"

Modified: head/graphics/opencv/Makefile
==============================================================================
--- head/graphics/opencv/Makefile	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/opencv/Makefile	Wed May  9 01:10:11 2018	(r469420)
@@ -1,9 +1,8 @@
 # Created by: Marc Abramowitz (http://marc.abramowitz.info)
 # $FreeBSD$
 
-PORTNAME?=	opencv
-PORTVERSION=	2.4.13.1
-PORTREVISION?=	10
+PORTNAME=	opencv
+PORTVERSION=	3.4.1
 CATEGORIES=	graphics
 
 MAINTAINER=	ports@FreeBSD.org
@@ -12,168 +11,330 @@ COMMENT=	Open Source Computer Vision library
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USE_GITHUB=	yes
-
-USES=		cmake pkgconfig
-USE_LDCONFIG=	yes
-
 NOT_FOR_ARCHS=	sparc64
 NOT_FOR_ARCHS_REASON_sparc64=	does not compile on sparc64
 
+LIB_DEPENDS=	libprotobuf.so:devel/protobuf \
+		libtesseract.so:graphics/tesseract
+
+USES=		cmake:outsource compiler:c++14-lang localbase:ldflags pkgconfig
+
+USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+USE_CXXSTD=	c++11
+
 DATADIR=	${PREFIX}/share/OpenCV
-PLIST_SUB+=	VERSION=${DISTVERSION:R}
+PLIST_SUB+=	SOVERSION=${DISTVERSION:R} VERSION=${DISTVERSION}
 
-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}
+# 3rd party libs
+CMAKE_ON=	ENABLE_CXX11
+CMAKE_OFF=	BUILD_ZLIB BUILD_TIFF BUILD_JASPER BUILD_JPEG BUILD_PNG BUILD_OPENEXR BUILD_TBB BUILD_IPP_IW BUILD_ITT BUILD_PROTOBUF
+# Optional 3rd party components
+CMAKE_ARGS+=	-DWITH_1394:BOOL=OFF \
+		-DWITH_CAROTENE:BOOL=OFF \
+		-DWITH_CPUFEATURES:BOOL=OFF \
+		-DWITH_VTK:BOOL=OFF \
+		-DWITH_CUDA:BOOL=OFF \
+		-DWITH_CUFFT:BOOL=OFF \
+		-DWITH_CUBLAS:BOOL=OFF \
+		-DWITH_NVCUVID:BOOL=OFF \
+		-DWITH_EIGEN:BOOL=OFF \
+		-DWITH_VFW:BOOL=OFF \
+		-DWITH_FFMPEG:BOOL=OFF \
+		-DWITH_GSTREAMER:BOOL=OFF \
+		-DWITH_GSTREAMER_0_10:BOOL=OFF \
+		-DWITH_GTK:BOOL=OFF \
+		-DWITH_GTK_2_X:BOOL=ON \
+		-DWITH_IPP:BOOL=OFF \
+		-DWITH_IPP_A:BOOL=OFF \
+		-DWITH_HALIDE:BOOL=OFF \
+		-DWITH_JASPER:BOOL=OFF \
+		-DWITH_JPEG:BOOL=OFF \
+		-DWITH_WEBP:BOOL=OFF \
+		-DWITH_OPENEXR:BOOL=OFF \
+		-DWITH_OPENGL:BOOL=OFF \
+		-DWITH_OPENVX:BOOL=OFF \
+		-DWITH_OPENNI:BOOL=OFF \
+		-DWITH_OPENNI2:BOOL=OFF \
+		-DWITH_PNG:BOOL=OFF \
+		-DWITH_GDCM:BOOL=OFF \
+		-DWITH_PVAPI:BOOL=OFF \
+		-DWITH_GIGEAPI:BOOL=OFF \
+		-DWITH_ARAVIS:BOOL=OFF \
+		-DWITH_QT:BOOL=OFF \
+		-DWITH_WIN32UI:BOOL=OFF \
+		-DWITH_TBB:BOOL=OFF \
+		-DWITH_OPENMP:BOOL=OFF \
+		-DWITH_CSTRIPES:BOOL=ON \
+		-DWITH_PTHREADS_PF:BOOL=OFF \
+		-DWITH_TIFF:BOOL=OFF \
+		-DWITH_UNICAP:BOOL=OFF \
+		-DWITH_V4L:BOOL=OFF \
+		-DWITH_LIBV4L:BOOL=OFF \
+		-DWITH_DSHOW:BOOL=OFF \
+		-DWITH_MSMF:BOOL=OFF \
+		-DWITH_XIMEA:BOOL=OFF \
+		-DWITH_XINE:BOOL=OFF \
+		-DWITH_CLP:BOOL=OFF \
+		-DWITH_OPENCL:BOOL=OFF \
+		-DWITH_OPENCL_SVM:BOOL=OFF \
+		-DWITH_OPENCLAMDFFT:BOOL=OFF \
+		-DWITH_OPENCLAMDBLAS:BOOL=OFF \
+		-DWITH_DIRECTX:BOOL=OFF \
+		-DWITH_INTELPERC:BOOL=OFF \
+		-DWITH_MATLAB:BOOL=OFF \
+		-DWITH_VA:BOOL=OFF \
+		-DWITH_VA_INTEL:BOOL=OFF \
+		-DWITH_MFX:BOOL=OFF \
+		-DWITH_GDAL:BOOL=OFF \
+		-DWITH_GPHOTO2:BOOL=OFF \
+		-DWITH_LAPACK:BOOL=OFF \
+		-DWITH_ITT:BOOL=OFF
+# OpenCV build components
+CMAKE_ARGS+=	-DBUILD_SHARED_LIBS:BOOL=ON \
+		-DBUILD_opencv_apps:BOOL=ON \
+		-DBUILD_opencv_js:BOOL=OFF \
+		-DBUILD_ANDROID_EXAMPLES:BOOL=OFF \
+		-DBUILD_DOCS:BOOL=OFF \
+		-DBUILD_EXAMPLES:BOOL=OFF \
+		-DBUILD_PACKAGE:BOOL=OFF \
+		-DBUILD_PERF_TESTS:BOOL=OFF \
+		-DBUILD_TESTS:BOOL=OFF \
+		-DBUILD_WITH_DEBUG_INFO:BOOL=OFF \
+		-DBUILD_WITH_DYNAMIC_IPP:BOOL=OFF \
+		-DBUILD_FAT_JAVA_LIB:BOOL=OFF \
+		-DBUILD_CUDA_STUBS:BOOL=OFF \
+		-DBUILD_ANDROID_SERVICE:BOOL=OFF \
+		-DBUILD_opencv_ts:BOOL=OFF \
+		-DBUILD_opencv_cnn_3dobj_INIT:BOOL=OFF \
+		-DBUILD_opencv_world:BOOL=OFF
+# OpenCV installation options
+CMAKE_ARGS+=	-DINSTALL_CREATE_DISTRIB:BOOL=OFF \
+		-DINSTALL_C_EXAMPLES:BOOL=OFF \
+		-DINSTALL_PYTHON_EXAMPLES:BOOL=OFF \
+		-DINSTALL_TO_MANGLED_PATHS:BOOL=OFF \
+		-DINSTALL_TESTS:BOOL=OFF
+# OpenCV build options
+CMAKE_ARGS+=	-DENABLE_CCACHE:BOOL=OFF \
+		-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF \
+		-DENABLE_SOLUTION_FOLDERS:BOOL=OFF \
+		-DENABLE_PROFILING:BOOL=OFF \
+		-DENABLE_COVERAGE:BOOL=OFF \
+		-DENABLE_OMIT_FRAME_POINTER:BOOL=ON \
+		-DENABLE_POWERPC:BOOL=OFF \
+		-DENABLE_VSX:BOOL=OFF \
+		-DENABLE_FAST_MATH:BOOL=OFF \
+		-DENABLE_NEON:BOOL=OFF \
+		-DENABLE_VFPV3:BOOL=OFF \
+		-DENABLE_NOISY_WARNINGS:BOOL=OFF \
+		-DOPENCV_WARNINGS_ARE_ERRORS:BOOL=OFF \
+		-DENABLE_IMPL_COLLECTION:BOOL=OFF \
+		-DENABLE_INSTRUMENTATION:BOOL=OFF \
+		-DENABLE_GNU_STL_DEBUG:BOOL=OFF \
+		-DENABLE_BUILD_HARDENING:BOOL=OFF \
+		-DENABLE_LTO:BOOL=OFF \
+		-DGENERATE_ABI_DESCRIPTOR:BOOL=OFF \
+		-DCV_ENABLE_INTRINSICS:BOOL=ON \
+		-DCV_DISABLE_OPTIMIZATION:BOOL=OFF \
+		-DCV_TRACE:BOOL=OFF \
+		-DENABLE_PYLINT:BOOL=OFF
 
 SUB_FILES=	FindOpenCVCore.cmake
-SUB_LIST=	OCV_VERSION=${DISTVERSION:R}
+SUB_LIST=	OCV_VERSION=${DISTVERSION}
 
 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_MODS=		apps calib3d contrib dnn features2d flann highgui \
+			imgcodecs ml objdetect photo shape stitching \
+			superres ts video videoio videostab
 OCV_JAVA_MODS=		java
-OCV_PYTHON_MODS=	python
+OCV_PYTHON_MODS=	python${PYTHON_MAJOR_VER}
 
-OPTIONS_DEFINE=		DC1394 EXAMPLES NONFREE OPENGL
-OPTIONS_GROUP=		IMAGE PERFORMANCE SIMD VIDEO
-OPTIONS_GROUP_IMAGE=	JASPER JPEG OPENEXR PNG TIFF
-OPTIONS_GROUP_PERFORMANCE=	EIGEN3 TBB
-OPTIONS_GROUP_SIMD=	${OPTIONS_GROUP_SIMD_${MACHINE_ARCH}}
-OPTIONS_GROUP_SIMD_amd64=	${OPTIONS_GROUP_SIMD_i386}
-OPTIONS_GROUP_SIMD_armv6=	NEON VFPV3
-#OPTIONS_GROUP_SIMD_armv7=	NEON VFPV3
-OPTIONS_GROUP_SIMD_i386=	SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
-OPTIONS_GROUP_VIDEO=	FFMPEG GSTREAMER GSTREAMER0 V4L XINE
+OPTIONS_DEFINE=		EXAMPLES EXTRA_MODULES OPENGL
+OPTIONS_GROUP=		PERFORMANCE IMAGE VIDEO
+OPTIONS_GROUP_PERFORMANCE=	EIGEN3 OPENCL TBB
+OPTIONS_GROUP_IMAGE=	GDAL GDCM JASPER JPEG OPENEXR PNG TIFF WEBP
+OPTIONS_GROUP_VIDEO=	ARAVIS DC1394 FFMPEG GPHOTO2 GSTREAMER V4L XINE
 OPTIONS_RADIO=		GUI
 OPTIONS_RADIO_GUI=	GTK2 QT4
-OPTIONS_DEFAULT=	EIGEN3 JASPER JPEG PNG TIFF V4L ${MACHINE_CPU:tu}
+# EXTRA_MODULES required for libopencv_dnn which is required by py-opencv
+OPTIONS_DEFAULT=	EIGEN3 EXTRA_MODULES FFMPEG JASPER JPEG PNG TIFF WEBP V4L \
+			${MACHINE_CPU:tu}
 OPTIONS_SUB=		yes
 .if defined(OCV_CORE)
-OPTIONS_EXCLUDE=	DC1394 EXAMPLES GTK2 QT4 JASPER JPEG NONFREE OPENEXR \
-			OPENGL PNG TIFF FFMPEG GSTREAMER GSTREAMER0 V4L XINE
+OPTIONS_EXCLUDE=	ARAVIS DC1394 EXAMPLES EXTRA_MODULES FFMPEG \
+			GDAL GDCM GPHOTO2 GSTREAMER GTK2 JASPER JPEG \
+			OPENEXR OPENGL PNG QT4 TIFF WEBP V4L XINE
+.elif defined(OCV_SLAVE)
+OPTIONS_EXCLUDE=	EXAMPLES
 .endif
 
 DC1394_DESC=		IEEE 1394 camera support
 DC1394_LIB_DEPENDS=	libdc1394.so:multimedia/libdc1394
 DC1394_CMAKE_BOOL=	WITH_1394
 
+EXAMPLES_CMAKE_BOOL=	INSTALL_C_EXAMPLES
+
+PERFORMANCE_DESC=	Performance enhancing libraries
+
 EIGEN3_DESC=		Eigen 3 support
-EIGEN3_USES=		eigen:3
+EIGEN3_BUILD_DEPENDS=	${LOCALBASE}/include/eigen3/Eigen/Eigen:math/eigen3
 EIGEN3_CMAKE_BOOL=	WITH_EIGEN
 
-. if !defined(OCV_SLAVE)
-EXAMPLES_CMAKE_BOOL=	BUILD_EXAMPLES INSTALL_C_EXAMPLES
-. endif
-EXAMPLES_PORTEXAMPLES=	*
+OPENCL_DESC=		OpenCL support
+OPENCL_BUILD_DEPENDS=	opencl>=0:devel/opencl
+OPENCL_RUN_DEPENDS=	opencl>=0:devel/opencl
+OPENCL_CMAKE_BOOL=	WITH_OPENCL
 
-FFMPEG_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg
-FFMPEG_CMAKE_BOOL=	WITH_FFMPEG
+TBB_DESC=		TBB support
+TBB_LIB_DEPENDS=	libtbb.so:devel/tbb
+TBB_CMAKE_BOOL=		WITH_TBB
 
-GSTREAMER0_DESC=	${GSTREAMER_DESC} 0.10
-GSTREAMER0_USE=		GSTREAMER=yes
-GSTREAMER0_CMAKE_BOOL=	WITH_GSTREAMER_0_10
+IMAGE_DESC=		Image format support
 
-GSTREAMER_USE=		GSTREAMER1=yes
-GSTREAMER_CMAKE_BOOL=	WITH_GSTREAMER
-
-GTK2_USE=		GNOME=gtk20
-GTK2_CMAKE_BOOL=	WITH_GTK
-
 JASPER_LIB_DEPENDS=	libjasper.so:graphics/jasper
 JASPER_CMAKE_BOOL=	WITH_JASPER
 
 JPEG_USES=		jpeg
 JPEG_CMAKE_BOOL=	WITH_JPEG
 
-NONFREE_CMAKE_BOOL=	BUILD_opencv_nonfree
+GDAL_DESC=		Geospatial Data Abstraction Library
+GDAL_LIB_DEPENDS=	libgdal.so:graphics/gdal
+GDAL_CMAKE_BOOL=	WITH_GDAL
 
+GDCM_DESC=		Open source DICOM library
+GDCM_LIB_DEPENDS=	libgdcmMSFF.so:devel/gdcm
+GDCM_CMAKE_BOOL=	WITH_GDCM
+
 OPENEXR_LIB_DEPENDS=	libIlmImf.so:graphics/OpenEXR
 OPENEXR_CMAKE_BOOL=	WITH_OPENEXR
 
-OPENGL_LIB_DEPENDS=	${PORT_OPTIONS:MGTK2:C,.+,libgtkglext-x11-1.0.so:x11-toolkits/gtkglext,}
-OPENGL_USE=		${PORT_OPTIONS:MQT4:S,$,=opengl,}
-OPENGL_CMAKE_BOOL=	WITH_OPENGL
-
 PNG_LIB_DEPENDS=	libpng.so:graphics/png
 PNG_CMAKE_BOOL=		WITH_PNG
 
-QT4_USE=		QT4=gui,moc_build,qmake_build,rcc_build,uic_build,qtestlib
-QT4_CMAKE_ON=		-DWITH_QT:STRING="4"
-QT4_CMAKE_OFF=		-DWITH_QT:BOOL=false
+TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
+TIFF_CMAKE_BOOL=	WITH_TIFF
 
-.for _simd in ${OPTIONS_GROUP_SIMD}
-${_simd}_DESC=		${MMX_DESC:S/MMX/${_simd}/}
-${_simd}_CMAKE_BOOL=	ENABLE_${_simd}
-.endfor
+WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
+WEBP_CMAKE_BOOL=	WITH_WEBP
 
-TBB_LIB_DEPENDS=	libtbb.so:devel/tbb
-TBB_CMAKE_BOOL=		WITH_TBB
-TBB_CMAKE_ON=		-DTBB_INCLUDE_DIR:STRING="${LOCALBASE}/include"
+VIDEO_DESC=		Video support
 
-TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
-TIFF_CMAKE_BOOL=	WITH_TIFF
+ARAVIS_DESC=		Aravis SDK
+ARAVIS_LIB_DEPENDS=	libaravis-0.6.so:devel/libaravis
+ARAVIS_CMAKE_BOOL=	WITH_ARAVIS
 
+FFMPEG_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg
+FFMPEG_CMAKE_BOOL=	WITH_FFMPEG
+
+GPHOTO2_DESC=		Gphoto2 camera support
+GPHOTO2_LIB_DEPENDS=	libgphoto2.so:graphics/libgphoto2
+GPHOTO2_CMAKE_BOOL=	WITH_GPHOTO2
+
+GSTREAMER_USE=		GSTREAMER1=yes
+GSTREAMER_CMAKE_BOOL=	WITH_GSTREAMER
+
 V4L_BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
 V4L_LIB_DEPENDS=	libv4l2.so:multimedia/libv4l
-V4L_CMAKE_BOOL=		WITH_V4L
-V4L_CMAKE_ON=		-DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include"
+V4L_CMAKE_BOOL=		WITH_V4L WITH_LIBV4L
+V4L_CMAKE_ON=		CMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include"
 
 XINE_LIB_DEPENDS=	libxine.so:multimedia/libxine
 XINE_CMAKE_BOOL=	WITH_XINE
 
-IMAGE_DESC=		Image format support
-NONFREE_DESC=		Build functionality that has possible limitations of use
-PERFORMANCE_DESC=	Performance enhancing libraries
-TBB_DESC=		TBB support
+EXTRA_MODULES_DESC=		Extra modules
+EXTRA_MODULES_GH_ACCOUNT=	opencv:DEFAULT \
+				tiny-dnn:extra_mod_3rdparty_tiny_dnn
+EXTRA_MODULES_GH_PROJECT=	opencv_contrib:extra_mod \
+				tiny-dnn:extra_mod_3rdparty_tiny_dnn \
+				opencv_3rdparty:extra_mod_3rdparty_face_landmark_model \
+				opencv_3rdparty:extra_mod_3rdparty_boost_descr \
+				opencv_3rdparty:extra_mod_3rdparty_vgg_descr
+EXTRA_MODULES_GH_TAGNAME=	${PORTVERSION}:extra_mod \
+				2a2b50caa437a5964a61e45ffc83e70558e2bc68:extra_mod_3rdparty_tiny_dnn \
+				8afa57abc8229d611c4937165d20e2a2d9fc5a12:extra_mod_3rdparty_face_landmark_model \
+				34e4206aef44d50e6bbcd0ab06354b52e7466d26:extra_mod_3rdparty_boost_descr \
+				fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d:extra_mod_3rdparty_vgg_descr
+EXTRA_MODULES_LIB_DEPENDS=	libgflags.so:devel/gflags \
+				libglog.so:devel/glog \
+				libhdf5.so:science/hdf5
+EXTRA_MODULES_EXTRA_PATCHES+=	${FILESDIR}/extra-patch-modules_dnn__modern_CMakeLists.txt \
+				${FILESDIR}/extra-patch-modules_sfm_src__libmv__light_libmv_numeric_numeric.h
 
+OPENGL_DESC=		OpenGL (require QT or GTK2)
+OPENGL_CMAKE_BOOL=	WITH_OPENGL
+OPENGL_LIB_DEPENDS=	${PORT_OPTIONS:MGTK2:C,.+,libgtkglext-x11-1.0.so:x11-toolkits/gtkglext,}
+OPENGL_USE=		${PORT_OPTIONS:MQT4:S,$,=opengl,}
+
+# GUI
+
+GTK2_USE=		GNOME=gtk20
+GTK2_CMAKE_BOOL=	WITH_GTK
+
+QT4_USE=		QT4=gui,moc_build,qmake_build,rcc_build,uic_build,qtestlib
+QT4_CMAKE_ON=		-DWITH_QT:STRING="4"
+QT4_CMAKE_OFF=		-DWITH_QT:BOOL=OFF
+
 .if defined(OCV_CORE)
 . for module in ${OCV_MODS} ${OCV_JAVA_MODS} ${OCV_PYTHON_MODS}
-CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=Off
+CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=OFF
 . endfor
 .elif defined(OCV_PYTHON)
-LIB_DEPENDS+=	libopencv_legacy.so:graphics/opencv
+LIB_DEPENDS+=	libopencv_core.so:graphics/opencv-core \
+		libopencv_imgproc.so:graphics/opencv-core \
+		libopencv_ml.so:graphics/opencv
 BUILD_DEPENDS+=	${PYNUMPY}
 RUN_DEPENDS+=	${PYNUMPY}
-USES+=		fortran python:2.7
+USES+=		python:2.7
 USE_PYTHON=	flavors
-CMAKE_ARGS+=	-DBUILD_opencv_python:BOOL=On
+CMAKE_ARGS+=	-DBUILD_opencv_python${PYTHON_MAJOR_VER}:BOOL=ON
 . for module in apps java stitching superres videostab
-CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=Off
+CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=OFF
 . endfor
-INSTALL_WRKSRC=	${WRKSRC}/modules/python
+INSTALL_WRKSRC=	${WRKDIR}/.build/modules/python${PYTHON_MAJOR_VER}
 .elif defined(OCV_JAVA)
 BUILD_DEPENDS+=	ant:devel/apache-ant
-LIB_DEPENDS+=	libopencv_legacy.so:graphics/opencv
-USES+=		python:2.7,build
+LIB_DEPENDS+=	libopencv_ml.so:graphics/opencv
+USES+=		python:build
 USE_JAVA=	yes
-CMAKE_ARGS+=	-DBUILD_opencv_java:BOOL=On
+CMAKE_ARGS+=	-DBUILD_opencv_java:BOOL=ON
 . for module in apps python stitching superres videostab
-CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=Off
+CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=OFF
 . endfor
 CONFIGURE_ENV+=	JAVA_HOME="${JAVA_HOME}"
-INSTALL_WRKSRC=	${WRKSRC}/modules/java
+INSTALL_WRKSRC=	${WRKDIR}/.build/modules/java
 .else
 LIB_DEPENDS+=	libopencv_core.so:graphics/opencv-core
 . for module in ${OCV_JAVA_MODS} ${OCV_PYTHON_MODS}
-CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=Off
+CMAKE_ARGS+=	-DBUILD_opencv_${module}:BOOL=OFF
 . endfor
 .endif
 
+.if !defined(OCV_JAVA)
+CMAKE_ARGS+=	-DBUILD_JAVA:BOOL=OFF
+.endif
+
+post-extract-EXTRA_MODULES-on:
+	@${MV} ${WRKSRC_extra_mod}/doc/tutorials/* ${WRKSRC}/doc/tutorials/
+	@${MV} ${WRKSRC_extra_mod}/modules/* ${WRKSRC}/modules/
+	@${CP} -RpP ${WRKSRC_extra_mod}/samples/* ${WRKSRC}/samples/
+	@${MKDIR} ${CONFIGURE_WRKSRC}/3rdparty/tinydnn/tiny-dnn-1.0.0a3/
+	@${MV} ${WRKSRC_extra_mod_3rdparty_tiny_dnn}/* ${CONFIGURE_WRKSRC}/3rdparty/tinydnn/tiny-dnn-1.0.0a3/
+	@${MKDIR} ${CONFIGURE_WRKSRC}/share/OpenCV/testdata/cv/face/
+	@${MV} ${WRKSRC_extra_mod_3rdparty_face_landmark_model}/* ${CONFIGURE_WRKSRC}/share/OpenCV/testdata/cv/face/
+	@${MKDIR} ${CONFIGURE_WRKSRC}/downloads/xfeatures2d/
+	@${MV} ${WRKSRC_extra_mod_3rdparty_boost_descr}/* ${CONFIGURE_WRKSRC}/downloads/xfeatures2d/
+	@${MV} ${WRKSRC_extra_mod_3rdparty_vgg_descr}/* ${CONFIGURE_WRKSRC}/downloads/xfeatures2d/
+
 post-patch:
-	@${MKDIR} ${CONFIGURE_WRKSRC}
 	@${REINPLACE_CMD} -e '/pkgconfig/s|$${OPENCV_LIB_INSTALL_PATH}|libdata|' \
 		 ${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake
+	@${REINPLACE_CMD} -e 's|$${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2|${LOCALBASE}/include/CL|g' \
+		 ${WRKSRC}/cmake/OpenCVDetectOpenCL.cmake
 	@${REINPLACE_CMD} -e 's|share/OpenCV/doc|${DOCSDIR_REL}|g' \
 		-e 's|share/OpenCV/samples|${EXAMPLESDIR_REL}|g' \
 		${WRKSRC}/CMakeLists.txt
-	@${FIND} ${WRKSRC} -name '*.orig' -exec ${RM} {} \;
+	@${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' \
+		${WRKSRC}/modules/dnn/src/torch/THGeneral.cpp
 .if defined(OCV_CORE)
 	@${REINPLACE_CMD} -e 's|opencv.pc|opencv-core.pc|g' \
 		${WRKSRC}/cmake/OpenCVGenPkgconfig.cmake
@@ -184,12 +345,18 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|add_subdirectory(data)||g' \
 		${WRKSRC}/CMakeLists.txt
 .endif
+	@${FIND} ${WRKSRC} -name '*.bak' -exec ${RM} {} \;
 
+pre-build:
+	protoc --proto_path=${WRKSRC}/modules/dnn/src/caffe/ --cpp_out=${WRKSRC}/modules/dnn/misc/caffe/ ${WRKSRC}/modules/dnn/src/caffe/*.proto
+	protoc --proto_path=${WRKSRC}/modules/dnn/src/tensorflow/ --cpp_out=${WRKSRC}/modules/dnn/misc/tensorflow/ ${WRKSRC}/modules/dnn/src/tensorflow/*.proto
+
 post-install:
 .if !defined(OCV_SLAVE)
 	(cd ${STAGEDIR}${PREFIX} && \
-		${RM} -r include/opencv2/core include/opencv2/imgproc \
-			lib/libopencv_core* lib/libopencv_imgproc*)
+		${RM} -r include/opencv2/core include/opencv2/core.hpp include/opencv2/imgproc \
+			include/opencv2/imgproc.hpp \
+			include/opencv2/cvconfig.h lib/libopencv_core* lib/libopencv_imgproc*)
 .endif
 .if defined(OCV_CORE)
 	${RM} -r ${STAGEDIR}${PREFIX}/include/opencv
@@ -204,8 +371,8 @@ post-install:
 	${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
 		-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S|${PREFIX}/||})
 	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	cd ${WRKSRC}/samples/python2 && \
-		${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/python2
+	cd ${WRKSRC}/samples/python && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/python
 .endif
 .if defined(OCV_JAVA)
 	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@@ -213,4 +380,12 @@ post-install:
 		${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/java
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if !defined(OCV_CORE)
+.if (${OPSYS} == FreeBSD && ${OSVERSION} < 1200000)
+EXTRA_PATCHES+=			${FILESDIR}/extra-patch-modules_sfm_src_libmv__light_libmv_numeric_numeric.cc
+.endif
+.endif
+
+.include <bsd.port.post.mk>

Modified: head/graphics/opencv/distinfo
==============================================================================
--- head/graphics/opencv/distinfo	Wed May  9 00:53:54 2018	(r469419)
+++ head/graphics/opencv/distinfo	Wed May  9 01:10:11 2018	(r469420)
@@ -1,3 +1,13 @@
-TIMESTAMP = 1475482010
-SHA256 (opencv-opencv-2.4.13.1_GH0.tar.gz) = 0d5ce5e0973e3a745f927d1ee097aaf909aae59f787be6d27a03d639e2d96bd7
-SIZE (opencv-opencv-2.4.13.1_GH0.tar.gz) = 91773677
+TIMESTAMP = 1524780757
+SHA256 (opencv-opencv-3.4.1_GH0.tar.gz) = f1b87684d75496a1054405ae3ee0b6573acaf3dad39eaf4f1d66fdd7e03dc852
+SIZE (opencv-opencv-3.4.1_GH0.tar.gz) = 87051748
+SHA256 (tiny-dnn-tiny-dnn-2a2b50caa437a5964a61e45ffc83e70558e2bc68_GH0.tar.gz) = 03ff06b154a1a6a0f53d6f24a128727e533355d68164c509303e2da14062e97f
+SIZE (tiny-dnn-tiny-dnn-2a2b50caa437a5964a61e45ffc83e70558e2bc68_GH0.tar.gz) = 12885594
+SHA256 (opencv-opencv_contrib-3.4.1_GH0.tar.gz) = 298c69ee006d7675e1ff9d371ba8b0d9e7e88374bb7ba0f9d0789851d352ec6e
+SIZE (opencv-opencv_contrib-3.4.1_GH0.tar.gz) = 57126844
+SHA256 (opencv-opencv_3rdparty-8afa57abc8229d611c4937165d20e2a2d9fc5a12_GH0.tar.gz) = 0ae1f2d2a619ab177d96024e253e142d15dea27236510aaf1a65c7b529ee6677
+SIZE (opencv-opencv_3rdparty-8afa57abc8229d611c4937165d20e2a2d9fc5a12_GH0.tar.gz) = 63301261
+SHA256 (opencv-opencv_3rdparty-34e4206aef44d50e6bbcd0ab06354b52e7466d26_GH0.tar.gz) = d93c783cdf799da7e4a9209d169390424c4c198c1c9b5eeb78ffc890afe5f332
+SIZE (opencv-opencv_3rdparty-34e4206aef44d50e6bbcd0ab06354b52e7466d26_GH0.tar.gz) = 397901
+SHA256 (opencv-opencv_3rdparty-fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d_GH0.tar.gz) = e9abccbabcace092e5424073168cc86d422585d15d25569f01fb6503b109e0e1
+SIZE (opencv-opencv_3rdparty-fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d_GH0.tar.gz) = 1470898

Added: head/graphics/opencv/files/extra-patch-modules_dnn__modern_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opencv/files/extra-patch-modules_dnn__modern_CMakeLists.txt	Wed May  9 01:10:11 2018	(r469420)
@@ -0,0 +1,37 @@
+--- modules/dnn_modern/CMakeLists.txt.orig	2017-12-22 19:15:17.000000000 +0300
++++ modules/dnn_modern/CMakeLists.txt	2018-01-17 02:29:23.382430000 +0300
+@@ -15,20 +15,20 @@
+ 
+ set(TINY_DNN_CPP_PATH "${OpenCV_BINARY_DIR}/3rdparty/tinydnn")
+ set(TINY_DNN_CPP_ROOT "${TINY_DNN_CPP_PATH}/tiny-dnn-1.0.0a3")
+-ocv_download(FILENAME "v1.0.0a3.tar.gz"
+-               HASH "adb1c512e09ca2c7a6faef36f9c53e59"
+-               URL
+-                 "${OPENCV_TINY_DNN_URL}"
+-                 "$ENV{OPENCV_TINY_DNN_URL}"
+-                 "https://github.com/tiny-dnn/tiny-dnn/archive/"
+-               DESTINATION_DIR "${TINY_DNN_CPP_PATH}"
+-               STATUS TINY_DNN_DOWNLOAD_SUCCESS
+-               ID "tiny-dnn"
+-               UNPACK RELATIVE_URL)
+-
+-if(NOT TINY_DNN_DOWNLOAD_SUCCESS)
+-  message(STATUS "Failed to download tiny-dnn sources")
+-endif()
++#ocv_download(FILENAME "v1.0.0a3.tar.gz"
++#               HASH "adb1c512e09ca2c7a6faef36f9c53e59"
++#               URL
++#                 "${OPENCV_TINY_DNN_URL}"
++#                 "$ENV{OPENCV_TINY_DNN_URL}"
++#                 "https://github.com/tiny-dnn/tiny-dnn/archive/"
++#               DESTINATION_DIR "${TINY_DNN_CPP_PATH}"
++#               STATUS TINY_DNN_DOWNLOAD_SUCCESS
++#               ID "tiny-dnn"
++#               UNPACK RELATIVE_URL)
++#
++#if(NOT TINY_DNN_DOWNLOAD_SUCCESS)
++#  message(STATUS "Failed to download tiny-dnn sources")
++#endif()
+ 
+ find_package(TinyDNN QUIET)
+ 

Added: head/graphics/opencv/files/extra-patch-modules_sfm_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opencv/files/extra-patch-modules_sfm_CMakeLists.txt	Wed May  9 01:10:11 2018	(r469420)
@@ -0,0 +1,40 @@
+--- modules/sfm/CMakeLists.txt.orig	2015-12-17 20:11:31.000000000 +0300
++++ modules/sfm/CMakeLists.txt	2016-10-10 18:28:05.556797000 +0300
+@@ -1,25 +1,30 @@
+ set(the_description "SFM algorithms")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ 
+ 
+ ### LIBMV LIGHT EXTERNAL DEPENDENCIES ###
+ 
+ find_package(Gflags QUIET)
+-find_package(Ceres QUIET)
+-if(NOT Ceres_FOUND)  # Looks like Ceres find glog on the own, so separate search isn't necessary
++#find_package(Ceres QUIET)
++#if(NOT Ceres_FOUND)  # Looks like Ceres find glog on the own, so separate search isn't necessary
+   find_package(Glog QUIET)
+-endif()
++#endif()
+ 
+ if((gflags_FOUND OR GFLAGS_FOUND) AND (glog_FOUND OR GLOG_FOUND))
+   set(_fname "${CMAKE_CURRENT_BINARY_DIR}/test_sfm_deps.cpp")
+   file(WRITE "${_fname}" "#include <glog/logging.h>\n#include <gflags/gflags.h>\nint main() { (void)(0); return 0; }\n")
+-  try_compile(SFM_DEPS_OK "${CMAKE_BINARY_DIR}" "${_fname}"
+-      CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${GLOG_INCLUDE_DIRS};${GFLAGS_INCLUDE_DIRS}"
+-      LINK_LIBRARIES ${GLOG_LIBRARIES} ${GFLAGS_LIBRARIES}
+-      OUTPUT_VARIABLE OUTPUT
++  try_compile(SFM_DEPS_OK "${CMAKE_CURRENT_BINARY_DIR}" "${_fname}"
++      CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${GLOG_INCLUDE_DIRS};${GFLAGS_INCLUDE_DIRS} -DLINK_LIBRARIES:STRING=${GLOG_LIBRARIES};${GFLAGS_LIBRARIES}"
+   )
+   file(REMOVE "${_fname}")
+   message(STATUS "Checking SFM deps... ${SFM_DEPS_OK}")
+ else()
++  if(NOT gflags_FOUND AND NOT GFLAGS_FOUND)
++    message(STATUS "gflags not found")
++  endif()
++  if(NOT glog_FOUND AND NOT GLOG_FOUND)
++    message(STATUS "glog not found")
++  endif()
+   set(SFM_DEPS_OK FALSE)
+ endif()
+ 

Added: head/graphics/opencv/files/extra-patch-modules_sfm_src__libmv__light_libmv_numeric_numeric.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opencv/files/extra-patch-modules_sfm_src__libmv__light_libmv_numeric_numeric.h	Wed May  9 01:10:11 2018	(r469420)
@@ -0,0 +1,11 @@
+--- modules/sfm/src/libmv_light/libmv/numeric/numeric.h.orig	2017-12-22 19:15:17.000000000 +0300
++++ modules/sfm/src/libmv_light/libmv/numeric/numeric.h	2018-01-15 01:06:23.742535000 +0300
+@@ -35,7 +35,7 @@
+ 
+ #if !defined(__MINGW64__)
+ #  if defined(_WIN32) || defined(__APPLE__) || \
+-      defined(__FreeBSD__) || defined(__NetBSD__)
++      defined(__NetBSD__)
+ static void sincos(double x, double *sinx, double *cosx) {
+   *sinx = sin(x);
+   *cosx = cos(x);

Added: head/graphics/opencv/files/extra-patch-modules_sfm_src_libmv__light_libmv_numeric_numeric.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opencv/files/extra-patch-modules_sfm_src_libmv__light_libmv_numeric_numeric.cc	Wed May  9 01:10:11 2018	(r469420)
@@ -0,0 +1,35 @@
+--- modules/sfm/src/libmv_light/libmv/numeric/numeric.cc.orig	2018-04-27 13:11:58.957812000 +0000
++++ modules/sfm/src/libmv_light/libmv/numeric/numeric.cc	2018-04-27 15:52:13.702374000 +0000
+@@ -24,8 +24,8 @@
+ namespace libmv {
+ 
+ Mat3 RotationAroundX(double angle) {
+-  double c, s;
+-  sincos(angle, &s, &c);
++  double c = cos(angle);
++  double s = sin(angle);
+   Mat3 R;
+   R << 1,  0,  0,
+        0,  c, -s,
+@@ -34,8 +34,8 @@ Mat3 RotationAroundX(double angle) {
+ }
+ 
+ Mat3 RotationAroundY(double angle) {
+-  double c, s;
+-  sincos(angle, &s, &c);
++  double c = cos(angle);
++  double s = sin(angle);
+   Mat3 R;
+   R <<  c, 0, s,
+         0, 1, 0,
+@@ -44,8 +44,8 @@ Mat3 RotationAroundY(double angle) {
+ }
+ 
+ Mat3 RotationAroundZ(double angle) {
+-  double c, s;
+-  sincos(angle, &s, &c);
++  double c = cos(angle);
++  double s = sin(angle);
+   Mat3 R;
+   R << c, -s,  0,
+        s,  c,  0,

Added: head/graphics/opencv/files/patch-modules_core_include_opencv2_core_cvdef.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opencv/files/patch-modules_core_include_opencv2_core_cvdef.h	Wed May  9 01:10:11 2018	(r469420)
@@ -0,0 +1,20 @@
+--- modules/core/include/opencv2/core/cvdef.h.orig	2018-02-23 08:38:33 UTC
++++ modules/core/include/opencv2/core/cvdef.h
+@@ -452,6 +452,7 @@ Cv64suf;
+ #  endif
+ #endif
+ 
++#if defined __cplusplus
+ 
+ // Integer types portatibility
+ #ifdef OPENCV_STDINT_HEADER
+@@ -493,6 +494,9 @@ typedef ::int64_t int64_t;
+ typedef ::uint64_t uint64_t;
+ }
+ #endif
++#endif
++#else
++#include <stdint.h>
+ #endif
+ 
+ 

Added: head/graphics/opencv/files/patch-modules_core_include_opencv2_core_types__c.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/opencv/files/patch-modules_core_include_opencv2_core_types__c.h	Wed May  9 01:10:11 2018	(r469420)
@@ -0,0 +1,49 @@
+--- modules/core/include/opencv2/core/types_c.h.orig	2018-02-23 08:38:33 UTC
++++ modules/core/include/opencv2/core/types_c.h
+@@ -63,6 +63,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <float.h>
++#include <math.h>
+ #endif // SKIP_INCLUDES
+ 
+ #if defined _WIN32
+@@ -196,6 +197,38 @@ enum {
+ 
+ #define cvInvSqrt(value) ((float)(1./sqrt(value)))
+ #define cvSqrt(value)  ((float)sqrt(value))
++
++#ifndef __cplusplus
++CV_INLINE int cvRound(float value)
++{
++#if ((defined _MSC_VER && defined _M_X64) || ((defined __GNUC__ || defined __clang__) && defined __x86_64__ && \
++      defined __SSE2__ && !defined __APPLE__)) && !defined(__CUDACC__)
++    __m128 t = _mm_set_ss( value );
++    return _mm_cvtss_si32(t);
++#elif defined _MSC_VER && defined _M_IX86
++    int t;
++    __asm
++    {
++        fld value;
++        fistp t;
++    }
++    return t;
++#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \
++        defined __GNUC__ || defined __clang__) && defined HAVE_TEGRA_OPTIMIZATION
++    TEGRA_ROUND_FLT(value);
++#elif defined CV_ICC || defined __GNUC__ || defined __clang__
++# if CV_VFP
++    ARM_ROUND_FLT(value);
++# else

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805090110.w491ACu3076228>