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
|
# Maintainer: artist for Artix Linux and XLibre <artist@artixlinux.org>
pkgname=xlibre-video-ati
pkgver=25.0.0
pkgrel=7
pkgdesc="XLibre fork of X.Org ati video driver"
arch=(x86_64 aarch64)
_pkgname="${pkgname//xlibre/xf86}"
url="https://github.com/X11Libre/${_pkgname}"
depends=("xlibre-xserver>=${pkgver%.*}" 'glibc')
makedepends=("xlibre-xserver-devel>=${pkgver%.*}" 'xorgproto')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
source=("${url}/archive/refs/tags/xlibre-${_pkgname}-${pkgver}.tar.gz")
groups=('xlibre-drivers')
depends+=('mesa' 'libpciaccess' 'libdrm')
build() {
case "$CARCH" in
"x86_64")
CFLAGS=" -march=x86-64"
;;
"aarch64")
CFLAGS=" -march=armv8-a"
;;
*)
CFLAGS=" -march=native"
;;
esac
CFLAGS+=" -mtune=generic -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security"
CFLAGS+=" -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
LDFLAGS=" -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,lazy -Wl,-z,relro -Wl,-z,pack-relative-relocs"
if [[ $CARCH != 'aarch64' ]]; then
CFLAGS+=" -fcf-protection"
fi
if [[ "$_pkgname" == *"xf86-input"* ]]; then
CFLAGS+=" -fno-plt"
LDFLAGS+=" -Wl,-z,now"
fi
if [[ "$_pkgname" == *"xf86-video-intel"* ]]; then
CFLAGS+=" -fno-lto"
LDFLAGS+=" -fno-lto"
fi
CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
export CFLAGS="${CFLAGS}"
export CXXFLAGS="${CXXFLAGS}"
export LDFLAGS="${LDFLAGS}"
cd ${_pkgname}-xlibre-${_pkgname}-${pkgver}
./autogen.sh --prefix=/usr --enable-glamor --disable-debug
./configure --prefix=/usr
make
}
check() {
cd ${_pkgname}-xlibre-${_pkgname}-${pkgver}
make check
}
package() {
cd ${_pkgname}-xlibre-${_pkgname}-${pkgver}
make "DESTDIR=${pkgdir}" install
install -Dm644 "${srcdir}"/${_pkgname}-xlibre-${_pkgname}-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
sha256sums=('597e9b3f9b1b4f5e40fd6d1706f4ffe6d31bbc2955d4f435d1e3014f2e089bde')
|