2019-10-06 20:25:19 +02:00
|
|
|
PORTNAME= darknet
|
2021-05-23 19:12:19 +02:00
|
|
|
DISTVERSIONPREFIX= darknet_yolo_v
|
|
|
|
DISTVERSION= 4_pre
|
2023-04-23 11:09:58 +02:00
|
|
|
PORTREVISION= 3
|
2019-10-06 21:19:39 +02:00
|
|
|
PORTEPOCH= 1
|
2020-05-08 02:13:18 +02:00
|
|
|
CATEGORIES= misc # machine-learning
|
2019-10-06 20:25:19 +02:00
|
|
|
|
|
|
|
MAINTAINER= yuri@FreeBSD.org
|
|
|
|
COMMENT= Open source neural networks in C
|
2022-09-07 23:06:12 +02:00
|
|
|
WWW= https://pjreddie.com/darknet/
|
2019-10-06 20:25:19 +02:00
|
|
|
|
|
|
|
LICENSE= PD
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
2019-12-16 03:06:55 +01:00
|
|
|
USES= cmake compiler:c11
|
2021-05-23 19:12:19 +02:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
|
2019-10-06 20:25:19 +02:00
|
|
|
USE_GITHUB= yes
|
2019-12-16 03:06:55 +01:00
|
|
|
GH_ACCOUNT= AlexeyAB
|
2019-10-06 20:25:19 +02:00
|
|
|
|
2019-12-16 03:06:55 +01:00
|
|
|
CMAKE_OFF= ENABLE_CUDA ENABLE_CUDNN ENABLE_CUDNN_HALF ENABLE_VCPKG_INTEGRATION
|
2019-10-06 20:25:19 +02:00
|
|
|
|
|
|
|
PLIST_FILES= bin/darknet \
|
|
|
|
include/darknet.h \
|
2019-12-16 03:06:55 +01:00
|
|
|
include/yolo_v2_class.hpp \
|
|
|
|
lib/libdark.so
|
2019-10-06 20:25:19 +02:00
|
|
|
|
2019-12-16 03:06:55 +01:00
|
|
|
OPTIONS_DEFINE= OPENCV
|
|
|
|
OPTIONS_DEFAULT= OPENCV
|
2020-03-15 22:42:43 +01:00
|
|
|
OPTIONS_DEFINE_amd64= SSE2 SSE3 SSE4 AVX
|
|
|
|
OPTIONS_DEFINE_i386= SSE2 SSE3 SSE4 AVX
|
|
|
|
OPTIONS_DEFAULT_amd64= SSE2
|
|
|
|
OPTIONS_DEFAULT_i386= SSE2
|
2019-10-07 01:06:16 +02:00
|
|
|
# Many secondary functions in DarkNet depend on OpenCV which is a large dependency.
|
|
|
|
# Build with OPENCV=off for a self-contained executable which would support
|
|
|
|
# core NN computations but would not support many visualization, training and
|
|
|
|
# other features.
|
|
|
|
|
2019-12-16 03:06:55 +01:00
|
|
|
OPENCV_USES= pkgconfig
|
|
|
|
OPENCV_CMAKE_BOOL= ENABLE_OPENCV
|
2019-10-07 01:06:16 +02:00
|
|
|
OPENCV_LIB_DEPENDS= libopencv_video.so:graphics/opencv \
|
graphics/opencv: update to 4.5.1 -- and make port more easily maintainable
This is a major upgrade from 3.x to 4.x.
Changelog from versions 3.4.1--4.5.1 can be found here:
https://github.com/opencv/opencv/wiki/ChangeLog
Note: this has explicitely not been added as a new graphics/opencv4 port, but replaces the
previous graphics/opencv[3] port. Again, to improve maintainability by not giving ports
the option to pick the "wrong one" - this leads however to some abandoned ports being
broken.
The port has been greatly simplified:
* graphics/opencv-core which existed to enable ffmpeg to depend on opencv, and vice versa
has been removed. ffmpeg no longer can depend on opencv.
* graphics/py-opencv has been integrated into graphics/opencv, the default versions python
bindings will be built unless the PYTHON option is explicitely turned off.
* graphics/opencv-java has been integrated into graphics/opencv -- it is off by default,
but can be enabled by toggling the JAVA option -- there are no consumers in the tree,
so that option might go away in the future.
* All the previous options have been removed and replaced by a (hopefully) sane set of
dependencies that make the port and package most usable for the majority of consumers.
- Please let me know if you think there are better defaults (i.e. anything that is missing,
or something that should not be dependet on).
- If you think something should be added or removed, please open a bug report.
- If you think something should be added as an optional dependency, please open a
bug report (with a good reason [tm]).
The depending ports have been updated to work against opencv4, or marked broken.
* Ports broken:
- graphics/rubygem-objectdetect: OpenCV4 no longer ships opencv-1.0 API
- graphics/p5-Image-ObjectDetect: OpenCV4 no longer ships opencv-1.0 API
- graphics/gimp-gmic-plugin: OpenCV4 no longer ships opencv-1.0 API
* Backports:
- misc/visp: https://github.com/lagadic/visp/commit/dfa7e4bd47c24cd2e631477e6afb18806733ff8a
- multimedia/zart: https://github.com/c-koi/zart/commit/6ca1964690afbbc78627d7c868a692401043a584,
https://github.com/c-koi/zart/commit/d3a2931b1a07ec0322211f253468000363c4b6cb
* Others:
- misc/actiona: switch to pkgconfig 'opencv4'
- multimedia/libav: drop opencv support
- misc/darknet: already failed to build prior to the upgrade
- math/saga: remove patching added to work against opencv3
2021-01-30 19:08:56 +01:00
|
|
|
libopencv_core.so:graphics/opencv
|
2019-10-07 01:06:16 +02:00
|
|
|
|
2020-03-15 22:42:43 +01:00
|
|
|
SSE2_DESC= Use SSE2 instructions
|
|
|
|
SSE2_CMAKE_ON= -DFREEBSD_SIMD="-msse2"
|
|
|
|
SSE3_DESC= Use SSE3 instructions
|
|
|
|
SSE3_CMAKE_ON= -DFREEBSD_SIMD="-msse3"
|
|
|
|
SSE4_DESC= Use SSE4 instructions
|
|
|
|
SSE4_CMAKE_ON= -DFREEBSD_SIMD="-msse4.1 -msse4.2 -msse4a"
|
|
|
|
AVX_DESC= Use AVX instructions
|
|
|
|
AVX_CMAKE_ON= -DFREEBSD_SIMD="-mavx -mavx2"
|
|
|
|
|
2019-12-16 03:06:55 +01:00
|
|
|
do-install: # https://github.com/AlexeyAB/darknet/issues/4527
|
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/darknet ${STAGEDIR}${PREFIX}/bin
|
2019-10-06 20:25:19 +02:00
|
|
|
cd ${WRKSRC} && ${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX}
|
2019-12-16 03:06:55 +01:00
|
|
|
${INSTALL_DATA} ${BUILD_WRKSRC}/libdark.so ${STAGEDIR}${PREFIX}/lib
|
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libdark.so
|
2019-10-06 20:25:19 +02:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|