aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-06-20 16:42:40 +0200
committerChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-06-20 16:42:40 +0200
commit70c39e38a682df7309e2406b184be914ebe0be7f (patch)
tree0df2e22b482b511c4fc95a017453083c4ab054ab
parentnative: polyfills for get/opt cbytes (diff)
fix misc build failures re: pkgconf detection
I really should do funny jpm alternative things, there's really no reason for a package manager that strongly depends on native bindings to not integrate typical tools like pkgconfig. It's also unfortunate that project.janet cannot have any configure-time dependencies, meaning that every project needs to duplicate any such utilities in-line.
-rw-r--r--project.janet13
1 files changed, 7 insertions, 6 deletions
diff --git a/project.janet b/project.janet
index e4d530e..f0c7f83 100644
--- a/project.janet
+++ b/project.janet
@@ -35,12 +35,13 @@
(fn pkgconf
[defval & args]
(if bin
- (->> (-> bin
- (execute ;args)
- (get :out)
- string/trim)
- (string/split " ")
- (filter |(< 0 (length $))))
+ (or (-?>> (-?> bin
+ (execute ;args)
+ (get :out)
+ string/trim)
+ (string/split " ")
+ (filter |(< 0 (length $))))
+ defval)
defval))))
(def {:cflags curl-cflags
:ldflags curl-ldflags}