~subsetpark/ec

ref: b0fefebb3537ec20d7a4077c0c17c05f9082d055 ec/project.janet -rw-r--r-- 739 bytes
b0fefebb — Zach Smith Add scan and range 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(declare-project
  :name "ec"
  :description "a very good calculator"
  :dependencies ["https://git.sr.ht/~subsetpark/fugue"
                 "https://github.com/janet-lang/argparse.git"
                 "https://github.com/pyrmont/testament"
                 "https://git.sr.ht/~subsetpark/janet-rl"])

(def *static-build* (= (or (os/getenv "EC_STATIC_BUILD") "0") "1"))

(defn pkg-config [what]
  (def f (file/popen (string "pkg-config " what)))
  (def v (->>
           (file/read f :all)
           (string/trim)
           (string/split " ")))
  (unless (zero? (file/close f))
    (error "pkg-config failed!"))
  v)

(declare-executable
  :name "ec"
  :entry "main.janet"
  :lflags (if *static-build* ["-static"] [])
  :install true)