summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-04-16 23:02:11 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2021-04-16 23:11:37 +0100
commit0f58ec95f1f02d7f4bf2572a08fa2b7762a5210e (patch)
tree58606639b9f8477a4865f502bb7f59268d6cc78e /dev-haskell
parentx11-themes/arc-theme: Version bump to 20210412 (diff)
downloadgentoo-0f58ec95f1f02d7f4bf2572a08fa2b7762a5210e.tar.gz
gentoo-0f58ec95f1f02d7f4bf2572a08fa2b7762a5210e.tar.bz2
gentoo-0f58ec95f1f02d7f4bf2572a08fa2b7762a5210e.zip
dev-haskell/wxdirect: switch to WX_GTK_VER="3.0-gtk3"
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-haskell')
-rw-r--r--dev-haskell/wxdirect/files/wxdirect-0.90.0.1-ghc-7.5.patch49
-rw-r--r--dev-haskell/wxdirect/files/wxdirect-0.90.1.1-ghc-7.5.patch38
-rw-r--r--dev-haskell/wxdirect/wxdirect-0.92.3.0-r2.ebuild47
3 files changed, 134 insertions, 0 deletions
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
new file mode 100644
index 000000000000..75d9bf21c726
--- /dev/null
+++ b/dev-haskell/wxdirect/files/wxdirect-0.90.0.1-ghc-7.5.patch
@@ -0,0 +1,49 @@
+--- wxdirect-0.90.0.1-orig/wxdirect.cabal 2012-04-19 01:05:11.000000000 +1000
++++ wxdirect-0.90.0.1/wxdirect.cabal 2012-05-19 21:12:02.612085338 +1000
+@@ -66,7 +66,7 @@
+ if flag(splitBase)
+ build-depends:
+ base >= 4 && < 5,
+- containers >= 0.2 && < 0.5
++ containers >= 0.2 && < 0.6
+ else
+ build-depends:
+ base >= 3 && < 4,
+--- wxdirect-0.90.0.1-orig/src/Classes.hs 2012-04-19 01:05:10.000000000 +1000
++++ wxdirect-0.90.0.1/src/Classes.hs 2012-07-14 13:58:48.072492467 +1000
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ -----------------------------------------------------------------------------------------
+ {-| Module : Classes
+ Copyright : (c) Daan Leijen 2003
+@@ -28,7 +29,9 @@
+ import Data.List( sort, sortBy )
+ import qualified Data.Set as Set
+ import qualified Data.Map as Map
++#if !MIN_VERSION_base(4,6,0)
+ import Prelude hiding ( catch )
++#endif
+ import HaskellNames( haskellTypeName, isBuiltin )
+ import Types
+
+--- wxdirect-0.90.0.1-orig/src/CompileClasses.hs 2012-04-19 01:05:10.000000000 +1000
++++ wxdirect-0.90.0.1/src/CompileClasses.hs 2012-05-19 21:28:27.358052781 +1000
+@@ -89,7 +89,7 @@
+ (exportsStatic,exportsClassClasses,classCount) = exportDefs decls exportsClass []
+
+ methodCount = length decls
+- ghcoptions = [ "{-# LANGUAGE ForeignFunctionInterface #-}"]
++ ghcoptions = [ "{-# LANGUAGE CPP, ForeignFunctionInterface #-}"]
+
+ export = concat [ ["module " ++ moduleRoot ++ moduleName
+ , " ( -- * Global" ]
+@@ -103,6 +103,9 @@
+ , "import System.IO.Unsafe( unsafePerformIO )"
+ , "import " ++ moduleRoot ++ "WxcTypes"
+ , "import " ++ moduleRoot ++ moduleClassTypesName
++ , "#if (__GLASGOW_HASKELL__>=705)"
++ , "import Foreign.C.Types(CDouble(..), CInt(..), CWchar(..))"
++ , "#endif"
+ , ""
+ ]
+ ]
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
new file mode 100644
index 000000000000..df29d1ba08b8
--- /dev/null
+++ b/dev-haskell/wxdirect/files/wxdirect-0.90.1.1-ghc-7.5.patch
@@ -0,0 +1,38 @@
+--- wxdirect-0.90.1.1-orig/src/Classes.hs 2014-03-23 01:08:59.000000000 +1100
++++ wxdirect-0.90.1.1/src/Classes.hs 2014-03-23 15:43:57.402011540 +1100
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ -----------------------------------------------------------------------------------------
+ {-| Module : Classes
+ Copyright : (c) Daan Leijen 2003
+@@ -24,6 +25,9 @@
+
+ import qualified Data.Set as Set
+ import qualified Data.Map as Map
++#if !MIN_VERSION_base(4,6,0)
++import Prelude hiding ( catch )
++#endif
+ import Text.Parsec.Prim hiding ( try )
+ import HaskellNames( haskellTypeName, isBuiltin )
+ import Types
+--- wxdirect-0.90.1.1-orig/src/CompileClasses.hs 2014-03-23 01:08:59.000000000 +1100
++++ wxdirect-0.90.1.1/src/CompileClasses.hs 2014-03-23 15:42:14.123894206 +1100
+@@ -96,7 +96,7 @@
+ (exportsStatic,exportsClassClasses,classCount) = exportDefs decls exportsClass []
+
+ methodCount = length decls
+- ghcoptions = [ "{-# LANGUAGE ForeignFunctionInterface #-}"]
++ ghcoptions = [ "{-# LANGUAGE CPP, ForeignFunctionInterface #-}"]
+
+ export = concat [ ["module " ++ moduleRoot ++ moduleName
+ , " ( -- * Global" ]
+@@ -111,6 +111,9 @@
+ , "import Foreign.C.Types(CInt(..), CWchar(..), CChar(..), CDouble(..))"
+ , "import " ++ moduleRoot ++ "WxcTypes"
+ , "import " ++ moduleRoot ++ moduleClassTypesName
++ , "#if (__GLASGOW_HASKELL__>=705)"
++ , "import Foreign.C.Types(CDouble(..), CInt(..), CWchar(..))"
++ , "#endif"
+ , ""
+ ]
+ ]
diff --git a/dev-haskell/wxdirect/wxdirect-0.92.3.0-r2.ebuild b/dev-haskell/wxdirect/wxdirect-0.92.3.0-r2.ebuild
new file mode 100644
index 000000000000..0e8ca99f46db
--- /dev/null
+++ b/dev-haskell/wxdirect/wxdirect-0.92.3.0-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.5.3.9999
+
+WX_GTK_VER="3.0-gtk3"
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="helper tool for building wxHaskell"
+HOMEPAGE="https://wiki.haskell.org/WxHaskell"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="${WX_GTK_VER}/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/parsec-2.1.0:=[profile?] <dev-haskell/parsec-4:=[profile?]
+ dev-haskell/strict:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+ !!dev-haskell/wxdirect:3.0
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.2
+"
+
+src_prepare() {
+ default
+
+ cabal_chdeps \
+ 'process >= 1.1 && < 1.5' 'process >= 1.1'\
+ 'base >= 3 && < 4' 'base >=3'\
+ 'containers >= 0.1 && < 0.3' 'containers >=0.1'
+
+ sed -e "s@executable wxdirect@executable wxdirect-${WX_GTK_VER}@" \
+ -i "${S}/${PN}.cabal" \
+ || die "Could not change ${PN}.cabal for wxdirect slot ${WX_GTK_VER}"
+
+ # embed ${CHOST}-cpp instead of "cpp" to support sys-devel/gcc-config[-native-symlinks]
+ # Ideally it should also obey CPP variable
+ sed -e 's/"cpp"/"'${CHOST}-cpp'"/g' \
+ -i src/ParseC.hs || die
+}