Accepting request 1251558 from KDE:Qt6

- Add patch (fixes boo#1218403):
  * 0001-Change-default-settings-for-Qt-packages.patch

OBS-URL: https://build.opensuse.org/request/show/1251558
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qt6-base?expand=0&rev=67
This commit is contained in:
Ana Guerrero 2025-03-10 16:57:53 +00:00 committed by Git OBS Bridge
commit ffb3facd0b
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,55 @@
From 7fc927ca12025a63bf063ca26046a1811313b1c2 Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Sun, 9 Mar 2025 10:27:34 +0100
Subject: [PATCH] Change default settings for Qt packages
- Install examples sources by default
- Enable QT_SKIP_AUTO_PLUGIN_INCLUSION and QT_SKIP_AUTO_QML_PLUGIN_INCLUSION by default
This prevents having build time dependencies on plugins needlessly
---
cmake/QtBuildInternalsExtra.cmake.in | 1 +
cmake/QtPlugins.cmake.in | 2 +-
cmake/QtPostProcessHelpers.cmake | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
index 8985f81..b6eb039 100644
--- a/cmake/QtBuildInternalsExtra.cmake.in
+++ b/cmake/QtBuildInternalsExtra.cmake.in
@@ -83,6 +83,7 @@ set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
# Propagate decision of building tests and examples to other repositories.
set(QT_BUILD_TESTS @QT_BUILD_TESTS@ CACHE BOOL "Build the testing tree.")
set(QT_BUILD_EXAMPLES @QT_BUILD_EXAMPLES@ CACHE BOOL "Build Qt examples")
+set(QT_INSTALL_EXAMPLES_SOURCES @QT_INSTALL_EXAMPLES_SOURCES@ CACHE BOOL "Install Qt examples sources")
set(QT_BUILD_BENCHMARKS @QT_BUILD_BENCHMARKS@ CACHE BOOL "Build Qt Benchmarks")
set(QT_BUILD_MANUAL_TESTS @QT_BUILD_MANUAL_TESTS@ CACHE BOOL "Build Qt manual tests")
set(QT_BUILD_MINIMAL_STATIC_TESTS @QT_BUILD_MINIMAL_STATIC_TESTS@ CACHE BOOL
diff --git a/cmake/QtPlugins.cmake.in b/cmake/QtPlugins.cmake.in
index e668a4c..d086316 100644
--- a/cmake/QtPlugins.cmake.in
+++ b/cmake/QtPlugins.cmake.in
@@ -6,7 +6,7 @@ include_guard(DIRECTORY)
# Distributions should probably change this default.
if(NOT DEFINED QT_SKIP_AUTO_PLUGIN_INCLUSION)
- set(QT_SKIP_AUTO_PLUGIN_INCLUSION OFF)
+ set(QT_SKIP_AUTO_PLUGIN_INCLUSION ON)
endif()
if(NOT QT_NO_CREATE_TARGETS AND NOT QT_SKIP_AUTO_PLUGIN_INCLUSION)
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 6ecb0c4..6fd8e75 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -507,7 +507,7 @@ function(qt_internal_create_plugins_auto_inclusion_files)
# Distributions should probably change this default.
if(NOT DEFINED QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
- set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION OFF)
+ set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION ON)
endif()
set(__qt_qml_plugins_config_file_list \"\")
--
2.48.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Mar 9 09:28:39 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Add patch (fixes boo#1218403):
* 0001-Change-default-settings-for-Qt-packages.patch
-------------------------------------------------------------------
Thu Feb 6 13:44:48 UTC 2025 - Christophe Marin <christophe@krop.fr>

View File

@ -53,6 +53,8 @@ Patch100: 0001-CMake-Install-objects-files-into-ARCHDATADIR.patch
Patch101: 0001-Use-newer-GCC-on-Leap.patch
%endif
Patch102: 0001-Don-t-strip-binaries-when-building-with-qmake.patch
# Change a couple default build system settings
Patch103: 0001-Change-default-settings-for-Qt-packages.patch
##
BuildRequires: cmake >= 3.18.3
BuildRequires: cups-devel
@ -785,6 +787,7 @@ sed -i '/zstd CONFIG/d' cmake/FindWrapZSTD.cmake
-DBUILD_WITH_PCH:BOOL=FALSE \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DQT_BUILD_EXAMPLES:BOOL=TRUE \
-DQT_INSTALL_EXAMPLES_SOURCES:BOOL=TRUE \
-DQT_BUILD_TESTS:BOOL=FALSE \
-DQT_CREATE_VERSIONED_HARD_LINK:BOOL=FALSE \
-DQT_DISABLE_RPATH:BOOL=FALSE \
@ -850,6 +853,10 @@ rm %{buildroot}%{_qt6_descriptionsdir}/ExamplesAssetDownloaderPrivate.json
rm %{buildroot}%{_qt6_libdir}/libQt6ExamplesAssetDownloader.*
rm %{buildroot}%{_qt6_metatypesdir}/qt6examplesassetdownloaderprivate_*_metatypes.json
# E: env-script-interpreter
sed -i 's#!/bin/env python3#!/usr/bin/python3#' %{buildroot}%{_qt6_examplesdir}/corelib/serialization/cbordump/cbortag.py
%ldconfig_scriptlets -n libQt6Concurrent6
%ldconfig_scriptlets -n libQt6Core6
%ldconfig_scriptlets -n libQt6DBus6