void-packages/srcpkgs/qt5-webkit/template

91 lines
2.9 KiB
Bash

# Template file for 'qt5-webkit'
pkgname=qt5-webkit
version=5.212.0
revision=12
_snap=1586819898
_v=${version%.*}
wrksrc="qtwebkit-opensource-src-${_v}"
build_style=cmake
# some nasty stuff to prevent cmake from inducing buggy -O3 and default -g
configure_args="-DPORT=Qt -DUSE_LD_GOLD=OFF
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_CXX_FLAGS_DEBUG=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_C_FLAGS_DEBUG=-DNDEBUG
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG"
hostmakedepends="bison gperf perl pkg-config python qt5-qmake ruby"
makedepends="libwebp-devel libxslt-devel libXcomposite-devel sqlite-devel
libjpeg-turbo-devel gst-plugins-base1-devel qt5-declarative-devel
qt5-location-devel qt5-sensors-devel qt5-webchannel-devel hyphen-devel
ruby-devel"
short_desc="Cross-platform application and UI framework (Qt5) - WebKit2 component"
maintainer="q66 <daniel@octaforge.org>"
license="LGPL-2.1-or-later"
homepage="https://www.qt.io/"
distfiles="https://download.qt.io/snapshots/ci/qtwebkit/${_v}/${_snap}/src/submodules/qtwebkit-opensource-src-${_v}.tar.xz"
checksum=9a6ed083154c7ec850081102b299afa928ca7e48bbdf2b5f3ae152425e46eb17
CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include"
CXXFLAGS="-fpermissive -Wno-class-memaccess -Wno-redundant-move -Wno-deprecated-copy"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools qt5-declarative-devel ruby-devel"
configure_args+=" -DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/ruby-*"
fi
# only a few platform support JIT
case "$XBPS_TARGET_MACHINE" in
armv[67]*|aarch64*|i686*|x86_64*) ;;
*) configure_args+=" -DENABLE_JIT=OFF" ;;
esac
# some platforms need libatomic
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
LIBS+=" -latomic"
fi
# use system malloc on ppc64le (potential 64k page kernel)
case "$XBPS_TARGET_MACHINE" in
ppc64le*) configure_args+=" -DUSE_SYSTEM_MALLOC=ON" ;;
*) ;;
esac
pre_configure() {
# work around large debug symbols on 32-bit hosts
# build on aarch64 builders does get killed for oom
if [ "$XBPS_WORDSIZE" = "32" ] || [ "$XBPS_TARGET_MACHINE" = "aarch64" ]; then
export CFLAGS="${CFLAGS/-g/-g1}"
export CXXFLAGS="${CXXFLAGS/-g/-g1}"
export LDFLAGS+=" -Wl,--no-keep-memory"
fi
# the above is not enough for 32-bit ppc and debug
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
mips*|ppc*)
export CFLAGS="${CFLAGS/-O2/-Os}"
export CXXFLAGS="${CXXFLAGS/-O2/-Os}"
;;
esac
if [ "$CROSS_BUILD" ]; then
# XXX: disable failing check for private headers and assume they are available
sed -i Source/cmake/OptionsQt.cmake \
-e 's;check_cxx_source_compiles("${INCLUDE_TEST_SOURCE}" \(Qt5${_qt_component}_PRIVATE_HEADER_FOUND\));set(\1 1);'
fi
}
qt5-webkit-devel_package() {
short_desc+=" (development)"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove usr/lib/qt5/mkspecs
}
}