summaryrefslogtreecommitdiff
path: root/libraries/qt5
diff options
context:
space:
mode:
authorDave Woodfall <dave@slackbuilds.org>2020-01-30 03:28:38 +0000
committerDave Woodfall <dave@slackbuilds.org>2020-04-05 16:23:14 +0100
commita99b46b49b93c1775ff0cca5ffa6f37838bfd809 (patch)
treeea47ccda88483d4021cd3bd7c4c476fee574029c /libraries/qt5
parentb37715ed5bffaecb16299ffccb681436a9a747f5 (diff)
downloadslackbuilds-a99b46b49b93c1775ff0cca5ffa6f37838bfd809.tar.gz
libraries/qt5: Fix QtWebEngine
Diffstat (limited to 'libraries/qt5')
-rw-r--r--libraries/qt5/README59
-rw-r--r--libraries/qt5/README.benchmarks114
-rw-r--r--libraries/qt5/qt5.SlackBuild76
3 files changed, 76 insertions, 173 deletions
diff --git a/libraries/qt5/README b/libraries/qt5/README
index c0fc3bbad5..d102803d2d 100644
--- a/libraries/qt5/README
+++ b/libraries/qt5/README
@@ -5,7 +5,9 @@ standard GUI functionality.
The following are optional dependencies that Qt will link
against if they are detected at build time:
-libwebp opus pcre2 snappy
+libwebp, opus, ffmpeg, pcre2, snappy, libminizip, jsnoncpp,
+libinput, unixODBC, postgresql, SDL2, assimp, wayland,
+OpenAL, protobuf(3?), and perhaps more.
============================================================
@@ -43,6 +45,11 @@ To NOT build qtwebengine (EXPERIMENTAL):
WEBENGINE=no ./qt5.SlackBuild
+To use the gold linker:
+
+ LDGOLD=yes ./qt5.SlackBuild
+
+This may speed up the build, but can take more RAM.
Combine any or all of the above.
@@ -54,7 +61,7 @@ After upgrading Qt5 it is important to rebuild qt5ct too, if
it is installed, or some applications may not display or
function correctly.
-There is a qt5-legacy (5.7.1) SlackBuild that is available
+There is a qt5-legacy (5.9.9) SlackBuild that is available
for older applications that do not run correctly with this
version. However it will not coexist with this version.
@@ -63,24 +70,6 @@ work correctly to the Qt5 maintainer or to the mailing list.
============================================================
-ROUGH SPEED & SIZE GUIDE
-
- OPTION PKG SPACE TIME
- Normal: 102M 5018M 9:55
- No Webengine: 50M 1895M 3:18
- With Documentation: 339M 6197M -
- With Examples: 391M 6388M -
- With Documentation and Examples: 628M 7604M -
-
- PKG: Package size.
- SPACE: Package directory + source space needed.
- TIME: Rough build time (- = unknown.)
-
-See README.benchmarks for more detailed information.
-See README.ccache for information on setting up ccache.
-
-============================================================
-
NOTES ON OPTIONS
* Using ccache should speed up subsequent rebuilds, but may
@@ -89,6 +78,20 @@ NOTES ON OPTIONS
* Building the documentation and/or examples creates a
significantly larger package.
+============================================================
+
+BUILDING WITHOUT WEBENGINE
+
+Building without webengine can speed up compilation.
+
+If you have no intention of using the browser code, which
+includes a chunk of 3rd party Google Chromium source, then
+it may make sense to skip it and save yourself about 2/3 of
+the build time.
+
+The package version has _nowebengine appended to it for
+clarity.
+
* Successfully tested so far without webengine (VERY quick
tests):
@@ -99,19 +102,3 @@ NOTES ON OPTIONS
qca-qt5
psi-plus
sddm
-
-============================================================
-
-BUILDING WITHOUT WEBENGINE
-
-See README.benchmarks for the benefits of not building
-webengine.
-
-YMMV whether it works with an application or not, but if you
-have no intention of using the browser code, which includes
-a chunk of 3rd party Google Chromium source, then it may
-make sense to skip it and save yourself about 2/3 of the
-build time.
-
-The package version has _nowebengine appended to it for
-clarity.
diff --git a/libraries/qt5/README.benchmarks b/libraries/qt5/README.benchmarks
deleted file mode 100644
index 466d6b924d..0000000000
--- a/libraries/qt5/README.benchmarks
+++ /dev/null
@@ -1,114 +0,0 @@
-ENVIRONMENT
-
- Linux 4.4.157 SMP x86_64 (stock 14.2 -huge.)
- Using /usr/bin/time rather than shell built-in.
- Jobs: 2.
- Qt version: 5.9.7
-
-DMI Info:
-
- Board: Lenovo Mahobay motherboard.
- CPU: Version: Intel(R) Pentium(R) CPU G640 @ 2.80GHz
- Family: Core i7 Core Count: 2
- Core Enabled: 2
- Thread Count: 2
- Max Speed: 2800 MHz
- Current Speed: 2800 MHz
- External Clock: 100 MHz
-
- CPUFREQ: Performance mode.
-
- RAM: 12G (1333 MHz) DDR3.
-
- An 8 GB tmpfs in /mnt/memory is used as a ramdisk for /tmp
- while the package was output on the real HDD. i.e.
- $TMP=/mnt/memory/SBo
- $OUTPUT=/tmp
-
-System ccache setup:
-
- cache size: 18.3 GB
- max_cache: 20.0 GB
- cache_dir: /root/.ccache
- CCACHE_TEMPDIR=/mnt/memory/ccache
-
-No special settings were used for Qt's -ccache.
-All builds with either ccache option were performed a few
-times to build up enough cache.
-
-BENCHMARKS
-
-BUILDS WITH WEBENGINE
-
-Normal build:
-
-45970.94 user
-2408.58 system
-9:55:02 elapsed
-135% CPU (0 avgtext + 0 avgdata 7378176 maxresident) k
-80232 inputs + 522800 outputs (263 major + 950621123 minor) pagefaults
-0 swaps
-
-Using Qt's -ccache option:
-
-36223.82 user
-1872.14 system
-6:58:03 elapsed
-151% CPU (0 avgtext + 0 avgdata 7375136 maxresident) k
-274848 inputs + 578712 outputs (730 major + 724828690 minor) pagefaults
-0 swaps
-
-Using system ccache:
-
-4008.03 user
-289.34 system
-1:17:11 elapsed
-92% CPU (0 avgtext + 0 avgdata 7377248 maxresident) k
-4396232 inputs + 391856 outputs (97 major + 59094442 minor) pagefaults
-0 swaps
-
-
-BUILDS WITHOUT WEBENGINE
-
-Normal build:
-
-10408.66 user
-687.60 system
-3:18:22 elapsed
-93% CPU (0 avgtext + 0 avgdata 3850048 maxresident) k
-48176 inputs + 414056 outputs (26 major + 265106108 minor) pagefaults
-0 swaps
-
-Using Qt's -ccache option:
-
-1055.75 user
-167.14 system
-22:17.13 elapsed
-91% CPU (0 avgtext + 0 avgdata 1188432 maxresident) k
-936 inputs + 468464 outputs (8 major + 42575851 minor) pagefaults
-0 swaps
-
-Using system ccache:
-
-922.05 user
-159.25 system
-19:42.82 elapsed
-91% CPU (0 avgtext + 0 avgdata 504048 maxresident) k
-5672 inputs + 158016 outputs (5 major + 38449127 minor) pagefaults
-0 swaps
-
-
-Average Packages Sizes:
-
-Normal: 102 MB
-Without webengine: 50 MB
-
-
-As is seen by the elapsed time in the results, using ccache
-system-wide has a huge benefit. Qt's -ccache option showed
-little gain when building the full package, but was good
-when building without webengine.
-
-See README.ccache for information on setting up ccache.
-
-Last updated Mon 10 Dec 03:46:29 UTC 2018
diff --git a/libraries/qt5/qt5.SlackBuild b/libraries/qt5/qt5.SlackBuild
index a08d3ff50a..2c95486181 100644
--- a/libraries/qt5/qt5.SlackBuild
+++ b/libraries/qt5/qt5.SlackBuild
@@ -46,10 +46,12 @@
# tailored to Qt 5. Modified by Larry Hajali.
# Adapted for Qt >= 5.9.6 by Dave Woodfall <dave@slackbuilds.org>
+# Some parts thanks to alienBOB's qt5 SlackBuild.
PRGNAM=qt5
+SRCNAM=${PRGNAM%%[[:digit:]]*}
VERSION=${VERSION:-5.12.6}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -71,10 +73,12 @@ PROPRIETARY_CODECS=${PROPRIETARY_CODECS:-no}
PULSEAUDIO=${PULSEAUDIO:-yes}
CCACHE=${CCACHE:-no}
WEBENGINE=${WEBENGINE:-yes}
+LDGOLD=${LDGOLD:-no}
[ "$EXAMPLES" = "no" ] && BUILD_EXAMPLES="-nomake examples"
[ "$PULSEAUDIO" = "no" ] && PULSE="-no-pulseaudio"
[ "$CCACHE" = "yes" ] && USE_CCACHE="-ccache"
+[ "$LDGOLD" = "no" ] && USE_LDGOLD="-no-use-gold-linker"
if [ "$WEBENGINE" = "no" ]; then
EXCLUDE="--exclude=qtweb*"
@@ -93,6 +97,7 @@ printf "%s\n" "EXAMPLES: $EXAMPLES"
printf "%s\n" "PROPRIETARY_CODECS: $PROPRIETARY_CODECS"
printf "%s\n" "PULSEAUDIO: $PULSEAUDIO"
printf "%s\n" "WEBENGINE: $WEBENGINE"
+printf "%s\n" "LDGOLD: $LDGOLD"
printf "\n"
if [ "$ARCH" = "i586" ]; then
@@ -129,9 +134,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
echo "Removing any existing source directory. Please wait..."
-rm -rf ${PRGNAM/5/}-everywhere-src-$VERSION
-tar xvf $CWD/${PRGNAM/5/}-everywhere-src-$VERSION.tar.xz $EXCLUDE
-cd ${PRGNAM/5/}-everywhere-src-$VERSION
+rm -rf $SRCNAM-everywhere-src-$VERSION
+tar xvf $CWD/$SRCNAM-everywhere-src-$VERSION.tar.xz $EXCLUDE
+cd $SRCNAM-everywhere-src-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -147,21 +152,41 @@ else
RELOCATIONS=""
fi
-# Borrowed a few things from alienBOB:
# Fix path to mysql header:
cat $CWD/patches/qt5.mysql.h.diff | patch -p1 --verbose
+# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui
+# and for it breaks KWin compilation with:
+# /usr/include/c++/9.1.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
+# See also https://bugzilla.redhat.com/1704474
+cd qtbase
+ cat $CWD/patches/qt5.qtbase_cmake_isystem_includes.patch \
+ | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+
+# CVE-2020-0569 (fixed in 5.14.0):
+cd qtbase
+ cat $CWD/patches/qt5.cve-2020-0569.patch \
+ | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+
+# CVE-2020-0570 (fixed in 5.14.1):
+cd qtbase
+ cat $CWD/patches/qt5.cve-2020-0570.patch \
+ | patch -p1 --verbose || exit 1
+cd - 1>/dev/null
+
# Fix missing private includes: QTBUG-37417
sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' \
-i qtbase/mkspecs/features/create_cmake.prf
-# Borrowed from alienBOB
# Use our custom compiler and linker flags:
sed -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${SLKCFLAGS}|" \
-i qtbase/mkspecs/common/gcc-base.conf || exit 1
sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${SLKLDFLAGS}|" \
-i qtbase/mkspecs/common/g++-unix.conf || exit 1
+export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS -std=c++14"
export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
export QTDIR="${TMP}/qt-everywhere-src-$VERSION"
@@ -176,6 +201,7 @@ export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
-headerdir "/usr/include/$PRGNAM" \
-libdir "/usr/lib${LIBDIRSUFFIX}" \
-docdir "/usr/doc/$PRGNAM-$VERSION" \
+ -examplesdir "/usr/doc/$PRGNAM-$VERSION/examples" \
-system-libpng \
-system-libjpeg \
-system-zlib \
@@ -194,24 +220,23 @@ export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
-no-rpath \
-no-strip \
-release \
- -no-use-gold-linker \
-c++std c++14 \
- -examplesdir "/usr/doc/$PRGNAM-$VERSION/examples" \
$USE_CCACHE \
$CODECS \
$PULSE \
$RELOCATIONS \
- $BUILD_EXAMPLES
+ $BUILD_EXAMPLES \
+ $USE_LDGOLD
-make
+make || make -j1
make install INSTALL_ROOT=$PKG
# Install documentation. Default is not to install documentation.
-if [ "$DOCS" == "yes" ]; then
+if [ "$DOCS" = "yes" ]; then
# Recreate Makefiles in order to use the just compiled qdoc.
- for doc in $(find . -name "Makefile*" | xargs egrep "^\s/usr/lib${LIBDIRSUFFIX}/qt5/bin/" \
- | cut -d':' -f1 | uniq)
- do
+ for doc in $(find . -name "Makefile*" \
+ | xargs egrep "^\s/usr/lib${LIBDIRSUFFIX}/qt5/bin/" | cut -d':' -f1 \
+ | uniq); do
rm -fv $doc
done
make docs
@@ -221,7 +246,12 @@ fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-ln -s $PRGNAM $PKG/usr/lib${LIBDIRSUFFIX}/qt-$VERSION
+# Remove rpaths:
+for file in $(find . | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f1 -d: 2>/dev/null); do
+ if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
+ patchelf --remove-rpath $file
+ fi
+done
mkdir -p $PKG/usr/bin
for BIN in $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/bin/*; do
@@ -267,26 +297,22 @@ Description: Qt5 Configuration
Version: $VERSION
EOF
+# Fix internal linking for Qt5WebEngineCore.pc.
if [ "$WEBENGINE" = "yes" ]; then
- # Fix internal linking for Qt5WebEngineCore.pc.
sed -i \
-e 's|-Wl,--start-group.* -Wl,--end-group||' \
-e "s|-L${PWD}/qtwebengine/src/core/api/Release||" \
$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebEngineCore.pc
fi
-# While we are at it, there isn't any reason to keep references to $PKG in the *.prl files.
-for PRL in $(find $PKG -name "*\.prl"); do
- sed -i '/^QMAKE_PRL_BUILD_DIR/d' $PRL
-done
+# Fix the path in prl files:
+find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
# One more for the road.
sed -i "s|$PWD/qtbase|/usr/lib${LIBDIRSUFFIX}/$PRGNAM|" \
$PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/mkspecs/modules/qt_lib_bootstrap_private.pri
-#sed -i "s|-L${PWD}/\w*/lib ||g" \
-# $PKG/usr/lib${LIBDIRSUFFIX}/libqgsttools_p.prl
-
for i in $CWD/desktop/*.desktop; do
install -D -m 0644 $i $PKG/usr/share/applications/$(basename $i)
done
@@ -306,6 +332,10 @@ done
# Remove executable bits from files.
find $PKG \( -name "*.qml" -o -name "*.app" \) -perm 755 -exec chmod 644 '{}' \;
+# Add missing verions info
+sed -i "s,set(PACKAGE_VERSION ),set(PACKAGE_VERSION $VERSION)," \
+ $PKG/usr/lib$LIBDIRSUFFIX/cmake/Qt5/Qt5ConfigVersion.cmake
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
README qtbase/{header*,LICENSE*} \