From ec555b61aaf130b62d986197e0e2985bceacbf9a Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Wed, 15 Jun 2022 08:55:39 +0000
Subject: [PATCH] community/intel-media-driver: upgrade to 22.4.3

---
 community/intel-media-driver/APKBUILD       | 17 ++++++++--------
 community/intel-media-driver/execinfo.patch | 22 +++++++++++++++++++++
 2 files changed, 31 insertions(+), 8 deletions(-)
 create mode 100644 community/intel-media-driver/execinfo.patch

diff --git a/community/intel-media-driver/APKBUILD b/community/intel-media-driver/APKBUILD
index 033f35b77a26..403b1eb7e254 100644
--- a/community/intel-media-driver/APKBUILD
+++ b/community/intel-media-driver/APKBUILD
@@ -2,7 +2,7 @@
 # Contributor: psykose <alice@ayaya.dev>
 # Maintainer: psykose <alice@ayaya.dev>
 pkgname=intel-media-driver
-pkgver=22.4.2
+pkgver=22.4.3
 pkgrel=0
 pkgdesc="Intel Media Driver for VAAPI - Broadwell+ iGPUs"
 options="!check" # tests can't run in check(), only on install
@@ -12,29 +12,29 @@ license="BSD-3-Clause AND MIT"
 makedepends="
 	cmake
 	intel-gmmlib-dev
+	libexecinfo-dev
 	libva-dev
 	libpciaccess-dev
 	samurai
 	"
 subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/intel/media-driver/archive/intel-media-$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/intel/media-driver/archive/intel-media-$pkgver.tar.gz
+	execinfo.patch
+	"
 builddir="$srcdir/media-driver-intel-media-$pkgver"
 
 build() {
 	if [ "$CBUILD" != "$CHOST" ]; then
 		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
 	fi
-	# only recognises debug/release internally
-	# BUILD_TYPE is an additional internal type
-	cmake -B build -G Ninja \
+	cmake -B build -G Ninja -Wno-dev \
 		-DCMAKE_INSTALL_PREFIX=/usr \
 		-DCMAKE_INSTALL_LIBDIR=lib \
 		-DBUILD_SHARED_LIBS=True \
-		-DCMAKE_BUILD_TYPE=Release \
 		-DBUILD_TYPE=Release \
 		-DINSTALL_DRIVER_SYSCONF=OFF \
 		-DMEDIA_RUN_TEST_SUITE=OFF \
-		$CMAKE_CROSSOPTS .
+		$CMAKE_CROSSOPTS
 	cmake --build build
 }
 
@@ -43,5 +43,6 @@ package() {
 }
 
 sha512sums="
-1f32709b80cd25006e2156e4487d75d07ff5eb337164c6aaacb92385dc31c1ce0c80a3c7062c830f89674d70bfedd7f81e4f34ea4d1dd8adb4da0d2212e744ea  intel-media-driver-22.4.2.tar.gz
+9acf38fc0ffc65a7ef39570a31e9403600b1c6fe532a741ccdb26588e056a4bb0e5a53290942a026f4813b86db95d7d1eb3166682a889e482ac1645c6ce8aba4  intel-media-driver-22.4.3.tar.gz
+28285fe0b5096af0a1abb0345711a304d61d45bf126fd7c12579f8e27acd6b1d93b755e5881f1113e146b0c2bd4b66a177ad3f4dca5f0b22e523e68ac442e90b  execinfo.patch
 "
diff --git a/community/intel-media-driver/execinfo.patch b/community/intel-media-driver/execinfo.patch
new file mode 100644
index 000000000000..0d28d0168d9e
--- /dev/null
+++ b/community/intel-media-driver/execinfo.patch
@@ -0,0 +1,22 @@
+--- a/media_driver/media_top_cmake.cmake
++++ b/media_driver/media_top_cmake.cmake
+@@ -202,7 +202,7 @@
+ bs_ufo_link_libraries_noBsymbolic(
+     ${LIB_NAME}
+     "${INCLUDED_LIBS}"
+-    "${PKG_PCIACCESS_LIBRARIES} m pthread dl"
++    "${PKG_PCIACCESS_LIBRARIES} m pthread dl execinfo"
+ )
+ 
+ if (NOT DEFINED INCLUDED_LIBS OR "${INCLUDED_LIBS}" STREQUAL "")
+--- a/media_softlet/media_top_cmake.cmake
++++ b/media_softlet/media_top_cmake.cmake
+@@ -105,7 +105,7 @@
+ bs_ufo_link_libraries_noBsymbolic(
+     ${LIB_NAME}
+     "${INCLUDED_LIBS}"
+-    "${PKG_PCIACCESS_LIBRARIES} m pthread dl"
++    "${PKG_PCIACCESS_LIBRARIES} m pthread dl execinfo"
+ )
+ 
+ if (NOT DEFINED INCLUDED_LIBS OR "${INCLUDED_LIBS}" STREQUAL "")
-- 
GitLab