Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 2022 20:45:08 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 8fc85cc71555 - main - misc/opennn: fix build on libomp-less architectures
Message-ID:  <202212252045.2BPKj8Ej086114@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8fc85cc715557fd65aca93b86c2d0247bd7e707b

commit 8fc85cc715557fd65aca93b86c2d0247bd7e707b
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-12-25 20:44:17 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-12-25 20:44:17 +0000

    misc/opennn: fix build on libomp-less architectures
---
 misc/opennn/Makefile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/misc/opennn/Makefile b/misc/opennn/Makefile
index b5a344aa8ede..90319fd8f739 100644
--- a/misc/opennn/Makefile
+++ b/misc/opennn/Makefile
@@ -11,11 +11,7 @@ WWW=		https://www.opennn.net/
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
-.if !exists(/usr/include/omp.h)
-BROKEN=		requires OpenMP support that is missing on this architecture
-.endif
-
-USES=		cmake:testing compiler:c++11-lang dos2unix
+USES=		cmake:testing dos2unix
 USE_LDCONFIG=	yes
 
 USE_GITHUB=	yes
@@ -27,7 +23,16 @@ 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+=	-lomp -pthread # https://github.com/Artelnics/opennn/issues/182
+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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212252045.2BPKj8Ej086114>