| 1 | defpkgbuild(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 | #:makedepends, ["mesa"], |
| 11 | #:source, ["https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz"], |
| 12 | #:sha256sums, ["bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"], |
| 13 | #:build, fn() { |
| 14 | run("vinix-meson", "glu-9.0.3", "build", "-Ddefault_library=shared", "-Dgl_provider=osmesa") |
| 15 | run("meson", "compile", "-C", "build", "-j2") |
| 16 | }, |
| 17 | #:check, fn() { |
| 18 | run("readelf", "-d", "build/src/libGLU.so") |
| 19 | }, |
| 20 | #:package, fn() { |
| 21 | run("meson", "install", "--no-rebuild", "-C", "build", "--destdir", pkgdir()) |
| 22 | run("rm", string-append(pkgdir(), "/usr/include/GL/glu.h")) |
| 23 | for-each(fn(file) { |
| 24 | notice := string-append(pkgdir(), "/usr/share/licenses/glu/", file) |
| 25 | run("install", "-Dm644", string-append("glu-9.0.3/", file), notice) |
| 26 | run("sed", "-i", "/^[[:space:]]*\\*\\//q", notice) |
| 27 | }, list("include/GL/glu.h", "src/libnurbs/interface/glinterface.cc")) |
| 28 | }) |
| 29 | |