aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-07-15 18:51:06 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-07-15 18:51:53 +0000
commit461a2801d4dde2197bb449f02909e69dfebf83c3 (patch)
tree344d69bb0f5324dd748b68ef06def873d3031425
parent333342296e5730bc18870a9b45e70cdedf47a26a (diff)
downloadports-461a2801d4dde2197bb449f02909e69dfebf83c3.tar.gz
ports-461a2801d4dde2197bb449f02909e69dfebf83c3.zip
misc/opennn: Add test target; remove MPI option (defunct); Add USES=compiler:c++11-lang
-rw-r--r--misc/opennn/Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/misc/opennn/Makefile b/misc/opennn/Makefile
index 81c10a2811a5..600ebd243910 100644
--- a/misc/opennn/Makefile
+++ b/misc/opennn/Makefile
@@ -1,5 +1,6 @@
PORTNAME= opennn
DISTVERSION= 5.0.5
+PORTREVISION= 1
CATEGORIES= misc # machine-learning
MASTER_SITES= https://github.com/Artelnics/opennn/archive/refs/tags/v${DISTVERSION}${EXTRACT_SUFX}?dummy=/
@@ -13,21 +14,23 @@ BROKEN_armv6= fatal error: 'omp.h' file not found
BROKEN_armv7= fatal error: 'omp.h' file not found
BROKEN_riscv64= fatal error: 'omp.h' file not found
-USES= cmake compiler dos2unix zip
-DOS2UNIX_FILES= opennn/CMakeLists.txt
+USES= cmake:testing compiler:c++11-lang dos2unix zip
USE_LDCONFIG= yes
-CMAKE_OFF= OpenNN_BUILD_EXAMPLES OpenNN_BUILD_TESTS
-LDFLAGS+= -lomp -pthread # https://github.com/Artelnics/opennn/issues/182
+DOS2UNIX_FILES= opennn/CMakeLists.txt
-OPTIONS_DEFINE= MPI
+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
-MPI_CMAKE_BOOL= __OPENNN_MPI__
-MPI_BROKEN= deactivated: https://github.com/Artelnics/OpenNN/issues/86
+LDFLAGS+= -lomp -pthread # https://github.com/Artelnics/opennn/issues/182
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>