void-packages/srcpkgs/webkit2gtk/template
Jürgen Buchmüller f522b3f5f3
webkit2gtk: fix build for i686-musl (no jit)
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-03-26 14:20:40 +01:00

84 lines
2.9 KiB
Bash

# Template file for 'webkit2gtk'
pkgname=webkit2gtk
version=2.24.0
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 -DENABLE_C_LOOP=$(vopt_if jit OFF ON)
-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 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 freetype-devel libopenjpeg2-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=2e4ad1503fe482ceb5a83cf70ac9cd42f37eb718555a4d6844fe4c59a9214407
# 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)"
# JIT conflicts with sampling_profiler
case "$XBPS_TARGET_MACHINE" in
i686*) build_options_default+=" gir" ;;
x86_64-musl) build_options_default+=" gir jit" ;;
ppc*-musl|mips-musl|arm*-musl) ;;
*-musl) build_options_default+=" jit" ;;
armv*|mips*|ppc*) build_options_default+=" gir" ;;
*) 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"
}
}