fix library install path issues

This commit is contained in:
xenia 2021-04-04 04:06:26 -04:00
parent c14081de59
commit 1423b84da5
3 changed files with 5 additions and 12 deletions

View File

@ -9,3 +9,7 @@
(define pre-install-collection "private/install.rkt")
(define compile-omit-files '("private/install.rkt"))
;; go linux-only, for now
(define install-platform #rx"linux")
(define move-foreign-libs '("private/compiled/native/libtty_raw.so"))

View File

@ -22,7 +22,6 @@
(build-path ansi/private/
"compiled"
"native"
(system-library-subpath #f)
(append-extension-suffix "libtty_raw")))
(when (file-exists? libtty_raw.so)
(delete-file libtty_raw.so))

View File

@ -7,18 +7,8 @@
(provide (protect-out tty-raw!
tty-restore!))
(define (local-lib-dirs)
;; FIXME: There's probably a better way to do this with
;; define-runtime-path and cross-system-library-subpath,
;; but this is what the bcrypt package is doing.
(list (build-path (collection-path "ansi")
"private"
"compiled"
"native"
(system-library-subpath #f))))
(define libtty_raw
(ffi-lib "libtty_raw" #:get-lib-dirs local-lib-dirs))
(ffi-lib "libtty_raw"))
(define-ffi-definer define-tty libtty_raw
#:default-make-fail make-not-available)