aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authoryuri <yuri@FreeBSD.org>2018-12-16 16:32:24 +0800
committeryuri <yuri@FreeBSD.org>2018-12-16 16:32:24 +0800
commit4dff52ab5ddc0e32dd2e667b9fbbec7807a6bbd6 (patch)
tree95215d437ca044244ce4e1f43e6885ecca1db00d /math
parente2d89dd40657ecf7009c44b07e150d08775ab502 (diff)
downloadfreebsd-ports-gnome-4dff52ab5ddc0e32dd2e667b9fbbec7807a6bbd6.tar.gz
freebsd-ports-gnome-4dff52ab5ddc0e32dd2e667b9fbbec7807a6bbd6.tar.zst
freebsd-ports-gnome-4dff52ab5ddc0e32dd2e667b9fbbec7807a6bbd6.zip
math/combblas: Fix the OpenMP dependency
Remove 'find_package(OpenMP)' and llvm/clang70 because 'find_package(OpenMP)' is now broken with clang70 too. Fix the problem by patching out 'find_package(OpenMP)'. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234050
Diffstat (limited to 'math')
-rw-r--r--math/combblas/Makefile11
-rw-r--r--math/combblas/files/patch-CMakeLists.txt24
2 files changed, 27 insertions, 8 deletions
diff --git a/math/combblas/Makefile b/math/combblas/Makefile
index a77264403ae4..0dec46780a7c 100644
--- a/math/combblas/Makefile
+++ b/math/combblas/Makefile
@@ -2,6 +2,7 @@
PORTNAME= CombBLAS
DISTVERSION= 1.6.2
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= https://people.eecs.berkeley.edu/~aydin/${PORTNAME}_FILES/
DISTNAME= ${PORTNAME}_beta_${DISTVERSION:S/.//:S/./_/}
@@ -12,20 +13,14 @@ COMMENT= Combinatorial BLAS library: an extensible parallel graph library
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-LIB_DEPENDS= libmpi.so:net/mpich
+LIB_DEPENDS= libmpi.so:net/mpich \
+ libomp.so:devel/openmp
RUN_DEPENDS= ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so.1:lang/gcc${GCC_DEFAULT} # because of the link flags induced by mpich
USES= cmake:outsource localbase:ldflags tar:tgz
USE_LDCONFIG= yes
CMAKE_ON= BUILD_SHARED_LIBS
-LDFLAGS+= ${LOCALBASE}/llvm${LLVM_DEFAULT}/lib/libomp.so
-
-# use clang from ports because cmake can't find OpenMP with base clang, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678
-BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
-CPP= clang-cpp${LLVM_DEFAULT}
-CC= clang${LLVM_DEFAULT}
-CXX= clang++${LLVM_DEFAULT}
post-extract:
@cd ${WRKSRC}/include && ${RM} .DS_Store ._.DS_Store CombBLAS/._CombBLAS.h
diff --git a/math/combblas/files/patch-CMakeLists.txt b/math/combblas/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..052ff9fee6fd
--- /dev/null
+++ b/math/combblas/files/patch-CMakeLists.txt
@@ -0,0 +1,24 @@
+--- CMakeLists.txt.orig 2018-12-16 07:56:08 UTC
++++ CMakeLists.txt
+@@ -23,7 +23,11 @@ target_include_directories(CombBLAS PRIV
+
+ # MPI and OpenMP dependencies
+ find_package(MPI REQUIRED)
+-find_package(OpenMP REQUIRED)
++#find_package(OpenMP REQUIRED)
++set(OPENMP_FOUND TRUE)
++set(OpenMP_CXX_FOUND TRUE)
++set(OpenMP_CXX_FLAGS "")
++set(OpenMP_LINK_FLAGS "-lomp")
+
+ if(TARGET MPI::MPI_CXX) # Use target if available (cmake >= 3.9)
+ target_link_libraries(CombBLAS PUBLIC MPI::MPI_CXX)
+@@ -40,7 +44,7 @@ if(OPENMP_FOUND OR OpenMP_CXX_FOUND)
+ target_link_libraries(CombBLAS PUBLIC OpenMP::OpenMP_CXX)
+ else()
+ target_compile_options(CombBLAS PUBLIC "${OpenMP_CXX_FLAGS}")
+- target_link_libraries(CombBLAS PUBLIC "${OpenMP_CXX_FLAGS}")
++ target_link_libraries(CombBLAS PUBLIC "${OpenMP_LINK_FLAGS}")
+ endif()
+ endif()
+