defpkgbuild(libffi, #:pkgname, "libffi", #:pkgver, "3.8.2", #:pkgrel, 2, #:pkgdesc, "Portable foreign function calls and closures", #:arch, [#:x86-64, #:aarch64], #:license, "MIT", #:url, "https://sourceware.org/libffi/", #:depends, ["musl"], #:source, ["https://github.com/libffi/libffi/releases/download/v3.8.2/libffi-3.8.2.tar.gz"], #:sha256sums, ["a699fda2b090c4b46cb79cf60c4dacfce480eb05742c0de66acf3af174a47f92"], #:build, fn() { run("vinix-configure", "libffi-3.8.2/configure", "--disable-multi-os-directory", "--disable-docs", "--enable-pax_emutramp", "--enable-portable-binary", "--disable-exec-static-tramp") run("make") }, #:check, fn() { run("vinix-cc", "-Iinclude", "-I.", "libffi-3.8.2/testsuite/libffi.call/strlen2.c", "-L.libs", "-lffi", "-o", "test-calling-convention") run("vinix-run", "--library-path", ".libs", "./test-calling-convention") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("rm", string-append(pkgdir(), "/usr/lib/libffi.la")) run("install", "-Dm644", "libffi-3.8.2/LICENSE", string-append(pkgdir(), "/usr/share/licenses/libffi/LICENSE")) })