Add newer version of libdrm (2.4.91)

This commit is contained in:
Bhushan Shah 2018-04-16 18:16:57 +05:30 committed by Oliver Smith
parent ebaca39807
commit 37b80a276a
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
3 changed files with 272 additions and 0 deletions

View File

@ -0,0 +1,49 @@
# Copied from Alpine to increase $pkgver to 2.4.91
# TODO: remove when alpine upgrades to libdrm to 2.4.90+
pkgname=libdrm
pkgver=2.4.91
pkgrel=1
pkgdesc="Userspace interface to kernel DRM services"
url="https://dri.freedesktop.org/"
arch="all"
# Requires a computer with gfx, no X running, build user in 'video' group..
options="!check"
license="MIT"
depends=""
depends_dev="linux-headers"
makedepends="$depends_dev libpthread-stubs eudev-dev libpciaccess-dev xmlto"
checkdepends="cunit-dev bash"
subpackages="$pkgname-dev $pkgname-doc"
source="https://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.bz2
ioctl.patch
"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-freedreno \
--enable-udev \
--disable-valgrind
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
sha512sums="07578c00c121ba37033db7172590e26d1545f81c242bbce2cfb7fb904bde504822c275d6468e5c5d20360d0046ae73d9b058aa0459ba35eb11927141cc998772 libdrm-2.4.91.tar.bz2
af52fef51aaa05a4dd17919371cb9d92a77480402730bf53ba223e54df52f3825be05a7f28e6aef8c904db5ee59fe38a6c15bc6aafa7f8d31a719e80399dd51f ioctl.patch"

View File

@ -0,0 +1,212 @@
diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
index c5b85b5..c943282 100755
--- a/amdgpu/amdgpu-symbol-check
+++ b/amdgpu/amdgpu-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.am/libdrm_amdgpuinclude_HEADERS
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '$2 == "T" {print $3}' | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
amdgpu_bo_alloc
diff --git a/etnaviv/etnaviv-symbol-check b/etnaviv/etnaviv-symbol-check
index 0e2030e..3c32352 100755
--- a/etnaviv/etnaviv-symbol-check
+++ b/etnaviv/etnaviv-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_ETNAVIV_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_etnaviv.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_etnaviv.so} | awk '$2 = "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
etna_device_new
diff --git a/exynos/exynos-symbol-check b/exynos/exynos-symbol-check
index 9692caa..2ab794e 100755
--- a/exynos/exynos-symbol-check
+++ b/exynos/exynos-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.am/libdrm_exynos*_HEADERS
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
exynos_bo_create
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
index 42f2c43..51de69c 100755
--- a/freedreno/freedreno-symbol-check
+++ b/freedreno/freedreno-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
fd_bo_cpu_fini
diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
index 2aa2d81..21d951a 100755
--- a/intel/intel-symbol-check
+++ b/intel/intel-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_INTEL_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '$2 == "T" {print $3}' | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
drm_intel_bo_alloc
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
index 658b269..e55963e 100755
--- a/libkms/kms-symbol-check
+++ b/libkms/kms-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
kms_bo_create
diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
index b265cea..4417e99 100755
--- a/nouveau/nouveau-symbol-check
+++ b/nouveau/nouveau-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_NOUVEAU_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
nouveau_bo_map
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
index 759c84b..7ea96bb 100755
--- a/omap/omap-symbol-check
+++ b/omap/omap-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.am/libdrm_omap*HEADERS
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
omap_bo_cpu_fini
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
index 0bf2ffc..35e3ea1 100755
--- a/radeon/radeon-symbol-check
+++ b/radeon/radeon-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
_fini
_init
radeon_bo_debug
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
index 420469f..4c7094e 100755
--- a/tegra/tegra-symbol-check
+++ b/tegra/tegra-symbol-check
@@ -1,16 +1,9 @@
-#!/bin/bash
+#!/bin/sh
# The following symbols (past the first nine) are taken from tegra.h.
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '$2 == "T" {print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
-__bss_end__
-__bss_start__
-__bss_start
-__end__
-_bss_end__
-_edata
-_end
_fini
_init
drm_tegra_bo_get_flags

View File

@ -0,0 +1,11 @@
--- libdrm-2.4.83/tests/nouveau/threaded.c
+++ libdrm-2.4.83/tests/nouveau/threaded.c
@@ -40,7 +40,7 @@
static int import_fd;
-int ioctl(int fd, unsigned long request, ...)
+int ioctl(int fd, int request, ...)
{
va_list va;
int ret;