From f46e734fbcd0b4cbae2cff1a017b95e4e8e02d53 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Jun 2012 00:01:51 +0000 Subject: Wed Jun 13 00:01:51 UTC 2012 --- staging/libdrm/COPYING | 48 ++++++++++++++++++++++++ staging/libdrm/PKGBUILD | 45 ++++++++++++++++++++++ staging/libdrm/git_fixes.diff | 13 +++++++ staging/libdrm/no-pthread-stubs.patch | 70 +++++++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 staging/libdrm/COPYING create mode 100644 staging/libdrm/PKGBUILD create mode 100644 staging/libdrm/git_fixes.diff create mode 100644 staging/libdrm/no-pthread-stubs.patch (limited to 'staging/libdrm') diff --git a/staging/libdrm/COPYING b/staging/libdrm/COPYING new file mode 100644 index 000000000..6e74c337c --- /dev/null +++ b/staging/libdrm/COPYING @@ -0,0 +1,48 @@ + Copyright 2005 Adam Jackson. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation on the rights to use, copy, modify, merge, + publish, distribute, sub license, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NON-INFRINGEMENT. IN NO EVENT SHALL ADAM JACKSON BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------------ + + Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. + All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS + SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. diff --git a/staging/libdrm/PKGBUILD b/staging/libdrm/PKGBUILD new file mode 100644 index 000000000..af789e2a9 --- /dev/null +++ b/staging/libdrm/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 161498 2012-06-12 01:59:59Z ibiru $ +# Maintainer: Jan de Groot + +pkgname=libdrm +pkgver=2.4.35 +pkgrel=1 +pkgdesc="Userspace interface to kernel DRM services" +arch=(i686 x86_64) +license=('custom') +depends=('glibc' 'libpciaccess') +makedepends=('cairo' 'valgrind') +replaces=('libdrm-new' 'libdrm-nouveau') +options=('!libtool') +url="http://dri.freedesktop.org/" +source=(http://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.bz2 + no-pthread-stubs.patch + COPYING +) +sha1sums=('a1d8d4945f782371d7855dbd693db885bd7e3d83' + '2a5410baa3e6e078f9378ce486a88f41d22fd838' + 'ba3dcd636997ee0d30df14b03dae05c24ae5d094') + +build() { + cd $pkgname-$pkgver + patch -Np1 -i ../no-pthread-stubs.patch + + #libtoolize --force + autoreconf --force --install + ./configure --prefix=/usr \ + --enable-udev \ + --enable-vmwgfx-experimental-api + make +} + +check() { + cd $pkgname-$pkgver + make -k check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -m755 -d "$pkgdir/usr/share/licenses/$pkgname" + install -m644 ../COPYING "$pkgdir/usr/share/licenses/$pkgname/" +} diff --git a/staging/libdrm/git_fixes.diff b/staging/libdrm/git_fixes.diff new file mode 100644 index 000000000..dc80155f2 --- /dev/null +++ b/staging/libdrm/git_fixes.diff @@ -0,0 +1,13 @@ +diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c +index 19441f3..eb9dd32 100644 +--- a/intel/intel_bufmgr_gem.c ++++ b/intel/intel_bufmgr_gem.c +@@ -958,7 +958,7 @@ static void drm_intel_gem_bo_purge_vma_cache(drm_intel_bufmgr_gem *bufmgr_gem) + bufmgr_gem->vma_cache.next, + vma_list); + assert(bo_gem->map_count == 0); +- DRMLISTDEL(&bo_gem->vma_list); ++ DRMLISTDELINIT(&bo_gem->vma_list); + + if (bo_gem->mem_virtual) { + munmap(bo_gem->mem_virtual, bo_gem->bo.size); diff --git a/staging/libdrm/no-pthread-stubs.patch b/staging/libdrm/no-pthread-stubs.patch new file mode 100644 index 000000000..6745f4bc4 --- /dev/null +++ b/staging/libdrm/no-pthread-stubs.patch @@ -0,0 +1,70 @@ +diff -Nur libdrm-2.4.34.orig/configure.ac libdrm-2.4.34/configure.ac +--- libdrm-2.4.34.orig/configure.ac 2012-05-12 14:54:06.375335490 +0000 ++++ libdrm-2.4.34/configure.ac 2012-05-12 14:54:32.075142065 +0000 +@@ -47,10 +47,6 @@ + LT_INIT([disable-static]) + + +-PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs) +-AC_SUBST(PTHREADSTUBS_CFLAGS) +-AC_SUBST(PTHREADSTUBS_LIBS) +- + pkgconfigdir=${libdir}/pkgconfig + AC_SUBST(pkgconfigdir) + AC_ARG_ENABLE([udev], +diff -Nur libdrm-2.4.34.orig/intel/Makefile.am libdrm-2.4.34/intel/Makefile.am +--- libdrm-2.4.34.orig/intel/Makefile.am 2012-05-12 14:54:06.372001955 +0000 ++++ libdrm-2.4.34/intel/Makefile.am 2012-05-12 14:55:24.164745055 +0000 +@@ -26,7 +26,6 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/intel \ +- $(PTHREADSTUBS_CFLAGS) \ + $(PCIACCESS_CFLAGS) \ + $(VALGRIND_CFLAGS) \ + -I$(top_srcdir)/include/drm +@@ -35,7 +34,6 @@ + libdrm_intel_ladir = $(libdir) + libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined + libdrm_intel_la_LIBADD = ../libdrm.la \ +- @PTHREADSTUBS_LIBS@ \ + @PCIACCESS_LIBS@ \ + @CLOCK_LIB@ + +diff -Nur libdrm-2.4.34.orig/nouveau/Makefile.am libdrm-2.4.34/nouveau/Makefile.am +--- libdrm-2.4.34.orig/nouveau/Makefile.am 2012-05-12 14:54:06.331998148 +0000 ++++ libdrm-2.4.34/nouveau/Makefile.am 2012-05-12 14:56:00.941132085 +0000 +@@ -2,14 +2,13 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/nouveau \ +- $(PTHREADSTUBS_CFLAGS) \ + -I$(top_srcdir)/include/drm \ + -DDEBUG + + libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la + libdrm_nouveau_ladir = $(libdir) + libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined +-libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++libdrm_nouveau_la_LIBADD = ../libdrm.la + + libdrm_nouveau_la_SOURCES = nouveau.c \ + pushbuf.c \ +diff -Nur libdrm-2.4.34.orig/radeon/Makefile.am libdrm-2.4.34/radeon/Makefile.am +--- libdrm-2.4.34.orig/radeon/Makefile.am 2012-05-12 14:54:06.365334765 +0000 ++++ libdrm-2.4.34/radeon/Makefile.am 2012-05-12 14:55:48.084557437 +0000 +@@ -26,13 +26,12 @@ + $(WARN_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/radeon \ +- $(PTHREADSTUBS_CFLAGS) \ + -I$(top_srcdir)/include/drm + + libdrm_radeon_la_LTLIBRARIES = libdrm_radeon.la + libdrm_radeon_ladir = $(libdir) + libdrm_radeon_la_LDFLAGS = -version-number 1:0:0 -no-undefined +-libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++libdrm_radeon_la_LIBADD = ../libdrm.la + + libdrm_radeon_la_SOURCES = \ + radeon_bo_gem.c \ -- cgit v1.2.3-54-g00ecf