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
|
# Maintainer: artist for Artix Linux and XLibre <artist@artixlinux.org>
pkgname=xlibre-video-nouveau
pkgver=25.0.0
pkgrel=5
pkgdesc="XLibre fork of X.Org Open Source 3D acceleration driver for nVidia cards"
arch=(x86_64 aarch64)
license=('MIT')
_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' '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
./configure --prefix=/usr
make
}
package() {
cd ${_pkgname}-xlibre-${_pkgname}-${pkgver}
make DESTDIR="$pkgdir" install
install -m755 -d "${pkgdir}/usr/share/licenses/xlibre-${_pkgname}"
}
sha256sums=('bc56f320ba6ce4d068351ac259cdb87571a05e03402afad02352bcb62be7b040')
|