View | Details | Raw Unified | Return to bug 253110 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-41 / +169 lines)
Lines 10-88 Link Here
10
LICENSE=	BSD3CLAUSE
10
LICENSE=	BSD3CLAUSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
12
13
BUILD_DEPENDS=	vulkan-headers>0:graphics/vulkan-headers \
14
		opencl>=0:devel/opencl
15
RUN_DEPENDS=	opencl>=0:devel/opencl
16
LIB_DEPENDS=	\
13
LIB_DEPENDS=	\
17
		libIlmImf.so:graphics/openexr \
18
		libavcodec.so:multimedia/ffmpeg \
19
		libfreetype.so:print/freetype2 \
14
		libfreetype.so:print/freetype2 \
20
		libgflags.so:devel/gflags \
15
		libgflags.so:devel/gflags \
21
		libglog.so:devel/glog \
16
		libglog.so:devel/glog \
22
		libgphoto2.so:graphics/libgphoto2 \
23
		libharfbuzz.so:print/harfbuzz \
17
		libharfbuzz.so:print/harfbuzz \
24
		libhdf5.so:science/hdf5 \
18
		libhdf5.so:science/hdf5
25
		libopenblas.so:math/openblas \
26
		libpng16.so:graphics/png \
27
		libtbb.so:devel/tbb \
28
		libtiff.so:graphics/tiff \
29
		libwebp.so:graphics/webp \
30
19
31
USES=		cmake compiler:c++14-lang eigen:3 jpeg localbase:ldflags pkgconfig python:3.6+,build
20
21
USES=		cmake compiler:c++14-lang localbase:ldflags pkgconfig python:3.6+,build
32
USE_GITHUB=	yes
22
USE_GITHUB=	yes
33
GH_PROJECT=	opencv_contrib:contrib \
23
GH_PROJECT=	opencv_contrib:contrib \
34
		ade:ade \
24
		ade:ade \
35
		opencv_3rdparty:extra_mod_3rdparty_boost_descr \
25
		opencv_3rdparty:extra_mod_3rdparty_boost_descr \
36
		opencv_3rdparty:extra_mod_3rdparty_vgg_descr
26
		opencv_3rdparty:extra_mod_3rdparty_vgg_descr \
27
		opencv_3rdparty:extra_mod_3rdparty_face_alignment_dat
37
GH_TAGNAME=	v0.1.1f:ade \
28
GH_TAGNAME=	v0.1.1f:ade \
38
		34e4206aef44d50e6bbcd0ab06354b52e7466d26:extra_mod_3rdparty_boost_descr \
29
		34e4206aef44d50e6bbcd0ab06354b52e7466d26:extra_mod_3rdparty_boost_descr \
39
		fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d:extra_mod_3rdparty_vgg_descr
30
		fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d:extra_mod_3rdparty_vgg_descr \
31
		8afa57abc8229d611c4937165d20e2a2d9fc5a12:extra_mod_3rdparty_face_alignment_dat
40
32
41
CMAKE_ON=	\
33
42
		WITH_EIGEN  \
34
CMAKE_ON=	ENABLE_BUILD_HARDENING \
43
		WITH_GDAL \
35
		ENABLE_CONFIG_VERIFICATION \
44
		WITH_GDCM \
36
		OPENCV_GENERATE_PKGCONFIG
45
		WITH_GPHOTO2 \
37
46
		WITH_JASPER \
47
		WITH_JPEG \
48
		WITH_OPENCL \
49
		WITH_OPENEXR \
50
		WITH_OPENGL \
51
		WITH_PNG \
52
		WITH_TBB \
53
		WITH_TIFF \
54
		WITH_VULKAN \
55
		WITH_WEBP \
56
		OPENCV_GENERATE_PKGCONFIG \
57
		OPENCV_ENABLE_NONFREE
58
CMAKE_OFF=	OPENCV_GENERATE_SETUPVARS \
38
CMAKE_OFF=	OPENCV_GENERATE_SETUPVARS \
59
		BUILD_opencv_python2 \
39
		BUILD_opencv_python2 \
60
		BUILD_TESTS
40
		BUILD_ZLIB \
41
		BUILD_TIFF \
42
		BUILD_JASPER \
43
		BUILD_JPEG \
44
		BUILD_PNG \
45
		BUILD_OPENEXR \
46
		BUILD_WEBP \
47
		BUILD_TBB \
48
		BUILD_IPP_IW \
49
		BUILD_ITT \
50
		BUILD_TESTS \
51
		ENABLE_CCACHE \
52
		ENABLE_PRECOMPILED_HEADERS \
53
		WITH_AVFOUNDATION \
54
		WITH_CAP_IOS \
55
		WITH_CAROTENE \
56
		WITH_CPUFEATURES \
57
		WITH_VTK \
58
		WITH_CUDA \
59
		WITH_CUFFT \
60
		WITH_CUBLAS \
61
		WITH_CUDNN \
62
		WITH_NVCUVID \
63
		WITH_GTK \
64
		WITH_GTK_2_X \
65
		WITH_IPP \
66
		WITH_HALIDE \
67
		WITH_INF_ENGINE \
68
		WITH_NGRAPH \
69
		WITH_OPENGL \
70
		WITH_OPENVX \
71
		WITH_OPENNI \
72
		WITH_OPENNI2 \
73
		WITH_PVAPI \
74
		WITH_ARAVIS \
75
		WITH_QT \
76
		WITH_HPX \
77
		WITH_OPENMP \
78
		WITH_DSHOW \
79
		WITH_MSMF \
80
		WITH_MSMF_DXVA \
81
		WITH_XIMEA \
82
		WITH_UEYE \
83
		WITH_CLP \
84
		WITH_OPENCL_SVM \
85
		WITH_OPENCLAMDFFT \
86
		WITH_OPENCLAMDBLAS \
87
		WITH_DIRECTX \
88
		WITH_OPENCL_D3D11_NV \
89
		WITH_LIBREALSENSE \
90
		WITH_VA \
91
		WITH_VA_INTEL \
92
		WITH_MFX \
93
		WITH_ITT \
94
		WITH_ANDROID_MEDIANDK \
95
		WITH_TENGINE \
96
		WITH_ONNX
97
		
61
CMAKE_ARGS=	-DOPENCV_EXTRA_MODULES_PATH="${WRKSRC}/contrib/modules" \
98
CMAKE_ARGS=	-DOPENCV_EXTRA_MODULES_PATH="${WRKSRC}/contrib/modules" \
62
		-DOPENCV_PYTHON3_INSTALL_PATH=${PYTHON_SITELIBDIR} \
99
		-DOPENCV_PYTHON3_INSTALL_PATH=${PYTHON_SITELIBDIR} \
63
		-DVULKAN_INCLUDE_DIRS=${LOCALBASE}/include
100
		-DVULKAN_INCLUDE_DIRS=${LOCALBASE}/include
64
101
65
DATADIR=	${PREFIX}/share/${PORTNAME}4
102
DATADIR=	${PREFIX}/share/${PORTNAME}4
66
103
67
OPTIONS_DEFINE=		PYTHON JAVA
104
OPTIONS_DEFINE=		PYTHON JAVA EIGEN GDAL GDCM OPENCL TBB PATENTED PROTOBUF
68
OPTIONS_DEFAULT=	PYTHON
69
OPTIONS_SUB=		yes
105
OPTIONS_SUB=		yes
106
OPTIONS_DEFAULT=	PYTHON OPENBLAS DC1394 EIGEN GDAL GPHOTO2 OPENJPEG JPEG OPENCL OPENEXR PNG TIFF VULKAN WEBP V4L PROTOBUF GSTREAMER GDCM XINE
107
OPTIONS_GROUP=		VIDEO IMAGEPROC
108
OPTIONS_GROUP_VIDEO=	DC1394 VULKAN WEBP FFMPEG V4L GSTREAMER XINE
109
OPTIONS_GROUP_IMAGEPROC=GPHOTO2 JPEG OPENEXR PNG TIFF
110
OPTIONS_SINGLE=		BLAS
111
OPTIONS_SINGLE_BLAS=	ATLAS OPENBLAS NOBLAS
112
OPTIONS_RADIO=		JPEG2K
113
OPTIONS_RADIO_JPEG2K=	JASPER OPENJPEG
70
114
71
JAVA_CMAKE_BOOL=	BUILD_openv_java
115
ATLAS_DESC=         	ATLAS blas implementation with lapacke
72
JAVA_BUILD_DEPENDS=	ant:devel/apache-ant
116
ATLAS_LIB_DEPENDS=	libatlas.so:math/atlas \
117
			liblapacke.so:math/lapacke
73
118
119
OPENBLAS_DESC=		OpenBLAS blas implementation with lapacke
120
OPENBLAS_LIB_DEPENDS=	libopenblas.so:math/openblas \
121
			liblapacke.so:math/lapacke
122
123
NOBLAS_DESC=		Disable support for lapack/blas
124
NOBLAS_CMAKE_ON=	-DWITH_LAPACK:BOOL=FALSE
125
126
DC1394_DESC=		IEEE 1394 camera support
127
DC1394_CMAKE_BOOL=	WITH_1394
128
DC1394_LIB_DEPENDS=	libdc1394.so:multimedia/libdc1394
129
EIGEN_DESC=		Add Eigen v3 Support, builds sfm modules
130
EIGEN_CMAKE_BOOL=	WITH_EIGEN
131
EIGEN_USES=		eigen:3
132
GDAL_DESC=		Add Geospatial Data Abstraction Library Support
133
GDAL_CMAKE_BOOL=	WITH_GDAL
134
GDAL_LIB_DEPENDS=	libgdal.so:graphics/gdal
135
GDCM_DESC=		Add Open source DICOM library Support
136
GDCM_CMAKE_BOOL=	WITH_GDCM
137
GDCM_LIB_DEPENDS=	libgdcmMSFF.so:devel/gdcm
138
GPHOTO2_DESC=		Add Gphoto2 Support
139
GPHOTO2_CMAKE_BOOL=	WITH_GPHOTO2
140
GPHOTO2_LIB_DEPENDS=	libgphoto2.so:graphics/libgphoto2
141
JASPER_DESC=		Add Jasper Support for JPEG2000
142
JASPER_CMAKE_BOOL=	WITH_JASPER
143
JASPER_LIB_DEPENDS=	libjasper.so:graphics/jasper
144
OPENJPEG_DESC=		Add OpenJPEG Support for JPEG2000, OpenCV preferred
145
OPENJPEG_CMAKE_BOOL=	WITH_OPENJPEG
146
OPENJPEG_LIB_DEPENDS=	libopenjp2.so:graphics/openjpeg
147
JPEG_DESC=		Add LibJpeg Support
148
JPEG_CMAKE_BOOL=	WITH_JPEG
149
JPEG_USES=		jpeg 
150
OPENCL_DESC=		Add OpenCL Support
151
OPENCL_CMAKE_BOOL=	WITH_OPENCL
152
OPENCL_BUILD_DEPENDS=	opencl>=0:devel/opencl
153
OPENCL_RUN_DEPENDS=	opencl>=0:devel/opencl
154
OPENEXR_DESC=		Add OpenEXR Support
155
OPENEXR_CMAKE_BOOL=	WITH_OPENEXR
156
OPENEXR_LIB_DEPENDS=	libIlmImf.so:graphics/openexr
157
PNG_DESC=		Add LibPNG Support
158
PNG_CMAKE_BOOL=		WITH_PNG
159
PNG_LIB_DEPENDS=	libpng16.so:graphics/png
160
TBB_DESC=		Add Intel Threading Building Blocks Support
161
TBB_CMAKE_BOOL=		WITH_TBB
162
TBB_LIB_DEPENDS=	libtbb.so:devel/tbb
163
TIFF_DESC=		Add LibTIFF Support
164
TIFF_CMAKE_BOOL=	WITH_TIFF
165
TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
166
VULKAN_DESC=		Add Vulkan Support
167
VULKAN_CMAKE_BOOL=	WITH_VULKAN
168
VULKAN_BUILD_DEPENDS=	vulkan-headers>0:graphics/vulkan-headers
169
GSTREAMER_DESC=		Add GSTREAMER Support
170
GSTREAMER_CMAKE_BOOL=	WITH_GSTREAMER
171
GSTREAMER_USE=		GSTREAMER1=yes
172
WEBP_DESC=		Add Webp Support
173
WEBP_CMAKE_BOOL=	WITH_WEBP
174
WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
175
PATENTED_DESC=		Enable patented 2d feature detection USE AT OWN RISK
176
PATENTED_CMAKE_BOOL=	OPENCV_ENABLE_NONFREE
177
FFMPEG_DESC=		Link with ffmpeg, circular dependancy possible
178
FFMPEG_CMAKE_BOOL=	WITH_FFMPEG
179
FFMPEG_LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg
180
V4L_DESC=		Enable support for Video for Linux
181
V4L_CMAKE_BOOL=		WITH_V4L WITH_LIBV4L
182
V4L_BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
183
V4L_LIB_DEPENDS=	libv4l2.so:multimedia/libv4l
184
PROTOBUF_DESC=		Enable protobuf support, builds dnn modules
185
PROTOBUF_CMAKE_BOOL=	WITH_PROTOBUF
186
PROTOBUF_LIB_DEPENDS=	libprotobuf.so:devel/protobuf
187
XINE_DESC=		Add Xine Support
188
XINE_CMAKE_BOOL=	WITH_XINE
189
XINE_LIB_DEPENDS=	libxine.so:multimedia/libxine
190
JAVA_DESC=		Enable Java Support
191
JAVA_CMAKE_BOOL=	BUILD_opencv_java BUILD_opencv_java_bindings_generator BUILD_JAVA 
192
JAVA_BUILD_DEPENDS=	ant:devel/apache-ant
193
PYTHON_DESC=		Enable Python Support 3.6 or greater
74
PYTHON_BUILD_DEPENDS=	${PYNUMPY}
194
PYTHON_BUILD_DEPENDS=	${PYNUMPY}
75
PYTHON_RUN_DEPENDS=	${PYNUMPY}
195
PYTHON_RUN_DEPENDS=	${PYNUMPY}
76
PYTHON_USES=		python:3.6+
196
PYTHON_USES=		python:3.6+
77
PYTHON_USE_PYTHON=	noflavors
197
PYTHON_USE_PYTHON=	noflavors
78
PYTHON_CMAKE_BOOL=	BUILD_opencv_python3
198
PYTHON_CMAKE_BOOL=	BUILD_opencv_python3
79
199
200
201
80
post-extract:
202
post-extract:
81
	${MV} ${WRKSRC_contrib} ${WRKSRC}/contrib
203
	${MV} ${WRKSRC_contrib} ${WRKSRC}/contrib
82
	${MKDIR} ${BUILD_WRKSRC}/3rdparty/ade
204
	${MKDIR} ${BUILD_WRKSRC}/3rdparty/ade
83
	${MV} ${WRKSRC_ade} ${BUILD_WRKSRC}/3rdparty/ade
205
	${MV} ${WRKSRC_ade} ${BUILD_WRKSRC}/3rdparty/ade
84
	${MKDIR} ${WRKSRC}/contrib/modules/xfeatures2d/src
206
	${MKDIR} ${BUILD_WRKSRC}/downloads/xfeatures2d
85
	${MV} ${WRKSRC_extra_mod_3rdparty_boost_descr}/* ${WRKSRC}/contrib/modules/xfeatures2d/src
207
	${MV} ${WRKSRC_extra_mod_3rdparty_boost_descr}/* ${BUILD_WRKSRC}/downloads/xfeatures2d
86
	${MV} ${WRKSRC_extra_mod_3rdparty_vgg_descr}/* ${WRKSRC}/contrib/modules/xfeatures2d/src
208
	${MV} ${WRKSRC_extra_mod_3rdparty_vgg_descr}/* ${BUILD_WRKSRC}/downloads/xfeatures2d
87
209
	${MKDIR} ${BUILD_WRKSRC}/share/opencv4/testdata/cv/face
210
	${MV} ${WRKSRC_extra_mod_3rdparty_face_alignment_dat}/* ${BUILD_WRKSRC}/share/opencv4/testdata/cv/face
211
post-patch:
212
	${REINPLACE_CMD} -e 's|/usr/lib/atlas-base|${LOCALBASE}/lib|g' ${WRKSRC}/cmake/OpenCVFindAtlas.cmake
213
	${REINPLACE_CMD} -e 's|/usr/include/atlas|${LOCALBASE}/include|g' ${WRKSRC}/cmake/OpenCVFindAtlas.cmake
214
	${REINPLACE_CMD} -e 's|/libpng/png.h|/libpng16/png.h|g' ${WRKSRC}/cmake/OpenCVFindLibsGrfmt.cmake
215
	${REINPLACE_CMD} -e 's|<libpng/png.h>|<libpng16/png.h>|g' ${WRKSRC}/modules/imgcodecs/src/grfmt_png.cpp
88
.include <bsd.port.mk>
216
.include <bsd.port.mk>

Return to bug 253110