# O3DE uses a FORKED Qt 5.15.1 with custom patches for high-DPI scaling, # performance, and platform fixes. Only qtbase and qtimageformats are # actually forked (from o3de/qtbase and o3de/qtimageformats); the other # modules (qtgraphicaleffects, qtsvg, qttools, qtx11extras, qtwayland) are # upstream Qt 5.15.1. # # Installs to /opt/o3de/qt5 to avoid conflicting with system Qt5 packages # (qt5-qtbase, qt5-qttools, etc.). # # Source tarball generation (recursive clone to capture submodules): # git clone --branch 5.15.1-o3de --depth 1 \ # https://github.com/o3de/qt5.git o3de-qt5-5.15.1 # cd o3de-qt5-5.15.1 # git submodule update --init --depth 1 \ # qtbase qtgraphicaleffects qtimageformats qtsvg qttools \ # qtx11extras qtwayland # find . -name '.git' -type d -exec rm -rf {} + # find . -name '.gitmodules' -delete # cd .. # tar czf o3de-qt5-5.15.1-full.tar.gz o3de-qt5-5.15.1 %global qt5_prefix /opt/o3de/qt5 # Qt modules to build, in dependency order %global qt5_modules qtgraphicaleffects qtimageformats qtsvg qttools qtx11extras Name: o3de-qt5 Version: 5.15.1 Release: 10%{?dist} Summary: Qt 5.15.1 fork for Open 3D Engine (O3DE) License: LGPL-3.0-only URL: https://github.com/o3de/qt5 Source0: o3de-qt5-%{version}-full.tar.gz # Patch from 3p-package-source: fixes O_PATH -> O_RDONLY in XDG Desktop # Portal and adds -lz to TIFF linking Source1: qt-linux.patch # Only x86_64 and aarch64 are relevant targets ExclusiveArch: x86_64 aarch64 BuildRequires: gcc-c++ BuildRequires: make BuildRequires: perl-interpreter BuildRequires: perl-English BuildRequires: python3 BuildRequires: openssl-devel BuildRequires: libtiff-devel BuildRequires: zlib-devel BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: dbus-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libEGL-devel BuildRequires: libxkbcommon-devel BuildRequires: libxkbcommon-x11-devel BuildRequires: xcb-util-devel BuildRequires: xcb-util-image-devel BuildRequires: xcb-util-keysyms-devel BuildRequires: xcb-util-renderutil-devel BuildRequires: xcb-util-wm-devel BuildRequires: xcb-util-cursor-devel BuildRequires: libXrender-devel BuildRequires: libXi-devel BuildRequires: wayland-devel BuildRequires: wayland-protocols-devel BuildRequires: libxcb-devel BuildRequires: libX11-devel BuildRequires: libdrm-devel BuildRequires: vulkan-devel BuildRequires: at-spi2-core-devel BuildRequires: libinput-devel BuildRequires: systemd-devel BuildRequires: gtk3-devel %description Qt 5.15.1 built from the O3DE (Open 3D Engine) fork. This includes custom patches for high-DPI scaling, performance, and platform fixes applied to qtbase and qtimageformats. The other modules (qtgraphicaleffects, qtsvg, qttools, qtx11extras, qtwayland) are upstream Qt 5.15.1. This package provides the shared libraries and plugins needed at runtime. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files, CMake config files, mkspecs, and development tools (moc, uic, rcc, qmake, lrelease, lupdate) for the O3DE fork of Qt 5.15.1. %prep %autosetup -n o3de-qt5-%{version} # Apply O3DE's platform patch (O_PATH -> O_RDONLY fix, -lz for TIFF) patch -p1 < %{SOURCE1} # Strip -Werror flags that break builds with newer GCC (15/16) find . -name CMakeLists.txt -o -name '*.cmake' -o -name '*.pro' -o -name '*.pri' -o -name '*.prf' | \ xargs sed -i 's/-Werror//g' # Fix cmake_minimum_required < 3.5 in all cmake files for CMake 4.x find . -name CMakeLists.txt -exec sed -i 's/cmake_minimum_required\s*(VERSION\s*[0-2]\.[0-9.]*)/cmake_minimum_required(VERSION 3.5)/Ii' {} + # GCC 15 removed transitive includes that Qt 5.15.1 relies on. # qfloat16.h, qendian.h, qbytearraymatcher.h, and others use # std::numeric_limits without including . # Fix by adding missing includes to qglobal.h (the master Qt header # included by everything) so all files get them transitively. # qglobal.h has: #include / #include / #include # Add and after sed -i '/# include /a # include \n# include ' \ qtbase/src/corelib/global/qglobal.h %build # Suppress GCC 15 -Wtemplate-body diagnostics in qendian.h and elsewhere # that would require more invasive patches to fix properly. export CXXFLAGS="${CXXFLAGS} -Wno-template-body" # Qt5 uses its own configure system, NOT cmake. # Step 1: Configure and build qtbase pushd qtbase ./configure \ -opensource -confirm-license \ -nomake examples -nomake tests \ -no-icu \ -dbus \ -no-separate-debug-info \ -xcb -xcb-xlib \ -no-feature-linuxfb \ -no-feature-vnc \ -qt-libpng -qt-libjpeg \ -openssl \ -fontconfig \ -no-cups \ -no-glib \ -no-feature-renameat2 -no-feature-getentropy -no-feature-statx \ -c++std c++1z \ -prefix %{qt5_prefix} \ -shared \ -release %make_build popd # Step 2: Build each additional module using the freshly built qmake for mod in %{qt5_modules}; do pushd $mod ../qtbase/bin/qmake %make_build popd done # Step 3: Build qtwayland last (depends on qtbase) pushd qtwayland ../qtbase/bin/qmake %make_build popd %install # Install qtbase pushd qtbase %make_install INSTALL_ROOT=%{buildroot} popd # Install each module for mod in %{qt5_modules}; do pushd $mod %make_install INSTALL_ROOT=%{buildroot} popd done # Install qtwayland separately - the compositor module's install may fail # due to missing generated protocol headers (qt-texture-sharing), but # O3DE only needs the client QPA plugin which installs before that point. pushd qtwayland %make_install INSTALL_ROOT=%{buildroot} || true popd # Fix ambiguous python shebang that Fedora's brp-mangle-shebangs rejects sed -i '1s|#!/usr/bin/python$|#!/usr/bin/python3|' \ %{buildroot}%{qt5_prefix}/mkspecs/features/uikit/devices.py 2>/dev/null || true %files %license qtbase/LICENSE.LGPLv3 %dir %{qt5_prefix} %dir %{qt5_prefix}/bin %dir %{qt5_prefix}/lib %{qt5_prefix}/lib/libQt5*.so.* %{qt5_prefix}/lib/lib*.a %{qt5_prefix}/plugins/ %files devel %{qt5_prefix}/include/ %{qt5_prefix}/lib/libQt5*.so %{qt5_prefix}/lib/cmake/ %{qt5_prefix}/lib/pkgconfig/ %{qt5_prefix}/lib/*.prl %{qt5_prefix}/lib/metatypes/ %{qt5_prefix}/mkspecs/ %{qt5_prefix}/doc/ %{qt5_prefix}/phrasebooks/ # All binaries are development tools (moc, uic, rcc, qmake, etc.) %{qt5_prefix}/bin/* %changelog * Thu Feb 12 2026 O3DE Package Maintainers - 5.15.1-7 - Ignore qtwayland compositor install errors (missing qt-texture-sharing protocol header; O3DE only needs the client QPA plugin) - Remove -system-tiff (tiff is handled by qtimageformats, not qtbase) * Thu Feb 12 2026 O3DE Package Maintainers - 5.15.1-5 - Fix configure options: use -no-feature-{vnc,linuxfb,renameat2,getentropy,statx} syntax (shortcut forms not available in Qt 5.15.1) - Fix GCC 15 missing transitive includes: add #include and #include to qglobal.h (the master Qt header) - Suppress -Wtemplate-body diagnostics via CXXFLAGS - Add perl-English BuildRequires (split from perl-interpreter in Fedora 43) * Thu Feb 12 2026 O3DE Package Maintainers - 5.15.1-1 - Initial package of O3DE's forked Qt 5.15.1 - Builds qtbase, qtgraphicaleffects, qtimageformats, qtsvg, qttools, qtx11extras, qtwayland - Installs to /opt/o3de/qt5 to avoid conflicts with system Qt5 - Includes O3DE's custom patches for high-DPI scaling and platform fixes