Skip to content

Commit 8e4e24f

Browse files
committed
use meson build system instead of make (try fix libxml2 build failed)
1 parent 8932bdb commit 8e4e24f

File tree

1 file changed

+55
-49
lines changed

1 file changed

+55
-49
lines changed

do-compile/apple/xml2.sh

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,52 +19,58 @@
1919
# ./cmake-compatible.sh "-DBUILD_SHARED_LIBS=0 -DLIBXML2_WITH_PROGRAMS=0 -DLIBXML2_WITH_ZLIB=1 -DLIBXML2_WITH_PYTHON=0 -DLIBXML2_WITH_ICONV=1"
2020

2121

22-
CFLAGS="$MR_DEFAULT_CFLAGS"
23-
24-
# prepare build config
25-
CFG_FLAGS="--prefix=$MR_BUILD_PREFIX"
26-
27-
# for cross compile
28-
if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]];then
29-
echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
30-
# https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
31-
CFLAGS="$CFLAGS -isysroot $MR_SYS_ROOT"
32-
# $MR_ARCH-apple-darwin
33-
CFG_FLAGS="$CFG_FLAGS --host=$MR_ARCH-apple-darwin --with-sysroot=$MR_SYS_ROOT"
34-
fi
35-
36-
echo "----------------------"
37-
echo "[*] configurate $LIB_NAME"
38-
echo "----------------------"
39-
40-
cd $MR_BUILD_SOURCE
41-
42-
echo
43-
echo "CC: $MR_CC"
44-
echo "CFG_FLAGS: $CFG_FLAGS"
45-
echo "CFLAGS: $CFLAGS"
46-
echo
47-
48-
export CFLAGS="$CFLAGS"
49-
export LDFLAGS="$CFLAGS"
50-
51-
export CC="$MR_CC"
52-
export CXX="$MR_CXX"
53-
54-
./autogen.sh \
55-
$CFG_FLAGS \
56-
--prefix=$MR_BUILD_PREFIX \
57-
--enable-static --disable-shared \
58-
--disable-fast-install \
59-
--without-python \
60-
--without-debug \
61-
--with-zlib \
62-
--with-pic \
63-
--without-lzma
64-
65-
echo "----------------------"
66-
echo "[*] compile $LIB_NAME"
67-
echo "----------------------"
68-
69-
make clean >/dev/null
70-
make install -j${MR_HOST_NPROC}
22+
# CFLAGS="$MR_DEFAULT_CFLAGS"
23+
24+
# # prepare build config
25+
# CFG_FLAGS="--prefix=$MR_BUILD_PREFIX"
26+
27+
# # for cross compile
28+
# if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]];then
29+
# echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
30+
# # https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
31+
# CFLAGS="$CFLAGS -isysroot $MR_SYS_ROOT"
32+
# # $MR_ARCH-apple-darwin
33+
# CFG_FLAGS="$CFG_FLAGS --host=$MR_ARCH-apple-darwin --with-sysroot=$MR_SYS_ROOT"
34+
# fi
35+
36+
# echo "----------------------"
37+
# echo "[*] configurate $LIB_NAME"
38+
# echo "----------------------"
39+
40+
# cd $MR_BUILD_SOURCE
41+
42+
# echo
43+
# echo "CC: $MR_CC"
44+
# echo "CFG_FLAGS: $CFG_FLAGS"
45+
# echo "CFLAGS: $CFLAGS"
46+
# echo
47+
48+
# export CFLAGS="$CFLAGS"
49+
# export LDFLAGS="$CFLAGS"
50+
51+
# export CC="$MR_CC"
52+
# export CXX="$MR_CXX"
53+
54+
# ./autogen.sh \
55+
# $CFG_FLAGS \
56+
# --prefix=$MR_BUILD_PREFIX \
57+
# --enable-static --disable-shared \
58+
# --disable-fast-install \
59+
# --without-python \
60+
# --without-debug \
61+
# --with-zlib \
62+
# --with-pic \
63+
# --without-lzma
64+
65+
# echo "----------------------"
66+
# echo "[*] compile $LIB_NAME"
67+
# echo "----------------------"
68+
69+
# make clean >/dev/null
70+
# make install -j${MR_HOST_NPROC}
71+
72+
set -e
73+
74+
CFG_FLAGS="-Ddocs=disabled -Ddebugging=disabled -Dpython=disabled -Dzlib=enabled"
75+
76+
./meson-compatible.sh "$CFG_FLAGS"

0 commit comments

Comments
 (0)