From 2013e7b084655e8be7249d5001e253ca700508ee5278a2b0539b022475d4d26f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 26 Feb 2024 10:53:42 +0000 Subject: [PATCH] Accepting request 1148731 from home:AndreasStieger:branches:devel:libraries:c_c++ utfcpp 4.0.5 OBS-URL: https://build.opensuse.org/request/show/1148731 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/utfcpp?expand=0&rev=22 --- _service | 2 +- no-cpp17-tests.patch | 32 ----------------------------- old-cmake.patch | 8 -------- utfcpp-3.2.3.tar.xz | 3 --- utfcpp-4.0.5-cmake-location.patch | 25 +++++++++++++++++++++++ utfcpp-4.0.5.tar.xz | 3 +++ utfcpp.changes | 9 ++++++++ utfcpp.spec | 34 ++++++++++--------------------- 8 files changed, 49 insertions(+), 67 deletions(-) delete mode 100644 no-cpp17-tests.patch delete mode 100644 old-cmake.patch delete mode 100644 utfcpp-3.2.3.tar.xz create mode 100644 utfcpp-4.0.5-cmake-location.patch create mode 100644 utfcpp-4.0.5.tar.xz diff --git a/_service b/_service index 96e84bf..182011d 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ https://github.com/nemtrif/utfcpp.git git .git - v3.2.3 + v4.0.5 @PARENT_TAG@ v(.*) diff --git a/no-cpp17-tests.patch b/no-cpp17-tests.patch deleted file mode 100644 index 97d181a..0000000 --- a/no-cpp17-tests.patch +++ /dev/null @@ -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) - diff --git a/old-cmake.patch b/old-cmake.patch deleted file mode 100644 index 613de44..0000000 --- a/old-cmake.patch +++ /dev/null @@ -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) diff --git a/utfcpp-3.2.3.tar.xz b/utfcpp-3.2.3.tar.xz deleted file mode 100644 index fbb3170..0000000 --- a/utfcpp-3.2.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ba0ec73161a6cb9c731a30fd678af0365315ee139ec948ab7ee45a6971e5cfa -size 24208 diff --git a/utfcpp-4.0.5-cmake-location.patch b/utfcpp-4.0.5-cmake-location.patch new file mode 100644 index 0000000..7ec0643 --- /dev/null +++ b/utfcpp-4.0.5-cmake-location.patch @@ -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 diff --git a/utfcpp-4.0.5.tar.xz b/utfcpp-4.0.5.tar.xz new file mode 100644 index 0000000..a9dba4e --- /dev/null +++ b/utfcpp-4.0.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bd522665420f02c547e6f279d2c1c728b9a336d4f31bf93f12c5915d7fb35e0 +size 28252 diff --git a/utfcpp.changes b/utfcpp.changes index 4ddc47e..c238dc9 100644 --- a/utfcpp.changes +++ b/utfcpp.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Feb 21 14:07:20 UTC 2024 - Andreas Stieger + +- 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 diff --git a/utfcpp.spec b/utfcpp.spec index b0e19f6..d65b461 100644 --- a/utfcpp.spec +++ b/utfcpp.spec @@ -2,6 +2,7 @@ # spec file for package utfcpp # # Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 Andreas Stieger # # 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