Skip to content

Commit 8753d3c

Browse files
committed
cog: fix the build with wpewebkit 2.28
Patch the pkg-config module saerched for by CMake after extraction. The version of WebKit 2.28 has been patched to use libsoup3, but using USE_SOUP2=OFF with Cog will try to find the wrong pkg-config module.
1 parent 6a8805c commit 8753d3c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

package/cog/cog.mk

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
################################################################################
66

7-
ifeq ($(BR2_PACKAGE_WPEWEBKIT2_38),y)
7+
ifeq ($(BR2_PACKAGE_WPEWEBKIT2_28)$(BR2_PACKAGE_WPEWEBKIT2_38),y)
88
COG_VERSION = 0.14.1
99
else
1010
COG_VERSION = 0.6.0
@@ -27,7 +27,7 @@ ifneq ($(BR2_PACKAGE_COG_PLATFORM_HEADLESS)$(BR2_PACKAGE_COG_PLATFORM_FDO)$(BR2_
2727
COG_DEPENDENCIES += wpebackend-fdo
2828
endif
2929

30-
ifeq ($(BR2_PACKAGE_WPEWEBKIT2_38),y)
30+
ifeq ($(BR2_PACKAGE_WPEWEBKIT2_28)$(BR2_PACKAGE_WPEWEBKIT2_38),y)
3131
COG_FDO_PLATFORM_CMAKE_OPTION = COG_PLATFORM_WL
3232
COG_CONF_OPTS += \
3333
-DCOG_PLATFORM_GTK4=OFF \
@@ -77,6 +77,19 @@ else
7777
COG_CONF_OPTS += -DCOG_DBUS_SYSTEM_BUS=OFF
7878
endif # BR2_PACKAGE_COG_USE_SYSTEM_DBUS
7979

80+
# WPE WebKit 2.28 has been patched to use libsoup3, but the pkg-config
81+
# module is still named wpe-webkit-1.0 (instead of -1.1), so patch the
82+
# build system after extracting the tarball.
83+
ifeq ($(BR2_PACKAGE_WPEWEBKIT2_28),y)
84+
define COG_POST_EXTRACT_ADJUST_PKGCONF_REQUIREMENT
85+
sed -i \
86+
-e 's/wpe-webkit-1.1/wpe-webkit-1.0/g' \
87+
-e 's/wpe-webkit-1.0>=[0-9.]\+/wpe-webkit-1.0/g' \
88+
$(@D)/CMakeLists.txt
89+
endef
90+
COG_POST_EXTRACT_HOOKS += COG_POST_EXTRACT_ADJUST_PKGCONF_REQUIREMENT
91+
endif # BR2_PACKAGE_WPEWEBKIT2_28
92+
8093
define COG_INSTALL_SETTINGS
8194
$(INSTALL) -D -m 0644 package/cog/websettings.txt $(TARGET_DIR)/root
8295
endef

0 commit comments

Comments
 (0)