void-packages/srcpkgs/webkit2gtk/template

101 lines
2.9 KiB
Bash

# Template file for 'webkit2gtk'
pkgname=webkit2gtk
version=2.22.5
revision=1
wrksrc="webkitgtk-${version}"
build_style=cmake
configure_args="-DPORT=GTK -DENABLE_GTKDOC=OFF -DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc
-DUSE_GSTREAMER_GL=OFF"
short_desc="GTK+3 port of the WebKit2 browser engine"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later, BSD-2-Clause"
homepage="https://webkitgtk.org/"
distfiles="${homepage}/releases/webkitgtk-${version}.tar.xz"
checksum=99d3863f418a7c3a3e37e5062950dbf2d91fb106ec1633459b0ef6f2d5f6cb13
# ETOOHUGE
nodebug=1
CXXFLAGS="-Wno-expansion-to-defined"
hostmakedepends="perl python pkg-config intltool gperf flex ruby glib-devel geoclue2"
makedepends="
at-spi2-core-devel libjpeg-turbo-devel libpng-devel sqlite-devel
harfbuzz-devel gst-plugins-base1-devel gst-plugins-bad1-devel
libsoup-devel libxslt-devel gnutls-devel icu-devel enchant-devel
dbus-glib-devel libwebp-devel gtk+-devel gtk+3-devel libgudev-devel
libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel
woff2-devel"
case "$XBPS_TARGET_MACHINE" in
armv[56]*|mips*|ppc|ppc-musl) configure_args+=" -DENABLE_JIT=0"
makedepends+=" libatomic-devel"
;;
aarch64*) configure_args+=" -DUSE_LD_GOLD=0";;
esac
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" -DENABLE_SAMPLING_PROFILER=OFF";;
esac
# Package build options
build_options="gir wayland x11"
# Disable gir for cross builds.
build_options_default="wayland x11"
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" gir"
else
# Make cmake detect Ruby headers in cross base
configure_args+=" -DRUBY_VERSION=2.5 -DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/ruby-2.5.0"
fi
if [ "$build_option_gir" ]; then
configure_args+=" -DENABLE_INTROSPECTION=1"
hostmakedepends+=" gobject-introspection"
else
configure_args+=" -DENABLE_INTROSPECTION=0"
fi
if [ "$build_option_wayland" ]; then
configure_args+=" -DENABLE_WAYLAND_TARGET=1"
hostmakedepends+=" wayland-devel"
makedepends+=" MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols"
else
configure_args+=" -DENABLE_WAYLAND_TARGET=0"
fi
if [ "$build_option_x11" ]; then
configure_args+=" -DENABLE_X11_TARGET=1"
makedepends+=" libXt-devel"
else
configure_args+=" -DENABLE_X11_TARGET=0"
fi
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
armv[56]*) # Add -latomic to the targets
find -name "CMakeLists.txt" -exec sed -i "{}" \
-e "/target_link_libraries/s/)/ atomic)/" \;
;;
esac
}
post_install() {
vlicense Source/WebCore/LICENSE-APPLE
vlicense Source/WebCore/LICENSE-LGPL-2.1
vlicense Source/WebCore/LICENSE-LGPL-2
}
webkit2gtk-devel_package() {
depends="gtk+3-devel libsoup-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
vmove "usr/lib/*.so"
}
}