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