andreas-kupries / critcl

Critcl lets you easily embed C code in Tcl. Online documentation at
http://andreas-kupries.github.io/critcl
Other
72 stars 19 forks source link

Allow overriding critcl's home directory with an env variable #110

Closed gahr closed 4 years ago

gahr commented 4 years ago

This is useful when building in a chroot'd environment that doesn't have access to the outside world, under a username that doesn't have a home (e.g., the nobody username).

This patch was necessary for building "as-user" in FreeBSD's CI: http://package19.nyi.freebsd.org/data/121amd64-default-build-as-user/533215/logs/errors/critcl-3.1.18.1.log

See critcl trying to create the /nonexistent directory.

gahr commented 4 years ago

I just realized that the reason why I was having this issue is that I failed to patch the second invocation of critcl inside the build script. appending a proper -cache <path> option works fine.

I'll leave this open in case you think having cache configurable as an env variable could be useful for some other purpose.

andreas-kupries commented 4 years ago

I would be more in favor of extending the install method of build.tcl with an option to set the cache directory.