From: lz-coder <lz-coder@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: chrono-date-3.0.1
Date: Sun, 22 Jan 2023 04:12:28 +0100 [thread overview]
Message-ID: <20230122031228.nVX6ViBX-mIfxVioETGVsR4QIf246Q6m409vlQWeDJw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41750@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
There is an updated pull request by lz-coder against master on the void-packages repository
https://github.com/lz-coder/void-packages chrono-date
https://github.com/void-linux/void-packages/pull/41750
New package: chrono-date-3.0.1
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (X86_64-GLIBC)
A patch file from https://github.com/void-linux/void-packages/pull/41750.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chrono-date-41750.patch --]
[-- Type: text/x-diff, Size: 8263 bytes --]
From 30ba5336467db8d2a7b5bab424fc8d38d8e0a8b3 Mon Sep 17 00:00:00 2001
From: lz-coder <lzcoder@proton.me>
Date: Fri, 20 Jan 2023 02:34:40 -0300
Subject: [PATCH] New package: chrono-date-3.0.1
---
common/shlibs | 1 +
srcpkgs/chrono-date-devel | 1 +
.../538_output_date_pc_for_pkg_config.patch | 60 +++++++++++++++++++
.../disable_buggy_libstdc++_tests.patch | 30 ++++++++++
srcpkgs/chrono-date/patches/get_info.patch | 24 ++++++++
srcpkgs/chrono-date/patches/sys_info.patch | 29 +++++++++
srcpkgs/chrono-date/template | 29 +++++++++
7 files changed, 174 insertions(+)
create mode 120000 srcpkgs/chrono-date-devel
create mode 100644 srcpkgs/chrono-date/patches/538_output_date_pc_for_pkg_config.patch
create mode 100644 srcpkgs/chrono-date/patches/disable_buggy_libstdc++_tests.patch
create mode 100644 srcpkgs/chrono-date/patches/get_info.patch
create mode 100644 srcpkgs/chrono-date/patches/sys_info.patch
create mode 100644 srcpkgs/chrono-date/template
diff --git a/common/shlibs b/common/shlibs
index 85c08f13a05f..6a2c8e447c28 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4224,3 +4224,4 @@ libIlmThread-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
libOpenEXRUtil-3_1.so.30 libopenexr-3.1.5_1
+libdate-tz.so.3 chrono-date-3.0.1_1
diff --git a/srcpkgs/chrono-date-devel b/srcpkgs/chrono-date-devel
new file mode 120000
index 000000000000..7ba11f09e6bd
--- /dev/null
+++ b/srcpkgs/chrono-date-devel
@@ -0,0 +1 @@
+chrono-date
\ No newline at end of file
diff --git a/srcpkgs/chrono-date/patches/538_output_date_pc_for_pkg_config.patch b/srcpkgs/chrono-date/patches/538_output_date_pc_for_pkg_config.patch
new file mode 100644
index 000000000000..d20af66b16dc
--- /dev/null
+++ b/srcpkgs/chrono-date/patches/538_output_date_pc_for_pkg_config.patch
@@ -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@
diff --git a/srcpkgs/chrono-date/patches/disable_buggy_libstdc++_tests.patch b/srcpkgs/chrono-date/patches/disable_buggy_libstdc++_tests.patch
new file mode 100644
index 000000000000..d6257c4c3016
--- /dev/null
+++ b/srcpkgs/chrono-date/patches/disable_buggy_libstdc++_tests.patch
@@ -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();
diff --git a/srcpkgs/chrono-date/patches/get_info.patch b/srcpkgs/chrono-date/patches/get_info.patch
new file mode 100644
index 000000000000..5ce6f15f6d26
--- /dev/null
+++ b/srcpkgs/chrono-date/patches/get_info.patch
@@ -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)
diff --git a/srcpkgs/chrono-date/patches/sys_info.patch b/srcpkgs/chrono-date/patches/sys_info.patch
new file mode 100644
index 000000000000..d7edfa0a4b5f
--- /dev/null
+++ b/srcpkgs/chrono-date/patches/sys_info.patch
@@ -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;
+ }
+
diff --git a/srcpkgs/chrono-date/template b/srcpkgs/chrono-date/template
new file mode 100644
index 000000000000..ff3f21b63f17
--- /dev/null
+++ b/srcpkgs/chrono-date/template
@@ -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"
+ }
+}
next prev parent reply other threads:[~2023-01-22 3:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 5:37 [PR PATCH] " lz-coder
2023-01-20 5:46 ` [PR PATCH] [Updated] " lz-coder
2023-01-20 6:21 ` classabbyamp
2023-01-20 7:01 ` [PR PATCH] [Updated] " lz-coder
2023-01-20 15:34 ` lz-coder
2023-01-20 15:38 ` lz-coder
2023-01-22 1:47 ` [PR REVIEW] " classabbyamp
2023-01-22 3:12 ` lz-coder [this message]
2023-02-07 7:46 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230122031228.nVX6ViBX-mIfxVioETGVsR4QIf246Q6m409vlQWeDJw@z \
--to=lz-coder@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).