From 275074c50dca7b941cc7cd7966a2ace71c29ecae Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 6 Oct 2022 13:21:55 +0100 Subject: gentoo auto-resync : 06:10:2022 - 13:21:55 --- dev-haskell/time-compat/Manifest | 3 +- .../time-compat/files/fix-resolution-test.patch | 49 ++++++++++++++++++++++ dev-haskell/time-compat/time-compat-1.9.6.1.ebuild | 4 +- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 dev-haskell/time-compat/files/fix-resolution-test.patch (limited to 'dev-haskell/time-compat') diff --git a/dev-haskell/time-compat/Manifest b/dev-haskell/time-compat/Manifest index f8dade787c29..4082c9576fbe 100644 --- a/dev-haskell/time-compat/Manifest +++ b/dev-haskell/time-compat/Manifest @@ -1,4 +1,5 @@ +AUX fix-resolution-test.patch 2175 BLAKE2B da5752e05d420996c7ec6b570b3a4bbc2eddbb0b96c2abe44f5aeb278c74690b067bbb9c2b71cf71be5449266a000418b653891b434cf72bea12cb1c7aba10cc SHA512 58050f6fb1e05e2b83829cecbf9cf43e20affd32c9973c6151065f070a1a4cdd3df59c4cfc8ff3f4e5bbbb33c13851abfe07ad4a44b69407cf2340a3638ddb7a DIST time-compat-1.9.6.1.cabal 5033 BLAKE2B bd54030fd2ea681d4b50eebbf05db7a8080c0023aaa845d285e4b9c15c86d9b578446c690d5053c00da27a28ee77be5ee4a728a9d120f98271f57128b4fada2a SHA512 9643dcfd5e6397b00b16547fc5eff687363d5921b44293d2e80e665392ee853315da84cfb3aa91ee8f225bee1966b281af80a5a549bdfa10b42444f27b097890 DIST time-compat-1.9.6.1.tar.gz 59964 BLAKE2B 0a19a9692100d47f14643613539061104fead78056d37ff3aededf3d15ef00e23aa6875b77b56a92138818511b7681197ff55fb8adb6a0d6075c7e02bf0fe397 SHA512 ca0b19aa5e7948fd7d9fbd8ff5e1b0f93a2d8d410d515e7078b40370e7d9fc363c111d53551d57a0320efb0894bcc2210afa8fc04da9f003ded626f53b7e58ea -EBUILD time-compat-1.9.6.1.ebuild 1618 BLAKE2B b57ca66b56df80028964501ce4fe17f0647438a6dce7c44f1239b98009dadd9fb739f3d768d0ad329820d40f31a7dc0b507e7b9c96f00360ca89ad6e6cc9e9d6 SHA512 4779dec19232a36b1df4da034afe6e6e6705b155a377ee2a2a181b0862386ea3c93ed27afb406c9ab06dbca36d0eaec811286a0fef5c82fc4ced8410638e8a00 +EBUILD time-compat-1.9.6.1.ebuild 1678 BLAKE2B 4ea2e13aad4c64063e12dd99705ebdcb7e614770704cd79e1051954ba688d0239fcc49a1c0d49dad994a1b1d1988b2131103cd1c54666180349cb3475d6b3ac9 SHA512 63e6971e639c9b118f2a8adc836757b422ea6db4b6b7333da318d27103c7ddb968d79f60bfbdd7dd8e3a76cbf2a6fe2e7f90b2ef1b478ccf284f9532def68880 MISC metadata.xml 250 BLAKE2B 3adf9597d5114c480b4cc9fb5c3e231d8475b795cd6dce77986e13583ab6e59b43857cf2328570490abef0062a8b8a6b73d231867f9b62124855515cdc044d6d SHA512 5ef2c1d34a3438b39a38c041d45bb06bd0f1ae8a3f8b971bd5aaf36dee560f380e9abefab0c2a4cd7b518e151f5c6a0d0c7cd53caee9a384818f1bdc7deeadc4 diff --git a/dev-haskell/time-compat/files/fix-resolution-test.patch b/dev-haskell/time-compat/files/fix-resolution-test.patch new file mode 100644 index 000000000000..918bd488dbc9 --- /dev/null +++ b/dev-haskell/time-compat/files/fix-resolution-test.patch @@ -0,0 +1,49 @@ +https://github.com/haskellari/time-compat/pull/33 + +From 9f7aa0a5937b800402359c3e82f4bee296ae8e06 Mon Sep 17 00:00:00 2001 +From: matoro +Date: Fri, 16 Sep 2022 11:19:20 -0400 +Subject: [PATCH] Backport 6516a35 "fix resolution test" from time + +The upstream version of time was incorrect in newer versions until +https://github.com/haskell/time/commit/6516a35b3d8cad14a21a559a5d2fc22ddda32fcc. +Because the compat implementation was correct and the upstream version +of time is now logically identical, simply replace both versions with +the current upstream time implementation. + +See https://github.com/haskellari/time-compat/issues/31 for details on +which platforms the distinction matters. Does NOT close that issue +though, because the original issue is for platforms on which the actual +resolution is less precise than the expected, and this will only fix +platforms on which the actual resolution is more precise. +--- + test/main/Test/Clock/Resolution.hs | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/test/main/Test/Clock/Resolution.hs b/test/main/Test/Clock/Resolution.hs +index aab756b..4c0b1dd 100644 +--- a/test/main/Test/Clock/Resolution.hs ++++ b/test/main/Test/Clock/Resolution.hs +@@ -25,7 +25,7 @@ gcdAll :: Real a => [a] -> a + gcdAll = foldr gcd' 0 + + testResolution :: (Show dt, Real dt) => String -> (at -> at -> dt) -> (dt, IO at) -> TestTree +-testResolution name timeDiff (res, getTime) = ++testResolution name timeDiff (reportedRes, getTime) = + testCase name $ do + t0 <- getTime + times0 <- +@@ -53,11 +53,8 @@ testResolution name timeDiff (res, getTime) = + threadDelay 1000 -- 1ms + getTime + let times = fmap (\t -> timeDiff t t0) $ times0 ++ times1 ++ times2 ++ times3 ++ times4 +-#if MIN_VERSION_time(1,8,0) +- assertEqual "resolution" res $ gcdAll times +-#else +- assertBool ("resolution " ++ show (res, gcdAll times)) (res >= gcdAll times) +-#endif ++ foundGrid = gcdAll times ++ assertBool ("resolution " ++ show (reportedRes, foundGrid)) (foundGrid <= reportedRes) + + testResolutions :: TestTree + testResolutions = diff --git a/dev-haskell/time-compat/time-compat-1.9.6.1.ebuild b/dev-haskell/time-compat/time-compat-1.9.6.1.ebuild index 9c9036fee7e0..be1cc3bdd89b 100644 --- a/dev-haskell/time-compat/time-compat-1.9.6.1.ebuild +++ b/dev-haskell/time-compat/time-compat-1.9.6.1.ebuild @@ -16,7 +16,7 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz LICENSE="BSD" SLOT="0/${PV}" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" RDEPEND=">=dev-haskell/base-orphans-0.8.4:=[profile?] =dev-haskell/hashable-1.3.2.0:=[profile?]