Skip to content

Commit 6c414c4

Browse files
split package/lib, starting on grovel file (successful sofar)
1 parent ff0c89b commit 6c414c4

File tree

5 files changed

+58
-41
lines changed

5 files changed

+58
-41
lines changed

cl-libuv.asd

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
(cl:eval-when (:load-toplevel :execute)
2+
(asdf:operate 'asdf:load-op 'cffi-grovel))
3+
14
(asdf:defsystem cl-libuv
25
:author "Andrew Danger Lyon <[email protected]>"
36
:license "MIT"
47
:version "0.1.5"
58
:description "Low-level libuv bindings for Common Lisp."
69
:depends-on (#:cffi #:alexandria)
7-
:components ((:file "libuv")
8-
(:file "wrapper" :depends-on ("libuv"))
10+
:components ((:file "package")
11+
(:file "lib" :depends-on ("package"))
12+
(cffi-grovel:grovel-file "grovel" :depends-on ("package"))
13+
(:file "wrapper" :depends-on ("package" "grovel"))
914
(:file "bindings" :depends-on ("wrapper"))
1015
(:file "win-error" :depends-on ("wrapper"))
1116
(:file "exports" :depends-on ("bindings" "win-error"))

grovel.lisp

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(in-package :libuv-grovel)
2+
3+
#+windows
4+
(progn
5+
(cc-flags "-Ic:/include/"
6+
"-Ic:/include/uv/"))
7+
8+
(include "uv.h")
9+

lib.lisp

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(in-package :libuv)
2+
3+
(eval-when (:load-toplevel)
4+
(define-foreign-library libuv
5+
(:darwin (:or "libuv.dylib"))
6+
(:unix (:or "libuv.so"
7+
"/usr/lib/libuv.so"
8+
"/usr/local/lib/libuv.so"
9+
; brew's install of libevent on Mac OX X
10+
"/usr/local/lib/libuv.dylib"))
11+
(:windows (:or "libuv.dll"))
12+
(t (:default "libuv")))
13+
(unless (foreign-library-loaded-p 'libuv)
14+
(use-foreign-library libuv)))
15+

libuv.lisp

-39
This file was deleted.

package.lisp

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
(defpackage #:libuv-grovel
2+
(:use :cl :cffi-grovel))
3+
4+
(defpackage #:libuv
5+
(:use :cl :cffi :libuv-grovel)
6+
(:nicknames :uv)
7+
(:export #:+af-unspec+
8+
#:+af-unix+
9+
#:+af-inet+
10+
#:+af-inet-6+
11+
#:+sock-stream+
12+
#:+ipproto-tcp+
13+
14+
#:errval
15+
#:alloc-uv-buf
16+
#:uv-buf-read
17+
#:free-uv-buf
18+
#:alloc-handle
19+
#:alloc-req
20+
#:free-handle
21+
#:free-req
22+
#:handle-type))
23+
24+
(defpackage #:libuv.accessors
25+
(:use :cl :cffi :libuv :libuv-grovel)
26+
(:nicknames :uv-a))
27+

0 commit comments

Comments
 (0)