summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e1a702bca015e77c6e85b3993a59efa3291cf6d2 (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
# Maintainer:  Peter Mattern <pmattern at arcor dot de>
# Contributor: Koscheev "Ashen" Mikhail <fresh19991 at yandex dot ru>
# Contributor: Pascal "hardfalcon" Ernster <aur at hardfalcon dot net>
# Contributor: Marcel Dykstra <marcel dot dykstra at gmail dot com>

_pkgname=xf86-video-openchrome
pkgname=$_pkgname-git
pkgver=0.6.0.r808.g857d892
pkgrel=1
pkgdesc='Open Source X driver for VIA IGPs'
arch=('i686' 'x86_64')
url='http://www.freedesktop.org/wiki/Openchrome'
license=('MIT')
depends=('libdrm' 'libxvmc' 'xorg-server')
makedepends=('git' 'xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=25.2')
provides=("$_pkgname")
conflicts=("$_pkgname" 'X-ABI-VIDEODRV_VERSION<25' 'X-ABI-VIDEODRV_VERSION>=26')
source=("git+https://anongit.freedesktop.org/git/openchrome/$_pkgname.git#branch=main")
sha256sums=("SKIP")

pkgver() {
    cd $_pkgname
    git describe --always | sed "s/^xf86-video-openchrome-//;s/-/.r/;s/-/./"
}

build() {
    # Since pacman 5.0.2-2, hardened flags are now enabled in makepkg.conf
    # With them, module fail to load with undefined symbol.
    # See https://bugs.archlinux.org/task/55102 / https://bugs.archlinux.org/task/54845
    export CFLAGS=${CFLAGS/-fno-plt}
    export CXXFLAGS=${CXXFLAGS/-fno-plt}
    export LDFLAGS=${LDFLAGS/-Wl,-z,now}
    cd $_pkgname
    ./autogen.sh --prefix=/usr
    make
}

package() {
    cd $_pkgname
    make DESTDIR=$pkgdir install
    install -D -m644 $srcdir/$_pkgname/COPYING \
      $pkgdir/usr/share/licenses/$pkgname/LICENSE
}