From bc7101e43a5aec76cccc2c8e049358d55d1e5e97 Mon Sep 17 00:00:00 2001 From: Mark Wright Date: Sat, 10 Jan 2026 14:32:08 +1100 Subject: [PATCH] dev-haskell/call-stack: Patch (by hololeap) to fix tests Signed-off-by: hololeap Signed-off-by: Mark Wright --- .../call-stack/call-stack-0.3.0.ebuild | 3 +-- .../call-stack/call-stack-0.4.0.ebuild | 6 ++++- ...ack-0.4.0-tests-ignore-srcLocPackage.patch | 25 +++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 dev-haskell/call-stack/files/call-stack-0.4.0-tests-ignore-srcLocPackage.patch diff --git a/dev-haskell/call-stack/call-stack-0.3.0.ebuild b/dev-haskell/call-stack/call-stack-0.3.0.ebuild index 8190745c9dd04..ca9345ed7c256 100644 --- a/dev-haskell/call-stack/call-stack-0.3.0.ebuild +++ b/dev-haskell/call-stack/call-stack-0.3.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -15,7 +15,6 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" LICENSE="MIT" SLOT="0/${PV}" KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" -IUSE="" RDEPEND=">=dev-lang/ghc-8.4.3:= " diff --git a/dev-haskell/call-stack/call-stack-0.4.0.ebuild b/dev-haskell/call-stack/call-stack-0.4.0.ebuild index d3e0ebf64eed7..c8e612d805c02 100644 --- a/dev-haskell/call-stack/call-stack-0.4.0.ebuild +++ b/dev-haskell/call-stack/call-stack-0.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -15,6 +15,10 @@ LICENSE="MIT" SLOT="0/${PV}" KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +PATCHES=( + "${FILESDIR}/${PN}-0.4.0-tests-ignore-srcLocPackage.patch" +) + RDEPEND=">=dev-lang/ghc-8.4.3:= " DEPEND="${RDEPEND} diff --git a/dev-haskell/call-stack/files/call-stack-0.4.0-tests-ignore-srcLocPackage.patch b/dev-haskell/call-stack/files/call-stack-0.4.0-tests-ignore-srcLocPackage.patch new file mode 100644 index 0000000000000..d6bed6907a149 --- /dev/null +++ b/dev-haskell/call-stack/files/call-stack-0.4.0-tests-ignore-srcLocPackage.patch @@ -0,0 +1,25 @@ +From 3df9eb420b742a1bbe5f7cb6202701663c057e6f Mon Sep 17 00:00:00 2001 +From: hololeap +Date: Wed, 29 Jan 2025 16:24:43 -0700 +Subject: [PATCH 1/1] Reset srcLocPackage in test + +The original returned value may include a ABI hash (when using newer +Cabal), which would be difficult to reliably test against. Reset it to +"main", which is expected by the test. + +Signed-off-by: hololeap +--- a/test/Data/CallStackSpec.hs ++++ b/test/Data/CallStackSpec.hs +@@ -9,7 +9,8 @@ spec :: Spec + spec = do + describe "callStack" $ do + it "returns the call stack" $ do +- mapLocations test `shouldBe` [ ++ let test' = map (\(x,y) -> (x,y { srcLocPackage = "main" })) test ++ mapLocations test' `shouldBe` [ + #if MIN_VERSION_base(4,8,1) + ("bar" + , SrcLoc { +-- +2.45.3 +