freebsd-ports/misc/darknet/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

60 lines
1.8 KiB
Makefile

PORTNAME= darknet
DISTVERSIONPREFIX= darknet_yolo_v
DISTVERSION= 4_pre
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= misc # machine-learning
MAINTAINER= yuri@FreeBSD.org
COMMENT= Open source neural networks in C
WWW= https://pjreddie.com/darknet/
LICENSE= PD
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cmake compiler:c11
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= AlexeyAB
CMAKE_OFF= ENABLE_CUDA ENABLE_CUDNN ENABLE_CUDNN_HALF ENABLE_VCPKG_INTEGRATION
PLIST_FILES= bin/darknet \
include/darknet.h \
include/yolo_v2_class.hpp \
lib/libdark.so
OPTIONS_DEFINE= OPENCV
OPTIONS_DEFAULT= OPENCV
OPTIONS_DEFINE_amd64= SSE2 SSE3 SSE4 AVX
OPTIONS_DEFINE_i386= SSE2 SSE3 SSE4 AVX
OPTIONS_DEFAULT_amd64= SSE2
OPTIONS_DEFAULT_i386= SSE2
# 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.
OPENCV_USES= pkgconfig
OPENCV_CMAKE_BOOL= ENABLE_OPENCV
OPENCV_LIB_DEPENDS= libopencv_video.so:graphics/opencv \
libopencv_core.so:graphics/opencv
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"
do-install: # https://github.com/AlexeyAB/darknet/issues/4527
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/darknet ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC} && ${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX}
${INSTALL_DATA} ${BUILD_WRKSRC}/libdark.so ${STAGEDIR}${PREFIX}/lib
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libdark.so
.include <bsd.port.mk>