qt5: fix cross builds

Closes: #11719
This commit is contained in:
Jürgen Buchmüller 2018-02-18 13:00:09 +01:00
parent e8e045529e
commit 813ac8c888
1 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'qt5'
pkgname=qt5
version=5.10.1
revision=2
revision=3
wrksrc="qt-everywhere-src-${version}"
build_style=gnu-configure
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja"
@ -111,6 +111,18 @@ _install_devel() {
_cleanup_wrksrc_leak
}
_move_target_binaries() {
local f
[ -z "$CROSS_BUILD" ] && return 0
vmkdir usr/lib/qt5/bin
for f in $@; do
if [ -f ${DESTDIR}/usr/lib/qt5/bin/${f}-target ]; then
mv -v ${DESTDIR}/usr/lib/qt5/bin/${f}-target \
${PKGDESTDIR}/usr/lib/qt5/bin/${f}
fi
done
}
_create_config() {
local specs=${wrksrc}/qtbase/mkspecs/devices device="$1"
local qmake_conf="${specs}/${device}/qmake.conf"
@ -484,6 +496,7 @@ qt5-3d-devel_package() {
depends="qt5-3d-${version}_${revision} qt5-devel-${version}_${revision}"
pkg_install() {
_install_devel qt3d
_move_target_binaries qgltf
}
}
@ -548,7 +561,7 @@ qt5-datavis3d_package() {
qt5-declarative-devel_package() {
short_desc+=" - Declarative component (development)"
depends="qt5-declarative-${version}_${revision}"
depends="qt5-declarative-${version}_${revision} qt5-devel-${version}_${revision}"
pkg_install() {
_install_devel qtdeclarative
}
@ -558,6 +571,7 @@ qt5-declarative_package() {
short_desc+=" - Declarative component"
pkg_install() {
_install_subpkg qtdeclarative
_move_target_binaries qmlmin qmllint qmlimportscanner
}
}
@ -704,6 +718,7 @@ qt5-remoteobjects_package() {
short_desc+=" - Remote Objects"
pkg_install() {
_install_subpkg qtremoteobjects
_move_target_binaries repc
}
}
@ -734,6 +749,7 @@ qt5-scxml_package() {
short_desc+=" - SCXML model integration"
pkg_install() {
_install_subpkg qtscxml
_move_target_binaries qscxmlc
}
}
@ -993,7 +1009,7 @@ qt5-tools_package() {
short_desc+=" - Development tools"
depends="qt5-translations desktop-file-utils hicolor-icon-theme"
pkg_install() {
local dest=${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/qt5-host-tools-${version}
local f dest=${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/qt5-host-tools-${version}
_install_subpkg qttools
# install missing icons and desktop files
for icon in ${wrksrc}/qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
@ -1014,6 +1030,7 @@ qt5-tools_package() {
# install desktop files
vmkdir usr/share/applications
install -m644 ${FILESDIR}/*.desktop ${PKGDESTDIR}/usr/share/applications
_move_target_binaries qtattributionsscanner qdoc
# Move some binaries to qt5-host-tools
for f in lconvert lupdate lrelease; do
if [ -f ${PKGDESTDIR}/usr/lib/qt5/bin/${f} ]; then