AtlatestRepositorycore-channel
core-channel / tree / src / core / packagesffi.sgl
1
;;; Foreign function interface.2
;;;3
;;; libffi is here for exactly one consumer -- libwayland's connection layer4
;;; dispatches protocol messages through `ffi_call`, in the CLIENT as well as5
;;; the server -- but it is filed under its own domain rather than beside6
;;; wayland, on the same reasoning that put libevent in `event.sgl` instead of7
;;; `terminal.sgl`: a module named for the consumer writes "this exists to8
;;; serve wayland" into the layout, and it does not.9
(define-library (core packages ffi)10
(import (sigil core)11
(core build-environments)12
(sigil env package)13
(sigil build external))14
(export libffi)15
(begin16
(define libffi17
(package18
name: "libffi"19
version: "3.4.8"20
source: (external-source21
location: "https://github.com/libffi/libffi/releases/download/v3.4.8/libffi-3.4.8.tar.gz"22
sha256: "bc9842a18898bfacb0ed1252c4febcc7e78fa139fd27fdc7a3e30d9d9356119b")23
buildenv: core-buildenv24
phases: (list25
(external-phase26
kind: 'configure27
args: (list "--prefix=${out}"28
"--disable-shared"29
"--enable-static"30
;; No docs: they want makeinfo, which is not in31
;; the seed, and libffi's build does not fail32
;; without it -- it silently ships no info33
;; pages, which is a smaller and quieter34
;; version of the same absent-tool problem.35
"--disable-docs"36
;; The multi-OS directory layout installs37
;; headers under lib/libffi-<ver>/include,38
;; which no consumer's -I would find.39
"--disable-multi-os-directory"))40
(external-phase kind: 'make)41
(external-phase kind: 'install))))))