Commit4d0b27d0Recorded24 Apr 2026Repositorysigil-audio

v0.10.1: resolve vorbis shim -include against package dir

Message

v0.10.0's compile-c-sources for the vendored vorbis tree used a literal relative -include vendor/vorbis/sigil_alloca_shim.h. That resolves correctly when sigil-audio itself is the working directory (how the vendoring worker verified), but breaks the moment a downstream consumer (live-crafter, cinder-cantata, anything via sigil deps) tries to compile sigil-audio's C — the cc invocation runs from a different cwd and can't find the shim header.

Fix: switch the flags list to a procedural form that resolves the shim path against (context-package-dir ctx) at build time. Same file, same cross-compile logic; just a path that works from any cwd.

Surfaced 2026-04-24 when live-crafter's first post-v0.10.0 build failed with "'vendor/vorbis/sigilallocashim.h' file not found" after the sigil-audio pin bumped to ^0.10.0.

Changed
 package.sgl | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
Diff
package.sglmodified
@@ -122,13 +122,21 @@
122
;; needs it for the alloca prototype under -std=c99) but
123
;; NOT on Windows/MinGW (where <alloca.h> is missing and
124
;; vorbis's _WIN32 branch handles alloca via <malloc.h>).
125
flags: '("-std=c99"
126
"-include" "vendor/vorbis/sigil_alloca_shim.h"
127
"-Wno-parentheses"
128
"-Wno-unused-function"
129
"-Wno-unused-but-set-variable"
130
"-Wno-sign-compare"
131
"-Wno-strict-aliasing"))
+125
;;
+126
;; Flags are procedural so the -include path is resolved
+127
;; against this package's own directory. Literal relative
+128
;; paths would break downstream consumers whose cwd differs
+129
;; from the package dir at cc time.
+130
flags: (lambda (ctx)
+131
(list "-std=c99"
+132
"-include"
+133
(path-join (context-package-dir ctx)
+134
"vendor/vorbis/sigil_alloca_shim.h")
+135
"-Wno-parentheses"
+136
"-Wno-unused-function"
+137
"-Wno-unused-but-set-variable"
+138
"-Wno-sign-compare"
+139
"-Wno-strict-aliasing")))
140
141
;; sigil-audio's own C sources.
142
(compile-c-sources