diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-08-29 14:12:12 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-08-29 14:15:55 +0100 |
commit | 8e83b7e39bbc510a81c477d4dfa95adf1b7240ae (patch) | |
tree | 1fb889143d10fa3ef09d33861667d7e382537eaf /dev-haskell | |
parent | x11-libs/libX11: Stabilize 1.6.12 ppc, #738984 (diff) | |
download | gentoo-8e83b7e39bbc510a81c477d4dfa95adf1b7240ae.tar.gz gentoo-8e83b7e39bbc510a81c477d4dfa95adf1b7240ae.tar.bz2 gentoo-8e83b7e39bbc510a81c477d4dfa95adf1b7240ae.zip |
dev-haskell/encoding: bump up to 0.8.5
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-haskell')
-rw-r--r-- | dev-haskell/encoding/Manifest | 1 | ||||
-rw-r--r-- | dev-haskell/encoding/encoding-0.8.5.ebuild | 46 | ||||
-rw-r--r-- | dev-haskell/encoding/files/encoding-0.8.2-overflow.patch | 41 |
3 files changed, 88 insertions, 0 deletions
diff --git a/dev-haskell/encoding/Manifest b/dev-haskell/encoding/Manifest index cc09d809b16e..32b45d0e6b4c 100644 --- a/dev-haskell/encoding/Manifest +++ b/dev-haskell/encoding/Manifest @@ -2,4 +2,5 @@ DIST encoding-0.6.7.2.tar.gz 832564 BLAKE2B b61a113be8ac4d26c85343d5e459c35a4cdf DIST encoding-0.7.0.2.tar.gz 320988 BLAKE2B f1fdef3e4b9d247c03f9669b7506cbd9082acdd85bd2d96e988c8731b3e9c774bb498717e49089cf4030d50a94e24bc461d65ef3923a14a0212d4e8741547c91 SHA512 60ede0397d68bcea292ed9fb09fe2bafcbc0afdd7d374b098049afe9a7146cc4be5615a83dbfb13c1a44db2e52a77f231fbac3ab2249398d3fb9921041aadd04 DIST encoding-0.8.1.tar.gz 1034198 BLAKE2B 67bcc5c36698e21eeb827d19585bafe4a8ce599703863295097c83b1c6908bec82bcf98c2d9b9c4ea492bfd79435d064330a7d1d1e57f7d7ea27f587145bcbbb SHA512 f77088138888673f0802b57cba3f14cf84a1bee15ad013a1335d8a9e8d7206d716078c3b2ab299545f49174d9de9db4c67089f1b01664c86337c31ec91c5cf46 DIST encoding-0.8.2.tar.gz 412630 BLAKE2B 2e6fd3599d4c1062c85389a1d12d332e982beecfb4f98b92ee8b1618e50ed1f91ec65b94273a325995bcbaa8fc6f41878870069c6400365e899b946592b740da SHA512 e8cbb1b64f3555945c185485688bfb7e73ca7104cbbbf5bec8ec55937656df1e3b99bae24aa1513c0c690d3521bca9c111f0258f2245637c7c8d706709cdcd62 +DIST encoding-0.8.5.tar.gz 380798 BLAKE2B 0b8ccca2de17e00c59b114c8b6b7107a80e92e376cc3bf9d5e95eadf2a2c1e5a2d2a12294e7ec669b1203d4b4c6809c8a129aaf17f1022f361b64542fcf45d9b SHA512 2ae2f44007735bdcb6b7cd35614ffcb5fe211321d516350555b03d9074c679995260f30de1df788b800711613bfdca037cb9c24cf90afc88d32a706c237df386 DIST encoding-0.8.tar.gz 321410 BLAKE2B ee87c14457c3474c571ebe25b5f98d50713b85666aeb5e099767d787bfaa9b10d03feb0e596c6c93ddf68bfc583285971f30d8e526cdc12d7570ae63b9b80f77 SHA512 c1f05333fa34eb0dc9ed1e1c82bc4d84e9fb3d0252a45519998a199ef1eafd49e9dea7ad60e8ae855b4efdaf4977f8a9aa6324d7b73bfd122bdef60341dea1e0 diff --git a/dev-haskell/encoding/encoding-0.8.5.ebuild b/dev-haskell/encoding/encoding-0.8.5.ebuild new file mode 100644 index 000000000000..48de713accc6 --- /dev/null +++ b/dev-haskell/encoding/encoding-0.8.5.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# ebuild generated by hackport 0.6.6.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +DESCRIPTION="A library for various character encodings" +HOMEPAGE="http://code.haskell.org/encoding/" +SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="+systemencoding" + +RDEPEND=">=dev-haskell/extensible-exceptions-0.1:=[profile?] <dev-haskell/extensible-exceptions-0.2:=[profile?] + >=dev-haskell/mtl-2.0:=[profile?] <dev-haskell/mtl-2.3:=[profile?] + >=dev-haskell/regex-compat-0.71:=[profile?] + >=dev-lang/ghc-7.8.2:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-2.0 + >=dev-haskell/haxml-1.22 <dev-haskell/haxml-1.26 + test? ( dev-haskell/hunit + dev-haskell/quickcheck ) +" +PATCHES=( + "${FILESDIR}"/${PN}-0.8.2-overflow.patch +) + +src_prepare() { + default + + cabal_chdeps \ + 'regex-compat >=0.71 && <0.95' 'regex-compat >=0.71' \ + 'containers >=0.4 && <0.6' 'containers >=0.4 && <0.7' +} + +src_configure() { + haskell-cabal_src_configure \ + $(cabal_flag systemencoding systemencoding) +} diff --git a/dev-haskell/encoding/files/encoding-0.8.2-overflow.patch b/dev-haskell/encoding/files/encoding-0.8.2-overflow.patch new file mode 100644 index 000000000000..c8085c827197 --- /dev/null +++ b/dev-haskell/encoding/files/encoding-0.8.2-overflow.patch @@ -0,0 +1,41 @@ +https://github.com/dmwit/encoding/pull/11 + +From ce27249d4260c7eb3f514c95d5edd762804dd4f3 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Sat, 29 Aug 2020 13:52:33 +0100 +Subject: [PATCH] Data/Map/Static/Builder.hs: avoid shiftL with negative offset + +On ghc-8.8 building `encoding` fails as: + +``` +Preprocessing library for encoding-0.8.5.. +arithmetic overflow +``` + +This happens because `findSplitSize` can't handle +small values, like `findSplitSize 1` and calls `shiftL` +with negative value, which is forbdden: + https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-Bits.html#v:shiftL + +Work it around by always passing non-negative offset. + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + Data/Map/Static/Builder.hs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Data/Map/Static/Builder.hs b/Data/Map/Static/Builder.hs +index 486e19c..61851cd 100644 +--- a/Data/Map/Static/Builder.hs ++++ b/Data/Map/Static/Builder.hs +@@ -37,6 +37,6 @@ treeDepth sz = find' [0..] + findSplitSize :: Int -> Int + findSplitSize len = let depth = treeDepth len + free = (maxSize depth) - len +- in if free <= (1 `shiftL` (depth - 2)) ++ in if 2 * free <= (1 `shiftL` (depth - 1)) + then maxSize (depth - 1) + else len - (maxSize (depth - 2)) - 1 +-- +2.28.0 + |