void-packages/srcpkgs/qt5-webview/template

58 lines
2.1 KiB
Bash
Raw Normal View History

# Template file for 'qt5-webview'
pkgname=qt5-webview
version=5.14.2
2020-04-03 16:47:12 +00:00
revision=2
wrksrc="qtwebview-everywhere-src-${version}"
build_style=qmake
hostmakedepends="qt5-qmake perl qt5-declarative-devel"
makedepends="qt5-location-devel qt5-webchannel-devel qt5-tools-devel qt5-declarative-devel
$(vopt_if webengine qt5-webengine-devel)"
short_desc="Cross-platform application and UI framework (QT5) - WebEngine component"
maintainer="John <johnz@posteo.net>"
license="GPL-3.0-or-later, LGPL-3.0-or-later"
homepage="https://qt.io/"
distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebview-everywhere-src-${version}.tar.xz"
checksum=c61f9213ee84fd7408898c0194468208ffb51af9d257e87e6b53daf24f65ff4b
2020-04-03 16:47:12 +00:00
build_options="webengine"
if [ "$XBPS_TARGET_ENDIAN" = "le" ] && [ "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
2020-04-03 16:47:12 +00:00
build_options_default="webengine"
fi
_cleanup_wrksrc_leak() {
if [ -d "${PKGDESTDIR}/usr/lib/cmake" ]; then
# Replace references to ${wrksrc} in cmake files
sed -i ${PKGDESTDIR}/usr/lib/cmake/*/*.cmake \
-e "s;${wrksrc}/host;/usr/lib/qt5;g" \
-e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g"
fi
if [ -d "${PKGDESTDIR}/usr/lib/pkgconfig" ]; then
# Replace references to ${wrksrc} in pkgconfig files
sed -i ${PKGDESTDIR}/usr/lib/pkgconfig/*.pc \
-e "s;${wrksrc}/host;/usr/lib/qt5;g" \
-e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g"
fi
# Remove QMAKE_PRL_BUILD_DIR from hint files for static libraries
# and replace references to ${wrksrc}
find ${PKGDESTDIR} -iname "*.prl" -exec sed -i "{}" \
-e "/^QMAKE_PRL_BUILD_DIR/d" \
-e "s;-L${wrksrc}/qtbase/lib;-L/usr/lib;g" \;
# Replace ${wrksrc} in project include files
find ${PKGDESTDIR} -iname "*.pri" -exec sed -i "{}" \
-e "s;${wrksrc}/qtbase;/usr/lib/qt5;g" \;
}
qt5-webview-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove usr/lib/qt5/mkspecs
vmove "usr/lib/*.so"
vmove "usr/lib/*.prl"
_cleanup_wrksrc_leak
}
}