diff options
author | João Figueiredo | 2021-08-31 01:13:13 +0100 |
---|---|---|
committer | João Figueiredo | 2021-08-31 01:13:13 +0100 |
commit | 393d266f06b56fc20f800d1ce57a464d232caba0 (patch) | |
tree | a78d00937f8a3f9d9f0136918803c871f6d99a34 | |
parent | 67676a31345ddc15526bec9ef45284dff7d72368 (diff) | |
download | aur-393d266f06b56fc20f800d1ce57a464d232caba0.tar.gz |
Qt without KDE patches
-rw-r--r-- | PKGBUILD | 111 | ||||
-rw-r--r-- | qt5-base-cflags.patch | 46 | ||||
-rw-r--r-- | qt5-base-nostrip.patch | 13 | ||||
-rw-r--r-- | qt5-qtbase-gcc11.patch | 67 | ||||
-rw-r--r-- | qtbase-QTBUG-89977.patch | 11 | ||||
-rw-r--r-- | qtbase-QTBUG-90395.patch | 23 | ||||
-rw-r--r-- | qtbase-QTBUG-91909.patch | 31 |
7 files changed, 261 insertions, 41 deletions
@@ -1,22 +1,25 @@ -# Maintainer: Valentin Hăloiu <vially.ichb+aur@gmail.com> +# Merged with official ABS qt5-base PKGBUILD by João, 2021/08/30 (all respective contributors apply herein) +# Maintainer: João Figueiredo & chaotic-aur <islandc0der@chaotic.cx> +# Contributor: Valentin Hăloiu <vially.ichb+aur@gmail.com> # Contributor: Riley Trautman <asonix.dev@gmail.com> # Contributor: Jerome Leclanche <jerome@leclan.ch> # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> -_pkgname=qt5-base -pkgname=$_pkgname-git -pkgver=5.15.0.beta1.r69.gfbebc93617 +pkgbase=qt5-base-git +pkgname=(qt5-base-git qt5-xcb-private-headers-git) +pkgver=5.15.2_r43754.g40143c189b pkgrel=1 -arch=("i686" "x86_64") -url='https://qt-project.org/' -license=('GPL3' 'LGPL3' 'FDL' 'custom') -pkgdesc="A cross-platform application and UI framework" -depends=('libjpeg-turbo' 'xcb-util-keysyms' 'xcb-util-renderutil' 'libgl' 'fontconfig' 'xdg-utils' - 'shared-mime-info' 'xcb-util-wm' 'libxrender' 'libxi' 'sqlite' 'xcb-util-image' 'mesa' - 'tslib' 'libinput' 'libxkbcommon-x11' 'libproxy' 'libcups' 'double-conversion' 'md4c') -makedepends=('libfbclient' 'mariadb-libs' 'sqlite' 'unixodbc' 'postgresql-libs' 'alsa-lib' 'gst-plugins-base-libs' - 'gtk3' 'libpulse' 'cups' 'freetds' 'vulkan-headers' 'git') +arch=($CARCH) +url='https://www.qt.io' +license=(GPL3 LGPL3 FDL custom) +pkgdesc='A cross-platform application and UI framework' +depends=(libjpeg-turbo xcb-util-keysyms xcb-util-renderutil libgl fontconfig xdg-utils + shared-mime-info xcb-util-wm libxrender libxi sqlite xcb-util-image mesa + tslib libinput libxkbcommon-x11 libproxy libcups double-conversion md4c) +makedepends=(git libfbclient mariadb-libs unixodbc postgresql-libs alsa-lib gst-plugins-base-libs + gtk3 libpulse cups freetds vulkan-headers) +conflicts=(qtchooser{,-git}) optdepends=('qt5-svg: to use SVG icon themes' 'qt5-wayland: to run Qt applications in a Wayland session' 'qt5-translations: for some native UI translations' @@ -27,37 +30,37 @@ optdepends=('qt5-svg: to use SVG icon themes' 'freetds: MS SQL driver' 'gtk3: GTK platform plugin' 'perl: for fixqt4headers and syncqt') -provides=("$_pkgname") -conflicts=("$_pkgname" "qtchooser") -source=("$_pkgname::git://code.qt.io/qt/qtbase.git#branch=5.15") - -sha256sums=('SKIP') +groups=(qt-git qt5-git) +source=("git+https://github.com/qt/qtbase.git" qt5-base-cflags.patch qt5-base-nostrip.patch qt5-qtbase-gcc11.patch qtbase-QTBUG-89977.patch qtbase-QTBUG-90395.patch qtbase-QTBUG-91909.patch) +sha256sums=('SKIP' + 'cf707cd970650f8b60f8897692b36708ded9ba116723ec8fcd885576783fe85c' + '4b93f6a79039e676a56f9d6990a324a64a36f143916065973ded89adc621e094' + 'b848bafd4eb3585cab5480196afdfdcaa251f4c56f6a93c765f7668cf48471d1' + '435e44c35273e1f7f72e525996b0b93b08602fe9f83c751cb4270d8b67fbfec4' + '1651229105d419937784d1b3b04955a5504142f48de3b4f96da051a76b6833f8' + '726eccdddf6fbac3822fc6530a14d3fe3b83e671ca35563b4c2fa4f6644214a3') pkgver() { - cd "$srcdir/$_pkgname" - git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + cd qtbase + echo "5.15.2_r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" } prepare() { - cd "$srcdir/$_pkgname" - - sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/gcc-base.conf - - # Build qmake using Arch {C,LD}FLAGS - # This also sets default {C,CXX,LD}FLAGS for projects built using qmake - sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CFLAGS}|" \ - mkspecs/common/gcc-base.conf - sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \ - mkspecs/common/g++-unix.conf + cd qtbase + git checkout ${pkgver%%_*} - # Use python2 for Python 2.x - find . -name '*.py' -exec sed -i \ - 's|#![ ]*/usr/bin/python$|&2|;s|#![ ]*/usr/bin/env python$|&2|' {} + + patch -p1 < ../qt5-base-cflags.patch # Use system CFLAGS in qmake + patch -p1 < ../qt5-base-nostrip.patch # Don't strip binaries with qmake + + ## Fedora patches for gcc11 support + patch -p1 < ../qt5-qtbase-gcc11.patch + patch -p1 < ../qtbase-QTBUG-89977.patch + patch -p1 < ../qtbase-QTBUG-90395.patch + patch -p1 < ../qtbase-QTBUG-91909.patch } build() { - cd "$srcdir/$_pkgname" - + cd qtbase ./configure -confirm-license -opensource -v \ -prefix /usr \ -docdir /usr/share/doc/qt \ @@ -71,22 +74,48 @@ build() { -openssl-linked \ -nomake examples \ -no-rpath \ - -optimized-qmake \ -dbus-linked \ -system-harfbuzz \ -journald \ + -no-mimetype-database \ -no-use-gold-linker \ - -reduce-relocations # -no-mimetype-database + -reduce-relocations \ + -no-strip make } -package() { - cd "$srcdir/$_pkgname" - make INSTALL_ROOT="$pkgdir" install +package_qt5-base-git() { + pkgdesc='A cross-platform application and UI framework' + conflicts=(qt5-base) + provides=(qt5-base) + + cd qtbase + make INSTALL_ROOT="${pkgdir}" install - install -Dm644 LICENSE* -t "${pkgdir}"/usr/share/licenses/${pkgname} + install -Dm644 LICENSE* -t "$pkgdir"/usr/share/licenses/${pkgbase%-git} # Drop QMAKE_PRL_BUILD_DIR because reference the build dir find "${pkgdir}/usr/lib" -type f -name '*.prl' \ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + # Fix wrong qmake path in pri file + sed -i "s|${srcdir}/qtbase|/usr|" \ + "${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri + + # Symlinks for backwards compatibility + for b in "${pkgdir}"/usr/bin/*; do + ln -s $(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5 + done +} + +package_qt5-xcb-private-headers-git() { + pkgdesc='Private headers for Qt5 Xcb' + + depends=("qt5-base-git=$pkgver") + conflicts=(qt5-xcb-private-headers) + provides=(qt5-xcb-private-headers) + + cd qtbase + install -d -m755 "$pkgdir"/usr/include/qtxcb-private + cp -r src/plugins/platforms/xcb/*.h "$pkgdir"/usr/include/qtxcb-private/ } diff --git a/qt5-base-cflags.patch b/qt5-base-cflags.patch new file mode 100644 index 000000000000..c33aa78e7e93 --- /dev/null +++ b/qt5-base-cflags.patch @@ -0,0 +1,46 @@ +diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf +index a493cd5984..41342f5020 100644 +--- a/mkspecs/common/g++-unix.conf ++++ b/mkspecs/common/g++-unix.conf +@@ -10,5 +10,6 @@ + + include(g++-base.conf) + +-QMAKE_LFLAGS_RELEASE += -Wl,-O1 ++SYSTEM_LDFLAGS = $$(LDFLAGS) ++!isEmpty(SYSTEM_LDFLAGS) { eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS)) } else { QMAKE_LFLAGS_RELEASE += -Wl,-O1 } + QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index 1f919d270a..7ef6046326 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf +@@ -40,9 +40,11 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os + QMAKE_CFLAGS_DEPS += -M + QMAKE_CFLAGS_WARN_ON += -Wall -Wextra + QMAKE_CFLAGS_WARN_OFF += -w +-QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE +-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g +-QMAKE_CFLAGS_DEBUG += -g ++SYSTEM_CFLAGS = $$(CFLAGS) ++SYSTEM_DEBUG_CFLAGS = $$(DEBUG_CFLAGS) ++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE += $$(CPPFLAGS) $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE } ++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g } ++!isEmpty(SYSTEM_DEBUG_CFLAGS) { eval(QMAKE_CFLAGS_DEBUG += $$(DEBUG_CFLAGS)) } else { QMAKE_CFLAGS_DEBUG += -g } + QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC + QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC + QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC +@@ -59,9 +61,11 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS + QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS + QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON + QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +-QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO +-QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG ++SYSTEM_CXXFLAGS = $$(CXXFLAGS) ++SYSTEM_DEBUG_CXXFLAGS = $$(DEBUG_CXXFLAGS) ++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE += $$(CPPFLAGS) $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE } ++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g } ++!isEmpty(SYSTEM_DEBUG_CXXFLAGS) { eval(QMAKE_CXXFLAGS_DEBUG += $$(DEBUG_CXXFLAGS)) } else { QMAKE_CXXFLAGS_DEBUG += -g } + QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB + QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB + QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP diff --git a/qt5-base-nostrip.patch b/qt5-base-nostrip.patch new file mode 100644 index 000000000000..17d24b4b6551 --- /dev/null +++ b/qt5-base-nostrip.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index 99d77156fd..fc840fe9f6 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf +@@ -31,6 +31,8 @@ + # you can use the manual test in tests/manual/mkspecs. + # + ++CONFIG += nostrip ++ + QMAKE_CFLAGS_OPTIMIZE = -O2 + QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 + QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og diff --git a/qt5-qtbase-gcc11.patch b/qt5-qtbase-gcc11.patch new file mode 100644 index 000000000000..bef7623727b0 --- /dev/null +++ b/qt5-qtbase-gcc11.patch @@ -0,0 +1,67 @@ +lude "qdatastream_p.h" + ++#include <limits> ++ + #if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED) + #include "qbuffer.h" + #include "qfloat16.h" +diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp +index 9a72df58..6651ee98 100644 +--- a/src/corelib/text/qbytearray.cpp ++++ b/src/corelib/text/qbytearray.cpp +@@ -39,6 +39,7 @@ + ** + ****************************************************************************/ + ++#include <limits> + #include "qbytearray.h" + #include "qbytearraymatcher.h" + #include "private/qtools_p.h" +diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp +index 72e09226..80511cb5 100644 +--- a/src/corelib/text/qbytearraymatcher.cpp ++++ b/src/corelib/text/qbytearraymatcher.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include <limits> + #include "qbytearraymatcher.h" + + #include <limits.h> +diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp +index ab3054d5..22efb3a0 100644 +--- a/src/corelib/tools/qbitarray.cpp ++++ b/src/corelib/tools/qbitarray.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include <limits> + #include "qbitarray.h" + #include <qalgorithms.h> + #include <qdatastream.h> +diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp +index fa8d21e0..cd85956d 100644 +--- a/src/corelib/tools/qcryptographichash.cpp ++++ b/src/corelib/tools/qcryptographichash.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include <limits> + #include <qcryptographichash.h> + #include <qiodevice.h> + +diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp +index e00f9d05..917ab5f9 100644 +--- a/src/gui/text/qfontengine_qpf2.cpp ++++ b/src/gui/text/qfontengine_qpf2.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include <limits> + #include "qfontengine_qpf2_p.h" + + #include <QtCore/QFile> diff --git a/qtbase-QTBUG-89977.patch b/qtbase-QTBUG-89977.patch new file mode 100644 index 000000000000..cfaac113353e --- /dev/null +++ b/qtbase-QTBUG-89977.patch @@ -0,0 +1,11 @@ +diff -up qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h +--- qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo 2020-10-27 03:02:11.000000000 -0500 ++++ qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h 2021-02-06 17:05:04.879201352 -0600 +@@ -51,6 +49,7 @@ + + #include <string> + #include <iterator> ++#include <limits> + + #ifdef truncate + #error qbytearray.h must be included before any header file that defines truncate diff --git a/qtbase-QTBUG-90395.patch b/qtbase-QTBUG-90395.patch new file mode 100644 index 000000000000..cc4bb6ee994f --- /dev/null +++ b/qtbase-QTBUG-90395.patch @@ -0,0 +1,23 @@ +diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h +--- qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 2020-10-27 03:02:11.000000000 -0500 ++++ qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h 2021-02-06 16:36:27.072105717 -0600 +@@ -44,6 +44,8 @@ + #include <QtCore/qfloat16.h> + #include <QtCore/qglobal.h> + ++#include <limits> ++ + // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems + #include <stdlib.h> + #include <string.h> +diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h +--- qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 2021-02-06 16:36:27.074105730 -0600 ++++ qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h 2021-02-06 16:37:19.212440114 -0600 +@@ -43,6 +43,7 @@ + + #include <QtCore/qglobal.h> + #include <QtCore/qmetatype.h> ++#include <limits> + #include <string.h> + + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) diff --git a/qtbase-QTBUG-91909.patch b/qtbase-QTBUG-91909.patch new file mode 100644 index 000000000000..dd7e18fe41f3 --- /dev/null +++ b/qtbase-QTBUG-91909.patch @@ -0,0 +1,31 @@ +From 659f7a06e91c04b239e3f4c0bcfccbe3581af1c3 Mon Sep 17 00:00:00 2001 +From: Sona Kurazyan <sona.kurazyan@qt.io> +Date: Wed, 17 Mar 2021 16:04:00 +0100 +Subject: [PATCH] Remove the unnecessary template parameter from the class specialization + +This seems to cause errors when compiling with gcc-11. Although this is +most likely a compiler bug, specifiying the template parameter type in +this case isn't necessary. + +Fixes: QTBUG-91909 +Fixes: QTBUG-90568 +Pick-to: 6.0 6.1 5.15 +Change-Id: Ib231257ccb2e16cc533f23ca5840d31e26a66d53 +Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> +--- + +diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h +index cbd8ad04..4cd5b85 100644 +--- a/src/concurrent/qtconcurrentthreadengine.h ++++ b/src/concurrent/qtconcurrentthreadengine.h +@@ -256,8 +256,8 @@ + class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void> + { + public: +- ThreadEngineStarter<void>(ThreadEngine<void> *_threadEngine) +- :ThreadEngineStarterBase<void>(_threadEngine) {} ++ ThreadEngineStarter(ThreadEngine<void> *_threadEngine) ++ : ThreadEngineStarterBase<void>(_threadEngine) {} + + void startBlocking() + { |