Files
BMLFS/build-scripts/wpewebkit.build
2024-02-12 10:14:20 -06:00

78 lines
3.0 KiB
Bash

#! /bin/bash
# WPE WebKit
# Source: https://wpewebkit.org/releases/wpewebkit-2.43.1.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: CMake, libwpe, wpebackend-fdo, bubblewrap, woff2, wayland,
# Required: ruby, cairo, GLib, fontconfig, freetype, harfBuzz, ICU,
# Required: libjpeg-turbo, libepoxy, libgcrypt, libxml2, mesa, libpng,
# Required: SQLite3, libwebp, libsoup, atk, openjpeg, libtasn1, libxslt,
# Required: LCM2, libseccomp, xdg-dbus-proxy unifdef gi-docgen libjxl
# Required: libavif
# Recommended: NONE
# Optional: qt5-qtbase qt5-qttools libsoup3
patch -Np1 -i ../patches/wpewebkit-alpine/patch-gettext.patch
# If Qt5 was not installed in /usr:
export QT5CMAKES="-DENABLE_WPE_QT_API=ON "
export QT5CMAKES+="-DQt5Core_DIR=/opt/qt5/lib/cmake/Qt5Core "
export QT5CMAKES+="-DQt5Gui_DIR=/opt/qt5/lib/cmake/Qt5Gui "
export QT5CMAKES+="-DQt5Network_DIR=/opt/qt5/lib/cmake/Qt5Network "
export QT5CMAKES+="-DQt5QmlModels_DIR=/opt/qt5/lib/cmake/Qt5QmlModels "
export QT5CMAKES+="-DQt5Qml_DIR=/opt/qt5/lib/cmake/Qt5Qml "
export QT5CMAKES+="-DQt5Quick_DIR=/opt/qt5/lib/cmake/Qt5Quick "
export QT5CMAKES+="-DQt5Test_DIR=/opt/qt5/lib/cmake/Qt5Test "
export QT5CMAKES+="-DQt5_DIR=/opt/qt5/lib/cmake/Qt5 "
export CMARGS="-DCMAKE_INSTALL_PREFIX=/usr "
export CMARGS+="-DCMAKE_INSTALL_LIBDIR=lib "
export CMARGS+="-DBUILD_SHARED_LIBS=True "
export CMARGS+="-DCMAKE_BUILD_TYPE=None "
export CMARGS+="-DPORT=WPE "
export CMARGS+="-DENABLE_MINIBROWSER=ON "
export CMARGS+="-DENABLE_GTKDOC=OFF "
export CMARGS+="-DUSE_SOUP2=On "
export CMARGS+="-DUSE_SYSTEMD=OFF "
export CMARGS+="-DENABLE_JOURNALD_LOG=OFF "
export CMARGS+="-DENABLE_WEBGL2=ON "
export CMARGGS+="-G Ninja "
cmake -B build $CMARGS -DENABLE_DOCUMENTATION=OFF \
-DUSE_LIBBACKTRACE=OFF $QT5CMAKES && \
#read -p "Compile?" && ninja -C build -j2 &&
cmake --build build --parallel 2
sudo -S DESTDIR=$BUILD ninja -C build install &&
unset CMARGS QT5CMAKES && \
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
wpewebkit: WPE Webkit
wpewebkit:
wpewebkit: WPE WebKit allows embedders to create simple and performant systems
wpewebkit: based on Web platform technologies. It is a WebKit port designed with
wpewebkit: flexibility and hardware acceleration in mind, leveraging common 3D
wpewebkit: graphics APIs for best performance.
wpewebkit:
wpewebkit: https://wpewebkit.org/
wpewebkit:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/wpewebkit-2.43.1-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*