void-packages/srcpkgs/webkit2gtk/template
Jürgen Buchmüller f7c684d305
webkit2gtk: handle i686-musl the same as i686
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-05-08 20:50:48 +02:00

89 lines
3 KiB
Bash

# Template file for 'webkit2gtk'
pkgname=webkit2gtk
version=2.24.1
revision=3
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=53cb8eaad2ca4caaae663d68331b83fd27d5bd5f6c5388d6ea3c455e338f396d
# ETOOHUGE
nodebug=1
CXXFLAGS="-Wno-expansion-to-defined"
# Package build options
build_options="gir wayland x11 jit sampling_profiler"
build_options_default="wayland x11"
case "$XBPS_TARGET_MACHINE" in
arm*-musl) # cross building hangs for hours in g-ir-scanner-qemuwrapper
broken="cross compiling from x86_64 to arm*-musl stalls the builders"
;;
*) build_options_default+=" gir"
esac
desc_option_jit="Enable JustInTime JS support"
desc_option_sampling_profiler="Toggle sampling profiler support (disabled on musl)"
case "$XBPS_TARGET_MACHINE" in
aarch64*|arm*) configure_args+=" -DUSE_LD_GOLD=0";;
i686*) CXXFLAGS+="-O2 -msse2";;
esac
# JIT conflicts with sampling_profiler
case "$XBPS_TARGET_MACHINE" in
i686*|ppc*|mips*|arm*) ;;
*-musl) build_options_default+=" jit" ;;
*) build_options_default+=" 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"
}
}