Lines 1-8
Link Here
|
1 |
# $FreeBSD: head/graphics/opencv/Makefile 565123 2021-02-13 11:08:29Z mandree $ |
1 |
# $FreeBSD: head/graphics/opencv/Makefile 563430 2021-01-30 18:08:56Z tcberner $ |
2 |
|
2 |
|
3 |
PORTNAME= opencv |
3 |
PORTNAME= opencv |
4 |
DISTVERSION= 4.5.1 |
4 |
DISTVERSION= 4.5.1 |
5 |
PORTREVISION= 1 |
5 |
PORTREVISION= 2 |
6 |
CATEGORIES= graphics |
6 |
CATEGORIES= graphics |
7 |
|
7 |
|
8 |
MAINTAINER= tcberner@FreeBSD.org |
8 |
MAINTAINER= tcberner@FreeBSD.org |
Lines 11-94
Link Here
|
11 |
LICENSE= BSD3CLAUSE |
11 |
LICENSE= BSD3CLAUSE |
12 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
12 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
13 |
|
13 |
|
14 |
BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers \ |
|
|
15 |
opencl>=0:devel/opencl |
16 |
RUN_DEPENDS= opencl>=0:devel/opencl |
17 |
LIB_DEPENDS= \ |
14 |
LIB_DEPENDS= \ |
18 |
libIlmImf.so:graphics/openexr \ |
|
|
19 |
libavcodec.so:multimedia/ffmpeg \ |
20 |
libfreetype.so:print/freetype2 \ |
15 |
libfreetype.so:print/freetype2 \ |
21 |
libgflags.so:devel/gflags \ |
16 |
libgflags.so:devel/gflags \ |
22 |
libglog.so:devel/glog \ |
17 |
libglog.so:devel/glog \ |
23 |
libgphoto2.so:graphics/libgphoto2 \ |
|
|
24 |
libharfbuzz.so:print/harfbuzz \ |
18 |
libharfbuzz.so:print/harfbuzz \ |
25 |
libhdf5.so:science/hdf5 \ |
19 |
libhdf5.so:science/hdf5 |
26 |
libopenblas.so:math/openblas \ |
|
|
27 |
libpng16.so:graphics/png \ |
28 |
libtbb.so:devel/tbb \ |
29 |
libtiff.so:graphics/tiff \ |
30 |
libwebp.so:graphics/webp \ |
31 |
|
20 |
|
32 |
USES= cmake compiler:c++14-lang eigen:3 jpeg localbase:ldflags pkgconfig python:3.6+,build |
21 |
|
|
|
22 |
USES= cmake compiler:c++14-lang localbase:ldflags pkgconfig python:3.6+,build |
33 |
USE_GITHUB= yes |
23 |
USE_GITHUB= yes |
34 |
GH_PROJECT= opencv_contrib:contrib \ |
24 |
GH_PROJECT= opencv_contrib:contrib \ |
35 |
ade:ade \ |
25 |
ade:ade \ |
36 |
opencv_3rdparty:extra_mod_3rdparty_boost_descr \ |
26 |
opencv_3rdparty:extra_mod_3rdparty_boost_descr \ |
37 |
opencv_3rdparty:extra_mod_3rdparty_vgg_descr |
27 |
opencv_3rdparty:extra_mod_3rdparty_vgg_descr \ |
|
|
28 |
opencv_3rdparty:extra_mod_3rdparty_face_alignment_dat |
38 |
GH_TAGNAME= v0.1.1f:ade \ |
29 |
GH_TAGNAME= v0.1.1f:ade \ |
39 |
34e4206aef44d50e6bbcd0ab06354b52e7466d26:extra_mod_3rdparty_boost_descr \ |
30 |
34e4206aef44d50e6bbcd0ab06354b52e7466d26:extra_mod_3rdparty_boost_descr \ |
40 |
fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d:extra_mod_3rdparty_vgg_descr |
31 |
fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d:extra_mod_3rdparty_vgg_descr \ |
|
|
32 |
8afa57abc8229d611c4937165d20e2a2d9fc5a12:extra_mod_3rdparty_face_alignment_dat |
41 |
|
33 |
|
42 |
CMAKE_ON= \ |
34 |
|
43 |
WITH_EIGEN \ |
35 |
CMAKE_ON= ENABLE_CONFIG_VERIFICATION \ |
44 |
WITH_GDAL \ |
36 |
OPENCV_GENERATE_PKGCONFIG |
45 |
WITH_GDCM \ |
37 |
|
46 |
WITH_GPHOTO2 \ |
|
|
47 |
WITH_JASPER \ |
48 |
WITH_JPEG \ |
49 |
WITH_OPENCL \ |
50 |
WITH_OPENEXR \ |
51 |
WITH_OPENGL \ |
52 |
WITH_PNG \ |
53 |
WITH_TBB \ |
54 |
WITH_TIFF \ |
55 |
WITH_VULKAN \ |
56 |
WITH_WEBP \ |
57 |
OPENCV_GENERATE_PKGCONFIG \ |
58 |
OPENCV_ENABLE_NONFREE |
59 |
CMAKE_OFF= OPENCV_GENERATE_SETUPVARS \ |
38 |
CMAKE_OFF= OPENCV_GENERATE_SETUPVARS \ |
60 |
BUILD_opencv_python2 \ |
39 |
BUILD_opencv_python2 \ |
61 |
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 |
|
62 |
CMAKE_ARGS= -DOPENCV_EXTRA_MODULES_PATH="${WRKSRC}/contrib/modules" \ |
98 |
CMAKE_ARGS= -DOPENCV_EXTRA_MODULES_PATH="${WRKSRC}/contrib/modules" \ |
63 |
-DOPENCV_PYTHON3_INSTALL_PATH=${PYTHON_SITELIBDIR} \ |
99 |
-DOPENCV_PYTHON3_INSTALL_PATH=${PYTHON_SITELIBDIR} \ |
64 |
-DVULKAN_INCLUDE_DIRS=${LOCALBASE}/include |
100 |
-DVULKAN_INCLUDE_DIRS=${LOCALBASE}/include |
65 |
|
101 |
|
66 |
DATADIR= ${PREFIX}/share/${PORTNAME}4 |
102 |
DATADIR= ${PREFIX}/share/${PORTNAME}4 |
67 |
|
103 |
|
68 |
OPTIONS_DEFINE= HARDENING PYTHON JAVA LTO |
104 |
OPTIONS_DEFINE= PYTHON JAVA EIGEN GDAL GDCM OPENCL TBB PATENTED PROTOBUF HARDENING LTO |
69 |
OPTIONS_DEFAULT= PYTHON |
|
|
70 |
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 |
71 |
|
114 |
|
72 |
HARDENING_CMAKE_BOOL= ENABLE_BUILD_HARDENING |
115 |
ATLAS_DESC= ATLAS blas implementation with lapacke |
73 |
HARDENING_DESC= Enable hardening of the resulting binaries |
116 |
ATLAS_LIB_DEPENDS= libatlas.so:math/atlas \ |
|
|
117 |
liblapacke.so:math/lapacke |
74 |
|
118 |
|
75 |
JAVA_CMAKE_BOOL= BUILD_openv_java |
119 |
OPENBLAS_DESC= OpenBLAS blas implementation with lapacke |
76 |
JAVA_BUILD_DEPENDS= ant:devel/apache-ant |
120 |
OPENBLAS_LIB_DEPENDS= libopenblas.so:math/openblas \ |
|
|
121 |
liblapacke.so:math/lapacke |
77 |
|
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 |
78 |
PYTHON_BUILD_DEPENDS= ${PYNUMPY} |
194 |
PYTHON_BUILD_DEPENDS= ${PYNUMPY} |
79 |
PYTHON_RUN_DEPENDS= ${PYNUMPY} |
195 |
PYTHON_RUN_DEPENDS= ${PYNUMPY} |
80 |
PYTHON_USES= python:3.6+ |
196 |
PYTHON_USES= python:3.6+ |
81 |
PYTHON_USE_PYTHON= noflavors |
197 |
PYTHON_USE_PYTHON= noflavors |
82 |
PYTHON_CMAKE_BOOL= BUILD_opencv_python3 |
198 |
PYTHON_CMAKE_BOOL= BUILD_opencv_python3 |
83 |
|
199 |
HARDENING_DESC= Enables Build Hardening |
|
|
200 |
HARDENING_CMAKE_BOOL= ENABLE_BUILD_HARDENING |
201 |
LTO_DESC= Enables Link Time Optimizations |
84 |
LTO_CMAKE_BOOL= ENABLE_THIN_LTO |
202 |
LTO_CMAKE_BOOL= ENABLE_THIN_LTO |
85 |
|
203 |
|
|
|
204 |
|
86 |
post-extract: |
205 |
post-extract: |
87 |
${MV} ${WRKSRC_contrib} ${WRKSRC}/contrib |
206 |
${MV} ${WRKSRC_contrib} ${WRKSRC}/contrib |
88 |
${MKDIR} ${BUILD_WRKSRC}/3rdparty/ade |
207 |
${MKDIR} ${BUILD_WRKSRC}/3rdparty/ade |
89 |
${MV} ${WRKSRC_ade} ${BUILD_WRKSRC}/3rdparty/ade |
208 |
${MV} ${WRKSRC_ade} ${BUILD_WRKSRC}/3rdparty/ade |
90 |
${MKDIR} ${WRKSRC}/contrib/modules/xfeatures2d/src |
209 |
${MKDIR} ${BUILD_WRKSRC}/downloads/xfeatures2d |
91 |
${MV} ${WRKSRC_extra_mod_3rdparty_boost_descr}/* ${WRKSRC}/contrib/modules/xfeatures2d/src |
210 |
${MV} ${WRKSRC_extra_mod_3rdparty_boost_descr}/* ${BUILD_WRKSRC}/downloads/xfeatures2d |
92 |
${MV} ${WRKSRC_extra_mod_3rdparty_vgg_descr}/* ${WRKSRC}/contrib/modules/xfeatures2d/src |
211 |
${MV} ${WRKSRC_extra_mod_3rdparty_vgg_descr}/* ${BUILD_WRKSRC}/downloads/xfeatures2d |
93 |
|
212 |
${MKDIR} ${BUILD_WRKSRC}/share/opencv4/testdata/cv/face |
|
|
213 |
${MV} ${WRKSRC_extra_mod_3rdparty_face_alignment_dat}/* ${BUILD_WRKSRC}/share/opencv4/testdata/cv/face |
214 |
post-patch: |
215 |
${REINPLACE_CMD} -e 's|/usr/lib/atlas-base|${LOCALBASE}/lib|g' ${WRKSRC}/cmake/OpenCVFindAtlas.cmake |
216 |
${REINPLACE_CMD} -e 's|/usr/include/atlas|${LOCALBASE}/include|g' ${WRKSRC}/cmake/OpenCVFindAtlas.cmake |
217 |
${REINPLACE_CMD} -e 's|/libpng/png.h|/libpng16/png.h|g' ${WRKSRC}/cmake/OpenCVFindLibsGrfmt.cmake |
218 |
${REINPLACE_CMD} -e 's|<libpng/png.h>|<libpng16/png.h>|g' ${WRKSRC}/modules/imgcodecs/src/grfmt_png.cpp |
94 |
.include <bsd.port.mk> |
219 |
.include <bsd.port.mk> |