Files
BMLFS/build-scripts/webkit2gtk.build
2021-12-22 08:55:08 -06:00

76 lines
3.0 KiB
Bash

#! /bin/bash
# WebKit2 GTK+
# Source: https://webkitgtk.org/releases/webkitgtk-2.34.3.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: Cairo, CMake, gst-plugins-base, gst-plugins-bad, GTK+3
# Required: ICU, libgudev, libsecret, libsoup, libwebp, Mesa, OpenJPEG
# Required: Ruby, SQLite, Which
# Recommended: enchant, GeoClue, goobject-introspection, hicolor-icon-theme, libnotify
# Optional: bubblewrap, GTK-Doc, harfuzz, Wayland, WOFF2, ccache, Hyphen, MathML,
# Optional: WPEBackend-fdo, and xdg-dbus-proxy, libseccomp, xdg-dbus-proxy
export CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE"
export CXXFLAGS="$CXXFLAGS -g1"
# Enable/Disable features
export CARGS="-DPORT=GTK "
export CARGS+="-DCMAKE_BUILD_TYPE=MinSizeRel "
export CARGS+="-DCMAKE_SKIP_RPATH=ON "
export CARGS+="-DCMAKE_INSTALL_PREFIX=/usr "
export CARGS+="-DLIB_INSTALL_DIR=/usr/lib "
export CARGS+="-DENABLE_GTKDOC=OFF "
export CARGS+="-DENABLE_GEOLOCATION=ON "
export CARGS+="-DENABLE_SAMPLING_PROFILER=OFF "
export CARGS+="-DENABLE_MINIBROWSER=ON "
export CARGS+="-DUSE_WPE_RENDERER=ON "
export CARGS+="-DUSE_WOFF2=ON "
export CARGS+= -DUSE_LD_GOLD=OFF "
export CARGS+="-DUSE_SYSTEMD=OFF "
export CARGS+="-DUSE_LIBHYPHEN=OFF "
export CARGS+="-DENABLE_X11_TARGET=OFF "
export CARGS+="-DENABLE_WAYLAND_TARGET=ON "
export CARGS+="-DENABLE_GLES2=ON "
export CARGS+="-DUSE_SOUP2=ON "
export CARGS+="-DENABLE_GAMEPAD=OFF "
mkdi build && cd build &&
cmake -GNinja -DCMAKE_CXX_FLAGS="$CXXFLAGS" $CARGS ..
# Multiple ninja jobs seems to cause internal compiler errors
#ninja JavaScriptCore-4-gir -j1 && ninja -j1 &&
ninja -j2 &&
sudo -S DESTDIR=$BUILD ninja install &&
unset CXXFLAGS ECONFIG CXXFLAGS LDFLAGS
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------------------------------------------------------|
webkit2gtk: webkit2gtk (Web content rendering)
webkit2gtk:
webkit2gtk: WebKitGTK+ is a full-featured port of the WebKit rendering engine,
webkit2gtk: suitable for projects requiring any kind of web integration, from
webkit2gtk: hybrid HTML/CSS applications to full-fledged web browsers.
webkit2gtk: It offers WebKit's full functionality and is useful in a wide range
webkit2gtk: of systems from desktop computers to embedded systems like phones,
webkit2gtk: tablets, and televisions.
webkit2gtk:
webkit2gtk: https://www.webkitgtk.org/
webkit2gtk:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/webkit2gtk-2.34.3-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*