# Maintainer: Jan de Groot # Maintainer (Parabola): Márcio Silva pkgbase=libdrm pkgname=libdrm-git pkgver=$(LC_ALL=C date -u +%Y%m%d) _pkgver=2.4.41 pkgrel=1 pkgdesc='Userspace interface to kernel DRM services' arch=( i686 x86_64 mips64el ) license=custom depends=libpciaccess makedepends=( cairo git valgrind ) options='!libtool' url=http://dri.freedesktop.org/ provides=( $pkgbase=$_pkgver $pkgbase-nouveau1 ) conflicts=( $pkgbase $pkgbase-new $pkgbase-nouveau $pkgbase-nouveau1 $pkgbase-old ) replaces=( $pkgbase-new $pkgbase-nouveau ) source=COPYING sha512sums=b0ca349b882a4326b19f81f22804fabdb6fb7aef31cdc7b16b0a7ae191bfbb50c7daddb2fc4e6c33f1136af06d060a273de36f6f3412ea326f16fa4309fda660 _gitroot=git://git.freedesktop.org/git/mesa/drm _gitname=drm build() { cd $srcdir msg 'Connecting to GIT server....' if [[ -d $_gitname ]]; then cd $_gitname && git pull origin msg 'The local files are updated.' else git clone $_gitroot $_gitname fi msg 'GIT checkout done or server timeout' msg 'Starting build...' rm -rf $srcdir/$_gitname-build git clone $srcdir/$_gitname $srcdir/$_gitname-build cd $srcdir/$_gitname-build # no-pthread-stubs sed -i '/PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)/d;/AC_SUBST(PTHREADSTUBS_CFLAGS)/d;/AC_SUBST(PTHREADSTUBS_LIBS)/d' \ configure.ac sed -i '/ $(PTHREADSTUBS_CFLAGS) /d;s/ @PTHREADSTUBS_LIBS@//' \ exynos/Makefile.am sed -i '/ $(PTHREADSTUBS_CFLAGS) /d;/ @PTHREADSTUBS_LIBS@ /d' \ intel/Makefile.am sed -i '/ $(PTHREADSTUBS_CFLAGS) /d;s/ @PTHREADSTUBS_LIBS@//' \ nouveau/Makefile.am sed -i '/ $(PTHREADSTUBS_CFLAGS) /d;s/ @PTHREADSTUBS_LIBS@//' \ omap/Makefile.am sed -i '/ $(PTHREADSTUBS_CFLAGS) /d;s/ @PTHREADSTUBS_LIBS@//' \ radeon/Makefile.am # man/Makefile.in is missing #sed -i '#^ man/Makefile#d' configure.ac # libtoolize --force setarch $CARCH autoreconf --force --install setarch $CARCH ./autogen.sh --prefix=/usr\ --enable-exynos-experimental-api\ --enable-intel\ --enable-nouveau\ --enable-omap-experimental-api\ --enable-radeon\ --enable-udev\ --enable-vmwgfx setarch $CARCH make V=0 } check() { cd $srcdir/$_gitname-build setarch $CARCH make -k check } package() { cd $srcdir/$_gitname-build setarch $CARCH make DESTDIR=$pkgdir install install -m755 -d $pkgdir/usr/share/licenses/$pkgbase install -m644 ../COPYING $pkgdir/usr/share/licenses/$pkgbase }