Skip to content

Commit 3b30eb8

Browse files
committed
not use cmake compile apple xml2
1 parent e7013d7 commit 3b30eb8

File tree

2 files changed

+63
-3
lines changed

2 files changed

+63
-3
lines changed

do-compile/android/bluray.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export RANLIB="$MR_RANLIB"
9191

9292
./configure $CFG_FLAGS
9393

94-
#----------------------
9594
echo "----------------------"
9695
echo "[*] compile $LIB_NAME"
9796
echo "----------------------"

do-compile/apple/xml2.sh

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,66 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# call common cmake build shell
18-
./cmake-compatible.sh "-DBUILD_SHARED_LIBS=0 -DLIBXML2_WITH_PROGRAMS=0 -DLIBXML2_WITH_ZLIB=1 -DLIBXML2_WITH_PYTHON=0 -DLIBXML2_WITH_ICONV=1"
17+
# can't use cmake,because ios undeclared function 'getentropy'
18+
# https://gitlab.gnome.org/GNOME/libxml2/-/issues/774#note_2174500
19+
# ./cmake-compatible.sh "-DBUILD_SHARED_LIBS=0 -DLIBXML2_WITH_PROGRAMS=0 -DLIBXML2_WITH_ZLIB=1 -DLIBXML2_WITH_PYTHON=0 -DLIBXML2_WITH_ICONV=1"
20+
21+
cd $MR_BUILD_SOURCE
22+
23+
if [[ "$MR_DEBUG" == "debug" ]];then
24+
export MR_OTHER_CFLAGS="${MR_OTHER_CFLAGS} -g"
25+
else
26+
export MR_OTHER_CFLAGS="${MR_OTHER_CFLAGS} -Os"
27+
fi
28+
29+
CFLAGS="$MR_OTHER_CFLAGS"
30+
31+
# prepare build config
32+
CFG_FLAGS="--prefix=$MR_BUILD_PREFIX"
33+
# for cross compile
34+
if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]];then
35+
echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
36+
# https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
37+
CFLAGS="$CFLAGS -isysroot $MR_SYS_ROOT"
38+
# $MR_ARCH-apple-darwin
39+
CFG_FLAGS="$CFG_FLAGS --host=$MR_ARCH-apple-$MR_PLAT --with-sysroot=$MR_SYS_ROOT"
40+
fi
41+
42+
echo "----------------------"
43+
echo "[*] configurate $LIB_NAME"
44+
echo "----------------------"
45+
46+
cd $MR_BUILD_SOURCE
47+
48+
echo
49+
echo "CC: $MR_CC"
50+
echo "CFG_FLAGS: $CFG_FLAGS"
51+
echo "CFLAGS: $CFLAGS"
52+
echo
53+
54+
export CFLAGS="$CFLAGS"
55+
export LDFLAGS="$CFLAGS"
56+
57+
export CC="$MR_CC"
58+
export CXX="$MR_CXX"
59+
export AR="$MR_AR"
60+
export AS="$RM_AS"
61+
export RANLIB="$MR_RANLIB"
62+
63+
./autogen.sh \
64+
$CFG_FLAGS \
65+
--prefix=$MR_BUILD_PREFIX \
66+
--enable-static --disable-shared \
67+
--disable-fast-install \
68+
--without-python \
69+
--without-debug \
70+
--with-zlib \
71+
--with-pic \
72+
--without-lzma
73+
74+
echo "----------------------"
75+
echo "[*] compile $LIB_NAME"
76+
echo "----------------------"
77+
78+
make clean >/dev/null
79+
make install -j${MR_HOST_NPROC}

0 commit comments

Comments
 (0)