Skip to content

Commit 6c88c26

Browse files
committed
fix opus、bluray pc file
1 parent f505f8a commit 6c88c26

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

do-install/correct-pc.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,28 @@ function correct_pc_file(){
4444
# 2. 匹配 -(arm64|x86) -> 紧跟其后的架构标识
4545
# 3. 匹配 [^/]* -> 架构后的剩余后缀(如 _simulator)
4646
# 4. 替换为 universal/\1 -> \1 就是第一对括号捕获到的 LIB_NAME
47+
4748

49+
my_sed_i "s|universal-simulator|universal|g" "$pc"
4850
my_sed_i "s|\([^/]*\)-arm64[^/]*|universal/\1|g" "$pc"
4951
my_sed_i "s|\([^/]*\)-x86[^/]*|universal/\1|g" "$pc"
5052

5153
# 全局替换 prefix= 开头后面的内容
5254
old_base=$(sed -n 's/^prefix=//p' "$pc")
5355
my_sed_i "s|$old_base|$base_dir|g" "$pc"
54-
56+
5557
# 具有局限性,比如 includedir=/Users/matt/GitWorkspace/fsplayer/FFToolChain/build/product/ios/universal-simulator/bluray
5658
# my_sed_i "s|^prefix=.*|prefix=$base_dir|" "$pc"
5759
# my_sed_i "s|^exec_prefix=[^$].*|exec_prefix=$bin_dir|" $pc
5860
# my_sed_i "s|^libdir=[^$].*|libdir=$lib_dir|" "$pc"
5961
# my_sed_i "s|^includedir=[^$].*include|includedir=$include_dir|" "$pc"
6062

61-
62-
6363
# Fix absolute paths to other internal dependencies
6464
# Pattern: -L/any/path/PRODUCT_NAME/PLATFORM/universal/LIB_NAME/lib
6565
# We want to replace the "/any/path/PRODUCT_NAME/PLATFORM" part with the local equivalent.
6666
# Since we know the local product root is the parent of 'universal', we can use that.
67-
68-
local product_root=$(cd "$fix_path"; pwd)
67+
# base_dir is lib folder, we need to go up two levels to get to product root,eg: ios
68+
local product_root=$(cd "$base_dir";cd ..;cd ..;pwd)
6969
# escaped for sed
7070
local escaped_root=$(echo "$product_root" | sed 's/\//\\\//g')
7171

0 commit comments

Comments
 (0)