~subsetpark/ec

ref: big ec/project.janet -rw-r--r-- 806 bytes
3f9b6ebe — Zach Smith Support bigints (note: this does not work on account of floats being coerced to big ints) 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
26
(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"
                "https://github.com/andrewchambers/janet-big.git" ])

(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)