patch: support Configure in autotools
This commit is contained in:
@@ -243,7 +243,16 @@ function builder.run_build(recipe, source_dir, stage_dir, opts)
|
||||
end
|
||||
|
||||
if bs == "autotools" then
|
||||
run("./configure --prefix=/usr" .. args_str)
|
||||
-- Some projects ship a capitalized Configure instead of autoconf's configure.
|
||||
local config_script = "configure"
|
||||
if not path.exists(path.join(source_dir, "configure")) then
|
||||
if path.exists(path.join(source_dir, "Configure")) then
|
||||
config_script = "Configure"
|
||||
else
|
||||
error(("no configure script found in %s (looked for ./configure and ./Configure)"):format(source_dir), 0)
|
||||
end
|
||||
end
|
||||
run("./" .. config_script .. " --prefix=/usr" .. args_str)
|
||||
run("make -j" .. njobs)
|
||||
run("make install DESTDIR=" .. path.quote(stage_dir))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user