commit 295b56b7891ff1772f1950a32044850475a910b5 Author: Tim Biermann <tbier@posteo.de> Date: Wed Aug 23 07:02:03 2023 +0200 qt5: updated for gcc 13 diff --git a/qt5/.signature b/qt5/.signature index 97d567b5f..6753a2ce0 100644 --- a/qt5/.signature +++ b/qt5/.signature @@ -1,6 +1,6 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/cvHmtY3vnrONQCMuHdh2X3ZffQNPt8DSCx/TCnPnaHWwyObh5NoESyaFn+WR+0TttLsjTck6sJ7vZpA8QpqbgY= -SHA256 (Pkgfile) = da35d0946f4e65453d9b855723f8611a2d23cc65f07d2b675b89eefcb8ba038c +RWSE3ohX2g5d/W34p9/RLg+1u5Xxx6Kz65a4Dd+xh5bJ8QYc0RZJ8QH6tXOd9xj/vp377zVipI6R/rcmu188mSygUrD4j5SEQgg= +SHA256 (Pkgfile) = 3848ddcc5d199473eb23ead3d776e0efe7a1b1750263b01bd73db5c6f213d715 SHA256 (.footprint) = 6727647eede586bf5661eb3960d705d2271ac99f6e23f57543624810fd4fe173 SHA256 (qt-everywhere-opensource-src-5.15.10.tar.xz) = b545cb83c60934adc9a6bbd27e2af79e5013de77d46f5b9f5bb2a3c762bf55ca SHA256 (qt-everywhere-opensource-src-5.15.10-kf5-1.patch) = 39848ffa81817b251db5f122b6942362174274e670ce51443878d4012c7ebf53 diff --git a/qt5/Pkgfile b/qt5/Pkgfile index 46ce30f64..d37c1cece 100644 --- a/qt5/Pkgfile +++ b/qt5/Pkgfile @@ -8,144 +8,148 @@ name=qt5 version=5.15.10 release=1 source=(https://download.qt.io/archive/qt/5.15/$version/single/qt-everywhere-opensou... - https://www.linuxfromscratch.org/patches/blfs/svn/qt-everywhere-opensource-s... - qtbase-5.15.8-fix-missing-qtsan-include.patch - qt5-cflags.patch - qt5-logo.png - qtbase-everywhere-src-5.14.2-no_relocatable.patch - qtbase-everywhere-src-5.15.2-libglvnd.patch - qtbase-use-wayland-on-gnome.patch) + https://www.linuxfromscratch.org/patches/blfs/svn/qt-everywhere-opensource-s... + qtbase-5.15.8-fix-missing-qtsan-include.patch + qt5-cflags.patch + qt5-logo.png + qtbase-everywhere-src-5.14.2-no_relocatable.patch + qtbase-everywhere-src-5.15.2-libglvnd.patch + qtbase-use-wayland-on-gnome.patch) build() { - if [[ ! -e /usr/include/xkbcommon/xkbcommon-x11.h ]]; then - printf '\e[31m%s\e[m\n' "libxkbcommon is not built with x11 support!" - printf '\e[31m%s\e[m\n' "qtx11extras will not be built!" - printf '\e[33m%s\e[m\n' "Install xkeyboard-config and rebuild libxkbcommon if you need that" - fi - - cd qt-everywhere-src-$version - - patch -p1 -i $SRC/qt-everywhere-opensource-src-$version-kf5-1.patch - patch -d qtbase -p1 -i $SRC/qt5-cflags.patch - patch -d qtbase -p1 -i $SRC/qtbase-everywhere-src-5.14.2-no_relocatable.patch - patch -d qtbase -p1 -i $SRC/qtbase-everywhere-src-5.15.2-libglvnd.patch - patch -d qtbase -p1 -i $SRC/qtbase-use-wayland-on-gnome.patch - patch -d qtbase -p1 -i $SRC/qtbase-5.15.8-fix-missing-qtsan-include.patch - - export PYTHON='/usr/bin/python3' - mkdir $SRC/bin - ln -s /usr/bin/python3 $SRC/bin/python - export PATH="$SRC/bin:$PATH" - - export QTDIR="$PWD" - export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH" - export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins" - - prt-get isinst ccache && PKGMK_QT5+=' -ccache' && \ - PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')" - prt-get isinst assimp && PKGMK_QT5+=' -system-assimp' - #prt-get isinst clang && PKGMK_QT5+=' -platform linux-clang' - #prt-get isinst clang lld && PKGMK_QT5+=' -linker lld' || PKGMK_QT5+=' -linker gold' - - sed -i '/utility/a #include <limits>' qtbase/src/corelib/global/qglobal.h - sed -i '/string/a #include <limits>' qtbase/src/corelib/global/qfloat16.h - sed -i '/qbytearray/a #include <limits>' qtbase/src/corelib/text/qbytearraymatcher.h - sed -i '/type_traits/a #include <limits>' qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h - - #pushd qtbase/src/3rdparty - #mv freetype libjpeg libpng zlib sqlite xcb pcre2 $SRC - #prt-get isinst assimp && mv assimp $SRC - #popd - - ./configure $PKGMK_QT5 \ - -prefix /usr/ \ - -archdatadir /usr/lib/qt5 \ - -bindir /usr/lib/qt5/bin \ - -plugindir /usr/lib/qt5/plugins \ - -importdir /usr/lib/qt5/imports \ - -datadir /usr/share/qt5 \ - -docdir /usr/share/doc/qt5 \ - -translationdir /usr/share/qt5/translations \ - -examplesdir /usr/share/doc/qt5/examples \ - -headerdir /usr/include/qt5 \ - -libdir /usr/lib \ - -sysconfdir /etc/xdg \ - QMAKE_CFLAGS_RELEASE="$CFLAGS -Wno-enum-constexpr-conversion" \ - QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS -Wno-enum-constexpr-conversion" \ - QMAKE_LFLAGS_RELEASE="${LDFLAGS} -fuse-ld=gold" \ - -confirm-license \ - -opensource \ - -release \ - -dbus-linked \ - -opengl desktop \ - -openssl-linked \ - -system-harfbuzz \ - -system-libjpeg \ - -system-libpng \ - -system-pcre \ - -system-sqlite \ - -system-zlib \ - -nomake examples \ - -no-mimetype-database \ - -no-rpath \ - -no-strip \ - -no-reduce-relocations \ - -no-feature-relocatable \ - -no-pch \ - -skip qtwebengine \ - -silent - - make - make -j1 INSTALL_ROOT=$PKG install - - # Fix paths - find "$PKG/usr/lib" -type f -name '*.prl' \ - -exec sed -e '/^QMAKE_PRL_BUILD_DIR/d' -i {} \; - - sed -e "s|$PWD/qtbase|/usr/lib/qt5|g" \ - -i $PKG/usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri - - rm -r $PKG/usr/share/doc - - # Install useful symlinks - install -d $PKG/usr/bin - for file in $PKG/usr/lib/qt5/bin/*; do - ln -s ../lib/qt5/bin/$(basename $file) $PKG/usr/bin/$(basename $file)-qt5 - ln -s ../lib/qt5/bin/$(basename $file) $PKG/usr/bin/$(basename $file) - done - - # 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 + if [[ ! -e /usr/include/xkbcommon/xkbcommon-x11.h ]]; then + printf '\e[31m%s\e[m\n' "libxkbcommon is not built with x11 support!" + printf '\e[31m%s\e[m\n' "qtx11extras will not be built!" + printf '\e[33m%s\e[m\n' "Install xkeyboard-config and rebuild libxkbcommon if you need that" + fi + + cd qt-everywhere-src-$version + + patch -p1 -i $SRC/qt-everywhere-opensource-src-$version-kf5-1.patch + patch -d qtbase -p1 -i $SRC/qt5-cflags.patch + patch -d qtbase -p1 -i $SRC/qtbase-everywhere-src-5.14.2-no_relocatable.patch + patch -d qtbase -p1 -i $SRC/qtbase-everywhere-src-5.15.2-libglvnd.patch + patch -d qtbase -p1 -i $SRC/qtbase-use-wayland-on-gnome.patch + patch -d qtbase -p1 -i $SRC/qtbase-5.15.8-fix-missing-qtsan-include.patch + + export PYTHON='/usr/bin/python3' + mkdir $SRC/bin + ln -s /usr/bin/python3 $SRC/bin/python + export PATH="$SRC/bin:$PATH" + + export QTDIR="$PWD" + export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH" + export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins" + + prt-get isinst ccache && PKGMK_QT5+=' -ccache' && \ + PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')" + prt-get isinst assimp && PKGMK_QT5+=' -system-assimp' + #prt-get isinst clang && PKGMK_QT5+=' -platform linux-clang' + #prt-get isinst clang lld && PKGMK_QT5+=' -linker lld' || PKGMK_QT5+=' -linker gold' + + sed -i '/utility/a #include <limits>' qtbase/src/corelib/global/qglobal.h + sed -i '/string/a #include <limits>' qtbase/src/corelib/global/qfloat16.h + sed -i '/qbytearray/a #include <limits>' qtbase/src/corelib/text/qbytearraymatcher.h + sed -i '/type_traits/a #include <limits>' qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h + sed -e "/pragma once/a#include <cstdint>" \ + -i qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp \ + qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp \ + qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp + + #pushd qtbase/src/3rdparty + #mv freetype libjpeg libpng zlib sqlite xcb pcre2 $SRC + #prt-get isinst assimp && mv assimp $SRC + #popd + + ./configure $PKGMK_QT5 \ + -prefix /usr/ \ + -archdatadir /usr/lib/qt5 \ + -bindir /usr/lib/qt5/bin \ + -plugindir /usr/lib/qt5/plugins \ + -importdir /usr/lib/qt5/imports \ + -datadir /usr/share/qt5 \ + -docdir /usr/share/doc/qt5 \ + -translationdir /usr/share/qt5/translations \ + -examplesdir /usr/share/doc/qt5/examples \ + -headerdir /usr/include/qt5 \ + -libdir /usr/lib \ + -sysconfdir /etc/xdg \ + QMAKE_CFLAGS_RELEASE="$CFLAGS -Wno-enum-constexpr-conversion" \ + QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS -Wno-enum-constexpr-conversion" \ + QMAKE_LFLAGS_RELEASE="${LDFLAGS} -fuse-ld=gold" \ + -confirm-license \ + -opensource \ + -release \ + -dbus-linked \ + -opengl desktop \ + -openssl-linked \ + -system-harfbuzz \ + -system-libjpeg \ + -system-libpng \ + -system-pcre \ + -system-sqlite \ + -system-zlib \ + -nomake examples \ + -no-mimetype-database \ + -no-rpath \ + -no-strip \ + -no-reduce-relocations \ + -no-feature-relocatable \ + -no-pch \ + -skip qtwebengine \ + -silent + + make + make -j1 INSTALL_ROOT=$PKG install + + # Fix paths + find "$PKG/usr/lib" -type f -name '*.prl' \ + -exec sed -e '/^QMAKE_PRL_BUILD_DIR/d' -i {} \; + + sed -e "s|$PWD/qtbase|/usr/lib/qt5|g" \ + -i $PKG/usr/lib/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri + + rm -r $PKG/usr/share/doc + + # Install useful symlinks + install -d $PKG/usr/bin + for file in $PKG/usr/lib/qt5/bin/*; do + ln -s ../lib/qt5/bin/$(basename $file) $PKG/usr/bin/$(basename $file)-qt5 + ln -s ../lib/qt5/bin/$(basename $file) $PKG/usr/bin/$(basename $file) + done + + # 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 @@ -158,7 +162,7 @@ Encoding=UTF-8 Type=Application Categories=Qt;Development; EOF - cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop + cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop [Desktop Entry] Name=Qt5 Assistant Comment=Shows Qt5 documentation and examples @@ -169,7 +173,7 @@ Encoding=UTF-8 Type=Application Categories=Qt;Development;Documentation; EOF - cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop + cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop [Desktop Entry] Name=Qt5 Linguist Comment=Add translations to Qt5 applications @@ -181,7 +185,7 @@ Encoding=UTF-8 Type=Application Categories=Qt;Development; EOF - cat <<EOF > $PKG/usr/share/applications/qt5-qdbusviewer.desktop + cat <<EOF > $PKG/usr/share/applications/qt5-qdbusviewer.desktop [Desktop Entry] Name=Qt5 QDbusViewer GenericName=Qt5 D-Bus Debugger diff --git a/qt5/qtbase-everywhere-src-5.11.1-python3.patch b/qt5/qtbase-everywhere-src-5.11.1-python3.patch deleted file mode 100644 index 40dfd4790..000000000 --- a/qt5/qtbase-everywhere-src-5.11.1-python3.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py ---- qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me 2018-06-23 11:29:21.750066271 +0200 -+++ qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py 2018-06-23 11:30:07.457292033 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - - ############################################################################# - ##