From 79f303af3529215ba4789b548bb2109f0c054172 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 24 Feb 2019 06:21:46 +0000 Subject: [PATCH] multimedia/svt-hevc: use all cores by default Thread affinity isn't supported yet. Mounting /proc is no help as it doesn't expose CPU topology e.g.., physical id is always 0. --- multimedia/svt-hevc/Makefile | 4 ++++ multimedia/svt-hevc/distinfo | 2 ++ .../svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/multimedia/svt-hevc/Makefile b/multimedia/svt-hevc/Makefile index d27bfbafd3bf..168288a5e4d0 100644 --- a/multimedia/svt-hevc/Makefile +++ b/multimedia/svt-hevc/Makefile @@ -3,8 +3,12 @@ PORTNAME= svt-hevc DISTVERSIONPREFIX= v PORTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= multimedia +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= ad0942db4ce4.patch:-p1 + MAINTAINER= jbeich@FreeBSD.org COMMENT= Scalable HEVC encoder diff --git a/multimedia/svt-hevc/distinfo b/multimedia/svt-hevc/distinfo index 0454982de5b2..50f20e01a680 100644 --- a/multimedia/svt-hevc/distinfo +++ b/multimedia/svt-hevc/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1550104614 SHA256 (Intel-SVT-HEVC-v1.3.0_GH0.tar.gz) = ef21f3a13e33b4f61af4a0c79337ce9e4f73f6fe13d1c2afe2c3b0712f4158d9 SIZE (Intel-SVT-HEVC-v1.3.0_GH0.tar.gz) = 1137878 +SHA256 (ad0942db4ce4.patch) = 2165f1b1d658dbbac91f8a2e86976f6692f93fcc6649feacbc6013d811874f48 +SIZE (ad0942db4ce4.patch) = 864 diff --git a/multimedia/svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h b/multimedia/svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h index 47ac4137551b..1bedb7ea1781 100644 --- a/multimedia/svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h +++ b/multimedia/svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h @@ -1,5 +1,3 @@ -FreeBSD (unlike DragonFly) didn't try to be compatible with GNU libc at first. - In file included from Source/Lib/Codec/EbEncDecProcess.c:9: In file included from Source/Lib/Codec/EbTransforms.h:14: In file included from Source/Lib/Codec/EbSequenceControlSet.h:10: @@ -9,16 +7,18 @@ extern cpu_set_t groupAffinity; --- Source/Lib/Codec/EbThreads.h.orig 2019-02-14 00:36:54 UTC +++ Source/Lib/Codec/EbThreads.h -@@ -95,7 +95,12 @@ extern EB_BOOL alternateGroups; +@@ -95,7 +95,14 @@ extern EB_BOOL alternateGroups; #else #define __USE_GNU #define _GNU_SOURCE +#ifdef __FreeBSD__ -+#include +#define cpu_set_t cpuset_t +#else #include +#endif #include ++#if defined(__DragonFly__) || defined(__FreeBSD__) ++#include ++#endif extern cpu_set_t groupAffinity; #define EB_CREATETHREAD(type, pointer, nElements, pointerClass, threadFunction, threadContext) \