[notify] qt5: major path changes, pkgrm qt5 before installing this one!

This commit is contained in:
Danny Rawlins 2016-10-02 20:50:35 +11:00
parent 56da0e31e1
commit 4741b23f51
5 changed files with 8848 additions and 8145 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,6 @@
63ec6b584757eef8cd713e4958297251 qt-everywhere-opensource-src-5.7.0.tar.xz
67165bacd3231b57d7b7db1e6bcb7d89 qt5-logo.png
646aea77ca90031c453a65ef61db55f9 qtbug-49452.patch
462f079cd46f869def6858903a718bf5 qtbug-53071.patch
da4fd787ea877516397a027412e975e1 qtbug-53071b.patch
981255fb1aea0d3c0b5c5f306fe374da qtbug-53237.patch

View File

@ -1,16 +1,18 @@
# Description: Qt Free Edition, version 5.x
# URL: http://qt-project.org/
# Description: Qt Free Edition, version 5.x.
# URL: http://www.qt.io/
# Maintainer: Danny Rawlins, crux at romster dot me
# Packager: predrag ivanovic, predivan at open dot telekom dot rs
# Depends on: dbus eudev mesa3d xorg-libxi xorg-libxrender xorg-xcb-util-image xorg-xcb-util-keysyms xorg-xcb-util-wm
# Depends on: dbus gdk-pixbuf gst-plugins-base libepoxy libmng mtdev xorg-libxcomposite xorg-libxcursor xorg-libxi xorg-libxinerama xorg-libxrandr xorg-xcb-util-image xorg-xcb-util-keysyms xorg-xcb-util-wm
name=qt5
version=5.7.0
release=2
source=(http://download.qt.io/official_releases/qt/${version%.*}/$version/single/qt-everywhere-opensource-src-$version.tar.xz
release=3
source=(http://download.qt.io/official_releases/qt/${version::3}/$version/single/qt-everywhere-opensource-src-$version.tar.xz
qt5-logo.png
qtbug-53071.patch
qtbug-53071b.patch
qtbug-53237.patch)
qtbug-53237.patch
qtbug-49452.patch)
build() {
cd qt-everywhere-opensource-src-$version
@ -22,92 +24,155 @@ build() {
# Fix UNSIGNED values in QMYSQL
patch -p1 -d qtbase -i $SRC/qtbug-53237.patch
# Fix freetype engine performance
patch -p1 -d qtbase -i $SRC/qtbug-49452.patch
# Respect system CXX
[ "$CXX" ] || CXX=g++
sed -i "/^QMAKE_CXX\s/s|=.*|= $CXX|" qtbase/mkspecs/common/g++-base.conf
sed -i "/^QMAKE_CXX\s/s|=.*|= $CXX|" qtbase/mkspecs/common/g++-base.conf
# Remove obsolete xorg path
sed -i 's|X11R6/||g' qtbase/mkspecs/*/*.conf
# Respect system CXXFLAGS
sed -i "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CXXFLAGS}|" qtbase/mkspecs/common/gcc-base.conf
#sed -i "s|-O2|$CXXFLAGS|" qtbase/mkspecs/common/g++-unix.conf
#sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
sed -i "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CXXFLAGS}|" \
qtbase/mkspecs/common/gcc-base.conf
# Respect system LDFLAGS
sed -i "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" qtbase/mkspecs/common/g++-unix.conf
#sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" qtbase/mkspecs/common/gcc-base.conf
sed -i "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \
qtbase/mkspecs/common/g++-unix.conf
# Fix quoting bug
sed -i 's|"$COMPILER" -c|$COMPILER -c|' qtbase/config.tests/unix/fvisibility.test
sed -i 's|"$COMPILER" -c|$COMPILER -c|' \
qtbase/config.tests/unix/fvisibility.test
export QTDIR="$PWD"
export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins"
./configure \
-prefix /usr/share/qt5 \
-bindir /usr/share/qt5/bin \
-headerdir /usr/share/qt5/include \
-libdir /usr/share/qt5/lib \
-libexecdir /usr/share/qt5/lib \
-plugindir /usr/share/qt5/plugins \
-prefix /usr/ \
-archdatadir /usr/lib/qt5 \
-bindir /usr/lib/qt5/bin \
-datadir /usr/share/qt5 \
-docdir /usr/share/doc/qt5-$version \
-examplesdir /usr/share/doc/qt5-$version/examples \
-headerdir /usr/include/qt5 \
-libdir /usr/lib \
-sysconfdir /usr/etc/xdg \
-openssl-linked -dbus-linked \
-no-cups -optimized-qmake \
-nomake examples \
-skip qtwebengine \
-qt-xkbcommon-x11 \
-opengl desktop \
-confirm-license \
-dbus-linked \
-no-cups \
-no-egl \
-no-separate-debug-info -no-strip -shared -no-rpath \
-opensource -confirm-license -release -reduce-relocations
-nomake examples \
-no-pch \
-no-rpath \
-no-separate-debug-info \
-no-strip \
-opengl desktop \
-opensource \
-openssl-linked \
-optimized-qmake \
-qt-xkbcommon-x11 \
-reduce-relocations \
-release \
-shared \
-skip qtwebengine
make
make INSTALL_ROOT=$PKG install
make -j1 INSTALL_ROOT=$PKG install
# Fix paths
find $PKG/usr/share/qt5/lib -type f -name '*.prl' \
find $PKG/usr/lib/ -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
sed -e "s|$PWD/qtbase|/usr/share/qt5/lib|g" \
-i $PKG/usr/share/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
sed -e "s|$PWD/qtbase|/usr/lib/qt5|g" \
-i $PKG/usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
# Remove unnecessary files
rm -rf $(find $PKG/usr/share/qt5/mkspecs/* | \
egrep -v '(linux-g++|common|modules|pri|features)')
rm -f $PKG/usr/share/qt5/mkspecs/linux-g++/linux-g++
rm -rf $PKG/usr/share/qt5/mkspecs/features/{mac,win32}
rm -rf $PKG/usr/share/qt5/mkspecs/common/mac*
rm -rf $PKG/usr/share/qt5/{phrasebooks,translations}
# Install linker config
install -d $PKG/{etc/ld.so.conf.d,usr/{bin,lib,include}}
echo "/usr/share/qt5/lib" > $PKG/etc/ld.so.conf.d/qt5.conf
ln -s ../share/qt5/include $PKG/usr/include/qt5
ln -s ../share/qt5/lib $PKG/usr/lib/qt5
ln -s linux-g++ $PKG/usr/share/qt5/mkspecs/default
# Install pkg config
mv $PKG/usr/share/qt5/lib/pkgconfig $PKG/usr/lib
# Fix paths
sed \
-e "s|-L$SRC/qt-everywhere-opensource-src-$version/lib ||g" \
-e "s|$SRC/qt-everywhere-opensource-src-$version/bin|/usr/share/qt5/bin|g" \
-i $PKG/usr/lib/pkgconfig/*.pc
rm -r $PKG/usr/share/doc
# Install useful symlinks
install -d $PKG/usr/bin
for b in $PKG/usr/share/qt5/bin/*; do
ln -s /usr/share/qt5/bin/$(basename $b) $PKG/usr/bin/$(basename $b)-qt5
for file in $PKG/usr/lib/qt5/bin/*; do
ln -s ../lib/qt5/bin/$(basename $file) $PKG/usr/bin/$(basename $file)-qt5
done
# cmake
install -d $PKG/usr/lib/cmake
for b in $PKG/usr/share/qt5/lib/cmake/*; do
ln -s /usr/share/qt5/lib/cmake/$(basename $b) $PKG/usr/lib/cmake/$(basename $b)
# Add menu entries for all those hidden but great Qt applications:
# # Qt5 logo:
install -d $PKG/usr/share/icons/hicolor/48x48/apps
# requires imagemagick
# convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt5-logo.png
install -m 0644 $SRC/qt5-logo.png $PKG/usr/share/icons/hicolor/48x48/apps/qt5-logo.png
# Assistant icons
install -m 0644 -D qttools/src/assistant/assistant/images/assistant.png \
$PKG/usr/share/icons/hicolor/32x32/apps/qt5-assistant.png
install -m 0644 -D qttools/src/assistant/assistant/images/assistant-128.png \
$PKG/usr/share/icons/hicolor/128x128/apps/qt5-assistant.png
# Designer icon
install -m 0644 -D qttools/src/designer/src/designer/images/designer.png \
$PKG/usr/share/icons/hicolor/128x128/apps/qt5-designer.png
# QDbusViewer icons
install -m 0644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer.png \
$PKG/usr/share/icons/hicolor/32x32/apps/qt5-qdbusviewer.png
install -m 0644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
$PKG/usr/share/icons/hicolor/128x128/apps/qt5-qdbusviewer.png
# Linguist icons
for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
size=$(echo $(basename ${icon}) | cut -d- -f2)
install -m 0644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/qt5-linguist.png
done
# And the .desktop files too:
install -d $PKG/usr/share/applications
cat <<EOF > $PKG/usr/share/applications/qt5-designer.desktop
[Desktop Entry]
Name=Qt5 Designer
GenericName=Interface Designer
Comment=Design GUIs for Qt5 applications
Exec=designer-qt5 -qt=5
Icon=qt5-designer
MimeType=application/x-designer;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;
EOF
cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop
[Desktop Entry]
Name=Qt5 Assistant
Comment=Shows Qt5 documentation and examples
Exec=assistant-qt5 -qt=5
Icon=qt5-assistant
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;
EOF
cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop
[Desktop Entry]
Name=Qt5 Linguist
Comment=Add translations to Qt5 applications
Exec=linguist-qt5 -qt=5
Icon=qt5-linguist
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;
EOF
cat <<EOF > $PKG/usr/share/applications/qt5-qdbusviewer.desktop
[Desktop Entry]
Name=Qt5 QDbusViewer
GenericName=Qt5 D-Bus Debugger
Comment=Debug D-Bus applications
Exec=qdbusviewer-qt5
Icon=qt5-qdbusviewer
Terminal=false
Type=Application
Categories=Qt;Development;Debugger;
EOF
}

BIN
qt5/qt5-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

58
qt5/qtbug-49452.patch Normal file
View File

@ -0,0 +1,58 @@
From 6f423555eba55ccdf7287071e10576bc1b687fd2 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Date: Mon, 1 Aug 2016 13:39:53 +0200
Subject: [PATCH] REG: Fix unwanted cache flush in Freetype engine
The Freetype cache was almost completely disabled by
134c6db8587a8ce156d4fa31ffa62605821851b2 because after that
change, the lockedAlphaMapForGlyph() function would no longer
cut off early for empty glyphs like spaces, but rather go
through all alpha map functions before it realized that there
was nothing to render. This would in turn invalidate the cache
for every empty glyph, causing all glyphs to be rerendered for
every isolated word.
This change adds back a cut off. This is only needed in the
lockedAlphaMapForGlyph() function, since the superclass implementation
of the other alpha map functions already contains a cut off for
width/height == 0.
[ChangeLog][Qt Gui][Text] Fixed a performance regression in Freetype
engine that was introduced in Qt 5.5.
Change-Id: I381285939909e99cc5fb5f3497fecf9fa871f29a
Task-number: QTBUG-49452
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
---
src/gui/text/qfontengine_ft.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 4de41df..7c878da 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1716,7 +1716,7 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe
static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, QFontEngine::GlyphFormat glyphFormat)
{
- if (glyph == Q_NULLPTR)
+ if (glyph == Q_NULLPTR || glyph->height == 0 || glyph->width == 0)
return QImage();
QImage::Format format = QImage::Format_Invalid;
@@ -1764,11 +1764,15 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
currentlyLockedAlphaMap = alphaMapFromGlyphData(glyph, neededFormat);
+ const bool glyphHasGeometry = glyph != Q_NULLPTR && glyph->height != 0 && glyph->width != 0;
if (!cacheEnabled && glyph != &emptyGlyph) {
currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy();
delete glyph;
}
+ if (!glyphHasGeometry)
+ return Q_NULLPTR;
+
if (currentlyLockedAlphaMap.isNull())
return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, subPixelPosition, neededFormat, t, offset);