SHA256
8
0
forked from pool/utfcpp

Accepting request 1151139 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/1151139
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/utfcpp?expand=0&rev=11
This commit is contained in:
2024-02-27 21:46:55 +00:00
committed by Git OBS Bridge
8 changed files with 49 additions and 67 deletions

View File

@@ -3,7 +3,7 @@
<param name="url">https://github.com/nemtrif/utfcpp.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="revision">v3.2.3</param>
<param name="revision">v4.0.5</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>

View File

@@ -1,32 +0,0 @@
--- utfcpp-3.2.3.orig/tests/CMakeLists.txt 2023-01-26 09:48:11.283201600 +0100
+++ utfcpp-3.2.3/tests/CMakeLists.txt 2023-01-26 09:49:10.139598712 +0100
@@ -1,13 +1,11 @@
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/apitests.cpp)
add_executable(noexceptionstests ${PROJECT_SOURCE_DIR}/tests/noexceptionstests.cpp)
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)
@@ -29,15 +27,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)

View File

@@ -1,8 +0,0 @@
--- a/utf8cppConfig.cmake.in
+++ b/utf8cppConfig.cmake.in
@@ -2,5 +2,3 @@
include("${CMAKE_CURRENT_LIST_DIR}/utf8cppTargets.cmake")
check_required_components( "utf8cpp" )
-
-add_library(utf8::cpp ALIAS utf8cpp)

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ba0ec73161a6cb9c731a30fd678af0365315ee139ec948ab7ee45a6971e5cfa
size 24208

View File

@@ -0,0 +1,25 @@
Index: utfcpp-4.0.5/CMakeLists.txt
===================================================================
--- utfcpp-4.0.5.orig/CMakeLists.txt
+++ utfcpp-4.0.5/CMakeLists.txt
@@ -36,17 +36,17 @@ install(TARGETS ${PROJECT_NAME}
configure_package_config_file(
"${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
- INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake
+ INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME}
)
install(EXPORT ${PROJECT_NAME}Targets
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake)
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME})
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake)
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME})
install(FILES ${PROJECT_SOURCE_DIR}/source/utf8.h DESTINATION include/utf8cpp)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/source/utf8 DESTINATION

BIN
utfcpp-4.0.5.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Feb 21 14:07:20 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 4.0.5:
* cmake fixes
- drop no-cpp17-tests.patch
- drop old-cmake.patch
- add utfcpp-4.0.5-cmake-location.patch
-------------------------------------------------------------------
Tue Feb 20 15:59:39 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@@ -2,6 +2,7 @@
# spec file for package utfcpp
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 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
@@ -17,16 +18,16 @@
Name: utfcpp
Version: 3.2.3
Version: 4.0.5
Release: 0
Summary: A library for handling UTF-8 encoded strings
License: BSL-1.0
URL: https://github.com/nemtrif/utfcpp
Source: %{name}-%{version}.tar.xz
Patch0: no-cpp17-tests.patch
Patch1: old-cmake.patch
BuildRequires: cmake >= 3.5
BuildRequires: gcc-c++
Patch0: utfcpp-4.0.5-cmake-location.patch
BuildRequires: c++_compiler
BuildRequires: cmake >= 3.14
BuildArch: noarch
%description
A C++ library for handling UTF-8 encoded strings.
@@ -38,35 +39,22 @@ Summary: A library for handling UTF-8 encoded strings
A C++ library for handling UTF-8 encoded strings.
%prep
%setup -q
%if 0%{?suse_version} < 1320
%patch -P 0 -p1
%endif
%if 0%{?suse_version} < 1550
%patch -P 1 -p1
%endif
%autosetup -p1
%build
%cmake
%cmake_build
%install
%cmake_install
%check
make -C build test
%ctest
%files devel
%license LICENSE
%doc README.md
%dir %{_includedir}/utf8cpp
%{_includedir}/utf8cpp/utf8.h
%dir %{_includedir}/utf8cpp/utf8
%{_includedir}/utf8cpp/utf8/checked.h
%{_includedir}/utf8cpp/utf8/core.h
%{_includedir}/utf8cpp/utf8/cpp11.h
%{_includedir}/utf8cpp/utf8/cpp17.h
%{_includedir}/utf8cpp/utf8/unchecked.h
%dir %{_libdir}/cmake/utf8cpp
%{_libdir}/cmake/utf8cpp/utf8cpp*.cmake
%{_includedir}/utf8cpp
%{_datadir}/cmake/utf8cpp
%changelog