We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcdb398 commit a32ec8aCopy full SHA for a32ec8a
packages/f/ffmpeg/xmake.lua
@@ -137,6 +137,7 @@ package("ffmpeg")
137
local configs = {
138
msystem = "MINGW64",
139
base_devel = true,
140
+ uchardet = true,
141
}
142
-- @see https://stackoverflow.com/questions/65438878/ffmpeg-build-on-windows-using-msvc-make-fails
143
configs.make = true
@@ -271,6 +272,13 @@ package("ffmpeg")
271
272
if package:is_arch("arm", "arm64") then
273
envs.PATH = path.join(os.programdir(), "scripts") .. path.envsep() .. envs.PATH
274
end
275
+ -- fix build failure with gbk encoding
276
+ io.replace("configure", "cp_if_changed $TMPH config.h", [[
277
+ config_encodings=$(uchardet $TMPH)
278
+ case "$config_encodings" in GB18030|GBK|GB2312)
279
+ { printf '\xEF\xBB\xBF'; iconv -f "$config_encodings" -t UTF-8 -c $TMPH; } > config.h;;
280
+ *) cp_if_changed $TMPH config.h;;
281
+ esac]], {plain = true})
282
autoconf.install(package, configs, {envs = envs})
283
else
284
import("core.base.option")
packages/m/msys2/xmake.lua
@@ -10,6 +10,7 @@ package("msys2")
10
11
add_configs("make", {description = "Install gnumake.", default = false, type = "boolean"})
12
add_configs("gcc", {description = "Install gcc.", default = false, type = "boolean"})
13
+ add_configs("uchardet", {description = "Install uchardet.", default = false, type = "boolean"})
14
add_configs("diffutils", {description = "Install diffutils.", default = false, type = "boolean"})
15
add_configs("base_devel", {description = "Install base-devel.", default = false, type = "boolean"})
16
add_configs("mingw64_gcc", {description = "Install mingw64 gcc.", default = false, type = "boolean"})
@@ -41,6 +42,7 @@ package("msys2")
41
42
local packages = {
43
"gcc", "make", "diffutils",
44
base_devel = "base-devel",
45
+ uchardet = "mingw-w64-x86_64-uchardet",
46
mingw32_gcc = "mingw-w64-i686-gcc",
47
mingw32_toolchain = "mingw-w64-i686-toolchain",
48
mingw64_gcc = "mingw-w64-x86_64-gcc",
0 commit comments