commit:     5f26af9a3dddaabf799978636bbe69bd8de708ac
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Wed Aug 28 14:57:50 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Sep 23 13:14:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f26af9a

dev-libs/date: add 3.0.1_p20240913 with reworked tests

- add || die to `./testit` to show test failiures

Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Closes: https://github.com/gentoo/gentoo/pull/38103
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-libs/date/Manifest                             |  1 +
 dev-libs/date/date-3.0.1_p20240913.ebuild          | 45 ++++++++++++++++++++++
 ...date-3.0.1_p20240913_remove-failing-tests.patch | 35 +++++++++++++++++
 3 files changed, 81 insertions(+)

diff --git a/dev-libs/date/Manifest b/dev-libs/date/Manifest
index 168710ab4714..1fa5abe76055 100644
--- a/dev-libs/date/Manifest
+++ b/dev-libs/date/Manifest
@@ -1 +1,2 @@
 DIST date-3.0.0.tar.gz 822623 BLAKE2B 
438a7a5c153c7c2d695fefc95bbd474ef507af2cd8182d1e7d54d482b0128c3f9c57582ed5b40ef46d8f6f5539228d20322c684b1e1b418e5ade3b4871bf4ec1
 SHA512 
03ba0faef68e053aba888591b9350af1a043ef543825c80b1ca3f0dc0448697f56286e561f1a2a59e684680d7fc1e51fd24955c4cc222fe28db64f56037dc1aa
+DIST date-3.0.1_p20240913.gh.tar.gz 828871 BLAKE2B 
bd036c0f12e54bc2d4de538fa32edbee9420c6579a267cd069575698692c2080e77ac0f803ab12607c5fce591603861e0f9de63ed7db2d1cd17e78f486978d96
 SHA512 
92d570658777d1cff09e78f15ae47a3d832bbc571f7cd6df309948b004641ec8b705f4fe4bace0cd19f8d7922cac52d7a7e0ee71cd2b5ff6a03550deee806267

diff --git a/dev-libs/date/date-3.0.1_p20240913.ebuild 
b/dev-libs/date/date-3.0.1_p20240913.ebuild
new file mode 100644
index 000000000000..716577c52456
--- /dev/null
+++ b/dev-libs/date/date-3.0.1_p20240913.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+# maintainer recommends to "live at head" so we ship snapshots
+COMMIT="155c6b9e76e462e1d47ea528ca87f366adccdea3"
+
+DESCRIPTION="A date and time library based on the C++11/14/17 <chrono> header"
+HOMEPAGE="https://github.com/HowardHinnant/date";
+SRC_URI="https://github.com/HowardHinnant/date/archive/${COMMIT}.tar.gz -> 
${P}.gh.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64"
+IUSE="only-c-locale test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( sys-devel/clang )" # tests call clang++
+
+PATCHES=(
+       "$FILESDIR"/${PN}-3.0.1_p20240913_remove-failing-tests.patch
+)
+
+src_prepare() {
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TZ_LIB=ON
+               -DUSE_SYSTEM_TZ_DB=ON
+               -DENABLE_DATE_TESTING=$(usex test)
+               -DCOMPILE_WITH_C_LOCALE=$(usex only-c-locale)
+       )
+       cmake_src_configure
+}
+
+src_test() {
+       cd "${SRC_DIR}"test/ || die
+       ./testit || die
+}

diff --git 
a/dev-libs/date/files/date-3.0.1_p20240913_remove-failing-tests.patch 
b/dev-libs/date/files/date-3.0.1_p20240913_remove-failing-tests.patch
new file mode 100644
index 000000000000..91e2de2566c0
--- /dev/null
+++ b/dev-libs/date/files/date-3.0.1_p20240913_remove-failing-tests.patch
@@ -0,0 +1,35 @@
+From: Filip Kobierski <[email protected]>
+
+Here are the failiure messages:
+test_c(): Assertion `!in.fail()' failed.
+test_Ip(): Assertion `tp == sys_days{2016_y/12/11} + hours{13}' failed.
+test_p():  Assertion `tp == sys_days{2016_y/12/11} + hours{23}' failed.
+---
+ test/date_test/parse.pass.cpp | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/test/date_test/parse.pass.cpp b/test/date_test/parse.pass.cpp
+index a7fecfd..bd1cef4 100644
+--- a/test/date_test/parse.pass.cpp
++++ b/test/date_test/parse.pass.cpp
+@@ -891,17 +891,14 @@ 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();
+-- 
+2.44.2
+

Reply via email to