summaryrefslogtreecommitdiff
path: root/dev-libs/date/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
commit9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch)
treeb690ddc0ca30f1472887edbb0b8313629bfcbbb2 /dev-libs/date/files
parentb17a3ef12038de50228bade1f05502c74e135321 (diff)
gentoo resync : 16.09.2020
Diffstat (limited to 'dev-libs/date/files')
-rw-r--r--dev-libs/date/files/date-3.0.0-c-locale-export.patch90
-rw-r--r--dev-libs/date/files/date-3.0.0-version.patch15
2 files changed, 105 insertions, 0 deletions
diff --git a/dev-libs/date/files/date-3.0.0-c-locale-export.patch b/dev-libs/date/files/date-3.0.0-c-locale-export.patch
new file mode 100644
index 000000000000..a4e5a9a93ef0
--- /dev/null
+++ b/dev-libs/date/files/date-3.0.0-c-locale-export.patch
@@ -0,0 +1,90 @@
+Fixes an compilation error when 'ONLY_C_LOCALE' is used to build the project.
+
+Upstream-Bug: https://github.com/HowardHinnant/date/issues/589
+
+--- 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( )
+--
diff --git a/dev-libs/date/files/date-3.0.0-version.patch b/dev-libs/date/files/date-3.0.0-version.patch
new file mode 100644
index 000000000000..398b2107059c
--- /dev/null
+++ b/dev-libs/date/files/date-3.0.0-version.patch
@@ -0,0 +1,15 @@
+Fixes an oversight in the build-system versioning.
+
+Upstream-Bug: https://github.com/HowardHinnant/date/issues/583
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,7 +17,7 @@
+
+ cmake_minimum_required( VERSION 3.7 )
+
+-project( date VERSION 2.4.1 )
++project( date VERSION 3.0.0 )
+
+ include( GNUInstallDirs )
+