Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: chrono-date-3.0.1
@ 2023-01-20  5:37 lz-coder
  2023-01-20  5:46 ` [PR PATCH] [Updated] " lz-coder
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: lz-coder @ 2023-01-20  5:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

There is a new 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: 1433 bytes --]

From 6593b9f13793caaab36354bba315499ddba19a2f 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

---
 srcpkgs/chrono-date/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/chrono-date/template

diff --git a/srcpkgs/chrono-date/template b/srcpkgs/chrono-date/template
new file mode 100644
index 000000000000..72b720937996
--- /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
+hostmakedepends="cmake"
+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
+
+do_build() {
+	cmake -B build -S "." \
+		-DCMAKE_BUILD_TYPE=None \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DBUILD_SHARED_LIBS=true \
+		-DBUILD_TZ_LIB=true \
+		-DUSE_SYSTEM_TZ_DB=true \
+		-DENABLE_DATE_TESTING=true \
+		-Wno-dev
+}
+
+do_install() {
+	make -C build DESTDIR="${DESTDIR}/" install
+	vlicense LICENSE.txt
+	vinstall README.md 644 "/usr/share/dock/${pkgname}"
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
@ 2023-01-20  5:46 ` lz-coder
  2023-01-20  6:21 ` classabbyamp
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lz-coder @ 2023-01-20  5:46 UTC (permalink / raw)
  To: ml

[-- 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: 1432 bytes --]

From 5e0376511243f39887007ef1e17ddb4ca51d20fd 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

---
 srcpkgs/chrono-date/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/chrono-date/template

diff --git a/srcpkgs/chrono-date/template b/srcpkgs/chrono-date/template
new file mode 100644
index 000000000000..76be385f9b68
--- /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
+hostmakedepends="cmake"
+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
+
+do_build() {
+	cmake -B build -S "." \
+		-DCMAKE_BUILD_TYPE=None \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DBUILD_SHARED_LIBS=true \
+		-DBUILD_TZ_LIB=true \
+		-DUSE_SYSTEM_TZ_DB=true \
+		-DENABLE_DATE_TESTING=true \
+		-Wno-dev
+}
+
+do_install() {
+	make -C build DESTDIR="${DESTDIR}/" install
+	vlicense LICENSE.txt
+	vinstall README.md 644 "/usr/share/doc/${pkgname}"
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-01-20  6:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/41750#issuecomment-1397969504

Comment:
how about this?

```bash
# 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=true"
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/*.so"
	}
}
```

- used the cmake `build_style`
    - removes need for manual `do_build` and `do_install`
    - allows usage of `configure_args`
    - removed unnecessary cmake arguments
- added a -devel subpackage (you will need to `ln -sr srcpkgs/chrono-date srcpkgs/chrono-date-devel`)
- removed the README... I don't think it's necessary to include
- you willl also need to add `libdate-tz.so.3 chrono-date-3.0.1_1` to `common/shlibs` to be able to use this with other packages

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
  2023-01-20  5:46 ` [PR PATCH] [Updated] " lz-coder
  2023-01-20  6:21 ` classabbyamp
@ 2023-01-20  7:01 ` lz-coder
  2023-01-20 15:34 ` lz-coder
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lz-coder @ 2023-01-20  7:01 UTC (permalink / raw)
  To: ml

[-- 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: 2119 bytes --]

From 15f25a4f75dc00fc9074ec3222aca7c20b856bc4 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 +
 srcpkgs/chrono-date/template | 28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 120000 srcpkgs/chrono-date-devel
 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/template b/srcpkgs/chrono-date/template
new file mode 100644
index 000000000000..8802629fd99e
--- /dev/null
+++ b/srcpkgs/chrono-date/template
@@ -0,0 +1,28 @@
+# 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=true"
+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/*.so"
+	}
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
                   ` (2 preceding siblings ...)
  2023-01-20  7:01 ` [PR PATCH] [Updated] " lz-coder
@ 2023-01-20 15:34 ` lz-coder
  2023-01-20 15:38 ` lz-coder
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lz-coder @ 2023-01-20 15:34 UTC (permalink / raw)
  To: ml

[-- 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: 8236 bytes --]

From ac9501d8303b1f9088a9e519722edf4458a08d8c 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                  | 28 +++++++++
 7 files changed, 173 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..973481fc7317
--- /dev/null
+++ b/srcpkgs/chrono-date/template
@@ -0,0 +1,28 @@
+# 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/*.so"
+	}
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
                   ` (3 preceding siblings ...)
  2023-01-20 15:34 ` lz-coder
@ 2023-01-20 15:38 ` lz-coder
  2023-01-22  1:47 ` [PR REVIEW] " classabbyamp
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: lz-coder @ 2023-01-20 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

New comment by lz-coder on void-packages repository

https://github.com/void-linux/void-packages/pull/41750#issuecomment-1398572502

Comment:
about setting' -DENABLE_DATE_TESTING=false'
[One can run tests by cd'ing into the test subdirectory and running testit. There are known failures on all platforms except for macOS. And even on macOS if C++11 is used](https://github.com/HowardHinnant/date/#build--test)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR REVIEW] New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
                   ` (4 preceding siblings ...)
  2023-01-20 15:38 ` lz-coder
@ 2023-01-22  1:47 ` classabbyamp
  2023-01-22  3:12 ` [PR PATCH] [Updated] " lz-coder
  2023-02-07  7:46 ` [PR PATCH] [Merged]: " classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-01-22  1:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/41750#discussion_r1083378564

Comment:
```suggestion
		vmove usr/lib/cmake
		vmove usr/lib/pkgconfig
```

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
                   ` (5 preceding siblings ...)
  2023-01-22  1:47 ` [PR REVIEW] " classabbyamp
@ 2023-01-22  3:12 ` lz-coder
  2023-02-07  7:46 ` [PR PATCH] [Merged]: " classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: lz-coder @ 2023-01-22  3:12 UTC (permalink / raw)
  To: ml

[-- 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"
+	}
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Merged]: New package: chrono-date-3.0.1
  2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 lz-coder
                   ` (6 preceding siblings ...)
  2023-01-22  3:12 ` [PR PATCH] [Updated] " lz-coder
@ 2023-02-07  7:46 ` classabbyamp
  7 siblings, 0 replies; 9+ messages in thread
From: classabbyamp @ 2023-02-07  7:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

There's a merged pull request on the void-packages repository

New package: chrono-date-3.0.1
https://github.com/void-linux/void-packages/pull/41750

Description:
<!-- 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)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-07  7:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20  5:37 [PR PATCH] New package: chrono-date-3.0.1 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 ` [PR PATCH] [Updated] " lz-coder
2023-02-07  7:46 ` [PR PATCH] [Merged]: " classabbyamp

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).