git: 070200f93538 - main - devel/intel-graphics-compiler: add llvm12 (beta) flavor
Jan Beich
jbeich at FreeBSD.org
Fri Oct 1 02:32:52 UTC 2021
The branch main has been updated by jbeich:
URL: https://cgit.FreeBSD.org/ports/commit/?id=070200f93538ba29ed33a884d7ad28e4f801b843
commit 070200f93538ba29ed33a884d7ad28e4f801b843
Author: Jan Beich <jbeich at FreeBSD.org>
AuthorDate: 2021-08-11 20:09:42 +0000
Commit: Jan Beich <jbeich at FreeBSD.org>
CommitDate: 2021-10-01 02:20:03 +0000
devel/intel-graphics-compiler: add llvm12 (beta) flavor
https://github.com/intel/intel-graphics-compiler/projects/2
---
devel/intel-graphics-compiler/Makefile | 13 +++++++++----
devel/intel-graphics-compiler/files/patch-llvm12 | 22 ++++++++++++++++++++++
lang/intel-compute-runtime/Makefile | 7 ++++++-
3 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/devel/intel-graphics-compiler/Makefile b/devel/intel-graphics-compiler/Makefile
index ec010d9a3569..338444e1547a 100644
--- a/devel/intel-graphics-compiler/Makefile
+++ b/devel/intel-graphics-compiler/Makefile
@@ -2,6 +2,7 @@ PORTNAME= intel-graphics-compiler
DISTVERSIONPREFIX= igc-
DISTVERSION= 1.0.8744
CATEGORIES= devel
+PKGNAMESUFFIX= -${FLAVOR}
MAINTAINER= jbeich at FreeBSD.org
COMMENT= Intel Graphics Compiler for OpenCL
@@ -12,16 +13,20 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported
-BUILD_DEPENDS= vc-intrinsics-llvm11>=s20210730:devel/vc-intrinsics at llvm11
-LIB_DEPENDS= libopencl-clang.so.11:devel/opencl-clang at llvm11
+BUILD_DEPENDS= vc-intrinsics-${FLAVOR}>=s20210730:devel/vc-intrinsics@${FLAVOR}
+LIB_DEPENDS= libopencl-clang.so.${FLAVOR:S/llvm//}:devel/opencl-clang@${FLAVOR}
+
+FLAVORS= ${12 11:L:S/^/llvm/}
+
+CONFLICTS_INSTALL= ${PORTNAME}-*
USES= bison cmake compiler:c++17-lang python:build
USE_GITHUB= yes
USE_LDCONFIG= yes
GH_ACCOUNT= intel
CMAKE_OFF= INSTALL_SPIRVDLL
-CMAKE_ARGS= -DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${LIB_DEPENDS:M*@llvm*:C/.*@//}" \
- -DIGC_OPTION__LLVM_PREFERRED_VERSION:STRING="${LIB_DEPENDS:M*@llvm*:C/.*so\.//:C/:.*//}"
+CMAKE_ARGS= -DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${FLAVOR}" \
+ -DIGC_OPTION__LLVM_PREFERRED_VERSION:STRING="${FLAVOR:S/llvm//}"
CFLAGS+= -Wno-macro-redefined # __fastcall
PLIST_SUB= ARCH_SUFX=${ARCH:S/i386/32/:S/amd//:S/x86_//}
diff --git a/devel/intel-graphics-compiler/files/patch-llvm12 b/devel/intel-graphics-compiler/files/patch-llvm12
new file mode 100644
index 000000000000..68e7995988dd
--- /dev/null
+++ b/devel/intel-graphics-compiler/files/patch-llvm12
@@ -0,0 +1,22 @@
+CMake Error at external/llvm/llvm_deps.cmake:50 (file):
+ file COPY cannot find
+ "IGC/DEFAULT_IGC_LLVM_SOURCES_DIR-NOTFOUND/libunwind/include/mach-o/compact_unwind_encoding.h":
+ No such file or directory.
+Call Stack (most recent call first):
+ IGC/CMakeLists.txt:1250 (include)
+
+--- external/llvm/llvm_deps.cmake.orig 2021-09-16 08:50:38 UTC
++++ external/llvm/llvm_deps.cmake
+@@ -44,12 +44,6 @@ include(llvm_spirv_source_hook)
+ # LLD source hook.
+ if(IGC_OPTION__LLVM_LLD)
+ include(llvm_lld_source_hook)
+- if(NOT EXISTS "${IGC_LLVM_WORKSPACE_SRC}/libunwind/include/mach-o" AND ${IGC_OPTION__LLVM_PREFERRED_VERSION} GREATER_EQUAL "12.0.0")
+- # Need to copy one header from unwind package for LLD (only for building from sources)
+- file(MAKE_DIRECTORY ${IGC_LLVM_WORKSPACE_SRC}/libunwind/include/mach-o)
+- file(COPY ${DEFAULT_IGC_LLVM_SOURCES_DIR}/libunwind/include/mach-o/compact_unwind_encoding.h
+- DESTINATION ${IGC_LLVM_WORKSPACE_SRC}/libunwind/include/mach-o/)
+- endif()
+ endif()
+
+ # Process LLVM.
diff --git a/lang/intel-compute-runtime/Makefile b/lang/intel-compute-runtime/Makefile
index 47168dd162bf..ebd3ab1e73e2 100644
--- a/lang/intel-compute-runtime/Makefile
+++ b/lang/intel-compute-runtime/Makefile
@@ -2,6 +2,7 @@ PORTNAME= compute-runtime
DISTVERSION= 21.37.20939
CATEGORIES= lang
PKGNAMEPREFIX= intel-
+PKGNAMESUFFIX= -${FLAVOR}
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= aa5a39a2db79.patch:-p1 # https://github.com/intel/compute-runtime/pull/361
@@ -15,9 +16,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported
-LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler \
+LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler@${FLAVOR} \
libigdgmm.so:multimedia/gmmlib
+FLAVORS= ${12 11:L:S/^/llvm/}
+
+CONFLICTS_INSTALL= ${PORTNAME}-*
+
USES= cmake compiler:c++17-lang localbase:ldflags pkgconfig
USE_GITHUB= yes
USE_LDCONFIG= yes
More information about the dev-commits-ports-all
mailing list