<div dir="ltr">Hello everyone!<div><br>I would like to propose an optimization for the android-tools SlackBuild to<br>eliminate its dependency on gtest (Google Test Framework). Currently, gtest is<br>required to build android-tools, but compiling such a heavy testing framework<br>just to get adb and fastboot feels redundant for everyday users. gtest is only<br>used for upstream development unit tests. If we look closely at the build<br>failure when gtest is missing, the only blocker is a single header include:<br>#include <gtest/gtest_prod.h> inside libziparchive. It is used solely for the<br>FRIEND_TEST macro, which is completely useless when we are not running tests<br>anyway. Instead of adding a bulky .patch file to the repository, we can<br>elegantly mock this header inline directly inside the SlackBuild script right<br>before the build directory is created. Since vendor/libbase/include is already<br>in the compiler's include paths, the mock header is picked up automatically:<br><br><font face="monospace">--- android-tools.SlackBuild_orig  2025-03-15 06:24:24.000000000 +0400<br>+++ android-tools.SlackBuild       2026-06-03 08:34:20.808218974 +0400<br>@@ -87,6 +87,10 @@<br> # Fix building with protobuf3 version 30<br> patch -p1 -d "vendor/extras" < $CWD/android-tools-35.0.2-fix-protobuf-30.0-compilation.patch<br> <br>+mkdir -p vendor/libbase/include/gtest &&<br>+    echo "#define FRIEND_TEST(test_case_name, test_name)" > \<br>+    vendor/libbase/include/gtest/gtest_prod.h<br>+<br> mkdir -p build<br> cd build<br>   cmake \</font><br><br>I have successfully tested this on my environment (15.0 x86_64). android-tools<br>compiles flawlessly without gtest being installed in the system at all.<br>Attached is the diff for android-tools.SlackBuild. If this looks good, we can<br>also safely remove gtest from the REQUIRES line in <a href="http://android-tools.info">android-tools.info</a>. What do<br>you think? I hope this saves some CPU cycles and disk space for Slackware<br>users.<br><br>Best regards, MyRequiem.<br></div></div>