blob: ac7c2ef49f1efed3d3ae806f30832b19be1c1da9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
PORTNAME= opennn
DISTVERSIONPREFIX= v
DISTVERSION= 6.0.4
CATEGORIES= misc # machine-learning
MAINTAINER= yuri@FreeBSD.org
COMMENT= Open neural networks library
WWW= https://www.opennn.net/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= cmake:testing dos2unix
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= Artelnics
DOS2UNIX_FILES= opennn/CMakeLists.txt
CMAKE_ON= BUILD_SHARED_LIBS
CMAKE_OFF= OpenNN_BUILD_EXAMPLES OpenNN_BUILD_TESTS
CMAKE_TESTING_ON= OpenNN_BUILD_TESTS # some tests fail, see https://github.com/Artelnics/opennn/issues/229
CMAKE_TESTING_TARGET= tests
LDFLAGS+= -pthread
LDFLAGS_powerpc= -latomic
.if !exists(/usr/include/omp.h)
LDFLAGS+= -fopenmp
USES+= compiler:gcc-c++11-lib
.else
LDFLAGS+= -lomp # https://github.com/Artelnics/opennn/issues/182
USES+= compiler:c++11-lang
.endif
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} && ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}
${INSTALL_DATA} ${BUILD_WRKSRC}/${PORTNAME}/libopennn.so ${STAGEDIR}${PREFIX}/lib
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libopennn.so
post-test:
@cd ${TEST_WRKSRC} && (${ECHO} suite | tests/tests)
.include <bsd.port.mk>
|