~subsetpark/ec

ref: 208a50058aaaa7a7a93cc4bba216ce87bd2ca9cb ec/project.janet -rw-r--r-- 739 bytes
208a5005 — Zach Smith float parsing and handle bools directly 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)