Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/wxdirect/files/, dev-haskell/wxdirect/
Date: Wed, 05 Aug 2020 06:52:38
Message-Id: 1596610272.f7a7039c608b3a411f7208b9436ad7b1dbffc169.slyfox@gentoo
1 commit: f7a7039c608b3a411f7208b9436ad7b1dbffc169
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 5 06:51:12 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 5 06:51:12 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7a7039c
7
8 dev-haskell/wxdirect: bump up to 0.92.3.0
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 dev-haskell/wxdirect/Manifest | 1 +
14 .../wxdirect/files/wxdirect-0.90.0.1-ghc-7.5.patch | 49 ++++++++++++++++++++++
15 .../wxdirect/files/wxdirect-0.90.1.1-ghc-7.5.patch | 38 +++++++++++++++++
16 dev-haskell/wxdirect/wxdirect-0.92.3.0-r1.ebuild | 46 ++++++++++++++++++++
17 4 files changed, 134 insertions(+)
18
19 diff --git a/dev-haskell/wxdirect/Manifest b/dev-haskell/wxdirect/Manifest
20 index d7baf064462..ecf20b6fbdb 100644
21 --- a/dev-haskell/wxdirect/Manifest
22 +++ b/dev-haskell/wxdirect/Manifest
23 @@ -1 +1,2 @@
24 DIST wxdirect-0.92.2.0.tar.gz 30544 BLAKE2B 3d51252cc792f2d00be9ec53f139d961c19d6bf5e5aa792b1fe65ed258b2f98b9da30fda28d018b6d26dae72d80d8c394c17ba822e43c2ba89611881b7ba9b29 SHA512 f112fc0a62031bc9eb8e6caa2bd70f0b9fa66a81380785165a07bdffa6fa2b44652ffb9f1165c3b8ab7db8a31273650e36e98c8eb72f7cec5873ecb75f58dc21
25 +DIST wxdirect-0.92.3.0.tar.gz 30586 BLAKE2B cb174838000a39b0067338297adb7c1e0b96bd524297950f5d3ede244ec914d2a1b3c717669b5af53f29b55266473c7042b7c90990b70c6177e85fc11d76bc34 SHA512 02dfd9496f1a36480c82a4cf03e3a0ded0a45ede984b70e923b2289323f9c4561b7c0a2ab2db34ee2021b7b5fe62c25ea4a8b61bcbbe3414f821dacb14190f8b
26
27 diff --git a/dev-haskell/wxdirect/files/wxdirect-0.90.0.1-ghc-7.5.patch b/dev-haskell/wxdirect/files/wxdirect-0.90.0.1-ghc-7.5.patch
28 new file mode 100644
29 index 00000000000..75d9bf21c72
30 --- /dev/null
31 +++ b/dev-haskell/wxdirect/files/wxdirect-0.90.0.1-ghc-7.5.patch
32 @@ -0,0 +1,49 @@
33 +--- wxdirect-0.90.0.1-orig/wxdirect.cabal 2012-04-19 01:05:11.000000000 +1000
34 ++++ wxdirect-0.90.0.1/wxdirect.cabal 2012-05-19 21:12:02.612085338 +1000
35 +@@ -66,7 +66,7 @@
36 + if flag(splitBase)
37 + build-depends:
38 + base >= 4 && < 5,
39 +- containers >= 0.2 && < 0.5
40 ++ containers >= 0.2 && < 0.6
41 + else
42 + build-depends:
43 + base >= 3 && < 4,
44 +--- wxdirect-0.90.0.1-orig/src/Classes.hs 2012-04-19 01:05:10.000000000 +1000
45 ++++ wxdirect-0.90.0.1/src/Classes.hs 2012-07-14 13:58:48.072492467 +1000
46 +@@ -1,3 +1,4 @@
47 ++{-# LANGUAGE CPP #-}
48 + -----------------------------------------------------------------------------------------
49 + {-| Module : Classes
50 + Copyright : (c) Daan Leijen 2003
51 +@@ -28,7 +29,9 @@
52 + import Data.List( sort, sortBy )
53 + import qualified Data.Set as Set
54 + import qualified Data.Map as Map
55 ++#if !MIN_VERSION_base(4,6,0)
56 + import Prelude hiding ( catch )
57 ++#endif
58 + import HaskellNames( haskellTypeName, isBuiltin )
59 + import Types
60 +
61 +--- wxdirect-0.90.0.1-orig/src/CompileClasses.hs 2012-04-19 01:05:10.000000000 +1000
62 ++++ wxdirect-0.90.0.1/src/CompileClasses.hs 2012-05-19 21:28:27.358052781 +1000
63 +@@ -89,7 +89,7 @@
64 + (exportsStatic,exportsClassClasses,classCount) = exportDefs decls exportsClass []
65 +
66 + methodCount = length decls
67 +- ghcoptions = [ "{-# LANGUAGE ForeignFunctionInterface #-}"]
68 ++ ghcoptions = [ "{-# LANGUAGE CPP, ForeignFunctionInterface #-}"]
69 +
70 + export = concat [ ["module " ++ moduleRoot ++ moduleName
71 + , " ( -- * Global" ]
72 +@@ -103,6 +103,9 @@
73 + , "import System.IO.Unsafe( unsafePerformIO )"
74 + , "import " ++ moduleRoot ++ "WxcTypes"
75 + , "import " ++ moduleRoot ++ moduleClassTypesName
76 ++ , "#if (__GLASGOW_HASKELL__>=705)"
77 ++ , "import Foreign.C.Types(CDouble(..), CInt(..), CWchar(..))"
78 ++ , "#endif"
79 + , ""
80 + ]
81 + ]
82
83 diff --git a/dev-haskell/wxdirect/files/wxdirect-0.90.1.1-ghc-7.5.patch b/dev-haskell/wxdirect/files/wxdirect-0.90.1.1-ghc-7.5.patch
84 new file mode 100644
85 index 00000000000..df29d1ba08b
86 --- /dev/null
87 +++ b/dev-haskell/wxdirect/files/wxdirect-0.90.1.1-ghc-7.5.patch
88 @@ -0,0 +1,38 @@
89 +--- wxdirect-0.90.1.1-orig/src/Classes.hs 2014-03-23 01:08:59.000000000 +1100
90 ++++ wxdirect-0.90.1.1/src/Classes.hs 2014-03-23 15:43:57.402011540 +1100
91 +@@ -1,3 +1,4 @@
92 ++{-# LANGUAGE CPP #-}
93 + -----------------------------------------------------------------------------------------
94 + {-| Module : Classes
95 + Copyright : (c) Daan Leijen 2003
96 +@@ -24,6 +25,9 @@
97 +
98 + import qualified Data.Set as Set
99 + import qualified Data.Map as Map
100 ++#if !MIN_VERSION_base(4,6,0)
101 ++import Prelude hiding ( catch )
102 ++#endif
103 + import Text.Parsec.Prim hiding ( try )
104 + import HaskellNames( haskellTypeName, isBuiltin )
105 + import Types
106 +--- wxdirect-0.90.1.1-orig/src/CompileClasses.hs 2014-03-23 01:08:59.000000000 +1100
107 ++++ wxdirect-0.90.1.1/src/CompileClasses.hs 2014-03-23 15:42:14.123894206 +1100
108 +@@ -96,7 +96,7 @@
109 + (exportsStatic,exportsClassClasses,classCount) = exportDefs decls exportsClass []
110 +
111 + methodCount = length decls
112 +- ghcoptions = [ "{-# LANGUAGE ForeignFunctionInterface #-}"]
113 ++ ghcoptions = [ "{-# LANGUAGE CPP, ForeignFunctionInterface #-}"]
114 +
115 + export = concat [ ["module " ++ moduleRoot ++ moduleName
116 + , " ( -- * Global" ]
117 +@@ -111,6 +111,9 @@
118 + , "import Foreign.C.Types(CInt(..), CWchar(..), CChar(..), CDouble(..))"
119 + , "import " ++ moduleRoot ++ "WxcTypes"
120 + , "import " ++ moduleRoot ++ moduleClassTypesName
121 ++ , "#if (__GLASGOW_HASKELL__>=705)"
122 ++ , "import Foreign.C.Types(CDouble(..), CInt(..), CWchar(..))"
123 ++ , "#endif"
124 + , ""
125 + ]
126 + ]
127
128 diff --git a/dev-haskell/wxdirect/wxdirect-0.92.3.0-r1.ebuild b/dev-haskell/wxdirect/wxdirect-0.92.3.0-r1.ebuild
129 new file mode 100644
130 index 00000000000..fa70c6b2eb0
131 --- /dev/null
132 +++ b/dev-haskell/wxdirect/wxdirect-0.92.3.0-r1.ebuild
133 @@ -0,0 +1,46 @@
134 +# Copyright 1999-2020 Gentoo Authors
135 +# Distributed under the terms of the GNU General Public License v2
136 +
137 +EAPI=7
138 +
139 +# ebuild generated by hackport 0.5.3.9999
140 +
141 +WX_GTK_VER="3.0"
142 +
143 +CABAL_FEATURES="lib profile haddock hoogle hscolour"
144 +inherit haskell-cabal
145 +
146 +DESCRIPTION="helper tool for building wxHaskell"
147 +HOMEPAGE="https://wiki.haskell.org/WxHaskell"
148 +SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
149 +
150 +LICENSE="BSD"
151 +SLOT="${WX_GTK_VER}/${PV}"
152 +KEYWORDS="~amd64 ~ppc ~x86"
153 +IUSE=""
154 +
155 +RDEPEND=">=dev-haskell/parsec-2.1.0:=[profile?] <dev-haskell/parsec-4:=[profile?]
156 + dev-haskell/strict:=[profile?]
157 + >=dev-lang/ghc-7.4.1:=
158 +"
159 +DEPEND="${RDEPEND}
160 + >=dev-haskell/cabal-1.2
161 +"
162 +
163 +src_prepare() {
164 + default
165 +
166 + cabal_chdeps \
167 + 'process >= 1.1 && < 1.5' 'process >= 1.1'\
168 + 'base >= 3 && < 4' 'base >=3'\
169 + 'containers >= 0.1 && < 0.3' 'containers >=0.1'
170 +
171 + sed -e "s@executable wxdirect@executable wxdirect-${WX_GTK_VER}@" \
172 + -i "${S}/${PN}.cabal" \
173 + || die "Could not change ${PN}.cabal for wxdirect slot ${WX_GTK_VER}"
174 +
175 + # embed ${CHOST}-cpp instead of "cpp" to support sys-devel/gcc-config[-native-symlinks]
176 + # Ideally it should also obey CPP variable
177 + sed -e 's/"cpp"/"'${CHOST}-cpp'"/g' \
178 + -i src/ParseC.hs || die
179 +}