rockboxdev: glib: drop tests and docs from autreconf

Removes dependency on distuitls (ModuleNotFoundError: No module named 'distutils');
gtk-doc-tools still required;

Change-Id: I50f69411d146b5b9b9c496b3507bcef5bb1638bc
This commit is contained in:
Roman Artiukhin 2026-01-31 15:43:14 +02:00
parent 3bfce366ac
commit 98b25f146b

View file

@ -391,15 +391,22 @@ buildtool () {
cflags='-U_FORTIFY_SOURCE -fgnu89-inline -O2'
if [ "$tool" == "glibc" ]; then
cflags="$cflags -fcommon" # glibc < 2.30 needs -fcommon for gcc10+
elif [ "$tool" == "glib" ]; then
run_cmd "$logfile" $SED -i -e 's/m4_copy/m4_copy_force/g' "$cfg_dir/m4macros/glib-gettext.m4"
run_cmd "$logfile" autoreconf -fiv "$cfg_dir"
elif [ "$tool" == "glib" ]; then
# glib < 2.47.5 requires this hack on newer systems to fix legacy python related build failure
# Note: autoreconf call adds dependency on gtk-doc-tools
if version_lt "$version" "2.47.5"; then
run_cmd "$logfile" $SED -i -e 's/m4_copy/m4_copy_force/g' "$cfg_dir/m4macros/glib-gettext.m4"
run_cmd "$logfile" $SED -i 's/tests//' "$cfg_dir/gio/Makefile.am"
run_cmd "$logfile" autoreconf -fiv "$cfg_dir"
config_opt="$config_opt --disable-gtk-doc"
fi
cflags="$cflags -Wno-format-nonliteral -Wno-format-overflow"
fi
# NOTE glibc requires to be compiled with optimization
CFLAGS="$cflags" CXXFLAGS="$CXXFLAGS" run_cmd "$logfile" \
"$cfg_dir/configure" "--prefix=$prefix" \
--disable-docs $config_opt
--disable-docs --disable-tests $config_opt
fi
if [ "$make_opts" != "NO_MAKE" ]; then