aboutsummaryrefslogtreecommitdiffstats
path: root/main/libdrm/APKBUILD
blob: d53dc1c745380b079f33dc8b6bb24046a1cf20e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libdrm
pkgver=2.4.41
pkgrel=0
pkgdesc="Userspace interface to kernel DRM services"
url="http://dri.freedesktop.org/"
arch="all"
license="custom"
depends=
makedepends="libpthread-stubs udev-dev libpciaccess-dev
	autoconf automake libtool"
subpackages="$pkgname-dev"
source="http://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.bz2
	man-makefile.patch"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	libtoolize --force && aclocal -I m4 && autoconf \
		&& automake --add-missing
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure --prefix=/usr \
		--enable-udev \
		|| return 1

	# temp workaround. problem appears to be with
	# uclibc open_memstream() and stdio.h
	sed -i -e 's/-Werror-implicit-function-declaration//' intel/Makefile

	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
}

md5sums="04f40d6a647e5149fe442cf536ae0a37  libdrm-2.4.41.tar.bz2
c92703a2dc9215fbf3b3684c931ac66f  man-makefile.patch"