| 1 | defpkgbuild(libedit, |
| 2 | #:pkgname, "libedit", |
| 3 | #:pkgver, "20240808.3.1", |
| 4 | #:pkgrel, 1, |
| 5 | #:pkgdesc, "NetBSD command-line editing and history library", |
| 6 | #:arch, [#:x86-64, #:aarch64], |
| 7 | #:url, "https://www.thrysoee.dk/editline/", |
| 8 | #:license, "BSD-3-Clause", |
| 9 | #:depends, ["musl", "ncurses"], |
| 10 | #:source, ["https://www.thrysoee.dk/editline/libedit-20240808-3.1.tar.gz", "history.c", "wchar.c"], |
| 11 | #:sha256sums, ["5f0573349d77c4a48967191cdd6634dd7aa5f6398c6a57fe037cc02696d6099f", "a0fdb40f4681d9c4ff14e576c99eaf2c45d98c2e9869e91a9f3b992bc3ab3f3f", |
| 12 | "1ab07b1d432adad891ffe252bd62459ef05f4453fa1984fd46292eab7eb39a1b"], |
| 13 | #:build, fn() { |
| 14 | run("vinix-cc", "wchar.c", "-o", "check-wchar") |
| 15 | run("vinix-run", "./check-wchar") |
| 16 | run("env", "CPPFLAGS=-D__STDC_ISO_10646__=201103L", "vinix-configure", "libedit-20240808-3.1/configure") |
| 17 | run("make") |
| 18 | }, |
| 19 | #:check, fn() { |
| 20 | run("make", "install", string-append("DESTDIR=", srcdir(), "/checked")) |
| 21 | run("vinix-cc", "history.c", "-Ichecked/usr/include", "-Lchecked/usr/lib", "-o", "history-check", "-ledit") |
| 22 | run("vinix-run", "--library-path", "checked/usr/lib", "./history-check") |
| 23 | }, |
| 24 | #:package, fn() { |
| 25 | run("make", "install", string-append("DESTDIR=", pkgdir())) |
| 26 | run("find", pkgdir(), "-name", "*.la", "-delete") |
| 27 | run("install", "-Dm644", "libedit-20240808-3.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/libedit/COPYING")) |
| 28 | }) |
| 29 | |