forked from pool/utfcpp
Accepting request 976436 from Java:packages
Allow building on SLE-12-SP5 OBS-URL: https://build.opensuse.org/request/show/976436 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/utfcpp?expand=0&rev=12
This commit is contained in:
34
no-cpp17-tests.patch
Normal file
34
no-cpp17-tests.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff -urEbwB utfcpp-3.2.1/tests/CMakeLists.txt utfcpp-3.2.1.new/tests/CMakeLists.txt
|
||||
--- utfcpp-3.2.1/tests/CMakeLists.txt 2021-06-06 17:09:04.000000000 +0200
|
||||
+++ utfcpp-3.2.1.new/tests/CMakeLists.txt 2021-07-27 23:56:21.956315062 +0200
|
||||
@@ -1,6 +1,5 @@
|
||||
add_executable(negative ${PROJECT_SOURCE_DIR}/tests/negative.cpp)
|
||||
add_executable(cpp11 ${PROJECT_SOURCE_DIR}/tests/test_cpp11.cpp)
|
||||
-add_executable(cpp17 ${PROJECT_SOURCE_DIR}/tests/test_cpp17.cpp)
|
||||
add_executable(apitests
|
||||
${PROJECT_SOURCE_DIR}/tests/test_checked_api.cpp
|
||||
${PROJECT_SOURCE_DIR}/tests/test_unchecked_api.cpp
|
||||
@@ -15,7 +14,6 @@
|
||||
|
||||
target_link_libraries(negative PRIVATE utf8::cpp)
|
||||
target_link_libraries(cpp11 PRIVATE utf8::cpp)
|
||||
-target_link_libraries(cpp17 PRIVATE utf8::cpp)
|
||||
target_link_libraries(apitests PRIVATE utf8::cpp)
|
||||
target_link_libraries(noexceptionstests PRIVATE utf8::cpp)
|
||||
|
||||
@@ -33,15 +31,8 @@
|
||||
CXX_STANDARD_REQUIRED YES
|
||||
CXX_EXTENSIONS NO)
|
||||
|
||||
-set_target_properties(cpp17
|
||||
- PROPERTIES
|
||||
- CXX_STANDARD 17
|
||||
- CXX_STANDARD_REQUIRED YES
|
||||
- CXX_EXTENSIONS NO)
|
||||
-
|
||||
add_test(negative_test negative ${PROJECT_SOURCE_DIR}/tests/test_data/utf8_invalid.txt)
|
||||
add_test(cpp11_test cpp11)
|
||||
-add_test(cpp17_test cpp17)
|
||||
add_test(api_test apitests)
|
||||
add_test(noexceptions_test noexceptionstests)
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 20 17:57:48 UTC 2021 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* no-cpp17-tests.patch
|
||||
+ do not run cpp17 tests when building on SLE12
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 10 12:00:26 UTC 2021 - Luigi Baldoni <aloisio@gmx.com>
|
||||
|
||||
|
||||
10
utfcpp.spec
10
utfcpp.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package utfcpp
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -23,7 +23,8 @@ Summary: A library for handling UTF-8 encoded strings
|
||||
License: BSL-1.0
|
||||
URL: https://github.com/nemtrif/utfcpp
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
BuildRequires: cmake >= 3.8
|
||||
Patch0: no-cpp17-tests.patch
|
||||
BuildRequires: cmake >= 3.5
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
%description
|
||||
@@ -36,7 +37,10 @@ Summary: A library for handling UTF-8 encoded strings
|
||||
A C++ library for handling UTF-8 encoded strings.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%setup -q
|
||||
%if 0%{?suse_version} < 1320
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cmake
|
||||
|
||||
Reference in New Issue
Block a user