diff options
Diffstat (limited to 'multimedia/gmmlib')
-rw-r--r-- | multimedia/gmmlib/Makefile | 34 | ||||
-rw-r--r-- | multimedia/gmmlib/distinfo | 3 | ||||
-rw-r--r-- | multimedia/gmmlib/files/patch-gcc-atomics | 82 | ||||
-rw-r--r-- | multimedia/gmmlib/files/patch-limits | 14 | ||||
-rw-r--r-- | multimedia/gmmlib/files/patch-thread-id | 39 | ||||
-rw-r--r-- | multimedia/gmmlib/pkg-descr | 5 | ||||
-rw-r--r-- | multimedia/gmmlib/pkg-plist | 96 |
7 files changed, 273 insertions, 0 deletions
diff --git a/multimedia/gmmlib/Makefile b/multimedia/gmmlib/Makefile new file mode 100644 index 000000000000..01ad8385e802 --- /dev/null +++ b/multimedia/gmmlib/Makefile @@ -0,0 +1,34 @@ +# $FreeBSD$ + +PORTNAME= gmmlib +DISTVERSIONPREFIX= intel-${PORTNAME}- +DISTVERSION= 18.3.0 +CATEGORIES= multimedia + +MAINTAINER= jbeich@FreeBSD.org +COMMENT= Intel Graphics Memory Management Library + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported + +USES= cmake:outsource compiler:c++11-lib +USE_GITHUB= yes +USE_LDCONFIG= yes +GH_ACCOUNT= intel +CMAKE_OFF= RUN_TEST_SUITE +CMAKE_ARGS= -DBUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" \ + -DGMMLIB_MARCH:STRING="${CPUTYPE}" + +post-patch: +# Silence -Wmacro-redefined + @${REINPLACE_CMD} -e '/__fastcall/d' \ + ${WRKSRC}/Source/inc/portable_compiler.h + +post-install: +# Clean up after PATTERN-based install + @${FIND} ${STAGEDIR}${PREFIX}/include -type d -empty -delete + +.include <bsd.port.mk> diff --git a/multimedia/gmmlib/distinfo b/multimedia/gmmlib/distinfo new file mode 100644 index 000000000000..22c2c093281e --- /dev/null +++ b/multimedia/gmmlib/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1538161179 +SHA256 (intel-gmmlib-intel-gmmlib-18.3.0_GH0.tar.gz) = e3114d7ddd429f1b9aa43a1b1d0086d881fbf4d90e4a90ab8577c369d2e3a5e1 +SIZE (intel-gmmlib-intel-gmmlib-18.3.0_GH0.tar.gz) = 620491 diff --git a/multimedia/gmmlib/files/patch-gcc-atomics b/multimedia/gmmlib/files/patch-gcc-atomics new file mode 100644 index 000000000000..9f593b225877 --- /dev/null +++ b/multimedia/gmmlib/files/patch-gcc-atomics @@ -0,0 +1,82 @@ +__sync* are GCC/Clang atomic builtins supported on any platform + +--- Source/GmmLib/Platform/GmmPlatforms.h.orig 2018-09-28 18:59:39 UTC ++++ Source/GmmLib/Platform/GmmPlatforms.h +@@ -69,7 +69,7 @@ namespace GmmLib { + { + #if defined(__GMM_KMD__) || _WIN32 + InterlockedIncrement((LONG *)&RefCount); +-#elif defined(__linux__) ++#elif defined(__GNUC__) + __sync_fetch_and_add(&RefCount, 1); + #endif + //TODO[Android] +@@ -79,7 +79,7 @@ namespace GmmLib { + { + #if defined(__GMM_KMD__) || _WIN32 + return(InterlockedDecrement((LONG *)&RefCount)); +-#elif defined(__linux__) ++#elif defined(__GNUC__) + return(__sync_sub_and_fetch(&RefCount, 1)); + #endif + //TODO[Android] +--- Source/GmmLib/inc/External/Common/GmmCachePolicyCommon.h.orig 2018-09-28 18:59:39 UTC ++++ Source/GmmLib/inc/External/Common/GmmCachePolicyCommon.h +@@ -57,7 +57,7 @@ namespace GmmLib + { + #if defined(__GMM_KMD__) || _WIN32 + InterlockedIncrement((LONG *)&RefCount); +- #elif defined(__linux__) ++ #elif defined(__GNUC__) + __sync_fetch_and_add(&RefCount, 1); + #endif + //TODO[Android] +@@ -67,7 +67,7 @@ namespace GmmLib + { + #if defined(__GMM_KMD__) || _WIN32 + return(InterlockedDecrement((LONG *)&RefCount)); +- #elif defined(__linux__) ++ #elif defined(__GNUC__) + return(__sync_sub_and_fetch(&RefCount, 1)); + #endif + //TODO[Android] +--- Source/GmmLib/inc/External/Common/GmmInfo.h.orig 2018-09-28 18:59:39 UTC ++++ Source/GmmLib/inc/External/Common/GmmInfo.h +@@ -128,7 +128,7 @@ namespace GmmLib + { + #if defined(_WIN32) + return(InterlockedIncrement((LONG *)&RefCount) - 1); //InterLockedIncrement() returns incremented value +-#elif defined(__linux__) ++#elif defined(__GNUC__) + return(__sync_fetch_and_add(&RefCount, 1)); + #endif + } +@@ -150,7 +150,7 @@ namespace GmmLib + } + #if defined(_WIN32) + } while (!(InterlockedCompareExchange((LONG *)&RefCount, TargetValue, CurrentValue) == CurrentValue)); +-#elif defined(__linux__) ++#elif defined(__GNUC__) + } while (!__sync_bool_compare_and_swap(&RefCount, CurrentValue, TargetValue)); + #endif + +--- Source/GmmLib/inc/Internal/Common/Texture/GmmTextureCalc.h.orig 2018-09-28 18:59:39 UTC ++++ Source/GmmLib/inc/Internal/Common/Texture/GmmTextureCalc.h +@@ -146,7 +146,7 @@ namespace GmmLib + { + #if defined(__GMM_KMD__) || _WIN32 + InterlockedIncrement((LONG *)&RefCount); +- #elif defined(__linux__) ++ #elif defined(__GNUC__) + __sync_fetch_and_add(&RefCount, 1); + #endif + //TODO[Android] +@@ -156,7 +156,7 @@ namespace GmmLib + { + #if defined(__GMM_KMD__) || _WIN32 + return(InterlockedDecrement((LONG *)&RefCount)); +- #elif defined(__linux__) ++ #elif defined(__GNUC__) + return(__sync_sub_and_fetch(&RefCount, 1)); + #endif + //TODO[Android] diff --git a/multimedia/gmmlib/files/patch-limits b/multimedia/gmmlib/files/patch-limits new file mode 100644 index 000000000000..b0354957f0c5 --- /dev/null +++ b/multimedia/gmmlib/files/patch-limits @@ -0,0 +1,14 @@ +Source/GmmLib/Utility/GmmLog/GmmLog.cpp:36:10: fatal error: 'linux/limits.h' file not found +#include <linux/limits.h> + ^~~~~~~~~~~~~~~~ + +--- Source/GmmLib/Utility/GmmLog/GmmLog.cpp.orig 2018-09-28 18:59:39 UTC ++++ Source/GmmLib/Utility/GmmLog/GmmLog.cpp +@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE. + #include <sys/stat.h> + #include <unistd.h> + #include <fstream> +-#include <linux/limits.h> + #endif + + /// Logger instance shared by all of GmmLib within a process diff --git a/multimedia/gmmlib/files/patch-thread-id b/multimedia/gmmlib/files/patch-thread-id new file mode 100644 index 000000000000..cea521260918 --- /dev/null +++ b/multimedia/gmmlib/files/patch-thread-id @@ -0,0 +1,39 @@ +Add more BSDs and update to modern way to get thread ID + +--- Source/GmmLib/Utility/GmmLog/spdlog/details/os.h.orig 2018-09-28 18:59:39 UTC ++++ Source/GmmLib/Utility/GmmLog/spdlog/details/os.h +@@ -39,9 +39,15 @@ + #include <unistd.h> + #include <chrono> + +-#elif __FreeBSD__ +-#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id ++#elif defined(__DragonFly__) ++#include <unistd.h> // for lwp_gettid + ++#elif defined(__FreeBSD__) ++#include <pthread_np.h> // for pthread_getthreadid_np ++ ++#elif defined(__NetBSD__) ++#include <lwp.h> // for _lwp_self ++ + #else + #include <thread> + +@@ -302,10 +308,12 @@ inline size_t thread_id() + # define SYS_gettid __NR_gettid + # endif + return static_cast<size_t>(syscall(SYS_gettid)); +-#elif __FreeBSD__ +- long tid; +- thr_self(&tid); +- return static_cast<size_t>(tid); ++#elif defined(__DragonFly__) ++ return static_cast<size_t>(lwp_gettid()); ++#elif defined(__FreeBSD__) ++ return static_cast<size_t>(pthread_getthreadid_np()); ++#elif defined(__NetBSD__) ++ return static_cast<size_t>(_lwp_self()); + #else //Default to standard C++11 (OSX and other Unix) + return static_cast<size_t>(std::hash<std::thread::id>()(std::this_thread::get_id())); + #endif diff --git a/multimedia/gmmlib/pkg-descr b/multimedia/gmmlib/pkg-descr new file mode 100644 index 000000000000..fee20db06f86 --- /dev/null +++ b/multimedia/gmmlib/pkg-descr @@ -0,0 +1,5 @@ +The Intel Graphics Memory Management Library provides device specific +and buffer management for the Intel Graphics Compute Runtime for +OpenCL and the Intel Media Driver for VAAPI. + +WWW: https://github.com/intel/gmmlib diff --git a/multimedia/gmmlib/pkg-plist b/multimedia/gmmlib/pkg-plist new file mode 100644 index 000000000000..7af92c47aaab --- /dev/null +++ b/multimedia/gmmlib/pkg-plist @@ -0,0 +1,96 @@ +include/igdgmm/GmmLib/CachePolicy/GmmCachePolicyConditionals.h +include/igdgmm/GmmLib/CachePolicy/GmmCachePolicyResourceUsageDefinitions.h +include/igdgmm/GmmLib/CachePolicy/GmmCachePolicyUndefineConditionals.h +include/igdgmm/GmmLib/CachePolicy/GmmGen10CachePolicy.h +include/igdgmm/GmmLib/CachePolicy/GmmGen11CachePolicy.h +include/igdgmm/GmmLib/CachePolicy/GmmGen8CachePolicy.h +include/igdgmm/GmmLib/CachePolicy/GmmGen9CachePolicy.h +include/igdgmm/GmmLib/Platform/GmmPlatforms.h +include/igdgmm/GmmLib/Texture/GmmTexture.h +include/igdgmm/GmmLib/Utility/CpuSwizzleBlt/CpuSwizzleBlt.c +include/igdgmm/GmmLib/Utility/CpuSwizzleBlt/assert.h +include/igdgmm/GmmLib/Utility/GmmLog/GmmLog.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/async_logger.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/common.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/async_log_helper.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/async_logger_impl.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/file_helper.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/format.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/line_logger_fwd.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/line_logger_impl.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/log_msg.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/logger_impl.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/mpmc_bounded_q.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/null_mutex.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/os.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/pattern_formatter_impl.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/registry.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/details/spdlog_impl.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/fmt/bundled/format.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/fmt/bundled/ostream.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/fmt/bundled/printf.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/fmt/fmt.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/fmt/ostr.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/formatter.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/logger.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/android_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/ansicolor_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/base_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/dist_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/file_sinks.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/msvc_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/null_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/ostream_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/stdout_sinks.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/syslog_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/sinks/wincolor_sink.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/spdlog.h +include/igdgmm/GmmLib/Utility/GmmLog/spdlog/tweakme.h +include/igdgmm/GmmLib/Utility/GmmUtility.h +include/igdgmm/GmmLib/inc/External/Common/CachePolicy/GmmCachePolicyGen10.h +include/igdgmm/GmmLib/inc/External/Common/CachePolicy/GmmCachePolicyGen11.h +include/igdgmm/GmmLib/inc/External/Common/CachePolicy/GmmCachePolicyGen8.h +include/igdgmm/GmmLib/inc/External/Common/CachePolicy/GmmCachePolicyGen9.h +include/igdgmm/GmmLib/inc/External/Common/GmmCachePolicy.h +include/igdgmm/GmmLib/inc/External/Common/GmmCachePolicyCommon.h +include/igdgmm/GmmLib/inc/External/Common/GmmCachePolicyExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmClientContext.h +include/igdgmm/GmmLib/inc/External/Common/GmmCommonExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmConst.h +include/igdgmm/GmmLib/inc/External/Common/GmmDebug.h +include/igdgmm/GmmLib/inc/External/Common/GmmFormatTable.h +include/igdgmm/GmmLib/inc/External/Common/GmmGttExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmInfo.h +include/igdgmm/GmmLib/inc/External/Common/GmmInfoExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmInternal.h +include/igdgmm/GmmLib/inc/External/Common/GmmLibDll.h +include/igdgmm/GmmLib/inc/External/Common/GmmLibDllName.h +include/igdgmm/GmmLib/inc/External/Common/GmmMemAllocator.hpp +include/igdgmm/GmmLib/inc/External/Common/GmmPlatformExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmProto.h +include/igdgmm/GmmLib/inc/External/Common/GmmResourceFlags.h +include/igdgmm/GmmLib/inc/External/Common/GmmResourceInfo.h +include/igdgmm/GmmLib/inc/External/Common/GmmResourceInfoCommon.h +include/igdgmm/GmmLib/inc/External/Common/GmmResourceInfoExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmTextureExt.h +include/igdgmm/GmmLib/inc/External/Common/GmmUtil.h +include/igdgmm/GmmLib/inc/External/Linux/GmmResourceInfoLin.h +include/igdgmm/GmmLib/inc/GmmLib.h +include/igdgmm/igdgmm.h +include/igdgmm/inc/common/gfxmacro.h +include/igdgmm/inc/common/gfxplatform.h +include/igdgmm/inc/common/gtsysinfo.h +include/igdgmm/inc/common/igfxfmid.h +include/igdgmm/inc/common/sku_wa.h +include/igdgmm/inc/portable_compiler.h +include/igdgmm/inc/umKmInc/UmKmDmaPerfTimer.h +include/igdgmm/inc/umKmInc/UmKmEnum.h +include/igdgmm/inc/umKmInc/sharedata.h +include/igdgmm/util/g_gfxDebug.h +include/igdgmm/util/gfxDebug.h +lib/libgmm_umd.a +lib/libigdgmm.so +lib/libigdgmm.so.1 +lib/libigdgmm.so.1.0.0 +libdata/pkgconfig/igdgmm.pc |