void-packages/srcpkgs/webkit2gtk/template
2019-02-23 20:32:53 +01:00

85 lines
2.9 KiB
Bash

# Template file for 'webkit2gtk'
pkgname=webkit2gtk
version=2.22.6
revision=1
wrksrc="webkitgtk-${version}"
build_style=cmake
build_helper="gir"
configure_args="-DPORT=GTK -DENABLE_GTKDOC=OFF -DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc
-DUSE_GSTREAMER_GL=OFF -DRUBY_VERSION=2.6
-DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/ruby-2.6.0
-DENABLE_INTROSPECTION=$(vopt_if gir ON OFF)
-DENABLE_WAYLAND_TARGET=$(vopt_if wayland ON OFF)
-DENABLE_X11_TARGET=$(vopt_if x11 ON OFF) -DENABLE_JIT=$(vopt_if jit ON OFF)
-DENABLE_SAMPLING_PROFILER=$(vopt_if sampling_profiler ON OFF)"
hostmakedepends="perl python pkg-config intltool gperf flex ruby glib-devel geoclue2
$(vopt_if wayland wayland-devel)"
makedepends=" at-spi2-core-devel libjpeg-turbo-devel libpng-devel
harfbuzz-devel gst-plugins-base1-devel gst-plugins-bad1-devel sqlite-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 $(vopt_if x11 libXt-devel) $(vopt_if jit '' libatomic-devel)
$(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
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=df90db9c0db0a2072b945fa3e1d45865922bd686c4659cce6cb5897ce357c85b
# ETOOHUGE
nodebug=1
CXXFLAGS="-Wno-expansion-to-defined"
case "$XBPS_TARGET_MACHINE" in
aarch64*) configure_args+=" -DUSE_LD_GOLD=0";;
esac
# Package build options
build_options="gir wayland x11 jit sampling_profiler"
build_options_default="wayland x11"
desc_option_jit="Enable JustInTime JS support"
desc_option_sampling_profiler="Toggle sampling profiler support (disabled on musl)"
case "$XBPS_TARGET_MACHINE" in
i686-musl|x86_64-musl) build_options_default+=" gir jit" ;;
ppc*-musl) ;;
mips-musl) ;;
armv[56]*-musl) ;;
*-musl) build_options_default+=" jit" ;;
armv[56]*) build_options_default+=" gir sampling_profiler" ;;
mips*) build_options_default+=" gir sampling_profiler" ;;
ppc*) build_options_default+=" gir sampling_profiler" ;;
*) build_options_default+=" gir jit sampling_profiler" ;;
esac
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"
}
}