cruxports/webkitgtk-41/Pkgfile

48 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-10-26 09:02:35 -04:00
# Description: rendering engine for gtk web browsers, linked against soup3
2022-10-16 12:31:31 -04:00
# URL: https://www.webkitgtk.org/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: gst-plugins-base gtk gtk3 hyphen icu lcms2 libseccomp libsecret libsoup3 libwebp libxslt ruby woff2 xorg-libxt
# Optional: enchant libnotify geoclue openjpeg2 xdg-dbus-proxy bubblewrap wpebackend-fdo libmanette
name=webkitgtk-41
2022-11-13 13:22:12 -05:00
version=2.38.2
2022-10-16 12:31:31 -04:00
release=1
source=(https://webkitgtk.org/releases/webkitgtk-$version.tar.xz)
build() {
# fail the build if dependencies are not met
ls /usr/include/harfbuzz/hb-icu.h || (printf '\e[1;31m%-6s\e[m\n' "You need to install icu, then rebuild harfbuzz for webkitgtk to work, quitting..." ; exit 1)
# Make sure we do not have ccache masquerade directory in PATH.
[ -e '/usr/bin/ccache' ] && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
prt-get isinst openjpeg2 || PKGMK_WEBKITGTK+=' -DUSE_OPENJPEG=OFF'
prt-get isinst enchant || PKGMK_WEBKITGTK+=' -DENABLE_SPELLCHECK=OFF'
prt-get isinst geoclue && PKGMK_WEBKITGTK+=' -DENABLE_GEOLOCATION=ON' || PKGMK_WEBKITGTK+=' -DENABLE_GEOLOCATION=OFF'
prt-get isinst bubblewrap xdg-dbus-proxy && PKGMK_WEBKITGTK+=' -DENABLE_BUBBLEWRAP_SANDBOX=ON' \
|| PKGMK_WEBKITGTK+=' -DENABLE_BUBBLEWRAP_SANDBOX=OFF'
prt-get isinst wpebackend-fdo || PKGMK_WEBKITGTK+=' -DUSE_WPE_RENDERER=OFF'
prt-get isinst libmanette || PKGMK_WEBKITGTK+=' -DENABLE_GAMEPAD=OFF'
cmake -S webkitgtk-$version -B build -G Ninja ${PKGMK_WEBKITGTK} \
-D CMAKE_INSTALL_PREFIX:PATH=/usr \
-D CMAKE_INSTALL_LIBDIR:PATH=/usr/lib \
-D CMAKE_INSTALL_LIBEXECDIR:PATH=/usr/lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -DNDEBUG -ffat-lto-objects" \
-D CMAKE_C_FLAGS_RELEASE="${CFLAGS} -DNDEBUG -ffat-lto-objects" \
-D CMAKE_EXE_LINKER_FLAGS="${LDFLAGS} -Wl,-fuse-ld=gold" \
-D CMAKE_SKIP_RPATH=ON \
-D PORT=GTK \
-D USE_SOUP2=OFF \
-D ENABLE_MINIBROWSER=ON \
-D ENABLE_JOURNALD_LOG=OFF \
-D ENABLE_DOCUMENTATION=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
rm -r $PKG/usr/share/locale
}