Index: head/lang/intel-compute-runtime/Makefile =================================================================== --- head/lang/intel-compute-runtime/Makefile (revision 520761) +++ head/lang/intel-compute-runtime/Makefile (revision 520762) @@ -1,46 +1,46 @@ # $FreeBSD$ PORTNAME= compute-runtime DISTVERSION= 19.50.15079 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang PKGNAMEPREFIX= intel- PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ PATCHFILES+= fb8df1a328e4.patch:-p1 MAINTAINER= jbeich@FreeBSD.org COMMENT= OpenCL library 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 pkgconfig USE_GITHUB= yes USE_LDCONFIG= yes GH_ACCOUNT= intel CMAKE_ON= SKIP_ALL_ULT 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' \ -e '/FORCE_RESPONSE_FILE/d' \ ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e '/defaults/!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 Index: head/lang/intel-compute-runtime/files/patch-max_freq =================================================================== --- head/lang/intel-compute-runtime/files/patch-max_freq (nonexistent) +++ head/lang/intel-compute-runtime/files/patch-max_freq (revision 520762) @@ -0,0 +1,44 @@ +/sys/bus/pci/devices doesn't exist as kms-drm exports sysfs via sysctl + + $ clinfo | fgrep clock + Max clock frequency 0MHz + +--- runtime/os_interface/linux/drm_neo.cpp.orig 2019-12-09 17:18:41 UTC ++++ runtime/os_interface/linux/drm_neo.cpp +@@ -16,6 +16,11 @@ + #include + #include + ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#include ++#include ++#endif ++ + namespace NEO { + + const char *Drm::sysFsDefaultGpuPath = "/drm/card0"; +@@ -66,6 +71,16 @@ int Drm::getEnabledPooledEu(int &enabled) { + + int Drm::getMaxGpuFrequency(int &maxGpuFrequency) { + maxGpuFrequency = 0; ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++ char max_freq[PAGE_SIZE]; ++ size_t len = sizeof(max_freq); ++ ++ if (sysctlbyname("sys.class.drm.card0.gt_max_freq_mhz", &max_freq, &len, NULL, 0)) { ++ return 0; ++ } ++ ++ maxGpuFrequency = std::stoi(max_freq); ++#else + int deviceID = 0; + int ret = getDeviceID(deviceID); + if (ret != 0) { +@@ -87,6 +102,7 @@ int Drm::getMaxGpuFrequency(int &maxGpuFrequency) { + + ifs >> maxGpuFrequency; + ifs.close(); ++#endif + return 0; + } + Property changes on: head/lang/intel-compute-runtime/files/patch-max_freq ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property