aboutsummaryrefslogtreecommitdiff
path: root/sys-build/gmake
diff options
context:
space:
mode:
authorforever2k38 <forever2k38@noreply.codeberg.org>2026-09-16 16:02:05 +0200
committerforever2k38 <forever2k38@noreply.codeberg.org>2026-09-16 16:02:05 +0200
commit250d4568537895ec283a72e811ab057de8929d2d (patch)
treefac4e6ad5198ce20941aab90dab092e977b2edcd /sys-build/gmake
parent8887530824769943bf8900a81e210ca58a7f4c86 (diff)
fixes
Diffstat (limited to 'sys-build/gmake')
-rw-r--r--sys-build/gmake/build.lua43
1 files changed, 42 insertions, 1 deletions
diff --git a/sys-build/gmake/build.lua b/sys-build/gmake/build.lua
index 792022d..7a759d1 100644
--- a/sys-build/gmake/build.lua
+++ b/sys-build/gmake/build.lua
@@ -11,7 +11,7 @@ package.license = { "GPLv3" }
package.deps = {
build = {
{ provides = "cc" },
- { provides = "make" },
+ "sys-build/autoconf",
},
}
@@ -23,6 +23,45 @@ package.sources = {
},
}
+-- shitty hack to remove version pinning and allow building on new autoconf versions
+
+local function process_file(path)
+ local f = io.open(path, "r")
+ if not f then
+ return
+ end
+
+ local content = f:read("*a")
+ f:close()
+
+ if content:find("1[.-]16") then
+ content = content:gsub("1([.-])16", "1%118")
+
+ f = assert(io.open(path, "w"))
+ f:write(content)
+ f:close()
+
+ print("Updated: " .. path)
+ end
+end
+
+local function walk(dir)
+ for entry in lfs.dir(dir) do
+ if entry ~= "." and entry ~= ".." then
+ local path = dir .. "/" .. entry
+ local attr = lfs.attributes(path)
+
+ if attr and attr.mode == "directory" then
+ if entry ~= ".git" then
+ walk(path)
+ end
+ elseif attr and attr.mode == "file" then
+ process_file(path)
+ end
+ end
+ end
+end
+
package.build = function()
print(lfs.currentdir())
@@ -30,6 +69,8 @@ package.build = function()
lfs.chdir("source/make-4.4.1")
+ walk(".")
+
os.execute("./configure")
os.execute("make")