Skip to content

Commit f9bead9

Browse files
committed
feat(automake): drop configure-project-installer, inline autotools build
Switch fromsource:automake to its own inline autotools build: * paths derived from pkginfo.install_file() * configure + make + install chained in a single sh -c * fixed -j8 * declare upstream url + sha256 * deps: explicit xim:gcc + xim:make + xim:xpkg-helper (previously pulled in transitively via xim:configure-project-installer) * URL switched ftpmirror.gnu.org → ftp.gnu.org (ftpmirror occasionally 404s individual mirrors between rotations; canonical source is stable) Verified end-to-end in xlings 0.4.9 iso: ✓ configure -> make -j8 -> make install ✓ produced bin/automake, bin/aclocal, bin/automake-1.16, bin/aclocal-1.16 ✓ "8 package(s) installed" exit 0 Cluster B leaf 6/8.
1 parent 0c21602 commit f9bead9

1 file changed

Lines changed: 30 additions & 8 deletions

File tree

pkgs/a/automake.lua

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
function __automake_url(version)
2+
return format("https://ftp.gnu.org/gnu/automake/automake-%s.tar.gz", version)
3+
end
4+
15
package = {
26
spec = "1",
37

@@ -20,9 +24,16 @@ package = {
2024

2125
xpm = {
2226
linux = {
23-
deps = { "xim:configure-project-installer@0.0.1" },
27+
deps = {
28+
"xim:xpkg-helper@0.0.1",
29+
"xim:gcc@15.1.0",
30+
"xim:make@4.3",
31+
},
2432
["latest"] = { ref = "1.16.5" },
25-
["1.16.5"] = { },
33+
["1.16.5"] = {
34+
url = __automake_url("1.16.5"),
35+
sha256 = nil,
36+
},
2637
},
2738
},
2839
}
@@ -35,12 +46,23 @@ import("xim.libxpkg.xvm")
3546
local binding_tree = "automake-binding-tree"
3647

3748
function install()
38-
local xpkg = package.name .. "@" .. pkginfo.version()
39-
os.tryrm(pkginfo.install_dir())
49+
-- Sandbox template (PR #49 bzip2): derive paths from pkginfo.install_file()
50+
-- since path.absolute is nil; chain configure + make + install in single
51+
-- sh -c (os.cd doesn't propagate to system.exec children).
52+
local runtime_dir = path.directory(pkginfo.install_file())
53+
local scode_dir = path.join(runtime_dir, "automake-" .. pkginfo.version())
54+
local build_dir = path.join(runtime_dir, "build-automake")
55+
local prefix = pkginfo.install_dir()
4056

41-
system.exec("configure-project-installer " .. pkginfo.install_dir()
42-
.. " --xpkg-scode " .. xpkg
43-
)
57+
os.tryrm(build_dir)
58+
os.mkdir(build_dir)
59+
60+
log.info("Configuring + building + installing automake (autotools)...")
61+
system.exec(string.format(
62+
"sh -c 'cd %s && %s/configure --prefix=%s "
63+
.. "&& make -j8 && make install'",
64+
build_dir, scode_dir, prefix
65+
))
4466

4567
return os.isdir(pkginfo.install_dir())
4668
end
@@ -68,4 +90,4 @@ function uninstall()
6890
end
6991
xvm.remove(binding_tree)
7092
return true
71-
end
93+
end

0 commit comments

Comments
 (0)