public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Artur Frenszek-Iwicki <fedora@svgames.pl>
To: git-commits@fedoraproject.org
Subject: [rpms/lazarus] multiple-IDE-widgetsets: Build the IDE with multiple widgetsets
Date: Thu, 23 Jul 2026 08:18:27 GMT	[thread overview]
Message-ID: <178479470708.1.2705164910711932453.rpms-lazarus-da66b1fbdef4@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/lazarus
Branch : multiple-IDE-widgetsets
Commit : da66b1fbdef49cbca2c9ebbbb642256146e49045
Author : Artur Frenszek-Iwicki <fedora@svgames.pl>
Date   : 2026-07-07T16:22:16+02:00
Stats  : +175/-8 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/lazarus/c/da66b1fbdef49cbca2c9ebbbb642256146e49045?branch=multiple-IDE-widgetsets

Log:
Build the IDE with multiple widgetsets

---
diff --git a/lazarus.spec b/lazarus.spec
index 19413bb..0e97ec9 100644
--- a/lazarus.spec
+++ b/lazarus.spec
@@ -2,7 +2,7 @@ Name:           lazarus
 Summary:        Lazarus Component Library and IDE for Free Pascal
 
 Version:        4.8
-Release:        2%{?dist}
+Release:        100%{?dist}
 
 # Version suffix used by subpackages using separate versioning
 %global version_suffix %{expand:laz%{version}}
@@ -38,6 +38,8 @@ BuildRequires:  fpc-src
 BuildRequires:  gcc-c++
 BuildRequires:  glibc-devel
 BuildRequires:  gtk2-devel
+BuildRequires:  gtk3-devel
+BuildRequires:  qt4pas-devel
 BuildRequires:  libappstream-glib
 BuildRequires:  make
 BuildRequires:  perl-generators
@@ -52,6 +54,7 @@ BuildRequires:  qt6-qtbase-devel
 # as they see fit.
 
 Requires:	%{name}-ide%{?_isa} = %{version}-%{release}
+Requires:	%{name}-ide-gtk2%{?_isa} = %{version}-%{release}
 Requires:	%{name}-lcl%{?_isa} = %{version}-%{release}
 Requires:	%{name}-lcl-nogui%{?_isa} = %{version}-%{release}
 Requires:	%{name}-lcl-gtk2%{?_isa} = %{version}-%{release}
@@ -78,14 +81,16 @@ Lazarus Component Library (LCL).
 
 
 %package ide
-Summary: Lazarus RAD IDE for Free Pascal
+Summary: Lazarus RAD IDE for Free Pascal - base files
 License: %{license_ide}
 
 Requires:	%{name}-lcl%{?_isa} = %{version}-%{release}
 Requires:	%{name}-tools%{?_isa} = %{version}-%{release}
 Recommends:	%{name}-doc = %{version}-%{release}
 Recommends:	%{name}-lcl-nogui%{?_isa} = %{version}-%{release}
-Recommends:	%{name}-lcl-gtk2%{?_isa} = %{version}-%{release}
+
+# Required for users upgrading lazarus. Can be removed in F46+.
+Obsoletes: lazarus-ide < 4.2-3
 
 Requires: fpc-src
 Requires: gdb
@@ -98,6 +103,104 @@ Lazarus is a cross-platform IDE and component library for Free Pascal.
 This package provides the Lazarus RAD IDE.
 
 
+%package ide-gtk2
+Summary: Lazarus RAD IDE for Free Pascal - GTK2 build
+License: %{license_ide}
+RemovePathPostfixes: +gtk2
+
+Requires:	%{name}-ide%{?_isa} = %{version}-%{release}
+Recommends:	%{name}-lcl-gtk2%{?_isa} = %{version}-%{release}
+
+# Required for users upgrading lazarus. Can be removed in F46+.
+Obsoletes: lazarus-ide < 4.2-3
+
+Conflicts: lazarus-ide-gtk3
+Conflicts: lazarus-ide-qt
+Conflicts: lazarus-ide-qt5
+Conflicts: lazarus-ide-qt6
+
+%description ide-gtk2
+Lazarus is a cross-platform IDE and component library for Free Pascal.
+
+This package provides the Lazarus RAD IDE.
+
+
+%package ide-gtk3
+Summary: Lazarus RAD IDE for Free Pascal - GTK3 build
+License: %{license_ide}
+RemovePathPostfixes: +gtk3
+
+Requires:	%{name}-ide%{?_isa} = %{version}-%{release}
+Recommends:	%{name}-lcl-gtk3%{?_isa} = %{version}-%{release}
+
+Conflicts: lazarus-ide-gtk2
+Conflicts: lazarus-ide-qt
+Conflicts: lazarus-ide-qt5
+Conflicts: lazarus-ide-qt6
+
+%description ide-gtk3
+Lazarus is a cross-platform IDE and component library for Free Pascal.
+
+This package provides the Lazarus RAD IDE.
+
+
+%package ide-qt
+Summary: Lazarus RAD IDE for Free Pascal - Qt4 build
+License: %{license_ide}
+RemovePathPostfixes: +qt
+
+Requires:	%{name}-ide%{?_isa} = %{version}-%{release}
+Recommends:	%{name}-lcl-qt%{?_isa} = %{version}-%{release}
+
+Conflicts: lazarus-ide-gtk2
+Conflicts: lazarus-ide-gtk3
+Conflicts: lazarus-ide-qt5
+Conflicts: lazarus-ide-qt6
+
+%description ide-qt
+Lazarus is a cross-platform IDE and component library for Free Pascal.
+
+This package provides the Lazarus RAD IDE.
+
+
+%package ide-qt5
+Summary: Lazarus RAD IDE for Free Pascal - Qt5 build
+License: %{license_ide}
+RemovePathPostfixes: +qt5
+
+Requires:	%{name}-ide%{?_isa} = %{version}-%{release}
+Recommends:	%{name}-lcl-qt5%{?_isa} = %{version}-%{release}
+
+Conflicts: lazarus-ide-gtk2
+Conflicts: lazarus-ide-gtk3
+Conflicts: lazarus-ide-qt
+Conflicts: lazarus-ide-qt6
+
+%description ide-qt5
+Lazarus is a cross-platform IDE and component library for Free Pascal.
+
+This package provides the Lazarus RAD IDE.
+
+
+%package ide-qt6
+Summary: Lazarus RAD IDE for Free Pascal - Qt6 build
+License: %{license_ide}
+RemovePathPostfixes: +qt6
+
+Requires:	%{name}-ide%{?_isa} = %{version}-%{release}
+Recommends:	%{name}-lcl-qt6%{?_isa} = %{version}-%{release}
+
+Conflicts: lazarus-ide-gtk2
+Conflicts: lazarus-ide-gtk3
+Conflicts: lazarus-ide-qt
+Conflicts: lazarus-ide-qt5
+
+%description ide-qt6
+Lazarus is a cross-platform IDE and component library for Free Pascal.
+
+This package provides the Lazarus RAD IDE.
+
+
 %package tools
 Summary: Lazarus IDE helper programs
 License: %{license_tools}
@@ -305,26 +408,56 @@ for WIDGETSET in gtk gtk2 gtk3 qt qt5 qt6; do
 	make lcl basecomponents bigidecomponents %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM="${WIDGETSET}"
 done
 
-# Compile the IDE itself
-# TODO: Could try building the IDE with multiple widgetsets, as well!
-make bigide %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM=gtk2
+# Compile the IDE itself.
+for WIDGETSET in gtk2 gtk3 qt; do
+	make bigide %{fpmakeopt} OPT='%{fpcopt}' LCL_PLATFORM="${WIDGETSET}"
+	mv ./lazarus "./lazarus+${WIDGETSET}"
+	mv ./startlazarus "./startlazarus+${WIDGETSET}"
+done
 
 # Build Qt5Pas
 pushd lcl/interfaces/qt5/cbindings/
 	%{qmake_qt5}
 	%make_build
 popd
+make bigide %{fpmakeopt} OPT="%{fpcopt} -Fl$(pwd)/lcl/interfaces/qt5/cbindings/" LCL_PLATFORM=qt5
+mv ./lazarus ./lazarus+qt5
+mv ./startlazarus ./startlazarus+qt5
 
 # Build Qt6Pas
 pushd lcl/interfaces/qt6/cbindings/
 	%{qmake_qt6}
 	%make_build
 popd
+make bigide %{fpmakeopt} OPT="%{fpcopt} -Fl$(pwd)/lcl/interfaces/qt6/cbindings/" LCL_PLATFORM=qt6
+mv ./lazarus ./lazarus+qt6
+mv ./startlazarus ./startlazarus+qt6
+
+# Create dummy files for "lazarus" and "startlazarus" so "make install" won't freak out
+touch ./lazarus ./startlazarus
 
 
 %install
 make install INSTALL_PREFIX=%{buildroot}%{_prefix} _LIB=%{_lib}
 
+rm \
+	%{buildroot}%{_bindir}/lazarus-ide \
+	%{buildroot}%{_libdir}/%{name}/lazarus \
+	%{buildroot}%{_bindir}/startlazarus \
+	%{buildroot}%{_libdir}/%{name}/startlazarus \
+
+for WIDGETSET in gtk2 gtk3 qt qt5 qt6; do
+	install -m 755 \
+		"./lazarus+${WIDGETSET}" \
+		"./startlazarus+${WIDGETSET}" \
+		-t %{buildroot}%{_libdir}/%{name}/
+
+	ln -sr %{buildroot}%{_libdir}/%{name}/lazarus \
+		"%{buildroot}%{_bindir}/lazarus-ide+${WIDGETSET}"
+	ln -sr %{buildroot}%{_libdir}/%{name}/startlazarus \
+		"%{buildroot}%{_bindir}/startlazarus+${WIDGETSET}"
+done
+
 # Remove man page for an executable that is not actually installed.
 rm %{buildroot}%{_mandir}/man1/svn2revisioninc.1* || true
 
@@ -378,9 +511,25 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
 
 # -- IDE files
 
+# Helper macro to reduce repetitions
+%define ide_files(n:) %{expand:
+	%{*} %{_bindir}/lazarus-ide+%{-n*}
+	%{*} %{_bindir}/startlazarus+%{-n*}
+	%{*} %{_libdir}/%{name}/lazarus+%{-n*}
+	%{*} %{_libdir}/%{name}/startlazarus+%{-n*}
+	%{*} %{_libdir}/%{name}/units/*/%{-n*}/
+}
+
 %files ide
 %{_libdir}/%{name}
 
+# Exclude files provided by widgetset-specific subpackages
+%ide_files -n gtk2 %exclude
+%ide_files -n gtk3 %exclude
+%ide_files -n qt   %exclude
+%ide_files -n qt5  %exclude
+%ide_files -n qt6  %exclude
+
 # Exclude -docs files
 %exclude %{_libdir}/%{name}/docs
 %exclude %{_libdir}/%{name}/examples
@@ -402,8 +551,6 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
 %exclude %{_libdir}/%{name}/ide/packages/ideproject
 %exclude %{_libdir}/%{name}/ide/packages/ideutils
 
-%{_bindir}/lazarus-ide
-%{_bindir}/startlazarus
 %{_datadir}/pixmaps/lazarus.png
 %{_datadir}/applications/*%{name}.desktop
 %{_datadir}/mime/packages/lazarus.xml
@@ -417,6 +564,23 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
 %{_mandir}/man1/lazarus-ide.1*
 %{_mandir}/man1/startlazarus.1*
 
+# -- IDE widgetsets
+
+%files ide-gtk2
+%ide_files -n gtk2
+
+%files ide-gtk3
+%ide_files -n gtk3
+
+%files ide-qt
+%ide_files -n qt
+
+%files ide-qt5
+%ide_files -n qt5
+
+%files ide-qt6
+%ide_files -n qt6
+
 # -- Tools files
 
 %files tools
@@ -548,6 +712,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
 
 
 %changelog
+* Thu Jun 11 2026 Artur Frenszek-Iwicki <fedora@svgames.pl> - 4.8-100
+- Build the IDE for all widgetsets, not just GTK2
+
 * Thu Jun 11 2026 Artur Frenszek-Iwicki <fedora@svgames.pl> - 4.8-2
 - Suffix qt5pas/qt6pas versions with Lazarus version instead of abusing the Release number
 

                 reply	other threads:[~2026-07-23  8:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178479470708.1.2705164910711932453.rpms-lazarus-da66b1fbdef4@fedoraproject.org \
    --to=fedora@svgames.pl \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox