因为 sciter 为每个架构发布各自的预编译库,所以 `SRC_URI` 按架构取用,`src_install` 按 `${ARCH}` 安装对应文件。
因为 vcpkg 构建产物同样按架构区分,所以 `SRC_URI` 分别指向 `x64-linux` 与 `arm64-linux` 两个压缩包。
因为 hwcodec 只在 `target_arch == "x86_64"` 时传入 `-lz`,而它捆绑的 ffmpeg 在各架构都启用了 zlib,arm64 链接 libavformat 的 `id3v2.o` 时 `uncompress` 无法解析,所以加入 `files/hwcodec-link-zlib.patch`,在所有 Linux 目标上链接 zlib。
Signed-off-by: Zakk <zakk@gentoozh.org>
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
The bundled ffmpeg is built with zlib on every architecture, as libavformat.pc
|
|
in both vcpkg bundles shows, but hwcodec only passes -lz on x86_64. On arm64
|
|
this leaves uncompress() unresolved when the linker pulls in libavformat's
|
|
id3v2.o. Link zlib on all Linux targets.
|
|
|
|
--- a/hwcodec-778df1f99597722473b29443bac22ae6c23946fe/build.rs
|
|
+++ b/hwcodec-778df1f99597722473b29443bac22ae6c23946fe/build.rs
|
|
@@ -174,15 +174,10 @@
|
|
|
|
fn link_os() {
|
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
|
- let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
|
let dyn_libs: Vec<&str> = if target_os == "windows" {
|
|
["User32", "bcrypt", "ole32", "advapi32"].to_vec()
|
|
} else if target_os == "linux" {
|
|
- let mut v = ["drm", "X11", "stdc++"].to_vec();
|
|
- if target_arch == "x86_64" {
|
|
- v.push("z");
|
|
- }
|
|
- v
|
|
+ ["drm", "X11", "stdc++", "z"].to_vec()
|
|
} else if target_os == "macos" || target_os == "ios" {
|
|
["c++", "m"].to_vec()
|
|
} else if target_os == "android" {
|