SHA256
8
0
forked from pool/cxxopts

fix build with cmake 4 (boo#1239788)

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cxxopts?expand=0&rev=9
This commit is contained in:
2025-05-24 09:49:18 +00:00
committed by Git OBS Bridge
commit 4ac6b430ae
6 changed files with 181 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,44 @@
From 050ccd8badc6c706c4d20b3db48b319cc5bd9187 Mon Sep 17 00:00:00 2001
From: Vitaly <vitaly@easycoding.org>
Date: Wed, 12 Mar 2025 09:59:07 +0100
Subject: [PATCH] Added compatibility with CMake 4.
---
CMakeLists.txt | 2 +-
test/add-subdirectory-test/CMakeLists.txt | 2 +-
test/find-package-test/CMakeLists.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6e4e86e..110d3dd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-cmake_minimum_required(VERSION 3.1...3.19)
+cmake_minimum_required(VERSION 3.5...3.19)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
include(cxxopts)
diff --git a/test/add-subdirectory-test/CMakeLists.txt b/test/add-subdirectory-test/CMakeLists.txt
index ec14d597..8bf81e3a 100644
--- a/test/add-subdirectory-test/CMakeLists.txt
+++ b/test/add-subdirectory-test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5...3.19)
project(cxxopts-test)
diff --git a/test/find-package-test/CMakeLists.txt b/test/find-package-test/CMakeLists.txt
index b88d7c9d..0bc60384 100644
--- a/test/find-package-test/CMakeLists.txt
+++ b/test/find-package-test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.5...3.19)
project(cxxopts-test)

BIN
cxxopts-3.2.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

42
cxxopts.changes Normal file
View File

@@ -0,0 +1,42 @@
-------------------------------------------------------------------
Thu Apr 17 17:08:04 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
- fix build with cmake 4 (boo#1239788) cxxopts-3.2.1-cmake4.patch
-------------------------------------------------------------------
Sun Mar 24 13:35:56 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.2.1:
* Fix compilation with optional on C++20.
* Fix unannotated fallthrough.
* Fix sign conversion with Unicode output.
* Don't initialize regex in static initialiser.
* Fix incorrect integer overflow checks.
* Change quote output to '' to match Windows.
* Don't split positional arguments by the list delimiter.
* Order help groups by the order they were added.
-------------------------------------------------------------------
Fri Apr 7 12:41:07 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 3.1.1:
* Fixed version number in header.
* Support for multiple long names for the same option (=
multiple long aliases)
* Add a `program()` function to retrieve the program name.
* Added a .clang-format file.
* Added iterator and printing for a ParseResult.
* Cleanup exception code, add cxxopts::exceptions namespace.
* Fix `arguments()` having no key for options that only have a
short name.
-------------------------------------------------------------------
Fri Oct 14 10:04:26 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update descriptions with limitations.
- Trim macros from URL: line (for copy-pasting with mouse).
-------------------------------------------------------------------
Sat Dec 4 06:17:35 UTC 2021 - Luigi Baldoni <aloisio@gmx.com>
- Initial package (v3.0.0)

68
cxxopts.spec Normal file
View File

@@ -0,0 +1,68 @@
#
# spec file for package cxxopts
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cxxopts
Version: 3.2.1
Release: 0
Summary: C++ command line option parser
License: MIT
URL: https://github.com/jarro2783/cxxopts
Source0: https://github.com/jarro2783/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: cxxopts-3.2.1-cmake4.patch
BuildRequires: c++_compiler
BuildRequires: cmake
%description
CXXOpts is a C++ option parser library supporting some of the
GNU-style syntax for options.
%package devel
Summary: Development files for %{name}
Requires: libstdc++-devel
%description devel
CXXOpts is a C++ option parser library supporting single-letter options
with a single dash, and long options with a double-dash.
(There are some corner cases in 3.0.0 where behavior is not exactly
matching GNU getopt or POSIX mode.)
It requires and makes use of C++11 <regex>.
%prep
%autosetup -p1
%build
%cmake \
-DCXXOPTS_BUILD_EXAMPLES:BOOL=oFF \
-DCXXOPTS_BUILD_TESTS:BOOL=ON
%cmake_build
%install
%cmake_install
%check
%ctest
%files devel
%doc README.md
%license LICENSE
%{_includedir}/%{name}.hpp
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/%{name}.pc
%changelog