[packages/date] up to 3.0.1

atler atler at pld-linux.org
Mon May 29 12:42:40 CEST 2023


commit 082be0103d199ffce81fb0c6dd61864ea57ad25c
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon May 29 12:42:17 2023 +0200

    up to 3.0.1

 date-cmake.patch | 200 -------------------------------------------------------
 date.spec        |   6 +-
 2 files changed, 2 insertions(+), 204 deletions(-)
---
diff --git a/date.spec b/date.spec
index 61f7c9e..7d560a0 100644
--- a/date.spec
+++ b/date.spec
@@ -1,12 +1,11 @@
 Summary:	A date and time library based on the C++11/14/17 <chrono> header
 Name:		date
-Version:	3.0.0
+Version:	3.0.1
 Release:	1
 License:	MIT
 Group:		Development/Libraries
 Source0:	https://github.com/HowardHinnant/date/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	c76681532f87644c59c19938961bc85c
-Patch0:		%{name}-cmake.patch
+# Source0-md5:	78902f47f7931a3ae8a320e0dea1f20a
 URL:		https://howardhinnant.github.io/date/date.html
 BuildRequires:	cmake >= 3.7
 BuildRequires:	libstdc++-devel >= 6:5
@@ -27,7 +26,6 @@ Header files for date library.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 install -d build
diff --git a/date-cmake.patch b/date-cmake.patch
deleted file mode 100644
index 6fe4de6..0000000
--- a/date-cmake.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From a6243ce56f6a3781fc2ef18054a718f196591aed Mon Sep 17 00:00:00 2001
-From: Michael Ellery <mellery451 at gmail.com>
-Date: Mon, 22 Jun 2020 08:48:09 -0700
-Subject: [PATCH] set cmake proj ver to 3.0: (#584)
-
-FIXES: #583
----
- CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ad749004..76b074ce 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -7,7 +7,7 @@
-      include( FetchContent )
-      FetchContent_Declare( date_src
-        GIT_REPOSITORY https://github.com/HowardHinnant/date.git
--       GIT_TAG        2.4.2  # adjust tag/branch/commit as needed
-+       GIT_TAG        v3.0.0  # adjust tag/branch/commit as needed
-      )
-      FetchContent_MakeAvailable(date_src)
-      ...
-@@ -17,7 +17,7 @@
- 
- cmake_minimum_required( VERSION 3.7 )
- 
--project( date VERSION 2.4.1 )
-+project( date VERSION 3.0.0 )
- 
- include( GNUInstallDirs )
- 
-From 9537addfc4f4b237d50a3502e07fcc492f98d8cc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Nico=20Schl=C3=B6mer?= <nico.schloemer at gmail.com>
-Date: Thu, 23 Jul 2020 01:03:42 +0200
-Subject: [PATCH] fix ONLY_C_LOCALE export from cmake (#590)
-
-* fix ONLY_C_LOCALE export from cmake
-
-* add some comments
-
-* remove all generator expressions for target output
-
-* cmake: fewer variables, make it easier to read
----
- CMakeLists.txt | 60 ++++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 44 insertions(+), 16 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 76b074ce..ebe2bcef 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -76,10 +76,25 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
-     # public headers will get installed:
-     set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h )
- endif ()
--target_compile_definitions( date INTERFACE
--    #To workaround libstdc++ issue https://github.com/HowardHinnant/date/issues/388
--    ONLY_C_LOCALE=$<IF:$<BOOL:${COMPILE_WITH_C_LOCALE}>,1,0>
--    $<$<BOOL:${DISABLE_STRING_VIEW}>:HAS_STRING_VIEW=0> )
-+
-+# These used to be set with generator expressions,
-+#
-+#   ONLY_C_LOCALE=$<IF:$<BOOL:${COMPILE_WITH_C_LOCALE}>,1,0>
-+#
-+# which expand in the output target file to, e.g.
-+#
-+#   ONLY_C_LOCALE=$<IF:$<BOOL:FALSE>,1,0>
-+#
-+# This string is then (somtimes?) not correctly interpreted.
-+if ( COMPILE_WITH_C_LOCALE )
-+  # To workaround libstdc++ issue https://github.com/HowardHinnant/date/issues/388
-+  target_compile_definitions( date INTERFACE ONLY_C_LOCALE=1 )
-+else()
-+  target_compile_definitions( date INTERFACE ONLY_C_LOCALE=0 )
-+endif()
-+if ( DISABLE_STRING_VIEW )
-+  target_compile_definitions( date INTERFACE HAS_STRING_VIEW=0 )
-+endif()
- 
- #[===================================================================[
-    tz (compiled) library
-@@ -89,27 +104,40 @@ if( BUILD_TZ_LIB )
-     target_sources( date-tz
-       PUBLIC
-         $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/date/tz.h
--        $<$<BOOL:${IOS}>:$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/date/ios.h>
-       PRIVATE
-         include/date/tz_private.h
--        $<$<BOOL:${IOS}>:src/ios.mm>
-         src/tz.cpp )
-+    if ( IOS )
-+      target_sources( date-tz
-+        PUBLIC
-+          $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/date/ios.h
-+        PRIVATE
-+          src/ios.mm )
-+    endif()
-     add_library( date::tz ALIAS date-tz )
-     target_link_libraries( date-tz PUBLIC date )
-     target_include_directories( date-tz PUBLIC
-         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-         $<INSTALL_INTERFACE:include> )
--    target_compile_definitions( date-tz
--        PRIVATE
--            AUTO_DOWNLOAD=$<IF:$<OR:$<BOOL:${USE_SYSTEM_TZ_DB}>,$<BOOL:${MANUAL_TZ_DB}>>,0,1>
--            HAS_REMOTE_API=$<IF:$<OR:$<BOOL:${USE_SYSTEM_TZ_DB}>,$<BOOL:${MANUAL_TZ_DB}>>,0,1>
--            $<$<AND:$<BOOL:${WIN32}>,$<BOOL:${BUILD_SHARED_LIBS}>>:DATE_BUILD_DLL=1>
--            $<$<BOOL:${USE_TZ_DB_IN_DOT}>:INSTALL=.>
--        PUBLIC
--            USE_OS_TZDB=$<IF:$<AND:$<BOOL:${USE_SYSTEM_TZ_DB}>,$<NOT:$<BOOL:${WIN32}>>,$<NOT:$<BOOL:${MANUAL_TZ_DB}>>>,1,0>
--        INTERFACE
--            $<$<AND:$<BOOL:${WIN32}>,$<BOOL:${BUILD_SHARED_LIBS}>>:DATE_USE_DLL=1> )
-+
-+    if ( USE_SYSTEM_TZ_DB OR MANUAL_TZ_DB )
-+      target_compile_definitions( date-tz PRIVATE AUTO_DOWNLOAD=0 HAS_REMOTE_API=0 )
-+    else()
-+      target_compile_definitions( date-tz PRIVATE AUTO_DOWNLOAD=1 HAS_REMOTE_API=1 )
-+    endif()
-+
-+    if ( USE_SYSTEM_TZ_DB AND NOT WIN32 AND NOT MANUAL_TZ_DB )
-+      target_compile_definitions( date-tz PRIVATE INSTALL=. PUBLIC USE_OS_TZDB=1 )
-+    else()
-+      target_compile_definitions( date-tz PUBLIC USE_OS_TZDB=0 )
-+    endif()
-+
-+    if ( WIN32 AND BUILD_SHARED_LIBS )
-+      target_compile_definitions( date-tz PUBLIC DATE_BUILD_DLL=1 )
-+    endif()
-+
-     set(TZ_HEADERS include/date/tz.h)
-+
-     if( IOS )
-         list(APPEND TZ_HEADERS include/date/ios.h)
-     endif( )
-From 313189b0a8767f9964704cfc87fe5956e12abc24 Mon Sep 17 00:00:00 2001
-From: Michael Ellery <mellery451 at gmail.com>
-Date: Tue, 25 Aug 2020 13:57:00 -0700
-Subject: [PATCH] Correct lingering references to bare "tz" libname: (#600)
-
-Fixes: #599
----
- CMakeLists.txt         | 7 ++++---
- cmake/dateConfig.cmake | 4 ++--
- 2 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ebe2bcef..d0baf600 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -18,6 +18,7 @@
- cmake_minimum_required( VERSION 3.7 )
- 
- project( date VERSION 3.0.0 )
-+set(ABI_VERSION 3) # used as SOVERSION, increment when ABI changes
- 
- include( GNUInstallDirs )
- 
-@@ -114,7 +115,7 @@ if( BUILD_TZ_LIB )
-         PRIVATE
-           src/ios.mm )
-     endif()
--    add_library( date::tz ALIAS date-tz )
-+    add_library( date::date-tz ALIAS date-tz )
-     target_link_libraries( date-tz PUBLIC date )
-     target_include_directories( date-tz PUBLIC
-         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-@@ -145,7 +146,7 @@ if( BUILD_TZ_LIB )
-         POSITION_INDEPENDENT_CODE ON
-         PUBLIC_HEADER "${TZ_HEADERS}"
-         VERSION "${PROJECT_VERSION}"
--        SOVERSION "${PROJECT_VERSION}" )
-+        SOVERSION "${ABI_VERSION}" )
-     if( NOT MSVC )
-         find_package( Threads )
-         target_link_libraries( date-tz PUBLIC Threads::Threads )
-@@ -250,7 +251,7 @@ if( ENABLE_DATE_TESTING )
-                     ${CMAKE_CXX_COMPILER}
-                     -std=c++14
-                     -L${CMAKE_BINARY_DIR}/
--                    -ltz
-+                    -ldate-tz
-                     -I${PROJECT_SOURCE_DIR}/include
-                     -I${PROJECT_SOURCE_DIR}/include/date
-                     -o ${BIN_NAME}
-diff --git a/cmake/dateConfig.cmake b/cmake/dateConfig.cmake
-index 20f86e8d..2198ad1a 100644
---- a/cmake/dateConfig.cmake
-+++ b/cmake/dateConfig.cmake
-@@ -1,8 +1,8 @@
- include( CMakeFindDependencyMacro )
- include( "${CMAKE_CURRENT_LIST_DIR}/dateTargets.cmake" )
--if( NOT MSVC AND TARGET date::tz )
-+if( NOT MSVC AND TARGET date::date-tz )
-     find_dependency( Threads REQUIRED)
--    get_target_property( _tzill date::tz  INTERFACE_LINK_LIBRARIES )
-+    get_target_property( _tzill date::date-tz  INTERFACE_LINK_LIBRARIES )
-     if( _tzill AND "${_tzill}" MATCHES "libcurl" )
-         find_dependency( CURL )
-     endif( )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/date.git/commitdiff/082be0103d199ffce81fb0c6dd61864ea57ad25c



More information about the pld-cvs-commit mailing list