summaryrefslogtreecommitdiff
path: root/libre/libdrm-libre/PKGBUILD
blob: 1746710cbfe3d9fb6e7d39ba4e064c5c0a8c0297 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>

pkgname=libdrm-libre
pkgver=2.4.39
pkgrel=1
pkgdesc='Userspace interface to kernel DRM services, without VMWare Graphics KMS API (vmwgfx)'
arch=(
  i686
  x86_64
  mips64el
:)
license=(
  MIT
)
depends=(
  libpciaccess
  )
makedepends=(
  cairo
  valgrind
)
options=(
  !libtool
)
url=http://dri.freedesktop.org/
provides=(
  ${pkgname%-libre}=$pkgver
  ${pkgname%-libre}-git
  $pkgname-git
)
conflicts=(
  ${pkgname%-libre}
  ${pkgname%-libre}-git
  $pkgname-git
  ${pkgname%-libre}-new
  ${pkgname%-libre}-nouveau
  ${pkgname%-libre}-old
)
replaces=(
  ${pkgname%-libre}
  ${pkgname%-libre}-git
  ${pkgname%-libre}-new
  ${pkgname%-libre}-nouveau
)

source=(
  http://dri.freedesktop.org/${pkgname%-libre}/${pkgname%-libre}-$pkgver.tar.bz2
  COPYING
)
sha512sums=(
  51b849d501adbf6c9d65847d2e6b41e426137af8cdb1335d19e22939128b7cdae8685c27d750db3aad7b1c43e7bb5a448634491dcd86873ba98293d56320eb1f
  b0ca349b882a4326b19f81f22804fabdb6fb7aef31cdc7b16b0a7ae191bfbb50c7daddb2fc4e6c33f1136af06d060a273de36f6f3412ea326f16fa4309fda660
)

build() {
  cd ${pkgname%-libre}-$pkgver

  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

  #libtoolize --force
  autoreconf --force --install
  ./configure --prefix=/usr \
    --disable-vmwgfx-experimental-api \
    --enable-udev
  make V=0
}

check() {
cd ${pkgname%-libre}-$pkgver
  make -k check
}

package() {
cd ${pkgname%-libre}-$pkgver
  make DESTDIR=$pkgdir install
  install -m755 -d $pkgdir/usr/share/licenses/${pkgname%-libre}
  install -m644 ../COPYING $pkgdir/usr/share/licenses/${pkgname%-libre}
}