[packages/kf6-extra-cmake-modules] - kf6 5.249.0

witekfl witekfl at pld-linux.org
Sun Feb 4 15:19:32 CET 2024


commit 421a1f610308f31690a2c01fd101971c1789bef3
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Sun Feb 4 14:33:49 2024 +0100

    - kf6 5.249.0

 extra-cmake-modules-tests.patch |  12 ++++
 kdefetchtranslations-test.patch |  11 ++++
 kf6-extra-cmake-modules.spec    | 128 ++++++++++++++++++++++++++++++++++++++++
 no-fatal-warnings.patch         |  14 +++++
 4 files changed, 165 insertions(+)
---
diff --git a/kf6-extra-cmake-modules.spec b/kf6-extra-cmake-modules.spec
new file mode 100644
index 0000000..e47fe6e
--- /dev/null
+++ b/kf6-extra-cmake-modules.spec
@@ -0,0 +1,128 @@
+#
+# Conditional build:
+%bcond_without	doc		# build without doc
+%bcond_without	tests		# build without tests
+
+%define		orgname		extra-cmake-modules
+%define		kdeframever	5.249.0
+Summary:	Extra Cmake Modules for KF6
+Summary(pl.UTF-8):	Dodatkowe moduły Cmake'a dla KF6
+Name:		kf6-%{orgname}
+Version:	5.249.0
+Release:	0.1
+License:	BSD
+Group:		Development/Building
+Source0:	https://download.kde.org/unstable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
+# Source0-md5:	e8cd307af19777f5ef99edf8e713387b
+Patch0:		%{orgname}-tests.patch
+Patch1:		kdefetchtranslations-test.patch
+Patch2:		no-fatal-warnings.patch
+URL:		https://kde.org/
+BuildRequires:	cmake >= 3.16
+BuildRequires:	qt6-assistant >= 5.9.0
+BuildRequires:	qt6-linguist
+BuildRequires:	rpmbuild(macros) >= 1.698
+BuildRequires:	sed >= 4.0
+%{?with_doc:BuildRequires:	sphinx-pdg >= 1.2}
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+%if %{with tests}
+BuildRequires:	Qt6Core-devel >= 5.9.0
+BuildRequires:	Qt6Quick-devel >= 5.9.0
+BuildRequires:	libstdc++-devel >= 6:5
+%endif
+BuildConflicts:	qmake
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The Extra CMake Modules package, or ECM, adds to the modules provided
+by CMake, including both ones used by find_package() to find common
+software and ones that can be used directly in CMakeLists.txt files to
+perform common tasks.
+
+In addition, it provides common build settings used in software
+produced by the KDE community.
+
+While the driving force of this module is to reduce duplication in
+CMake scripts across KDE software, it is intended to be useful for any
+software that uses the CMake build system.
+
+%description -l pl.UTF-8
+Pakiet Extra CMake Modules (ECM) dostarcza dodatkowe moduły do tych
+dostarczanych przez CMake'a, zawierające te używane przez
+find_package() do szukania popularnego oprogramowania, a także takie,
+których można używać bezpośrednio w CMakeLists.txt do wykonywania
+wspólnych zadań.
+
+Ponadto pakiet dostarcza wspólne ustawienia budowana używane w
+oprogramowaniu tworzonym przez społeczność KDE.
+
+O ile główną motywacją tego modułu jest zmniejszenie duplikacji w
+skryptach CMake'a w oprogramowaniu KDE, ma także być przydatny dla
+dowolnych programów wykorzystujących system budowania CMake.
+
+%package apidocs
+Summary:	API documentation for %{orgname}
+Summary(pl.UTF-8):	Dokumentacja API %{orgname}
+Group:		Documentation
+Obsoletes:	kf6-extra-cmake-modules-doc < 1.4.0
+
+%description apidocs
+API documentation for %{orgname}.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API dla %{orgname}.
+
+%prep
+%setup -q -n %{orgname}-%{version}
+%patch0 -p1
+%patch1 -p0
+%patch2 -p1
+
+# causes make install failure after running tests
+%{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt
+
+%build
+%cmake -B build \
+	%{!?with_tests:-DBUILD_TESTING=OFF} \
+	%{!?with_doc:-DBUILD_HTML_DOCS=OFF}
+
+%{__make} -C build
+
+%if %{with tests}
+# GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4
+# ECMPoQmToolsTest fails to build it's own moc file
+cd build
+ctest -E '(GenerateSipBindings|ECMPoQmToolsTest)' --output-on-failure
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build -j1 install \
+        DESTDIR=$RPM_BUILD_ROOT
+
+sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/pre-commit.in
+sed -i -e 's#/usr/bin/env bash#/bin/bash#' $RPM_BUILD_ROOT%{_datadir}/ECM/kde-modules/kde-git-commit-hooks/clang-format.sh
+
+%if %{with doc}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
+%endif
+install -d $RPM_BUILD_ROOT%{_datadir}/qlogging-categories6
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING-CMAKE-SCRIPTS README.rst
+%{_datadir}/ECM
+%{_datadir}/qlogging-categories6
+%{_mandir}/man7/ecm*.7*
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc ECM-doc/html/*
+%endif
diff --git a/extra-cmake-modules-tests.patch b/extra-cmake-modules-tests.patch
new file mode 100644
index 0000000..8e703ec
--- /dev/null
+++ b/extra-cmake-modules-tests.patch
@@ -0,0 +1,12 @@
+diff -up extra-cmake-modules-5.91.0/tests/ECMPoQmToolsTest/check.cmake.in.orig extra-cmake-modules-5.91.0/tests/ECMPoQmToolsTest/check.cmake.in
+--- extra-cmake-modules-5.91.0/tests/ECMPoQmToolsTest/check.cmake.in.orig	2022-02-05 16:33:17.000000000 +0100
++++ extra-cmake-modules-5.91.0/tests/ECMPoQmToolsTest/check.cmake.in	2022-02-14 16:48:05.753931574 +0100
+@@ -74,7 +74,7 @@ if("@CMAKE_SYSTEM_NAME@" STREQUAL "Linux
+         foreach(lang en de de_AT fr)
+             execute_process(
+                 COMMAND "${CMAKE_COMMAND}" -E env "XDG_DATA_DIRS=${ACTUAL_TREE}/share"
+-                    LANG=${lang} "${exec}"
++                    LC_ALL=${lang} "${exec}"
+                 OUTPUT_VARIABLE output
+             )
+             string(STRIP "${output}" stripped_output)
diff --git a/kdefetchtranslations-test.patch b/kdefetchtranslations-test.patch
new file mode 100644
index 0000000..dd08477
--- /dev/null
+++ b/kdefetchtranslations-test.patch
@@ -0,0 +1,11 @@
+--- tests/KDEFetchTranslations/CMakeLists.txt.orig	2021-02-05 16:18:39.000000000 +0100
++++ tests/KDEFetchTranslations/CMakeLists.txt	2021-03-06 19:41:09.226109189 +0100
+@@ -19,7 +19,7 @@
+ 
+ _repository_name(name "${CMAKE_CURRENT_SOURCE_DIR}/../../")
+ if (NOT ${name} STREQUAL "frameworks/extra-cmake-modules")
+-    message(FATAL_ERROR "Wrong repository name: ${name}, should be 'frameworks/extra-cmake-modules'")
++#    message(FATAL_ERROR "Wrong repository name: ${name}, should be 'frameworks/extra-cmake-modules'")
+ endif()
+ add_executable(dummy ../ExecuteKDEModules/main.c)
+ ecm_mark_nongui_executable(dummy)
diff --git a/no-fatal-warnings.patch b/no-fatal-warnings.patch
new file mode 100644
index 0000000..d8f30b3
--- /dev/null
+++ b/no-fatal-warnings.patch
@@ -0,0 +1,14 @@
+diff -up extra-cmake-modules-5.249.0/kde-modules/KDECompilerSettings.cmake.orig extra-cmake-modules-5.249.0/kde-modules/KDECompilerSettings.cmake
+--- extra-cmake-modules-5.249.0/kde-modules/KDECompilerSettings.cmake.orig	2024-02-03 10:14:12.611733929 +0100
++++ extra-cmake-modules-5.249.0/kde-modules/KDECompilerSettings.cmake	2024-02-03 10:15:03.631553247 +0100
+@@ -546,8 +546,8 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU
+         (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) OR
+         (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32))
+     # Linker warnings should be treated as errors
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}")
+-    set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}")
++    ##set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}")
++    ##set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}")
+ 
+     string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" compileflags)
+     if("${CMAKE_CXX_FLAGS} ${${compileflags}}" MATCHES "-fsanitize")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kf6-extra-cmake-modules.git/commitdiff/421a1f610308f31690a2c01fd101971c1789bef3



More information about the pld-cvs-commit mailing list