vinix-ports / libxcb / PKGBUILD.vile
36 lines · 35 sloc · 1.73 KB
Raw
1defpkgbuild(libxcb,
2 #:pkgname, "libxcb",
3 #:pkgver, "1.16.1",
4 #:pkgrel, 1,
5 #:pkgdesc, "X client connection and protocol extension libraries",
6 #:arch, [#:x86-64],
7 #:license, "MIT",
8 #:url, "https://xcb.freedesktop.org/",
9 #:depends, ["musl", "libxau", "libxdmcp"],
10 #:makedepends, ["xcb-proto"],
11 #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.16.1.tar.xz"],
12 #:sha256sums, ["f24d187154c8e027b358fc7cb6588e35e33e6a92f11c668fe77396a7ae66e311"],
13
14 #:prepare, fn() {
15 ; The 1.17 protocol description adds a DRI3 include to the generated Present header.
16 run("sed", "-i", "/^Requires.private:/s/$/ xcb-dri3/", "libxcb-1.16.1/xcb-present.pc.in")
17 },
18 #:build, fn() {
19 root := get-environment-variable("VPAC_MAKEPKG_ROOT")
20 run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "CC=vinix-cc",
21 "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig:", root, "/usr/share/pkgconfig"),
22 string-append("PKG_CONFIG_SYSROOT_DIR=", root),
23 "libxcb-1.16.1/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--prefix=/usr", "--enable-xkb", "--enable-xinput", "--disable-xprint", "--disable-devel-docs")
24 ; The generator imports modules from the installed SDK.
25 run("env", "PYTHONDONTWRITEBYTECODE=1", "make")
26 },
27 #:check, fn() {
28 run("make", "check", "VERBOSE=1")
29 run("test", "-s", "src/.libs/libxcb-xinput.so")
30 run("test", "-s", "src/.libs/libxcb-xkb.so")
31 },
32 #:package, fn() {
33 run("make", "install", string-append("DESTDIR=", pkgdir()))
34 run("find", pkgdir(), "-name", "*.la", "-delete")
35 run("install", "-Dm644", "libxcb-1.16.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/libxcb/COPYING"))
36 })
37