freebsd-ports/misc/mxnet/Makefile
Tobias C. Berner 7a09f7fbc2 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: dfa7e4bd47
      - multimedia/zart: 6ca1964690,
                         d3a2931b1a
    * 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 18:08:56 +00:00

60 lines
1.6 KiB
Makefile

# $FreeBSD$
PORTNAME= mxnet
DISTVERSION= 1.7.0
PORTREVISION= 2
CATEGORIES= misc # machine-learning
MAINTAINER= yuri@FreeBSD.org
COMMENT= Apache MXNet: Ultra-scalable deep learning framework
LICENSE= APACHE20
BUILD_DEPENDS= googletest>0:devel/googletest \
${LOCALBASE}/include/dnnl.h:math/onednn
LIB_DEPENDS= libdmlc.so:devel/dmlc-core \
liblapack.so:math/lapack \
libopenblas.so:math/openblas
USES= cmake compiler:c++11-lang localbase:ldflags
USE_GITHUB= yes
GH_ACCOUNT= apache
GH_PROJECT= incubator-mxnet
GH_TUPLE= apache:incubator-tvm:9bd2c7b:tvm/3rdparty/tvm \
dmlc:dlpack:3efc489:dlpack/3rdparty/dlpack
USE_LDCONFIG= yes
CMAKE_OFF= USE_CUDA USE_CUDNN USE_MKLDNN USE_NCCL ENABLE_CUDA_RTC \
BUILD_CPP_EXAMPLES USE_JEMALLOC USE_MKL_IF_AVAILABLE
LDFLAGS+= -pthread -lexecinfo
OPTIONS_DEFINE= CPP OPENCV
OPTIONS_DEFAULT= CPP OPENCV
OPTIONS_SUB= yes
CPP_DESC= Install the C++ binding (cpp-package)
CPP_CMAKE_BOOL= USE_CPP_PACKAGE
CPP_USES= python:build
CPP_VARS= BINARY_ALIAS=python=${PYTHON_CMD}
OPENCV_CMAKE_BOOL= USE_OPENCV
OPENCV_LIB_DEPENDS= libopencv_core.so:graphics/opencv \
libopencv_videoio.so:graphics/opencv
.include <bsd.port.pre.mk>
.if ${ARCH} != amd64 && ${ARCH} != i386
CMAKE_OFF+= USE_SSE
.endif
post-patch:
@${RM} ${WRKSRC}/include/mkldnn/*
.for h in dnnl.h dnnl.hpp mkldnn.h mkldnn.hpp mkldnn_dnnl_mangling.h mkldnn_types.h mkldnn_version.h
@${LN} -s ${LOCALBASE}/include/${h} ${WRKSRC}/include/mkldnn/${h}
.endfor
post-install-CPP-on: # https://github.com/apache/incubator-mxnet/issues/17080
@cd ${STAGEDIR}${PREFIX} && ${RM} include/mxnet-cpp/.gitignore include/mxnet-cpp/CPPLINT.cfg
.include <bsd.port.post.mk>