temp/mesa-dri-simpledrm: new package (MR 4026)
This package provides a KMSRO stub for simpledrm, allowing GPU drivers from Mesa to work with it.
This commit is contained in:
parent
b8e23f13fd
commit
73a9100e13
2 changed files with 42 additions and 0 deletions
28
temp/mesa-dri-simpledrm/APKBUILD
Normal file
28
temp/mesa-dri-simpledrm/APKBUILD
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Temporary hack
|
||||||
|
# Upstream issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8929
|
||||||
|
pkgname=mesa-dri-simpledrm
|
||||||
|
pkgdesc="Temporary KMSRO stub for simpledrm"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://mesa.freedesktop.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="mesa-dri-gallium"
|
||||||
|
replaces="mesa-dri-gallium"
|
||||||
|
makedepends="gcc"
|
||||||
|
source="
|
||||||
|
usr-lib-xorg-modules-dri-simpledrm_dri.c
|
||||||
|
"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
gcc usr-lib-xorg-modules-dri-simpledrm_dri.c -shared -o usr-lib-xorg-modules-dri-simpledrm_dri.so
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm755 "$srcdir"/usr-lib-xorg-modules-dri-simpledrm_dri.so "$pkgdir"/usr/lib/xorg/modules/dri/simpledrm_dri.so
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
999b4909b25e9fcadb1e9ca034c0a014b219a8a3cf908072f1f8f58f75489ca72dd3765b2f5b9d89b69e29c7c1554a0fc5d62b11a2ab129103d9d3d6ed0c7f6c usr-lib-xorg-modules-dri-simpledrm_dri.c
|
||||||
|
"
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
This is a temporary hack until Mesa upstream adds 2 lines to their code.
|
||||||
|
https://gitlab.freedesktop.org/mesa/mesa/-/issues/8929
|
||||||
|
*/
|
||||||
|
|
||||||
|
void* __driDriverGetExtensions_simpledrm(void)
|
||||||
|
{
|
||||||
|
static void*(*ddge_mediatek)(void);
|
||||||
|
if(!ddge_mediatek)
|
||||||
|
ddge_mediatek = dlsym(dlopen("/usr/lib/xorg/modules/dri/mediatek_dri.so", RTLD_NOW), "__driDriverGetExtensions_mediatek");
|
||||||
|
return ddge_mediatek();
|
||||||
|
}
|
Loading…
Reference in a new issue