diff mbox series

package/webkitgtk: add option to enable MiniBrowser

Message ID 20240903105105.3285178-1-aperez@igalia.com
State Accepted
Headers show
Series package/webkitgtk: add option to enable MiniBrowser | expand

Commit Message

Adrian Perez de Castro Sept. 3, 2024, 10:51 a.m. UTC
Add an option to enable building and installing the MiniBrowser program
included in the WebKitGTK source tree. This may be handy now that Midori
will no longer be packaged in Builroot. A post-install hook installs a
symbolic link to it into /usr/bin for convenience.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/webkitgtk/Config.in    |  5 +++++
 package/webkitgtk/webkitgtk.mk | 10 ++++++++++
 2 files changed, 15 insertions(+)
diff mbox series

Patch

diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in
index 8ee90dda1c..e6ab405cd5 100644
--- a/package/webkitgtk/Config.in
+++ b/package/webkitgtk/Config.in
@@ -139,4 +139,9 @@  config BR2_PACKAGE_WEBKITGTK_WEBDRIVER
 	  Enable support for WebDriver. This will build and install the
 	  WebKitWebDriver program in the target.
 
+config BR2_PACKAGE_WEBKITGTK_MINIBROWSER
+	bool "MiniBrowser"
+	help
+	  Example browser application included with WebKitGTK.
+
 endif
diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index 9aaff5da8f..d29c533e1a 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -61,6 +61,16 @@  else
 WEBKITGTK_CONF_OPTS += -DENABLE_WEBDRIVER=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_WEBKITGTK_MINIBROWSER),y)
+define WEBKITGTK_INSTALL_MINIBROWSER_SYMLINK
+	ln -sf ../libexec/webkit2gtk-4.1/MiniBrowser $(TARGET_DIR)/usr/bin/MiniBrowser
+endef
+WEBKITGTK_POST_INSTALL_TARGET_HOOKS += WEBKITGTK_INSTALL_MINIBROWSER_SYMLINK
+WEBKITGTK_CONF_OPTS += -DENABLE_MINIBROWSER=ON
+else
+WEBKITGTK_CONF_OPTS += -DENABLE_MINIBROWSER=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_LCMS2),y)
 WEBKITGTK_CONF_OPTS += -DUSE_LCMS=ON
 WEBKITGTK_DEPENDENCIES += lcms2