diff options
author | Daniel Bermond | 2019-06-14 23:12:58 +0000 |
---|---|---|
committer | Daniel Bermond | 2019-06-14 23:12:58 +0000 |
commit | 5d92569078e617d7596a4bfa668ffe5a25eb7ec4 (patch) | |
tree | f46b9c91d816a0289bd1b140efc1d950babb5385 | |
parent | 2f3c070a98fe433ec1ee733582b072038084fc8f (diff) | |
download | aur-5d92569078e617d7596a4bfa668ffe5a25eb7ec4.tar.gz |
Fix build on non-intel cpu
https://github.com/OpenVisualCloud/SVT-HEVC/issues/207
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | intel-svt-hevc-fix-build-on-non-intel.patch | 12 |
3 files changed, 28 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = intel-svt-hevc pkgdesc = An HEVC-compliant encoder for Intel CPUs of 5th Generation (Broadwell) and above pkgver = 1.3.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/OpenVisualCloud/SVT-HEVC/ arch = x86_64 license = BSD @@ -9,7 +9,9 @@ pkgbase = intel-svt-hevc makedepends = yasm depends = gcc-libs source = intel-svt-hevc-1.3.0.tar.gz::https://github.com/OpenVisualCloud/SVT-HEVC/archive/v1.3.0.tar.gz + source = intel-svt-hevc-fix-build-on-non-intel.patch sha256sums = ef21f3a13e33b4f61af4a0c79337ce9e4f73f6fe13d1c2afe2c3b0712f4158d9 + sha256sums = e18d5cba469242e35fcbf285a3f05cd954d27b3243c8760333c5487b60e55132 pkgname = intel-svt-hevc @@ -2,20 +2,30 @@ pkgname=intel-svt-hevc pkgver=1.3.0 -pkgrel=1 +pkgrel=2 pkgdesc='An HEVC-compliant encoder for Intel CPUs of 5th Generation (Broadwell) and above' arch=('x86_64') url='https://github.com/OpenVisualCloud/SVT-HEVC/' license=('BSD') depends=('gcc-libs') makedepends=('cmake' 'yasm') -source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/OpenVisualCloud/SVT-HEVC/archive/v${pkgver}.tar.gz") -sha256sums=('ef21f3a13e33b4f61af4a0c79337ce9e4f73f6fe13d1c2afe2c3b0712f4158d9') +source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/OpenVisualCloud/SVT-HEVC/archive/v${pkgver}.tar.gz" + 'intel-svt-hevc-fix-build-on-non-intel.patch') +sha256sums=('ef21f3a13e33b4f61af4a0c79337ce9e4f73f6fe13d1c2afe2c3b0712f4158d9' + 'e18d5cba469242e35fcbf285a3f05cd954d27b3243c8760333c5487b60e55132') prepare() { cd "SVT-HEVC-${pkgver}" mkdir -p build + + # hack: fix build on non-intel cpu + local _cpu_vendor + _cpu_vendor="$(awk -F':' '/vendor_id/ { gsub(" ", "", $2); print $2 }' /proc/cpuinfo | uniq)" + if [ "$_cpu_vendor" != 'GenuineIntel' ] + then + patch -Np1 -i "${srcdir}/intel-svt-hevc-fix-build-on-non-intel.patch" + fi } build() { diff --git a/intel-svt-hevc-fix-build-on-non-intel.patch b/intel-svt-hevc-fix-build-on-non-intel.patch new file mode 100644 index 000000000000..4a2f77e449e2 --- /dev/null +++ b/intel-svt-hevc-fix-build-on-non-intel.patch @@ -0,0 +1,12 @@ +diff -Nawurp a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2019-02-14 00:36:54.000000000 +0000 ++++ b/CMakeLists.txt 2019-06-14 22:55:19.335471333 +0000 +@@ -73,7 +73,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + endif() + + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong -fPIE -fPIC -D_FORTIFY_SOURCE=2 -O2 -flto -Wall -Wextra -Wformat -Wformat-security -fvisibility=hidden -march=native") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong -fPIE -fPIC -D_FORTIFY_SOURCE=2 -O2 -flto -Wall -Wextra -Wformat -Wformat-security -fvisibility=hidden -mavx") + if(CMAKE_SYSTEM_NAME STREQUAL "Windows") #for Mingw64 support, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-asynchronous-unwind-tables") + endif() |