[packages/microsoft-gsl] - updated to 4.2.1
qboosh
qboosh at pld-linux.org
Tue May 19 17:23:31 CEST 2026
commit 39292b9b8c1658cd521bafd5fd46df9ae903cf39
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue May 19 17:23:31 2026 +0200
- updated to 4.2.1
microsoft-gsl.spec | 39 ++++++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 11 deletions(-)
---
diff --git a/microsoft-gsl.spec b/microsoft-gsl.spec
index 61ff47a..7fcd5bc 100644
--- a/microsoft-gsl.spec
+++ b/microsoft-gsl.spec
@@ -1,16 +1,25 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
Summary: Microsoft GSL: Guidelines Support Library
Summary(pl.UTF-8): Microsoft GSL - biblioteka wspierająca wskazania C++ Foundation
Name: microsoft-gsl
-Version: 4.0.0
+Version: 4.2.1
Release: 1
License: MIT
Group: Libraries
#Source0Download: https://github.com/microsoft/GSL/releases
Source0: https://github.com/microsoft/GSL/archive/v%{version}/GSL-%{version}.tar.gz
-# Source0-md5: 4b1a5f39c5f489d2bdf3bd352548907d
+# Source0-md5: ae93f67a036c15d8787ab6461c35de6d
URL: https://github.com/microsoft/GSL
-BuildRequires: cmake >= 3.1.3
+BuildRequires: cmake >= 3.14
BuildRequires: rpmbuild(macros) >= 1.605
+%if %{with tests}
+BuildRequires: gtest-devel
+BuildRequires: libstdc++-devel >= 6:7
+BuildRequires: pkgconfig
+%endif
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -56,13 +65,21 @@ Ten pakiet zawiera implementację GSL firmy Microsoft.
%setup -q -n GSL-%{version}
%build
-install -d build
-cd build
-# override install dir to avoid dir clash with GNU gsl
-%cmake .. \
- -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/microsoft-gsl
-
-%{__make}
+# override CMAKE_INSTALL_INCLUDEDIR to avoid dir clash with GNU gsl
+# force C++17 for recent gtest
+%cmake -B build \
+ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/microsoft-gsl \
+%if %{with tests}
+ -DGSL_CXX_STANDARD=17 \
+%else
+ -DGSL_TEST=OFF
+%endif
+
+%{__make} -C build
+
+%if %{with tests}
+%{__make} -C build test
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -75,6 +92,6 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
-%doc LICENSE README.md ThirdPartyNotices.txt
+%doc LICENSE README.md SECURITY.md ThirdPartyNotices.txt
%{_includedir}/microsoft-gsl
%{_datadir}/cmake/Microsoft.GSL
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/microsoft-gsl.git/commitdiff/39292b9b8c1658cd521bafd5fd46df9ae903cf39
More information about the pld-cvs-commit
mailing list