From d2081e80e074a86b0a2f685a90469c162917a8d8029af43c724630e155db2523 Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Mon, 25 Apr 2022 10:43:07 +0000 Subject: [PATCH] Accepting request 972523 from home:pragmalin:branches:devel:languages:pascal Overall improvements and fixed bug #1197651. OBS-URL: https://build.opensuse.org/request/show/972523 OBS-URL: https://build.opensuse.org/package/show/devel:languages:pascal/lazarus?expand=0&rev=73 --- lazarus-Makefile_patch.diff | 12 +++++-- lazarus-rpmlintrc | 2 ++ lazarus.changes | 17 ++++++++++ lazarus.spec | 68 +++++++------------------------------ 4 files changed, 42 insertions(+), 57 deletions(-) diff --git a/lazarus-Makefile_patch.diff b/lazarus-Makefile_patch.diff index 3cd8c34..d98e815 100644 --- a/lazarus-Makefile_patch.diff +++ b/lazarus-Makefile_patch.diff @@ -7,7 +7,7 @@ Index: lazarus/Makefile.fpc [install] fpcpackage=n -basedir=share/lazarus -+basedir=lib/lazarus ++basedir=$(_LIB)/lazarus [dist] destdir=$(BASEDIR)/dist @@ -20,7 +20,7 @@ Index: lazarus/Makefile.fpc INSTALL_MAN_DIR=$(INSTALL_PREFIX)/share/man ifneq ($(findstring $(OS_TARGET),win32 win64),) LAZARUS_INSTALL_DIR=C:\lazarus -@@ -271,8 +271,8 @@ installbase: +@@ -287,8 +287,8 @@ installbase: ifneq ($(findstring $(OS_TARGET),win32 win64),) else @@ -31,3 +31,11 @@ Index: lazarus/Makefile.fpc $(MKDIR) $(INSTALL_PREFIX)/share/applications $(MKDIR) $(INSTALL_PREFIX)/share/pixmaps $(MKDIR) $(INSTALL_PREFIX)/share/mime/packages +@@ -334,6 +334,7 @@ else + $(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/gtk + $(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/gtk2 + $(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/qt ++ $(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/qt5 + $(MKDIR) $(LAZARUS_INSTALL_DIR)/components/synedit/design/languages + endif + diff --git a/lazarus-rpmlintrc b/lazarus-rpmlintrc index 08aee78..0849f23 100644 --- a/lazarus-rpmlintrc +++ b/lazarus-rpmlintrc @@ -1,2 +1,4 @@ addFilter("devel-file-in-non-devel-package .*/lazarus/components/codetools/examples/scanexamples/test.h") addFilter("devel-file-in-non-devel-package .*/lazarus/components/compilers/c/examples/test.c") +# Do not use fdupes because a lot of duplicate files are actually needed when developing apps in Lazarus (bug 1197651). +addFilter("files-duplicate") diff --git a/lazarus.changes b/lazarus.changes index 5c2dd13..06c2839 100644 --- a/lazarus.changes +++ b/lazarus.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sat Apr 23 10:57:00 UTC 2022 - PragmaticLinux + +- Skip removing duplicates with fdupes. It removes important files, + causing "unit not found errors" during application development + (bug 1197651). +- Corrected library directory in lazarus-Makefile_patch.diff. +- Added creation of qt5 directory in lazarus-Makefile_patch.diff, + needed when rebuilding the IDE using the QT5 widgetset. +- Added gcc, make and binutils package requirements, needed when + the user rebuilds the IDE. +- Removed git ignore files to prevent version control files from + being installed. +- Fixed a few spurious executable permission RPM lint errors. +- Cleaned up spec-file by removing support for obsolete distribution + versions. + ------------------------------------------------------------------- Wed Jan 5 11:56:21 UTC 2022 - Luigi Baldoni diff --git a/lazarus.spec b/lazarus.spec index 9f9b3c9..1e3bf35 100644 --- a/lazarus.spec +++ b/lazarus.spec @@ -38,42 +38,27 @@ BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: fpc >= 3.0.0 BuildRequires: fpc-src >= 3.0.0 +Requires: binutils Requires: fpc Requires: fpc-src +Requires: gcc Requires: gdb +Requires: make Requires(post): desktop-file-utils Requires(post): shared-mime-info Requires(postun):desktop-file-utils Requires(postun):shared-mime-info -%if 0%{?suse_version} > 1210 BuildRequires: desktop-file-utils -%else -BuildRequires: update-desktop-files -%endif -%if 0%{?suse_version} >= 1140 BuildRequires: hicolor-icon-theme -%endif -%if 0%{?sles_version} == 11 -BuildRequires: glib2-devel -BuildRequires: gtk2-devel -%else -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(gtk+-2.0) -%endif -%if 0%{?sle_version} >= 120200 || 0%{?suse_version} > 1320 BuildRequires: libqt5-qtbase-common-devel >= 5.6.0 BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5X11Extras) -%endif -%if 0%{?sles_version} == 11 -Requires: glib2-devel -Requires: gtk2-devel -%else +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gtk+-2.0) Requires: pkgconfig(glib-2.0) Requires: pkgconfig(gtk+-2.0) -%endif %description Lazarus is a Rapid Application Development @@ -127,16 +112,23 @@ dos2unix examples/trayicon/wndtray.* # fix rpmlint error "spurious-executable-perm" chmod 644 docs/booth/ProdProgEntwMitOpenSourceSystems2007.odp +chmod 644 docs/html/build_lcl_chm.sh +chmod 644 docs/xml/multi_makeskel.pl + +# reset source timestamps because they are embedded in compiled files if [ -n "$SOURCE_DATE_EPOCH" ] ; then datestr=$(date -u "-d@$SOURCE_DATE_EPOCH" +%Y/%m/%d) sed -i -e 's!{\$I %%date%%}!'"'$datestr'"'!' \ ide/ideinfodlg.pas ide/aboutfrm.pas ide/idefpcinfo.pas - touch -d@"$SOURCE_DATE_EPOCH" ide/ideinfodlg.pas ide/aboutfrm.pas ide/idefpcinfo.pas # reset source timestamps because they are embedded in compiled files + touch -d@"$SOURCE_DATE_EPOCH" ide/ideinfodlg.pas ide/aboutfrm.pas ide/idefpcinfo.pas fi # fix shebang find . \( -name "*.sh" -o -name "*.pl" \) -exec sed -i '1s|#!%{_bindir}/env|%{_bindir}/|' {} + +# remove git ignore files to prevent them from being installed to fix rpmlint error "version-control-internal-file" +find . \( -name ".gitignore" \) -delete + %build # Don't use -gs (use explicitly "stabs" debuginfo) for compiling lhelp but -g (use the default debuginfo type "dwarf") as in the rest of package's Makefiles # Fixes the "Stabs debuginfo not supported" error when extracting debug info from the package @@ -153,7 +145,6 @@ export LCL_PLATFORM= # build Qt4 interface make -C lcl/interfaces/qt all LCL_PLATFORM=qt OPT="-dQT_NATIVE_DIALOGS" -%if 0%{?sle_version} >= 120200 || 0%{?suse_version} > 1320 # build Qt5 interface make -C lcl/interfaces/qt5 all LCL_PLATFORM=qt5 OPT="-dQT_NATIVE_DIALOGS" @@ -162,7 +153,6 @@ pushd lcl/interfaces/qt5/cbindings %qmake5 make %{?_smp_mflags} popd -%endif %install make install \ @@ -172,12 +162,10 @@ make install \ LAZARUS_INSTALL_DIR=%{buildroot}%{_libdir}/%{name} \ _LIB=%{_lib} -%if 0%{?sle_version} >= 120200 || 0%{?suse_version} > 1320 pushd lcl/interfaces/qt5/cbindings %qmake5_install install -Dpm 0644 qt5.pas %{buildroot}%{_datadir}/fpcsrc/packages/qt5/qt5.pas popd -%endif # convenience links for f in lazarus lazbuild startlazarus; do @@ -204,12 +192,7 @@ for f in 16 32 48 64 128 256; do done # menu-entry -%if 0%{?suse_version} > 1210 desktop-file-install install/lazarus.desktop -%else -install -Dpm 0644 install/lazarus.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop -%suse_update_desktop_file -n %{name} Development IDE -%endif # mime info install -Dpm 0644 install/%{name}-mime.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml @@ -225,33 +208,10 @@ sed = 1140 -%mime_database_post -%icon_theme_cache_post -%desktop_database_post -%else -%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null || : -%endif - -%postun -%if 0%{?suse_version} >= 1140 -%mime_database_postun -%icon_theme_cache_postun -%desktop_database_postun -%else -%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null || : -%endif -%endif - -%if 0%{?sle_version} >= 120200 || 0%{?suse_version} > 1320 %post -n libQt5Pas%{sover} -p /sbin/ldconfig %postun -n libQt5Pas%{sover} -p /sbin/ldconfig -%endif %files %defattr(-,root,root,-) @@ -277,7 +237,6 @@ rm -rf %{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt5/cbindings %dir %{_datadir}/appdata/ %{_datadir}/appdata/%{name}.appdata.xml -%if 0%{?sle_version} >= 120200 || 0%{?suse_version} > 1320 %files -n libQt5Pas%{sover} %defattr(-,root,root,-) %license lcl/interfaces/qt5/cbindings/COPYING.TXT @@ -291,6 +250,5 @@ rm -rf %{buildroot}%{_libdir}/%{name}/lcl/interfaces/qt5/cbindings %dir %{_datadir}/fpcsrc/packages/qt5 %{_datadir}/fpcsrc/packages/qt5/qt5.pas %{_libdir}/libQt5Pas.so -%endif %changelog