public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/lazarus] multiple-IDE-widgetsets: Backport some upstream patches
@ 2026-07-23  8:18 Artur Frenszek-Iwicki
  0 siblings, 0 replies; only message in thread
From: Artur Frenszek-Iwicki @ 2026-07-23  8:18 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/lazarus
Branch : multiple-IDE-widgetsets
Commit : 6f6db655f698fce59dd64f1684c3488bdf2f1981
Author : Artur Frenszek-Iwicki <fedora@svgames.pl>
Date   : 2024-04-26T19:06:17+02:00
Stats  : +171/-33 in 6 file(s)
URL    : https://src.fedoraproject.org/rpms/lazarus/c/6f6db655f698fce59dd64f1684c3488bdf2f1981?branch=multiple-IDE-widgetsets

Log:
Backport some upstream patches

---
diff --git a/.gitignore b/.gitignore
index ce3c433..a99ef2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,8 @@
-lazarus-0.9.28-src.tar.bz2
+# Unpacked source dir
+/lazarus/
+
+# Archives
+/lazarus-0.9.28-src.tar.bz2
 /lazarus-0.9.30-src.tar.bz2
 /lazarus-0.9.30.2-src.tar.bz2
 /lazarus-0.9.30.4-src.tar.bz2

diff --git a/0001-crash-when-trying-to-recompile-packages.patch b/0001-crash-when-trying-to-recompile-packages.patch
new file mode 100644
index 0000000..92fb7bf
--- /dev/null
+++ b/0001-crash-when-trying-to-recompile-packages.patch
@@ -0,0 +1,29 @@
+Description: Fixed crash when trying to recompile packages.
+ Some packages do not need to be recompiled. There was a bug in lazbuild
+ when trying to guess package output directory in this special case.
+ Now, we just skip recompilation if it is not needed.
+Author: Abou Al Montacir <abou.almontacir@sfr.fr>
+Last-Update: Mon, 25 Dec 2023 16:02:09 +0100
+
+---
+ lazarus/packager/packagesystem.pas | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lazarus/packager/packagesystem.pas b/lazarus/packager/packagesystem.pas
+index e2c6c080..e36eefff 100644
+--- a/lazarus/packager/packagesystem.pas
++++ b/lazarus/packager/packagesystem.pas
+@@ -4221,6 +4221,10 @@ begin
+                           pcfSkipDesignTimePackages in Flags,
+                           pcfGroupCompile in Flags,
+                           NeedBuildAllFlag,Note);
++    if Result = mrNo then begin
++      DebugLn(['Info: (lazarus) [CompilePackage]: CheckIfPackageNeedsCompilation returned mrNo for package ', APackage.IDAsString]);
++      Exit(mrOk);
++    end;
+     if Note<>'' then
+       Note:='Compile reason: '+Note;
+     if (pcfOnlyIfNeeded in Flags) then begin
+-- 
+2.39.2
+

diff --git a/0002-Qt6-removed-function.patch b/0002-Qt6-removed-function.patch
new file mode 100644
index 0000000..93a4cc2
--- /dev/null
+++ b/0002-Qt6-removed-function.patch
@@ -0,0 +1,78 @@
+From b71e3074a333b1573c6d662930b4689d92f5962e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=BDeljan=20Rikalo?= <zeljko@lazarus-ide.org>
+Date: Sun, 14 Apr 2024 13:19:52 +0200
+Subject: [PATCH] Qt6: removed deprecated QString::IsSimpleText() from
+ cbindings. issue #40901
+
+---
+ lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro        | 8 ++++----
+ lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp | 5 -----
+ lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.h   | 1 -
+ lazarus/lcl/interfaces/qt6/qt62.pas                    | 1 -
+ 4 files changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro b/lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro
+index bb4dd573cfd..c6e7419f18e 100644
+--- a/lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro
++++ b/lazarus/lcl/interfaces/qt6/cbindings/Qt6Pas.pro
+@@ -10,13 +10,13 @@
+ 
+ 
+ 
+-# Binding Release Version 6.2.7 against Qt6 6.2 LTS release.
++# Binding Release Version 6.2.8 against Qt6 6.2 LTS release.
+ 
+-win32:VERSION = 6.2.7.0
+-else:VERSION = 6.2.7
++win32:VERSION = 6.2.8.0
++else:VERSION = 6.2.8
+ VER_MAJ = 6
+ VER_MIN = 2
+-VER_PAT = 7
++VER_PAT = 8
+ win32:VERSION_PE_HEADER = 6.2
+ 
+ QT += gui printsupport
+diff --git a/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp b/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp
+index 9cb602ebc08..d3d5058480f 100644
+--- a/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp
++++ b/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.cpp
+@@ -1073,11 +1073,6 @@ bool QString_isNull(QStringH handle)
+ 	return (bool) ((QString *)handle)->isNull();
+ }
+ 
+-bool QString_isSimpleText(QStringH handle)
+-{
+-	return (bool) ((QString *)handle)->isSimpleText();
+-}
+-
+ bool QString_isRightToLeft(QStringH handle)
+ {
+ 	return (bool) ((QString *)handle)->isRightToLeft();
+diff --git a/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.h b/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.h
+index 6f0b6715207..377ef5a133a 100644
+--- a/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.h
++++ b/lazarus/lcl/interfaces/qt6/cbindings/src/qstring_c.h
+@@ -166,7 +166,6 @@ C_EXPORT void QString_push_back2(QStringH handle, PWideString s);
+ C_EXPORT void QString_push_front(QStringH handle, PWideChar c);
+ C_EXPORT void QString_push_front2(QStringH handle, PWideString s);
+ C_EXPORT bool QString_isNull(QStringH handle);
+-C_EXPORT bool QString_isSimpleText(QStringH handle);
+ C_EXPORT bool QString_isRightToLeft(QStringH handle);
+ C_EXPORT void QString_chopped(QStringH handle, int len, PWideString retval);
+ C_EXPORT void QString_first(QStringH handle, int n, PWideString retval);
+diff --git a/lazarus/lcl/interfaces/qt6/qt62.pas b/lazarus/lcl/interfaces/qt6/qt62.pas
+index 9def6242a2a..bef59bfc9bc 100644
+--- a/lazarus/lcl/interfaces/qt6/qt62.pas
++++ b/lazarus/lcl/interfaces/qt6/qt62.pas
+@@ -3214,7 +3214,6 @@ procedure QString_push_back(handle: QStringH; s: PWideString); cdecl; external Q
+ procedure QString_push_front(handle: QStringH; c: PWideChar); cdecl; external Qt6PasLib name 'QString_push_front';
+ procedure QString_push_front(handle: QStringH; s: PWideString); cdecl; external Qt6PasLib name 'QString_push_front2';
+ function QString_isNull(handle: QStringH): Boolean; cdecl; external Qt6PasLib name 'QString_isNull';
+-function QString_isSimpleText(handle: QStringH): Boolean; cdecl; external Qt6PasLib name 'QString_isSimpleText';
+ function QString_isRightToLeft(handle: QStringH): Boolean; cdecl; external Qt6PasLib name 'QString_isRightToLeft';
+ function QString_Create(size: Integer; AnonParam2: QtInitialization): QStringH; cdecl; external Qt6PasLib name 'QString_Create8';
+ procedure QString_chopped(handle: QStringH; len: integer; retval: PWideString); cdecl; external Qt6PasLib name 'QString_chopped';
+-- 
+GitLab
+

diff --git a/0003-gtk2-SIGSEGV.patch b/0003-gtk2-SIGSEGV.patch
new file mode 100644
index 0000000..bbd700f
--- /dev/null
+++ b/0003-gtk2-SIGSEGV.patch
@@ -0,0 +1,35 @@
+From dcaf7e6bbeee9312a1c9f342a5ee97ee9757fc58 Mon Sep 17 00:00:00 2001
+From: Juha <juha@lazarus-ide.org>
+Date: Tue, 5 Mar 2024 09:18:41 +0200
+Subject: [PATCH] LCL-GTK2: Prevent a SIGSEGV in function
+ DeliverMouseUpMessage(). Issue #40793, patch by Iluha Companets.
+
+---
+ lazarus/lcl/interfaces/gtk2/gtk2callback.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lazarus/lcl/interfaces/gtk2/gtk2callback.inc b/lazarus/lcl/interfaces/gtk2/gtk2callback.inc
+index 5cfcca52a8d..813493ee4c2 100644
+--- a/lazarus/lcl/interfaces/gtk2/gtk2callback.inc
++++ b/lazarus/lcl/interfaces/gtk2/gtk2callback.inc
+@@ -2274,7 +2274,7 @@ begin
+     else if MessI.Result <> 0 then
+     begin
+       // issue #19914
+-      if GTK_IS_NOTEBOOK(Widget) then
++      if GTK_IS_NOTEBOOK(PGTKObject(AWinControl.Handle)) then
+       begin
+         if g_object_get_data({%H-}PGObject(AWinControl.Handle),'lclnotebookdragging') <> nil then
+         begin
+@@ -2284,7 +2284,7 @@ begin
+       end;
+       // handled by the LCL
+       //DebugLn(['DeliverMouseUpMessage msg was handled by the LCL, Stopping signal ...']);
+-      g_signal_stop_emission_by_name(PGTKObject(Widget), 'button-release-event');
++      //g_signal_stop_emission_by_name(PGTKObject(AWinControl.Handle), 'button-release-event');
+       Result := True;
+     end;
+   end;
+-- 
+GitLab
+

diff --git a/Fixed-crash-when-trying-to-recompile-packages.patch b/Fixed-crash-when-trying-to-recompile-packages.patch
deleted file mode 100644
index 92fb7bf..0000000
--- a/Fixed-crash-when-trying-to-recompile-packages.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Description: Fixed crash when trying to recompile packages.
- Some packages do not need to be recompiled. There was a bug in lazbuild
- when trying to guess package output directory in this special case.
- Now, we just skip recompilation if it is not needed.
-Author: Abou Al Montacir <abou.almontacir@sfr.fr>
-Last-Update: Mon, 25 Dec 2023 16:02:09 +0100
-
----
- lazarus/packager/packagesystem.pas | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lazarus/packager/packagesystem.pas b/lazarus/packager/packagesystem.pas
-index e2c6c080..e36eefff 100644
---- a/lazarus/packager/packagesystem.pas
-+++ b/lazarus/packager/packagesystem.pas
-@@ -4221,6 +4221,10 @@ begin
-                           pcfSkipDesignTimePackages in Flags,
-                           pcfGroupCompile in Flags,
-                           NeedBuildAllFlag,Note);
-+    if Result = mrNo then begin
-+      DebugLn(['Info: (lazarus) [CompilePackage]: CheckIfPackageNeedsCompilation returned mrNo for package ', APackage.IDAsString]);
-+      Exit(mrOk);
-+    end;
-     if Note<>'' then
-       Note:='Compile reason: '+Note;
-     if (pcfOnlyIfNeeded in Flags) then begin
--- 
-2.39.2
-

diff --git a/lazarus.spec b/lazarus.spec
index dfb2802..227fdd6 100644
--- a/lazarus.spec
+++ b/lazarus.spec
@@ -3,7 +3,7 @@ Summary:        Lazarus Component Library and IDE for Free Pascal
 
 Version:        3.2
 
-%global baserelease 1
+%global baserelease 2
 Release:        %{baserelease}%{?dist}
 
 # The qt5pas version is taken from lcl/interfaces/qt5/cbindings/Qt5Pas.pro
@@ -11,7 +11,7 @@ Release:        %{baserelease}%{?dist}
 %global qt5pas_release %(relstr="%{version}.%{baserelease}"; relstr=(${relstr//./ }); ((relno=${relstr[0]}*10000 + ${relstr[1]}*100 + ${relstr[2]})); echo "${relno}%{?dist}";)
 
 # The qt6pas version is taken from lcl/interfaces/qt6/cbindings/Qt6Pas.pro
-%global qt6pas_version 6.2.7
+%global qt6pas_version 6.2.8
 %global qt6pas_release %{qt5pas_release}
 
 # The IDE itself is licensed under GPLv2+, with minor parts under the modified LGPL.
@@ -37,7 +37,24 @@ Patch0:         0000-Makefile_patch.diff
 #
 # Taken from Debian:
 # https://sources.debian.org/data/main/l/lazarus/3.0%2Bdfsg1-6/debian/patches/Fixed-crash-when-trying-to-recompile-packages.patch
-Patch1:         Fixed-crash-when-trying-to-recompile-packages.patch
+Patch1:         0001-crash-when-trying-to-recompile-packages.patch
+
+# Qt 6.7 removed a deprecated function.
+# This causes Qt6Pas to fail to build due to a linking error.
+#
+# RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2277326
+# Upstream bug: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40901
+#
+# Patch backported from upstream:
+# https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/b71e3074a333b1573c6d662930b4689d92f5962e
+Patch2:         0002-Qt6-removed-function.patch
+
+# Fix segmentation fault when recreating Gtk2 widgets
+# Upstream bug: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40793
+#
+# Patch backported from upstream:
+# https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/dcaf7e6bbeee9312a1c9f342a5ee97ee9757fc58
+Patch3:         0003-gtk2-SIGSEGV.patch
 
 # -- Build-time dependencies
 
@@ -544,6 +561,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
 
 
 %changelog
+* Fri Apr 26 2024 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.2-2
+- Add a patch to fix Qt6Pas breaking with Qt 6.7
+- Add a patch to fix segmentation fault in Gtk2 widget set
+
 * Sun Mar 17 2024 Artur Frenszek-Iwicki <fedora@svgames.pl> - 3.2-1
 - Update to v3.2
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-23  8:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23  8:18 [rpms/lazarus] multiple-IDE-widgetsets: Backport some upstream patches Artur Frenszek-Iwicki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox