Skip to content

Commit 0c2d483

Browse files
authored
Remove GUI dependencies from apk when GUI components are disabled (yuezk#638)
1 parent 3c49eab commit 0c2d483

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,17 @@ init-apk: clean-apk tarball
409409
checksum=$$(sha512sum .build/apk/${PKG}.tar.gz | cut -d' ' -f1); \
410410
sed -i "s/@SHA512@/$$checksum/g" .build/apk/APKBUILD
411411

412+
# Remove the GUI dependencies if BUILD_GUI_HELPER is set to 0
413+
if [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
414+
sed -i "/^\tlibayatana-appindicator$$/d" .build/apk/APKBUILD; \
415+
sed -i "/^\tlibsecret$$/d" .build/apk/APKBUILD; \
416+
fi
417+
418+
# Remove the WebKitGTK dependency only if neither gpauth webview auth nor gpgui-helper needs it
419+
if [ $(BUILD_GUI_HELPER) -eq 0 ] && [ $(BUILD_WEBVIEW_AUTH) -eq 0 ]; then \
420+
sed -i "/^\twebkit2gtk-4.1$$/d" .build/apk/APKBUILD; \
421+
fi
422+
412423
apk: init-apk
413424
cd .build/apk && abuild -r -P "$(CURDIR)/.build/apk/packages"
414425

0 commit comments

Comments
 (0)