summaryrefslogtreecommitdiff
path: root/libraries/webkit2gtk
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-02 11:39:14 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-02 11:40:46 +0700
commit9b3dc1f1ca75b9e0a83d65b66076001370a111a5 (patch)
tree2d3741e9b97e3b606da38f0a187c65f607e2e472 /libraries/webkit2gtk
parent89cdc3d0fdb5b2d26ba55cd7b72d723e072ae621 (diff)
downloadslackbuilds-9b3dc1f1ca75b9e0a83d65b66076001370a111a5.tar.gz
libraries/webkit2gtk: Accomodate libsoup and libsoup3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/webkit2gtk')
-rw-r--r--libraries/webkit2gtk/README4
-rw-r--r--libraries/webkit2gtk/webkit2gtk.SlackBuild19
2 files changed, 18 insertions, 5 deletions
diff --git a/libraries/webkit2gtk/README b/libraries/webkit2gtk/README
index fc82e5029b..a745c0704e 100644
--- a/libraries/webkit2gtk/README
+++ b/libraries/webkit2gtk/README
@@ -7,3 +7,7 @@ of systems from desktop computers to embedded systems like phones,
tablets, and televisions.
This package provides WebKit2 API and can co-exist with webkitgtk{3}.
+
+NOTE:
+If you need to build webkit2 API v4.1, use SOUP3=YES ./webkit2gtk.SlackBuild
+It requires libsoup3 to be present before building this package.
diff --git a/libraries/webkit2gtk/webkit2gtk.SlackBuild b/libraries/webkit2gtk/webkit2gtk.SlackBuild
index 051bf38764..5df4ad8b7b 100644
--- a/libraries/webkit2gtk/webkit2gtk.SlackBuild
+++ b/libraries/webkit2gtk/webkit2gtk.SlackBuild
@@ -82,6 +82,15 @@ find -L . \
patch -p1 < $CWD/unhide-deprecated-api.patch
+# Use Slackware's libsoup by default, but we offer libsoup3 to build API v4.1:
+if [ "${SOUP3:-NO}" = "YES" ]; then
+ USESOUP2=""
+ WKAPI="4.1"
+else
+ USESOUP2="-DUSE_SOUP2=ON"
+ WKAPI="4.0"
+fi
+
mkdir -p build
cd build
cmake -DPORT=GTK \
@@ -91,11 +100,11 @@ cd build
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
- -DLIBEXEC_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}/webkit2gtk-4.0 \
+ -DLIBEXEC_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}/webkit2gtk-$WKAPI \
-DENABLE_GAMEPAD=OFF \
-DENABLE_MINIBROWSER=ON \
-DUSE_SYSTEMD=OFF \
- -DUSE_SOUP2=ON \
+ $USESOUP2 \
-Wno-dev \
-G Ninja \
..
@@ -105,11 +114,11 @@ cd build
"${NINJA:=ninja}" -j$(expr $(nproc) / 2)
DESTDIR=$PKG $NINJA -j1 install
-mkdir -p $PKG/usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0
+mkdir -p $PKG/usr/share/gtk-doc/html/webkit{2,dom}gtk-$WKAPI
install -m 0644 ../Documentation/webkit2gtk-4.0/html/* \
- $PKG/usr/share/gtk-doc/html/webkit2gtk-4.0
+ $PKG/usr/share/gtk-doc/html/webkit2gtk-$WKAPI
install -m 0644 ../Documentation/webkitdomgtk-4.0/html/* \
- $PKG/usr/share/gtk-doc/html/webkitdomgtk-4.0
+ $PKG/usr/share/gtk-doc/html/webkitdomgtk-$WKAPI
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ../NEWS $PKG/usr/doc/$PRGNAM-$VERSION