Skip to content

Commit e15200d

Browse files
committed
fix: add local variable declarations in do_make_xcframework and fix pkgconfig arch suffix path
1 parent 9d92866 commit e15200d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

do-compile/apple/any.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ function do_make_xcframework() {
113113
mkdir -p "$MR_XCFRMK_DIR"
114114

115115
for lib in $LIPO_LIBS; do
116+
local macos_inputs=""
117+
local ios_inputs=""
118+
local ios_sim_inputs=""
119+
local tvos_inputs=""
120+
local tvos_sim_inputs=""
121+
116122
# add macOS
117123
macos_lib=$MR_MACOS_PRODUCT_ROOT/universal/$LIB_NAME/lib/${lib}.a
118124
if [[ -f $macos_lib ]]; then
@@ -156,6 +162,12 @@ function do_fix_pc() {
156162
my_sed_i 's|[^ ]*lib\([^ /]*\)\.tbd|-l\1|g' "$pc"
157163
# remove xcode sdk include path
158164
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
159171
fi
160172
done
161173
fi

0 commit comments

Comments
 (0)