Skip to content

Instantly share code, notes, and snippets.

@mribbons
Created May 18, 2023 23:41
Show Gist options
  • Select an option

  • Save mribbons/d1bd86fc485e109e5d4666b57c887e39 to your computer and use it in GitHub Desktop.

Select an option

Save mribbons/d1bd86fc485e109e5d4666b57c887e39 to your computer and use it in GitHub Desktop.
Socket Runtime libwebkitgtk-4.0 Patch
diff --git a/bin/cflags.sh b/bin/cflags.sh
index 3002f2e6..dde212e5 100755
--- a/bin/cflags.sh
+++ b/bin/cflags.sh
@@ -81,7 +81,7 @@ if (( !TARGET_OS_ANDROID && !TARGET_ANDROID_EMULATOR )); then
if [[ "$host" = "Darwin" ]]; then
cflags+=("-ObjC++")
elif [[ "$host" = "Linux" ]]; then
- cflags+=($(pkg-config --cflags --static gtk+-3.0 webkit2gtk-4.1))
+ cflags+=($(pkg-config --cflags --static gtk+-3.0 webkit2gtk-4.0))
elif [[ "$host" = "Win32" ]]; then
# https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170
# Because we can't pass /MT[d] directly, we have to manually set the flags
diff --git a/bin/functions.sh b/bin/functions.sh
index a1a41c41..a0482814 100755
--- a/bin/functions.sh
+++ b/bin/functions.sh
@@ -565,7 +565,7 @@ function first_time_experience_setup() {
log_and_run sudo apt update || return $?
log_and_run sudo apt install -y \
git \
- libwebkit2gtk-4.1-dev \
+ libwebkit2gtk-4.0-dev \
build-essential \
libc++abi-14-dev \
libc++-14-dev \
@@ -575,7 +575,7 @@ function first_time_experience_setup() {
elif [[ "$package_manager" == "pacman -S" ]]; then
log_and_run sudo pacman -Syu \
git \
- webkit2gtk-4.1 \
+ webkit2gtk-4.0 \
base-devel \
libc++abi-14 \
libc++1-14 \
diff --git a/bin/ldflags.sh b/bin/ldflags.sh
index 573c4423..5626494d 100755
--- a/bin/ldflags.sh
+++ b/bin/ldflags.sh
@@ -111,7 +111,7 @@ if [[ "$host" = "Darwin" ]]; then
ldflags+=("-framework" "OSLog")
elif [[ "$host" = "Linux" ]]; then
if [ -z "$BUILDING_SSC_CLI" ]; then
- ldflags+=($(pkg-config --libs gtk+-3.0 webkit2gtk-4.1))
+ ldflags+=($(pkg-config --libs gtk+-3.0 webkit2gtk-4.0))
fi
elif [[ "$host" = "Win32" ]]; then
if [[ -n "$DEBUG" ]]; then
diff --git a/src/cli/cli.cc b/src/cli/cli.cc
index ca643c7b..c1132252 100644
--- a/src/cli/cli.cc
+++ b/src/cli/cli.cc
@@ -2705,7 +2705,7 @@ int main (const int argc, const char* argv[]) {
//
if (platform.linux && isForDesktop) {
log("preparing build for linux");
- flags = " -std=c++2a `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.1`";
+ flags = " -std=c++2a `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0`";
flags += " -ldl " + getCxxFlags();
flags += " -I" + Path(paths.platformSpecificOutputPath / "include").string();
flags += " -I" + prefixFile();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment