@@ -88,6 +88,9 @@ package = {
8888 },
8989 macosx = {
9090 [" b10069.2" ] = {
91+ -- Refresh older installs after the explicit standard-header fix.
92+ revision = 1 ,
93+ floor = 1 ,
9194 url = {
9295 GLOBAL = " https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz" ,
9396 CN = " https://gitcode.com/mcpp-res/llamacpp/releases/download/b10069.2/llamacpp-b10069.2.tar.gz" ,
@@ -135,16 +138,19 @@ import("xim.libxpkg.pkginfo")
135138
136139function install ()
137140 local wrap = " llama.cpp-m-" .. pkginfo .version ()
138- -- libc++ 23 exposes missing standard headers in this Linux checkpoint.
139- -- Scope the explicit includes to ordinary Linux implementation sources;
141+ -- Current libc++ exposes missing standard headers in this checkpoint.
142+ -- Scope explicit includes to ordinary Linux/macOS implementation sources;
140143 -- the exported module and the downloaded source files remain untouched.
141144 if pkginfo .version () == " b10069.2" then
142145 local manifest = path .join (wrap , " mcpp.toml" )
143146 local content = assert (io .readfile (manifest )):gsub (" \r\n " , " \n " )
144147 local patched , count = content :gsub (" \n %[target%.linux%.build%]\n " ,
145148 ' \n [target.linux.build]\n flags = [{ glob = "third_party/llama.cpp/**/*.cpp", cxxflags = ["-include", "cstdlib", "-include", "cerrno"] }]\n ' , 1 )
146149 assert (count == 1 , " llamacpp: expected the native Linux build table" )
147- io .writefile (manifest , patched )
150+ local macos , macos_count = patched :gsub (" \n %[target%.macos%.build%]\n " ,
151+ ' \n [target.macos.build]\n flags = [{ glob = "third_party/llama.cpp/**/*.cpp", cxxflags = ["-include", "cstdlib", "-include", "cerrno"] }]\n ' , 1 )
152+ assert (macos_count == 1 , " llamacpp: expected the native macOS build table" )
153+ io .writefile (manifest , macos )
148154 end
149155 local prefix = pkginfo .install_dir ()
150156 os .tryrm (prefix )
0 commit comments