[packages/kf5-extra-cmake-modules] - pl - added tests patch, fix tests bcond

qboosh qboosh at pld-linux.org
Sun Dec 24 14:56:09 CET 2017


commit 53d00b1b0cd8b8ef6917148bc3f780766513d12c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 24 14:57:35 2017 +0100

    - pl
    - added tests patch, fix tests bcond

 extra-cmake-modules-tests.patch | 11 +++++++++
 kf5-extra-cmake-modules.spec    | 54 ++++++++++++++++++++++++++++++++---------
 2 files changed, 54 insertions(+), 11 deletions(-)
---
diff --git a/kf5-extra-cmake-modules.spec b/kf5-extra-cmake-modules.spec
index ddc2978..158f17d 100644
--- a/kf5-extra-cmake-modules.spec
+++ b/kf5-extra-cmake-modules.spec
@@ -1,10 +1,11 @@
 #
 # Conditional build:
-%bcond_with	tests		# build without tests
+%bcond_without	tests		# build without tests
 
 %define		orgname		extra-cmake-modules
 %define		kdeframever	5.39
 Summary:	Extra Cmake Modules for KF5
+Summary(pl.UTF-8):	Dodatkowe moduły Cmake'a dla KF5
 Name:		kf5-%{orgname}
 Version:	5.39.0
 Release:	1
@@ -12,19 +13,27 @@ License:	BSD
 Group:		Development/Building
 Source0:	http://download.kde.org/stable/frameworks/%{kdeframever}/%{orgname}-%{version}.tar.xz
 # Source0-md5:	777b57222f5c23d1599b8e8774e96b73
+Patch0:		%{orgname}-tests.patch
 URL:		http://www.kde.org/
 BuildRequires:	cmake >= 2.8.12
-BuildRequires:	qt5-assistant
+BuildRequires:	qt5-assistant >= 5.5.1
 BuildRequires:	qt5-linguist
 BuildRequires:	rpmbuild(macros) >= 1.698
-BuildRequires:	sphinx-pdg
+BuildRequires:	sed >= 4.0
+BuildRequires:	sphinx-pdg >= 1.2
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
-Requires:	kf5-dirs
+%if %{with tests}
+BuildRequires:	Qt5Core-devel >= 5.5.1
+BuildRequires:	Qt5Gui-devel >= 5.5.1
+BuildRequires:	Qt5Network-devel >= 5.5.1
+BuildRequires:	Qt5Qml-devel >= 5.5.1
+BuildRequires:	Qt5Quick-devel >= 5.5.1
+BuildRequires:	libstdc++-devel >= 6:4.9
+BuildRequires:	qt5-build >= 5.5.1
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		qt5dir		%{_libdir}/qt5
-
 %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
@@ -38,24 +47,47 @@ 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.
+
 %prep
 %setup -q -n %{orgname}-%{version}
+%patch0 -p1
+
+# causes make install failure after running tests
+%{__sed} -i -e '/ECMToolchainAndroidTest/d' tests/CMakeLists.txt
 
 %build
 install -d build
 cd build
-%cmake \
-	../
+%cmake .. \
+	%{!?with_tests:-DBUILD_TESTING=OFF}
+
 %{__make}
 
-%{?with_tests:%{__make} test}
+%if %{with tests}
+# GenerateSipBindings wants clang and has libclang checks incompatible with libclang >= 4
+ctest -E GenerateSipBindings
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} -C build install \
+
+%{__make} -C build -j1 install \
         DESTDIR=$RPM_BUILD_ROOT
 
-mv $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/ECM ECM-doc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/extra-cmake-modules-tests.patch b/extra-cmake-modules-tests.patch
new file mode 100644
index 0000000..97b5613
--- /dev/null
+++ b/extra-cmake-modules-tests.patch
@@ -0,0 +1,11 @@
+--- extra-cmake-modules-5.39.0/tests/ECMPoQmToolsTest/check.cmake.in.orig	2017-09-09 14:07:55.000000000 +0200
++++ extra-cmake-modules-5.39.0/tests/ECMPoQmToolsTest/check.cmake.in	2017-12-24 13:35:12.069782068 +0100
+@@ -70,7 +70,7 @@
+         foreach(lang en de fr)
+             execute_process(
+                 COMMAND "${CMAKE_COMMAND}" -E env "XDG_DATA_DIRS=${ACTUAL_TREE}/share"
+-                    LANGUAGE=${lang} "${exec}"
++                    LC_ALL=${lang} "${exec}"
+                 OUTPUT_VARIABLE output
+             )
+             string(STRIP "${output}" stripped_output)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kf5-extra-cmake-modules.git/commitdiff/53d00b1b0cd8b8ef6917148bc3f780766513d12c



More information about the pld-cvs-commit mailing list