vinix-ports / ports / glu / PKGBUILD.vile
27 lines · 27 sloc · 1.15 KB · d914b2bbe5e1296a6ee3cdd5ff76cf12d6b65175
Raw
1defpkgbuild(glu,
2 #:pkgname, "glu",
3 #:pkgver, "9.0.3",
4 #:pkgrel, 1,
5 #:pkgdesc, "OpenGL utility library for the Vinix Mesa SDK",
6 #:arch, [#:x86-64, #:aarch64],
7 #:license, "SGI-B-1.1 AND SGI-B-2.0",
8 #:url, "https://archive.mesa3d.org/glu/",
9 #:depends, ["mesa-gallium-sdk", "gcc-libs", "glu-headers"],
10 #:source, ["https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz"],
11 #:sha256sums, ["bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"],
12 #:build, fn() {
13 run("vinix-meson", "glu-9.0.3", "build", "-Ddefault_library=shared", "-Dgl_provider=osmesa")
14 run("meson", "compile", "-C", "build", "-j2")
15 },
16 #:check, fn() {
17 run("readelf", "-d", "build/src/libGLU.so")
18 },
19 #:package, fn() {
20 run("meson", "install", "--no-rebuild", "-C", "build", "--destdir", pkgdir())
21 run("rm", string-append(pkgdir(), "/usr/include/GL/glu.h"))
22 for-each(fn(file) {
23 notice := string-append(pkgdir(), "/usr/share/licenses/glu/", file)
24 run("install", "-Dm644", string-append("glu-9.0.3/", file), notice)
25 run("sed", "-i", "/^[[:space:]]*\\*\\//q", notice)
26 }, list("include/GL/glu.h", "src/libnurbs/interface/glinterface.cc"))
27 })
28