New package: chrono-date-3.0.1
This commit is contained in:
parent
428b748ca0
commit
9dcb42c5fc
7 changed files with 174 additions and 0 deletions
|
@ -4224,3 +4224,4 @@ libIlmThread-3_1.so.30 libopenexr-3.1.5_1
|
||||||
libOpenEXR-3_1.so.30 libopenexr-3.1.5_1
|
libOpenEXR-3_1.so.30 libopenexr-3.1.5_1
|
||||||
libOpenEXRCore-3_1.so.30 libopenexr-3.1.5_1
|
libOpenEXRCore-3_1.so.30 libopenexr-3.1.5_1
|
||||||
libOpenEXRUtil-3_1.so.30 libopenexr-3.1.5_1
|
libOpenEXRUtil-3_1.so.30 libopenexr-3.1.5_1
|
||||||
|
libdate-tz.so.3 chrono-date-3.0.1_1
|
||||||
|
|
1
srcpkgs/chrono-date-devel
Symbolic link
1
srcpkgs/chrono-date-devel
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
chrono-date
|
|
@ -0,0 +1,60 @@
|
||||||
|
From e56b2dce7e89a92e1b9b35caa13b3e938c4cedea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Mickens <cole.mickens@gmail.com>
|
||||||
|
Date: Sun, 26 Jan 2020 01:27:08 -0800
|
||||||
|
Subject: [PATCH] CMakeLists.txt: output date.pc for pkg-config
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 15 +++++++++++++++
|
||||||
|
date.pc.in | 10 ++++++++++
|
||||||
|
2 files changed, 25 insertions(+)
|
||||||
|
create mode 100644 date.pc.in
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f30c473..fe778e8 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -128,6 +128,15 @@ if( BUILD_TZ_LIB )
|
||||||
|
endif( )
|
||||||
|
endif( )
|
||||||
|
|
||||||
|
+if ( BUILD_TZ_LIB )
|
||||||
|
+ # Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@
|
||||||
|
+ set( TZ_COMPILE_DEFINITIONS "$<IF:$<TARGET_EXISTS:date-tz>,-D$<JOIN:$<TARGET_PROPERTY:date-tz,INTERFACE_COMPILE_DEFINITIONS>, -D>,>" )
|
||||||
|
+ configure_file(date.pc.in date.pc.cf @ONLY)
|
||||||
|
+ file( GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/date.pc"
|
||||||
|
+ INPUT "${CMAKE_CURRENT_BINARY_DIR}/date.pc.cf" )
|
||||||
|
+
|
||||||
|
+endif( )
|
||||||
|
+
|
||||||
|
#[===================================================================[
|
||||||
|
installation
|
||||||
|
#]===================================================================]
|
||||||
|
@@ -171,6 +180,12 @@ install (
|
||||||
|
FILES cmake/dateConfig.cmake "${version_config}"
|
||||||
|
DESTINATION ${CONFIG_LOC})
|
||||||
|
|
||||||
|
+if ( BUILD_TZ_LIB )
|
||||||
|
+ install(
|
||||||
|
+ FILES ${CMAKE_BINARY_DIR}/date.pc
|
||||||
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
+endif( )
|
||||||
|
+
|
||||||
|
#[===================================================================[
|
||||||
|
testing
|
||||||
|
#]===================================================================]
|
||||||
|
diff --git a/date.pc.in b/date.pc.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..b9c4623
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/date.pc.in
|
||||||
|
@@ -0,0 +1,10 @@
|
||||||
|
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
+exec_prefix=@CMAKE_INSTALL_BINDIR@
|
||||||
|
+libdir=@CMAKE_INSTALL_LIB@
|
||||||
|
+includedir=@CMAKE_INSTALL_INCLUDE@
|
||||||
|
+
|
||||||
|
+Name: date
|
||||||
|
+Description: A date and time library based on the C++11/14/17 <chrono> header
|
||||||
|
+Version: @PACKAGE_VERSION@
|
||||||
|
+Libs: -L${libdir} -ldate-tz
|
||||||
|
+Cflags: -I${includedir} @TZ_COMPILE_DEFINITIONS@
|
|
@ -0,0 +1,30 @@
|
||||||
|
--- a/test/date_test/parse.pass.cpp 2020-06-02 18:08:57.000000000 -0700
|
||||||
|
+++ b/test/date_test/parse.pass.cpp 2020-07-11 19:35:35.349377734 -0700
|
||||||
|
@@ -874,27 +874,20 @@
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
- test_a();
|
||||||
|
- test_b();
|
||||||
|
- test_c();
|
||||||
|
test_C();
|
||||||
|
test_d();
|
||||||
|
test_D();
|
||||||
|
test_F();
|
||||||
|
test_H();
|
||||||
|
- test_Ip();
|
||||||
|
test_j();
|
||||||
|
test_m();
|
||||||
|
test_M();
|
||||||
|
- test_p();
|
||||||
|
- test_r();
|
||||||
|
test_R();
|
||||||
|
test_S();
|
||||||
|
test_T();
|
||||||
|
test_U();
|
||||||
|
test_W();
|
||||||
|
test_GV();
|
||||||
|
- test_x();
|
||||||
|
test_X();
|
||||||
|
test_z();
|
||||||
|
test_Z();
|
24
srcpkgs/chrono-date/patches/get_info.patch
Normal file
24
srcpkgs/chrono-date/patches/get_info.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
From b49a7575ebbe127e8bd344900a52c14b5d69dd7b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Howard Hinnant <howard.hinnant@gmail.com>
|
||||||
|
Date: Tue, 18 May 2021 16:15:31 -0400
|
||||||
|
Subject: [PATCH] Zero initialize local_info in get_info
|
||||||
|
|
||||||
|
* Even when the result is unique, the second sys_info
|
||||||
|
should be zero initialized.
|
||||||
|
---
|
||||||
|
src/tz.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/tz.cpp b/src/tz.cpp
|
||||||
|
index 26babbd9..1592bc8f 100644
|
||||||
|
--- a/src/tz.cpp
|
||||||
|
+++ b/src/tz.cpp
|
||||||
|
@@ -2164,7 +2164,7 @@ time_zone::get_info_impl(local_seconds tp) const
|
||||||
|
{
|
||||||
|
using namespace std::chrono;
|
||||||
|
init();
|
||||||
|
- local_info i;
|
||||||
|
+ local_info i{};
|
||||||
|
i.result = local_info::unique;
|
||||||
|
auto tr = upper_bound(transitions_.begin(), transitions_.end(), tp,
|
||||||
|
[](const local_seconds& x, const transition& t)
|
29
srcpkgs/chrono-date/patches/sys_info.patch
Normal file
29
srcpkgs/chrono-date/patches/sys_info.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
From 052eebaf0086e6bbc5ead01c3f1a8f02496aa701 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Howard Hinnant <howard.hinnant@gmail.com>
|
||||||
|
Date: Tue, 18 May 2021 16:17:37 -0400
|
||||||
|
Subject: [PATCH] When comparing sys_info in test... only compare whether the
|
||||||
|
saves are equal to 0 and not their actual values.
|
||||||
|
|
||||||
|
This allows one to compare against the binary database
|
||||||
|
which does not contain actual values of save.
|
||||||
|
---
|
||||||
|
test/posix/ptz.pass.cpp | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/posix/ptz.pass.cpp b/test/posix/ptz.pass.cpp
|
||||||
|
index 5601c21d..9e15e3a9 100644
|
||||||
|
--- a/test/posix/ptz.pass.cpp
|
||||||
|
+++ b/test/posix/ptz.pass.cpp
|
||||||
|
@@ -29,10 +29,11 @@
|
||||||
|
bool
|
||||||
|
is_equal(date::sys_info const& x, date::sys_info const& y)
|
||||||
|
{
|
||||||
|
+ using namespace std::chrono;
|
||||||
|
return x.begin == y.begin &&
|
||||||
|
x.end == y.end &&
|
||||||
|
x.offset == y.offset &&
|
||||||
|
- x.save == y.save &&
|
||||||
|
+ (x.save == minutes{0}) == (y.save == minutes{0}) &&
|
||||||
|
x.abbrev == y.abbrev;
|
||||||
|
}
|
||||||
|
|
29
srcpkgs/chrono-date/template
Normal file
29
srcpkgs/chrono-date/template
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Template file for 'chrono-date'
|
||||||
|
pkgname=chrono-date
|
||||||
|
version=3.0.1
|
||||||
|
revision=1
|
||||||
|
build_style=cmake
|
||||||
|
configure_args="-DBUILD_SHARED_LIBS=true -DBUILD_TZ_LIB=true
|
||||||
|
-DUSE_SYSTEM_TZ_DB=true -DENABLE_DATE_TESTING=false"
|
||||||
|
short_desc="Date and time library based on the C++11/14/17 <chrono> header"
|
||||||
|
maintainer="lz-coder <lzcoder@proton.me>"
|
||||||
|
license="MIT"
|
||||||
|
homepage="https://howardhinnant.github.io/date/date.html"
|
||||||
|
changelog="https://github.com/HowardHinnant/date/releases"
|
||||||
|
distfiles="https://github.com/HowardHinnant/date/archive/v${version}.tar.gz"
|
||||||
|
checksum=7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
vlicense LICENSE.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
chrono-date-devel_package() {
|
||||||
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
|
short_desc+=" - development files"
|
||||||
|
pkg_install() {
|
||||||
|
vmove usr/include
|
||||||
|
vmove usr/lib/cmake
|
||||||
|
vmove usr/lib/pkgconfig
|
||||||
|
vmove "usr/lib/*.so"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue