ports/devel/intel-graphics-compiler/Makefile
Muhammad Moinur Rahman bbab7f59e9 */*: Sunset 12.4-RELEASE/12-STABLE from ports tree
- Remove all references to defunct ARCH arm
- Remove all references to defunct ARCH sparc64
- Remove x11-drivers/xf86-video-sunffb which requires defunct sparc64
  ARCH
- Remove sysutils/afbinit requires defunct sparc64 ARCH
- Remove all references to bktr driver
- Remove all references to defunct FreeBSD_12
- Remove all references to OSVERSION/OSREL corresponding to 12
- Remove conditionals in Mk/Uses/cabal.mk
- Remove sparc reference from Mk/Uses/qt-dist.mk
- Remove BROKEN_sparc64/NOT_FOR_ARCH=sparc64
- Remove BROKEN_FreeBSD_12* from:
- Remove OpenSSL patches from:
- Remove conditional flags for OSVERSION >= 1300000 to fixed flags.
  Also move conditional flags for non sparc64/arm ARCH to fixed flags.

Reviewed by:	brooks, jbeich, rene, salvadore
Differential Revision: https://reviews.freebsd.org/D42068
2023-12-31 01:37:05 +01:00

55 lines
2 KiB
Makefile

PORTNAME= intel-graphics-compiler
DISTVERSIONPREFIX= igc-
DISTVERSION= 1.0.12504.5
CATEGORIES= devel
PKGNAMESUFFIX= -${FLAVOR}
MAINTAINER= ports@FreeBSD.org
COMMENT= Intel Graphics Compiler for OpenCL
WWW= https://01.org/compute-runtime
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.md
ONLY_FOR_ARCHS= aarch64 amd64 i386
ONLY_FOR_ARCHS_REASON= only Intel GPUs on x86 are supported
BROKEN_FreeBSD_14_i386= lld crashes during build
BUILD_DEPENDS= vc-intrinsics-${FLAVOR}>=0.4.0:devel/vc-intrinsics@${FLAVOR}
LIB_DEPENDS= libLLVM-${FLAVOR:S/llvm//}.so:devel/${FLAVOR} \
libopencl-clang.so.${FLAVOR:S/llvm//}:devel/opencl-clang@${FLAVOR} \
libLLVMSPIRVLib.so.${FLAVOR:S/llvm//}:devel/spirv-llvm-translator@${FLAVOR}
FLAVORS= ${14 13 12 11:L:S/^/llvm/}
CONFLICTS_INSTALL= ${PORTNAME}-llvm*
USES= bison cmake compiler:c++17-lang python:build
USE_GITHUB= yes
USE_LDCONFIG= yes
GH_ACCOUNT= intel
GH_TUPLE= KhronosGroup:SPIRV-Headers:1.5.4.raytracing.fixed-123-g814e728:headers/../SPIRV-Headers \
KhronosGroup:SPIRV-Tools:v2021.4:tools/../SPIRV-Tools
CMAKE_ARGS= -DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${FLAVOR}" \
-DIGC_OPTION__LLVM_PREFERRED_VERSION:STRING="${FLAVOR:S/llvm//}" \
-DIGC_OPTION__VC_INTRINSICS_MODE:STRING=Prebuilds
CFLAGS+= -Wno-macro-redefined # __fastcall
PLIST_SUB= ARCH_SUFX=${ARCH:S/aarch//:S/amd//:S/i386/32/:S/x86_//}
post-patch:
# lang/python* don't install unsuffixed symlinks
@${REINPLACE_CMD} -i .python \
-e '/EXECUTABLE/s/"python"/"${PYTHON_CMD:T}"/' \
-e '/IGC_PYTHON/s/"python"/"${PYTHON_CMD:T}"/' \
${WRKSRC}/IGC/CMakeLists.txt \
${WRKSRC}/IGC/BiFModule/linux/CMakeLists.txt
# No need to abort on every benign warning enabled by default
# Disable debug symbols unless WITH_DEBUG passed via CXXFLAGS
@${REINPLACE_CMD} -e 's/"-Werror"//; /-Werror/d' \
-e 's/"-g"//' \
${WRKSRC}/IGC/CMakeLists.txt
# Search LLVMSPIRVLib.pc where devel/spirv-llvm-translator installs
@${REINPLACE_CMD} -e '/pkgconfig/s,$${_libdir},&/../libdata,' \
${WRKSRC}/IGC/cmake/modules/FindSPIRVLLVMTranslator.cmake
.include <bsd.port.mk>