vinix-ports / ports / xf86-video-fbdev / PKGBUILD.vile
37 lines · 37 sloc · 1.73 KB · 6327522add55a5e4c9661d5b3c7570aabcc7c481
Raw
1defpkgbuild(xf86-video-fbdev,
2 #:pkgname, "xf86-video-fbdev",
3 #:pkgver, "0.5.1",
4 #:pkgrel, 2,
5 #:pkgdesc, "Vinix Xorg framebuffer driver",
6 #:arch, [#:x86-64, #:aarch64],
7 #:license, "MIT",
8 #:url, "https://www.x.org/",
9 #:depends, ["xorg-server"],
10 #:makedepends, ["linux-headers", "xorgproto"],
11 #:source, [
12 "https://xorg.freedesktop.org/archive/individual/driver/xf86-video-fbdev-0.5.1.tar.xz",
13 "https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/patches/xf86-video-fbdev/jinx-working-patch.patch"
14 ],
15 #:sha256sums, [
16 "9c2bc0fb9af092804138e8d5cb5627cabf2919ef60f0d1544a95c4ac2047f387",
17 "3b4460c13dc2b3216df24f2638a64d9b8e49ce88bd2c1a1fdd74c2ad72d9a9d4"
18 ],
19 #:prepare, fn() {
20 run("patch", "--batch", "--fuzz=0", "-d", "xf86-video-fbdev-0.5.1", "-p1", "-i", "../jinx-working-patch.patch")
21 },
22 #:build, fn() {
23 root := get-environment-variable("VPAC_MAKEPKG_ROOT")
24 modules := string-append(root, "/usr/lib/xorg/modules")
25 run("env", "CPPFLAGS=-D__vinix__", string-append("LDFLAGS=-L", modules, " -Wl,-rpath-link,", modules),
26 "vinix-configure", "xf86-video-fbdev-0.5.1/configure", "--disable-pciaccess")
27 run("make", string-append("SYSROOT=", root), "moduledir=/usr/lib/xorg/modules")
28 },
29 #:check, fn() {
30 run("readelf", "-d", "src/.libs/fbdev_drv.so")
31 },
32 #:package, fn() {
33 run("make", "install", "moduledir=/usr/lib/xorg/modules", string-append("DESTDIR=", pkgdir()))
34 run("find", pkgdir(), "-name", "*.la", "-delete")
35 run("install", "-Dm644", "xf86-video-fbdev-0.5.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/xf86-video-fbdev/COPYING"))
36 run("find", string-append(pkgdir(), "/usr"), "-type", "d", "-exec", "chmod", "755", "{}", "+")
37 })
38