Skip to content

Commit a6a4cac

Browse files
committed
fix after lipo the pc file lib absolute path contains arch suffix bug
1 parent 3a9beb4 commit a6a4cac

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

do-compile/apple/any.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ do_lipo_all() {
8888
mkdir -p "$pc_dst_dir"
8989
echo "copy pkgconfig file to $pc_dst_dir"
9090
cp ${pc_src_dir}/*.pc "$pc_dst_dir"
91+
92+
# fix absolute path which contains arch suffix bug,such as /path/to/opus-arch/lib
93+
#-L/Users/runner/work/MRFFToolChainBuildShell/MRFFToolChainBuildShell/build/product/macos/opus-arch/lib
94+
#->
95+
#-L/Users/runner/work/MRFFToolChainBuildShell/MRFFToolChainBuildShell/build/product/macos/universal/opus/lib
96+
# my_sed_i "s|${LIB_NAME}-${arch}|universal/${LIB_NAME}|g" "$pc_dst_dir/"*.pc
97+
9198
#fix prefix path
9299
p="$uni_dir/$LIB_NAME"
93100
escaped_p=$(echo $p | sed 's/\//\\\//g')
@@ -162,12 +169,6 @@ function do_fix_pc() {
162169
my_sed_i 's|[^ ]*lib\([^ /]*\)\.tbd|-l\1|g' "$pc"
163170
# remove xcode sdk include path
164171
my_sed_i 's|-I/Applications/Xcode[^ ]*usr/include||g' "$pc"
165-
166-
# fix absolute path which contains arch suffix bug,such as /path/to/opus-arch/lib
167-
if [[ -n "$_MR_ARCH" ]]; then
168-
# handle any remaining arch suffix in the path
169-
my_sed_i "s|${LIB_NAME}-${_MR_ARCH}|${LIB_NAME}|g" "$pc"
170-
fi
171172
fi
172173
done
173174
fi

0 commit comments

Comments
 (0)