qt5: move some tools to qt5-host-tools
+ Move lconvert, lupdate, and lrelease to qt5-host-tools + Add a subpackage qt5-quickcontrols2-devel + Enable libvpx-devel for all architectures (armv6l works again) + Drop now redundant CXXFLAGS _GLIBCXX_USE_C99_STD{IO,LIB}
This commit is contained in:
parent
5dfea97099
commit
c7a5b962cb
2 changed files with 62 additions and 35 deletions
1
srcpkgs/qt5-quickcontrols2-devel
Symbolic link
1
srcpkgs/qt5-quickcontrols2-devel
Symbolic link
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'qt5'
|
||||
pkgname=qt5
|
||||
version=5.8.0
|
||||
revision=8
|
||||
revision=9
|
||||
wrksrc="qt-everywhere-opensource-src-${version}"
|
||||
build_style=gnu-configure
|
||||
homepage="http://qt.io/"
|
||||
|
@ -20,7 +20,7 @@ makedepends="
|
|||
fontconfig-devel libXi-devel libXv-devel libXinerama-devel libXrandr-devel
|
||||
libXcursor-devel libXScrnSaver-devel dbus-devel glib-devel icu-devel
|
||||
cups-devel libjpeg-turbo-devel sqlite-devel alsa-lib-devel tiff-devel
|
||||
libmng-devel libevent-devel ffmpeg-devel jsoncpp-devel
|
||||
libmng-devel libevent-devel ffmpeg-devel libvpx-devel jsoncpp-devel
|
||||
libsrtp-devel protobuf-devel snappy-devel minizip-devel
|
||||
libxshmfence-devel libSM-devel xcb-util-keysyms-devel
|
||||
xcb-util-image-devel xcb-util-renderutil-devel xcb-util-wm-devel
|
||||
|
@ -35,23 +35,14 @@ replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0
|
|||
|
||||
# Work around SSLv3_{client,server}_method missing in libressl-2.3.3
|
||||
CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG -DOPENSSL_NO_SSL3_METHOD"
|
||||
CXXFLAGS="${CFLAGS} -D_GLIBCXX_USE_C99_STDLIB=1 -D_GLIBCXX_USE_C99_STDIO=1"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
CXXFLAGS+=" -Wno-deprecated-declarations -fno-delete-null-pointer-checks"
|
||||
# Required for musl libc
|
||||
LDFLAGS="-pthread -ldl -fPIE"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv5*) # Cannot cross compile libvpx (?)
|
||||
makedepends+=" libvpx-devel"
|
||||
;;
|
||||
armv6*) # Cannot cross compile libvpx
|
||||
;;
|
||||
armv7*) # Force use of neon and enable libvpx
|
||||
CXXFLAGS+=" -mfpu=neon"
|
||||
makedepends+=" libvpx-devel"
|
||||
;;
|
||||
*) # Other architectures have libvpx (TODO: mips-* too?)
|
||||
makedepends+=" libvpx-devel"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -121,41 +112,42 @@ _install_devel() {
|
|||
}
|
||||
|
||||
_create_config() {
|
||||
local specs=${wrksrc}/qtbase/mkspecs/devices device="$1" qmake_conf
|
||||
local specs=${wrksrc}/qtbase/mkspecs/devices device="$1"
|
||||
local qmake_conf="${specs}/${device}/qmake.conf"
|
||||
|
||||
mkdir -p ${specs}/${device}
|
||||
|
||||
echo "#" > ${specs}/${device}/qmake.conf
|
||||
echo "# qmake configuration for building with $XBPS_TARGET_MACHINE" >> ${specs}/${device}/qmake.conf
|
||||
echo "#" >> ${specs}/${device}/qmake.conf
|
||||
echo >> ${specs}/${device}/qmake.conf
|
||||
echo "include(../common/linux_device_pre.conf)" >> ${specs}/${device}/qmake.conf
|
||||
echo >> ${specs}/${device}/qmake.conf
|
||||
echo "#" > ${qmake_conf}
|
||||
echo "# qmake configuration for building with $XBPS_TARGET_MACHINE" >> ${qmake_conf}
|
||||
echo "#" >> ${qmake_conf}
|
||||
echo >> ${qmake_conf}
|
||||
echo "include(../common/linux_device_pre.conf)" >> ${qmake_conf}
|
||||
echo >> ${qmake_conf}
|
||||
# Fake distro name to tell we want control
|
||||
echo "DISTRO = arch" >> ${specs}/${device}/qmake.conf
|
||||
echo "DISTRO = arch" >> ${qmake_conf}
|
||||
# Hard float on armv6, armv7, not on armv5tel
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv6*|armv7*)
|
||||
echo "DISTRO_OPTS += hard-float" >> ${specs}/${device}/qmake.conf
|
||||
echo "DISTRO_OPTS += hard-float" >> ${qmake_conf}
|
||||
;;
|
||||
esac
|
||||
echo "QMAKE_CC = ${CC}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_CXX = ${CXX}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_LINK = ${CXX}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_LINK_SHLIB = ${CXX}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_LFLAGS = ${LDFLAGS}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_CFLAGS = ${CFLAGS}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_CXXFLAGS = ${CXXFLAGS}" >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_CC = ${CC}" >> ${qmake_conf}
|
||||
echo "QMAKE_CXX = ${CXX}" >> ${qmake_conf}
|
||||
echo "QMAKE_LINK = ${CXX}" >> ${qmake_conf}
|
||||
echo "QMAKE_LINK_SHLIB = ${CXX}" >> ${qmake_conf}
|
||||
echo "QMAKE_LFLAGS = ${LDFLAGS}" >> ${qmake_conf}
|
||||
echo "QMAKE_CFLAGS = ${CFLAGS}" >> ${qmake_conf}
|
||||
echo "QMAKE_CXXFLAGS = ${CXXFLAGS}" >> ${qmake_conf}
|
||||
# FIXME: is this required?
|
||||
echo "QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2" >> ${specs}/${device}/qmake.conf
|
||||
echo >> ${specs}/${device}/qmake.conf
|
||||
echo "QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2" >> ${qmake_conf}
|
||||
echo >> ${qmake_conf}
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
arm*)
|
||||
echo "include(../common/linux_arm_device_post.conf)" >> ${specs}/${device}/qmake.conf ;;
|
||||
echo "include(../common/linux_arm_device_post.conf)" >> ${qmake_conf} ;;
|
||||
*)
|
||||
echo "include(../common/linux_device_post.conf)" >> ${specs}/${device}/qmake.conf ;;
|
||||
echo "include(../common/linux_device_post.conf)" >> ${qmake_conf} ;;
|
||||
esac
|
||||
echo "load(qt_config)" >> ${specs}/${device}/qmake.conf
|
||||
echo "load(qt_config)" >> ${qmake_conf}
|
||||
|
||||
echo '#include "../../linux-g++/qplatformdefs.h"' > ${specs}/${device}/qplatformdefs.h
|
||||
}
|
||||
|
@ -173,6 +165,7 @@ pre_configure() {
|
|||
# Do not use experimental allocator shim (incompatible with musl libc)
|
||||
sed -i qtwebengine/src/3rdparty/chromium/build/common.gypi \
|
||||
-e"s;\('use_experimental_allocator_shim%':\) 1,;\1 0,;"
|
||||
;;
|
||||
esac
|
||||
# Cross build patches
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
|
@ -197,7 +190,7 @@ pre_configure() {
|
|||
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \
|
||||
qtbase/mkspecs/common/g++-unix.conf
|
||||
fi
|
||||
sed -i qtwebengine/src/3rdparty/chromium/third_party/ffmpeg/ffmpeg.gyp \
|
||||
sed -i qtwebengine/src/3rdparty/chromium/third_party/ffmpeg/ffmpeg.gyp \
|
||||
-e "s|'use_system_ffmpeg%': 0,|'use_system_ffmpeg%': 1,|"
|
||||
}
|
||||
|
||||
|
@ -377,11 +370,19 @@ do_install() {
|
|||
make clean
|
||||
make -f Makefile.host ${makejobs}
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense ${wrksrc}/LGPL_EXCEPTION.txt
|
||||
# Remove binaries which are contained in subpackages
|
||||
for f in qscxmlc qmlmin qmllint qmlimportscanner qgltf qdoc lconvert lupdate lrelease; do
|
||||
rm -f ${DESTDIR}/usr/lib/qt5/bin/${f}
|
||||
rm -f ${DESTDIR}/usr/bin/${f}-qt5
|
||||
done
|
||||
# Symbolic links for remaining binaries
|
||||
vmkdir usr/bin
|
||||
for f in ${DESTDIR}/usr/lib/qt5/bin/*; do
|
||||
base=$(basename $f)
|
||||
base=${f##*/}
|
||||
ln -sf /usr/lib/qt5/bin/${base} ${PKGDESTDIR}/usr/bin/${base}-qt5
|
||||
done
|
||||
_cleanup_wrksrc_leak
|
||||
|
@ -554,6 +555,14 @@ qt5-quickcontrols_package() {
|
|||
}
|
||||
}
|
||||
|
||||
qt5-quickcontrols2-devel_package() {
|
||||
short_desc+=" - Quick UI controls (ver. 2; development)"
|
||||
depends="qt5-quickcontrols2-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtquickcontrols2
|
||||
}
|
||||
}
|
||||
|
||||
qt5-quickcontrols2_package() {
|
||||
short_desc+=" - Quick UI controls (ver. 2)"
|
||||
pkg_install() {
|
||||
|
@ -798,8 +807,20 @@ qt5-translations_package() {
|
|||
qt5-host-tools_package() {
|
||||
short_desc+=" - Tools required when cross compiling"
|
||||
pkg_install() {
|
||||
vmkdir usr/bin
|
||||
for f in moc rcc uic qlalr qdbuscpp2xml qdbusxml2cpp; do
|
||||
vmove usr/lib/qt5/bin/${f}
|
||||
vmove usr/bin/${f}-qt5
|
||||
done
|
||||
for f in lconvert lupdate lrelease; do
|
||||
if [ -f ${wrksrc}/target/bin/${f} ]; then
|
||||
# cross build for target
|
||||
vinstall ${wrksrc}/target/bin/${f} 755 usr/lib/qt5/bin
|
||||
else
|
||||
# build for host
|
||||
vinstall ${wrksrc}/qttools/bin/${f} 755 usr/lib/qt5/bin
|
||||
fi
|
||||
ln -sf ../lib/qt5/bin/${f} ${PKGDESTDIR}/usr/bin/${f}-qt5
|
||||
done
|
||||
}
|
||||
}
|
||||
|
@ -817,6 +838,11 @@ qt5-tools_package() {
|
|||
depends="qt5-translations desktop-file-utils hicolor-icon-theme"
|
||||
pkg_install() {
|
||||
_install_subpkg qttools
|
||||
# these are now in qt5-host-tools
|
||||
for f in lconvert lupdate lrelease; do
|
||||
rm -f ${PKGDESTDIR}/usr/lib/qt5/bin/${f}
|
||||
rm -f ${PKGDESTDIR}/usr/bin/${f}-qt5
|
||||
done
|
||||
# install missing icons and desktop files
|
||||
for icon in ${wrksrc}/qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
|
||||
size=$(echo $(basename ${icon}) | cut -d- -f2)
|
||||
|
|
Loading…
Reference in a new issue