From 6fa0e95aa9a7e6dbe46cec5a2e8652a7e44b2514bfbeb258f593a3b9d111c2ee Mon Sep 17 00:00:00 2001 From: Luigi Baldoni Date: Mon, 6 Jul 2020 14:53:14 +0000 Subject: [PATCH 1/2] Accepting request 819012 from home:alois:branches:devel:libraries:c_c++ - Update to version 7.0.0 * Reduced the library size. * Added a simpler and more efficient format string compilation API. The old fmt::compile API is now deprecated. * Optimized integer formatting: format_to with format string compilation and a stack-allocated buffer is now faster than to_chars on both libc++ and libstdc++. * Optimized handling of small format strings. * Applied extern templates to improve compile times when using the core API and fmt/format.h. It is still recommended to use fmt/core.h instead of fmt/format.h but the compile time difference is now smaller. * Named arguments are now stored on stack (no dynamic memory allocations) and the compiled code is more compact and efficient. * Implemented compile-time checks for dynamic width and precision. * Added sentinel support to fmt::join. * Added support for named args, clear and reserve to dynamic_format_arg_store. * Added support for the 'c' format specifier to integral types for compatibility with std::format. * Replaced the 'n' format specifier with 'L' for compatibility with std::format. The 'n' specifier can be enabled via the FMT_DEPRECATED_N_SPECIFIER macro. * The '=' format specifier is now disabled by default for compatibility with std::format. It can be enabled via the FMT_DEPRECATED_NUMERIC_ALIGN macro. * Removed the following deprecated APIs: + FMT_STRING_ALIAS and fmt macros - replaced by FMT_STRING + fmt::basic_string_view::char_type - replaced by fmt::basic_string_view::value_type + convert_to_int + format_arg_store::types + *parse_context - replaced by *format_parse_context + FMT_DEPRECATED_INCLUDE_OS + FMT_DEPRECATED_PERCENT - incompatible with std::format + *writer - replaced by compiled format API * Renamed the internal namespace to detail. The former is still provided as an alias if the FMT_USE_INTERNAL macro is defined. * Improved compatibility between fmt::printf with the standard specs. * Fixed handling of operator<< overloads that use copyfmt. * Added the FMT_OS CMake option to control inclusion of OS-specific APIs in the fmt target. This can be useful for embedded platforms. * Replaced FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION with the FMT_FUZZ macro to prevent interferring with fuzzing of projects using {fmt}. * Fixed compatibility with emscripten. * Improved documentation. * Implemented various build configuration fixes and improvements. * Fixed various warnings and compilation issues. - Drop fmt-6.2.1-fix_pkgconfig_paths.patch - Bump sover to 7 OBS-URL: https://build.opensuse.org/request/show/819012 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=26 --- baselibs.conf | 2 +- fmt-6.2.1-fix_pkgconfig_paths.patch | 117 ---------------------------- fmt-6.2.1.tar.gz | 3 - fmt-7.0.0.tar.gz | 3 + fmt.changes | 63 +++++++++++++++ fmt.spec | 6 +- 6 files changed, 69 insertions(+), 125 deletions(-) delete mode 100644 fmt-6.2.1-fix_pkgconfig_paths.patch delete mode 100644 fmt-6.2.1.tar.gz create mode 100644 fmt-7.0.0.tar.gz diff --git a/baselibs.conf b/baselibs.conf index bdc9cea..b9ca48f 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -libfmt6 +libfmt7 diff --git a/fmt-6.2.1-fix_pkgconfig_paths.patch b/fmt-6.2.1-fix_pkgconfig_paths.patch deleted file mode 100644 index ccdc4da..0000000 --- a/fmt-6.2.1-fix_pkgconfig_paths.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 78f041ab5b40a1145ba686aeb8013e8788b08cd2 Mon Sep 17 00:00:00 2001 -From: Jan Tojnar -Date: Thu, 30 Apr 2020 22:23:38 +0200 -Subject: [PATCH] build: Fix installation paths - -It is not generally true that `CMAKE_INSTALL_` variables are relative paths: - -https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files ---- - CMakeLists.txt | 21 +++++++++++++-------- - support/cmake/JoinPaths.cmake | 26 ++++++++++++++++++++++++++ - support/cmake/fmt.pc.in | 4 ++-- - 3 files changed, 41 insertions(+), 10 deletions(-) - create mode 100644 support/cmake/JoinPaths.cmake - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ce38e7b8..3a487ce7b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -81,6 +81,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} - - include(cxx14) - include(CheckCXXCompilerFlag) -+include(JoinPaths) - - list(FIND CMAKE_CXX_COMPILE_FEATURES "cxx_variadic_templates" index) - if (${index} GREATER -1) -@@ -239,8 +240,8 @@ if (FMT_INSTALL) - include(GNUInstallDirs) - include(CMakePackageConfigHelpers) - set_verbose(FMT_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/fmt CACHE STRING -- "Installation directory for cmake files, relative to " -- "${CMAKE_INSTALL_PREFIX}.") -+ "Installation directory for cmake files, a relative path " -+ "that will be joined to ${CMAKE_INSTALL_PREFIX}, or an arbitrary absolute path.") - set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake) - set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake) - set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc) -@@ -252,22 +253,26 @@ if (FMT_INSTALL) - endif () - - set_verbose(FMT_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING -- "Installation directory for libraries, relative to " -- "${CMAKE_INSTALL_PREFIX}.") -+ "Installation directory for libraries, a relative path " -+ "that will be joined to ${CMAKE_INSTALL_PREFIX}, or an arbitrary absolute path.") - - set_verbose(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING -- "Installation directory for include files, relative to " -- "${CMAKE_INSTALL_PREFIX}.") -+ "Installation directory for include files, a relative path " -+ "that will be joined to ${CMAKE_INSTALL_PREFIX}, or an arbitrary absolute path.") - - set_verbose(FMT_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH -- "Installation directory for pkgconfig (.pc) files, relative to " -- "${CMAKE_INSTALL_PREFIX}.") -+ "Installation directory for pkgconfig (.pc) files, a relative path " -+ "that will be joined to ${CMAKE_INSTALL_PREFIX}, or an arbitrary absolute path.") - - # Generate the version, config and target files into the build directory. - write_basic_package_version_file( - ${version_config} - VERSION ${FMT_VERSION} - COMPATIBILITY AnyNewerVersion) -+ -+ join_paths(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}") -+ join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") -+ - configure_file( - "${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in" - "${pkgconfig}" -diff --git a/support/cmake/JoinPaths.cmake b/support/cmake/JoinPaths.cmake -new file mode 100644 -index 000000000..32d6d6685 ---- /dev/null -+++ b/support/cmake/JoinPaths.cmake -@@ -0,0 +1,26 @@ -+# This module provides function for joining paths -+# known from from most languages -+# -+# Original license: -+# SPDX-License-Identifier: (MIT OR CC0-1.0) -+# Explicit permission given to distribute this module under -+# the terms of the project as described in /LICENSE.rst. -+# Copyright 2020 Jan Tojnar -+# https://github.com/jtojnar/cmake-snips -+# -+# Modelled after Python’s os.path.join -+# https://docs.python.org/3.7/library/os.path.html#os.path.join -+# Windows not supported -+function(join_paths joined_path first_path_segment) -+ set(temp_path "${first_path_segment}") -+ foreach(current_segment IN LISTS ARGN) -+ if(NOT ("${current_segment}" STREQUAL "")) -+ if(IS_ABSOLUTE "${current_segment}") -+ set(temp_path "${current_segment}") -+ else() -+ set(temp_path "${temp_path}/${current_segment}") -+ endif() -+ endif() -+ endforeach() -+ set(${joined_path} "${temp_path}" PARENT_SCOPE) -+endfunction() -diff --git a/support/cmake/fmt.pc.in b/support/cmake/fmt.pc.in -index 4e030afdf..29976a8af 100644 ---- a/support/cmake/fmt.pc.in -+++ b/support/cmake/fmt.pc.in -@@ -1,7 +1,7 @@ - prefix=@CMAKE_INSTALL_PREFIX@ - exec_prefix=@CMAKE_INSTALL_PREFIX@ --libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ --includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ -+libdir=@libdir_for_pc_file@ -+includedir=@includedir_for_pc_file@ - - Name: fmt - Description: A modern formatting library diff --git a/fmt-6.2.1.tar.gz b/fmt-6.2.1.tar.gz deleted file mode 100644 index 2ea132a..0000000 --- a/fmt-6.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5edf8b0f32135ad5fafb3064de26d063571e95e8ae46829c2f4f4b52696bbff0 -size 733646 diff --git a/fmt-7.0.0.tar.gz b/fmt-7.0.0.tar.gz new file mode 100644 index 0000000..9c9094e --- /dev/null +++ b/fmt-7.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d2b4ee9294ed05eac4cc9ee625fe4b3a90c40eeb1097d0b9b330f0f95a74ad1 +size 738799 diff --git a/fmt.changes b/fmt.changes index 6a44ac4..eb78631 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,3 +1,66 @@ +------------------------------------------------------------------- +Mon Jul 6 14:36:10 UTC 2020 - Luigi Baldoni + +- Update to version 7.0.0 + * Reduced the library size. + * Added a simpler and more efficient format string compilation + API. The old fmt::compile API is now deprecated. + * Optimized integer formatting: format_to with format string + compilation and a stack-allocated buffer is now faster than + to_chars on both libc++ and libstdc++. + * Optimized handling of small format strings. + * Applied extern templates to improve compile times when using + the core API and fmt/format.h. It is still recommended to use + fmt/core.h instead of fmt/format.h but the compile time + difference is now smaller. + * Named arguments are now stored on stack (no dynamic memory + allocations) and the compiled code is more compact and + efficient. + * Implemented compile-time checks for dynamic width and + precision. + * Added sentinel support to fmt::join. + * Added support for named args, clear and reserve to + dynamic_format_arg_store. + * Added support for the 'c' format specifier to integral types + for compatibility with std::format. + * Replaced the 'n' format specifier with 'L' for compatibility + with std::format. The 'n' specifier can be enabled via the + FMT_DEPRECATED_N_SPECIFIER macro. + * The '=' format specifier is now disabled by default for + compatibility with std::format. It can be enabled via the + FMT_DEPRECATED_NUMERIC_ALIGN macro. + * Removed the following deprecated APIs: + + FMT_STRING_ALIAS and fmt macros - replaced by + FMT_STRING + + fmt::basic_string_view::char_type - replaced by + fmt::basic_string_view::value_type + + convert_to_int + + format_arg_store::types + + *parse_context - replaced by *format_parse_context + + FMT_DEPRECATED_INCLUDE_OS + + FMT_DEPRECATED_PERCENT - incompatible with + std::format + + *writer - replaced by compiled format API + * Renamed the internal namespace to detail. The former is + still provided as an alias if the FMT_USE_INTERNAL macro is + defined. + * Improved compatibility between fmt::printf with the standard + specs. + * Fixed handling of operator<< overloads that use copyfmt. + * Added the FMT_OS CMake option to control inclusion of + OS-specific APIs in the fmt target. This can be useful for + embedded platforms. + * Replaced FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION with the + FMT_FUZZ macro to prevent interferring with fuzzing of + projects using {fmt}. + * Fixed compatibility with emscripten. + * Improved documentation. + * Implemented various build configuration fixes and + improvements. + * Fixed various warnings and compilation issues. +- Drop fmt-6.2.1-fix_pkgconfig_paths.patch +- Bump sover to 7 + ------------------------------------------------------------------- Tue Jun 23 16:02:53 UTC 2020 - Luigi Baldoni diff --git a/fmt.spec b/fmt.spec index 6c03ced..5c29de3 100644 --- a/fmt.spec +++ b/fmt.spec @@ -16,17 +16,15 @@ # -%define sover 6 +%define sover 7 Name: fmt -Version: 6.2.1 +Version: 7.0.0 Release: 0 Summary: A formatting library for C++ License: MIT URL: http://fmtlib.net/ Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM fmt-6.2.1-fix_pkgconfig_paths.patch -Patch0: fmt-6.2.1-fix_pkgconfig_paths.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig From 6fc4def8ee16773447e4e986f36b9e5d96db05790b4affa162e53fcffa474434 Mon Sep 17 00:00:00 2001 From: Luigi Baldoni Date: Tue, 7 Jul 2020 19:22:22 +0000 Subject: [PATCH 2/2] Accepting request 819279 from home:alois:branches:devel:libraries:c_c++ - Update to version 7.0.1 * Updated the inline version namespace name. * Worked around a gcc bug in mangling of alias templates * Fixed minor issues with the documentation. OBS-URL: https://build.opensuse.org/request/show/819279 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fmt?expand=0&rev=27 --- fmt-7.0.0.tar.gz | 3 --- fmt-7.0.1.tar.gz | 3 +++ fmt.changes | 8 ++++++++ fmt.spec | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 fmt-7.0.0.tar.gz create mode 100644 fmt-7.0.1.tar.gz diff --git a/fmt-7.0.0.tar.gz b/fmt-7.0.0.tar.gz deleted file mode 100644 index 9c9094e..0000000 --- a/fmt-7.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d2b4ee9294ed05eac4cc9ee625fe4b3a90c40eeb1097d0b9b330f0f95a74ad1 -size 738799 diff --git a/fmt-7.0.1.tar.gz b/fmt-7.0.1.tar.gz new file mode 100644 index 0000000..b3e9f23 --- /dev/null +++ b/fmt-7.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac335a4ca6beaebec4ddb2bc35b9ae960b576f3b64a410ff2c379780f0cd4948 +size 739512 diff --git a/fmt.changes b/fmt.changes index eb78631..74b0fe9 100644 --- a/fmt.changes +++ b/fmt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 7 19:18:26 UTC 2020 - aloisio@gmx.com + +- Update to version 7.0.1 + * Updated the inline version namespace name. + * Worked around a gcc bug in mangling of alias templates + * Fixed minor issues with the documentation. + ------------------------------------------------------------------- Mon Jul 6 14:36:10 UTC 2020 - Luigi Baldoni diff --git a/fmt.spec b/fmt.spec index 5c29de3..f8860a8 100644 --- a/fmt.spec +++ b/fmt.spec @@ -18,7 +18,7 @@ %define sover 7 Name: fmt -Version: 7.0.0 +Version: 7.0.1 Release: 0 Summary: A formatting library for C++ License: MIT