rockboxdev: glib: drop tests and docs from autreconf

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 98b25f146ba88fff1dec97a50fab470b91f8ddbe
Author: Roman Artiukhin <[email protected]>
Date:   Sat Jan 31 15:43:14 2026 +0200

    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

diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index e06b3afbef..8b8d4d204a 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -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
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.