From 162cdedc84763f1c5389753574732561bef44abe Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Wed, 4 Oct 2023 16:44:29 -0600 Subject: [PATCH] git: apply config.prefix to paths from @michaelforney: > It looks like all of those paths (`GIT_*_PATH`, `DEFAULT_GIT_TEMPLATE_DIR`) > are used with the `system_path()` function, which prefixes them > with `system_prefix()`. > > `system_prefix()` works in one of two ways, depending on whether > RUNTIME_PREFIX is defined. If it is, it looks of the executable > path using `/proc/self/exe`, finding the prefix dynamically similar > to a relocatable gcc toolchain, otherwise it uses > `FALLBACK_RUNTIME_PREFIX`. see #15: Support configurable PREFIX --- pkg/git/gen.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git/gen.lua b/pkg/git/gen.lua index ff45e433..89239fa9 100644 --- a/pkg/git/gen.lua +++ b/pkg/git/gen.lua @@ -31,7 +31,7 @@ build('hooklist', '$outdir/hook-list.h', { '|', '$srcdir/generate-hooklist.sh', '$srcdir/Documentation/githooks.txt' }) -cc('exec-cmd.c', nil, {cflags=[[$cflags '-DFALLBACK_RUNTIME_PREFIX=""']]}) +cc('exec-cmd.c', nil, {cflags=string.format([[$cflags '-DFALLBACK_RUNTIME_PREFIX="%s"']], config.prefix)}) cc('common-main.c') cc('http.c') cc('compat/regex/regex.c', nil, {cflags='$cflags -DGAWK -DNO_MBSUPPORT'})