diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2019-11-29 22:24:45 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2019-11-29 22:24:45 +0000 |
commit | 0a789b2a93890c9f967dafd1adff6bdaae51a75e (patch) | |
tree | bb209c0d1a60732d951f14bb123e1d86399a01c0 | |
parent | lang/rust, Mk/Uses/cargo.mk: Drop gmake build dependency for backtrace-sys (diff) |
devel/dmlc-core: fix build on GCC architectures
Use USES=compiler:openmp instead of hard dependency on ports LLVM. Use new GCC when using base GCC.
Remove -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200809L, this causes some errno.h macros not being visible.
PR: 242234
Approved by: yuri (maintainer), linimon (mentor)
Differential Revision: https://reviews.freebsd.org/D22580
Notes
Notes:
svn path=/head/; revision=518679
-rw-r--r-- | devel/dmlc-core/Makefile | 18 | ||||
-rw-r--r-- | devel/dmlc-core/files/patch-CMakeLists.txt | 11 |
2 files changed, 17 insertions, 12 deletions
diff --git a/devel/dmlc-core/Makefile b/devel/dmlc-core/Makefile index 87f38cc5c04c..c9670a570ae7 100644 --- a/devel/dmlc-core/Makefile +++ b/devel/dmlc-core/Makefile @@ -4,6 +4,7 @@ PORTNAME= dmlc-core DISTVERSIONPREFIX= v DISTVERSION= 0.3-105 DISTVERSIONSUFFIX= -g32d9fe7 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org @@ -11,24 +12,17 @@ COMMENT= Common library for scalable and portable distributed machine learning LICENSE= APACHE20 -BUILD_DEPENDS= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} - -USES= cmake +USES= compiler:openmp cmake USE_GITHUB= yes GH_ACCOUNT= dmlc USE_LDCONFIG= yes CMAKE_ON= BUILD_SHARED_LIBS -# use clang from ports because otherwise OpenMP isn't detected on some systems (ex. 12.0-RELEASE-p9) -CPP= clang-cpp${LLVM_DEFAULT} -CC= clang${LLVM_DEFAULT} -CXX= clang++${LLVM_DEFAULT} - -.include <bsd.port.options.mk> +.include <bsd.port.pre.mk> -.if ${LLVM_DEFAULT:S,-devel,990,} >= 90 -LLVM_DEFAULT= 80 +.if ${CHOSEN_COMPILER_TYPE} == gcc +USE_GCC= yes .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/devel/dmlc-core/files/patch-CMakeLists.txt b/devel/dmlc-core/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..20f183a5c2fc --- /dev/null +++ b/devel/dmlc-core/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2019-11-25 13:40:31 UTC ++++ CMakeLists.txt +@@ -207,7 +207,7 @@ target_include_directories(dmlc PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>) + target_compile_definitions(dmlc PRIVATE -D_XOPEN_SOURCE=700 +- -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200809L -D_DARWIN_C_SOURCE ++ -D_DARWIN_C_SOURCE + -DDMLC_CORE_USE_CMAKE) + # DMLC_CORE_USE_CMAKE macro constant indicates the use of CMake + |