Skip to content

Commit 6f4c67a

Browse files
committed
fix bluray pc file
1 parent 849ecfe commit 6f4c67a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

apple/do-compile/bluray.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ echo "----------------------"
8585

8686
make install -j8 1>/dev/null
8787
# system xml2 lib has no pc file,when compile ffmepg, pkg-config can't find the private xml2 lib
88-
echo "remove private xml lib from pc file"
89-
90-
sed -i "" '/Requires.private/d' $XC_BUILD_PREFIX/lib/pkgconfig/libbluray.pc
88+
echo "mv private xml lib to system"
89+
90+
pc_file="$XC_BUILD_PREFIX/lib/pkgconfig/libbluray.pc"
91+
# rm line 'Requires.private'
92+
sed -i "" '/Requires.private/d' "$pc_file"
93+
# find line number
94+
n=$(grep -n 'Libs.private' "$pc_file" | cut -d: -f1)
95+
xml_lib=echo $(xml2-config --libs) | awk '{len=split($0,a," "); for(n=2;n<=len;n++)printf " %s",a[n]}'
96+
# line n append " -lxml2 -lz -lpthread -licucore -lm"
97+
sed -i "" "$n s/$/&$xml_lib/" "$pc_file"

0 commit comments

Comments
 (0)