freebsd-ports/lang/intel-compute-runtime/Makefile

43 lines
1.1 KiB
Makefile
Raw Normal View History

# $FreeBSD$
PORTNAME= compute-runtime
DISTVERSION= 20.13.16352
CATEGORIES= lang
PKGNAMEPREFIX= intel-
MAINTAINER= jbeich@FreeBSD.org
COMMENT= OpenCL implementation for Intel HD 5000 (Gen8) or newer
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported
LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler \
libigdgmm.so:multimedia/gmmlib
USES= cmake compiler:c++14-lang localbase:ldflags pkgconfig
USE_GITHUB= yes
USE_LDCONFIG= yes
GH_ACCOUNT= intel
CMAKE_ON= SKIP_UNIT_TESTS
CMAKE_ARGS= -DNEO_DRIVER_VERSION:STRING="${DISTVERSIONFULL}"
PLIST_FILES= etc/OpenCL/vendors/intel.icd \
bin/ocloc \
lib/intel-opencl/libigdrcl.so
post-patch:
@${REINPLACE_CMD} -e '/-Werror/d' \
lang/compute-runtime: unbreak build with ninja BSD ar(1) from base doesn't understand @file which CMake projects can use to work around maximum number of arguments on command line. $ echo /dev/null >foo.rsp $ /usr/bin/ar qc libfoo.a @foo.rsp ar: warning: can't open file: @foo.rsp: No such file or directory leading to FAILED: bin/ocloc : && /usr/bin/c++ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -mretpoline -ftemplate-depth=1024 -Wall -Wempty-body -Wignored-qualifiers -Wtype-limits -Wuninitialized -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Winvalid-pch -Wshorten-64-to-32 -Wno-unused-local-typedefs -DSANITIZER_BUILD -Wno-deprecated-register -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong @CMakeFiles/ocloc.rsp -o bin/ocloc && : ld: error: undefined symbol: CLElfLib::CElfReader::CElfReader(std::__1::vector<char, std::__1::allocator<char> >&) >>> referenced by binary_decoder.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/decoder/binary_decoder.cpp.o:(BinaryDecoder::getDevBinary()) ld: error: undefined symbol: CLElfLib::CElfReader::getSectionData(unsigned long) >>> referenced by binary_decoder.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/decoder/binary_decoder.cpp.o:(BinaryDecoder::getDevBinary()) >>> referenced by binary_decoder.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/decoder/binary_decoder.cpp.o:(BinaryDecoder::getDevBinary()) >>> referenced by binary_decoder.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/decoder/binary_decoder.cpp.o:(BinaryDecoder::getDevBinary()) >>> referenced by binary_decoder.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/decoder/binary_decoder.cpp.o:(BinaryDecoder::getDevBinary()) ld: error: undefined symbol: CLElfLib::CElfWriter::resolveBinary(std::__1::vector<char, std::__1::allocator<char> >&) >>> referenced by binary_encoder.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/decoder/binary_encoder.cpp.o:(BinaryEncoder::createElf()) >>> referenced by offline_compiler.cpp >>> offline_compiler/CMakeFiles/ocloc.dir/offline_compiler.cpp.o:(NEO::OfflineCompiler::generateElfBinary()) c++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
2019-12-08 18:52:36 +01:00
-e '/FORCE_RESPONSE_FILE/d' \
${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e '/OCL_ICD_VENDORDIR/s,/etc,${PREFIX}&,' \
${WRKSRC}/package.cmake
post-install:
# install/strip has no effect on install(FILES), so strip manually
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/intel-opencl/*.so
.include <bsd.port.mk>