summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD141
-rw-r--r--fix-vadriverinit-1.patch (renamed from vadriverinit-fix.patch)0
-rw-r--r--fix-vadriverinit-2.patch55
-rw-r--r--intel-hybrid-codec-driver.install8
6 files changed, 133 insertions, 91 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bdfb7b8eaec7..5fff2c34a057 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,7 @@
pkgbase = intel-hybrid-codec-driver-git
pkgdesc = Libva support for partially hardware accelerated encode and decode on Haswell and newer
- pkgver = 2.0.0.r170.20220515.cfb3b71
- pkgrel = 3
- epoch = 1
+ pkgver = 2.0.0.r1.gcfb3b718
+ pkgrel = 1
url = https://github.com/kcning/intel-hybrid-driver
install = intel-hybrid-codec-driver.install
arch = x86_64
@@ -13,16 +12,15 @@ pkgbase = intel-hybrid-codec-driver-git
depends = libva
depends = libcmrt
optdepends = libva-intel-driver-hybrid: To be able to use the full hw codecs with hybrid codecs
- provides = intel-hybrid-codec-driver=2.0.0.r170.20220515.cfb3b71
+ provides = intel-hybrid-codec-driver=2.0.0
conflicts = intel-hybrid-codec-driver
- replaces = intel-hybrid-codec-driver<=2.0.0.r170.7961945
- source = intel-hybrid-driver::git+https://github.com/kcning/intel-hybrid-driver.git
+ source = kcning.intel-hybrid-driver::git+https://github.com/kcning/intel-hybrid-driver.git
source = gcc10-fix.patch
- source = vadriverinit-fix.patch
- source = intel-hybrid-codec-driver.install
+ source = fix-vadriverinit-1.patch
+ source = fix-vadriverinit-2.patch
sha256sums = SKIP
sha256sums = 90c01a1771f90007b001057edd4ada66751e54ccc380b3d87672694ab7ea92cb
sha256sums = 5359cfa322403bad1a20dc55de290c5f5c2f8d56afeba9c4a84dfc35cc89ec8b
- sha256sums = 0465f0f9a29b5168ecb51a07bcca6db85637f847e0ac5bffdea4152ba329f3f2
+ sha256sums = acb0acf2a83632358ccb3b02a4b74184149312863fa15bab4686df41abb1fd9b
pkgname = intel-hybrid-codec-driver-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..018a3de08144
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index a779d15221de..3a9d746a5563 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,31 @@
-# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)
-# Contributor: DetMittens
-# Contributer: uth 2.0.0 update
-#
-# Supported Platforms Features
-# Haswell (HSW) vp8enc
-# Bay Trail M (BYT) vp8enc
-# Broadwell (BRW) vp9dec vp9enc
-# Braswell (BSW) vp8enc vp9dec
-#
-#
-# The libva-intel-driver package isn't compiled with support for loading this driver
-# so in order to use this driver's features with non hybrid codecs either
-# recompile libva-intel-driver with the --enable-hybrid-codec or install
-# the libva-intel-driver-hybrid package from the AUR
+# Maintainer:
+# Contributor: dreieck
+
+# Supported Platforms | Features
+# --------------------+--------------
+# Haswell (HSW) | vp8enc
+# Bay Trail M (BYT) | vp8enc
+# Broadwell (BRW) | vp9dec vp9enc
+# Braswell (BSW) | vp8enc vp9dec
+
+# The libva-intel-driver package isn't compiled with support for loading
+# this driver. To use this driver's features with non hybrid codecs,
+# recompile libva-intel-driver with the --enable-hybrid-codec
+# or install the libva-intel-driver-hybrid package from the AUR
+
+## useful links
+# https://01.org/linuxmedia/vaapi
+# https://github.com/kcning/intel-hybrid-driver
_pkgname=intel-hybrid-codec-driver
-pkgname="${_pkgname}-git"
-_gitname=intel-hybrid-driver
-_gitroot="git+https://github.com/kcning/${_gitname}.git"
-epoch=1
-_pkgver=2.0.0 # According to upstream, we are at version 2.0.0, but git tags say 1.0.2.
-pkgver=2.0.0.r170.20220515.cfb3b71
-pkgrel=3
-pkgdesc='Libva support for partially hardware accelerated encode and decode on Haswell and newer'
-arch=(
- 'x86_64'
-)
-# url='https://01.org/linuxmedia/vaapi'
-url='https://github.com/kcning/intel-hybrid-driver'
-license=(
- 'MIT'
-)
+pkgname="$_pkgname-git"
+pkgver=2.0.0.r1.gcfb3b718
+pkgrel=1
+pkgdesc="Libva support for partially hardware accelerated encode and decode on Haswell and newer"
+url="https://github.com/kcning/intel-hybrid-driver"
+license=('MIT')
+arch=('x86_64')
+
depends=(
'libva'
'libcmrt'
@@ -43,74 +38,64 @@ makedepends=(
'automake'
'git'
)
-provides=(
- "${_pkgname}=${pkgver}"
-)
-conflicts=(
- "${_pkgname}"
-)
-replaces=(
- "${_pkgname}<=2.0.0.r170.7961945" # Because this package was wrongly named 'intel-hybrid-codec-driver' before. See https://aur.archlinux.org/packages/intel-hybrid-codec-driver-git#comment-934635 for more rartionale about this `replaces` directive.
-)
-install="${_pkgname}.install"
+provides=("${_pkgname}=${pkgver%%.r*}")
+conflicts=("$_pkgname")
+
+install="$_pkgname.install"
+
+_pkgsrc="kcning.intel-hybrid-driver"
source=(
- "$_gitname::$_gitroot"
+ "$_pkgsrc"::"git+$url.git"
'gcc10-fix.patch'
- 'vadriverinit-fix.patch'
- "${install}"
+ 'fix-vadriverinit-1.patch'
+ 'fix-vadriverinit-2.patch'
)
sha256sums=(
'SKIP'
'90c01a1771f90007b001057edd4ada66751e54ccc380b3d87672694ab7ea92cb'
'5359cfa322403bad1a20dc55de290c5f5c2f8d56afeba9c4a84dfc35cc89ec8b'
- '0465f0f9a29b5168ecb51a07bcca6db85637f847e0ac5bffdea4152ba329f3f2'
+ 'acb0acf2a83632358ccb3b02a4b74184149312863fa15bab4686df41abb1fd9b'
)
prepare() {
- cd "${srcdir}/${_gitname}"
- patch -N -p1 --follow-symlinks -i "${srcdir}/gcc10-fix.patch"
- patch -N -p1 --follow-symlinks -i "${srcdir}/vadriverinit-fix.patch"
- autoreconf -v --install
+ cd "$_pkgsrc"
+ patch -Np1 -F100 --follow-symlinks -i "$srcdir/gcc10-fix.patch"
+ patch -Np1 -F100 --follow-symlinks -i "$srcdir/fix-vadriverinit-1.patch"
+ patch -Np1 -F100 --follow-symlinks -i "$srcdir/fix-vadriverinit-2.patch"
- git log > "${srcdir}/git.log"
+ autoreconf -v --install
}
pkgver() {
- cd "${srcdir}/${_gitname}"
- # _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|-g[0-9a-f]*$||' -e 's|-|+|g')"
- _ver="${_pkgver}"
- _rev="$(git rev-list --count HEAD)"
- _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
- _hash="$(git rev-parse --short HEAD)"
-
- if [ -z "${_ver}" ]; then
- error "Version could not be determined."
- return 1
- else
- printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
- fi
+ cd "$_pkgsrc"
+
+ local _ref_ver=2.0.0
+ local _ref_hash=edead0c17e2818bc0fee0ea644f85ab81bbe6f7a
+ local _revision=$(git rev-list --count --cherry-pick $_ref_hash...HEAD)
+ local _commit=$(git rev-parse --short=8 HEAD)
+
+ printf '%s.r%s.g%s' "${_ref_ver:?}" "${_revision:?}" "${_commit:?}"
}
build() {
- cd "${srcdir}/${_gitname}"
- ./configure --prefix=/usr \
- --enable-drm \
- --enable-x11 \
- --enable-wayland \
- --disable-static \
+ cd "$_pkgsrc"
+
+ local _configure_options=(
+ --prefix=/usr
+ --enable-drm
+ --enable-x11
+ --enable-wayland
+ --disable-static
--enable-shared
+ )
+
+ ./configure "${_configure_options[@]}"
make
}
package() {
- cd "${srcdir}/${_gitname}"
- make install DESTDIR="${pkgdir}"
-
- install -D -v -m644 "${srcdir}/git.log" "${pkgdir}/usr/share/doc/${_pkgname}/git.log"
- for _docfile in AUTHORS NEWS README; do
- install -D -v -m644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
- done
+ cd "$_pkgsrc"
+ make install DESTDIR="$pkgdir"
- install -D -v -m644 "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
- ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" "${pkgdir}/usr/share/doc/${_pkgname}/COPYING"
+ install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/$pkgname/"
}
diff --git a/vadriverinit-fix.patch b/fix-vadriverinit-1.patch
index 5177e1448539..5177e1448539 100644
--- a/vadriverinit-fix.patch
+++ b/fix-vadriverinit-1.patch
diff --git a/fix-vadriverinit-2.patch b/fix-vadriverinit-2.patch
new file mode 100644
index 000000000000..8812fe68b6e8
--- /dev/null
+++ b/fix-vadriverinit-2.patch
@@ -0,0 +1,55 @@
+From b3b4d9a3a08d48bf6022723908a22255cc271ab7 Mon Sep 17 00:00:00 2001
+From: Daniel Charles <daniel.charles@intel.com>
+Date: Fri, 4 May 2018 09:56:10 -0700
+Subject: [PATCH] driver_init: load libva-x11.so for any ABI version
+
+with libva > 2.0.0 hybrid driver can operate with it as well
+so make this load generic to libva installed version
+
+Signed-off-by: Daniel Charles <daniel.charles@intel.com>
+---
+ src/media_drv_output_dri.c | 10 ++++++++++
+ src/media_drv_output_dri.h | 2 +-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/media_drv_output_dri.c b/src/media_drv_output_dri.c
+index 42299b8..bbd9713 100644
+--- a/src/media_drv_output_dri.c
++++ b/src/media_drv_output_dri.c
+@@ -105,6 +105,15 @@ media_output_dri_init (VADriverContextP ctx)
+ struct dri_vtable *dri_vtable;
+
+ static const struct dso_symbol symbols[] = {
++#if VA_CHECK_VERSION(1,0,0)
++ {"va_dri_get_drawable",
++ offsetof (struct dri_vtable, get_drawable)},
++ {"va_dri_get_rendering_buffer",
++ offsetof (struct dri_vtable, get_rendering_buffer)},
++ {"va_dri_swap_buffer",
++ offsetof (struct dri_vtable, swap_buffer)},
++ {NULL,}
++#else
+ {"dri_get_drawable",
+ offsetof (struct dri_vtable, get_drawable)},
+ {"dri_get_rendering_buffer",
+@@ -112,6 +121,7 @@ media_output_dri_init (VADriverContextP ctx)
+ {"dri_swap_buffer",
+ offsetof (struct dri_vtable, swap_buffer)},
+ {NULL,}
++#endif
+ };
+
+ drv_ctx->dri_output =
+diff --git a/src/media_drv_output_dri.h b/src/media_drv_output_dri.h
+index 0d6ccf0..889861c 100644
+--- a/src/media_drv_output_dri.h
++++ b/src/media_drv_output_dri.h
+@@ -30,7 +30,7 @@
+ #define _MEDIA__DRIVER_OUT_DRI_H
+ #include <stdbool.h>
+ #include "media_drv_defines.h"
+-#define LIBVA_X11_NAME "libva-x11.so.1"
++#define LIBVA_X11_NAME "libva-x11.so"
+ VOID media_output_dri_terminate (VADriverContextP ctx);
+ BOOL media_output_dri_init (VADriverContextP ctx);
+
diff --git a/intel-hybrid-codec-driver.install b/intel-hybrid-codec-driver.install
index 70fd81cca8d9..9327d31da04a 100644
--- a/intel-hybrid-codec-driver.install
+++ b/intel-hybrid-codec-driver.install
@@ -17,10 +17,10 @@ Bay Trail M (BYT) | vp8enc
Broadwell (BRW) | vp9dec vp9enc
Braswell (BSW) | vp8enc vp9dec
-The libva-intel-driver package isn't compiled with support for loading this driver
-so in order to use this driver's features with non hybrid codecs either
-recompile libva-intel-driver with the --enable-hybrid-codec or install
-the libva-intel-driver-hybrid package from the AUR
+The libva-intel-driver package isn't compiled with support for loading
+this driver. To use this driver's features with non hybrid codecs,
+recompile libva-intel-driver with the --enable-hybrid-codec
+or install the libva-intel-driver-hybrid package from the AUR
EOF
}