86 lines
2.9 KiB
Bash
86 lines
2.9 KiB
Bash
# Template file for 'webkit2gtk'
|
|
pkgname=webkit2gtk
|
|
version=2.22.7
|
|
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=4be6f7d605cd0a690fd26e8aa83b089a33ad9d419148eafcfb60580dd2af30ff
|
|
|
|
# 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"
|
|
}
|
|
}
|