summaryrefslogtreecommitdiff
path: root/dev-haskell/lens-family-th
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-haskell/lens-family-th
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-haskell/lens-family-th')
-rw-r--r--dev-haskell/lens-family-th/Manifest4
-rw-r--r--dev-haskell/lens-family-th/files/lens-family-th-0.4.1.0-ghc-8.patch40
-rw-r--r--dev-haskell/lens-family-th/lens-family-th-0.4.1.0.ebuild28
-rw-r--r--dev-haskell/lens-family-th/metadata.xml20
4 files changed, 92 insertions, 0 deletions
diff --git a/dev-haskell/lens-family-th/Manifest b/dev-haskell/lens-family-th/Manifest
new file mode 100644
index 000000000000..8855cda40d0e
--- /dev/null
+++ b/dev-haskell/lens-family-th/Manifest
@@ -0,0 +1,4 @@
+AUX lens-family-th-0.4.1.0-ghc-8.patch 1528 SHA256 7d35d88be2570d2ae010fbdc4ea2e34266d8f3e1a63a53773e8573a22e38d300 SHA512 752aaae5a9a174a67329a16e999a4e1606da1ed11c1c3244d84b07171cfbcb2384f5015ad6f57b718733878a789c59da7e148ab3be015284c5703f2670708dd8 WHIRLPOOL 5ff29e839ec09f65c0ddcd39166454b8eec3921ba0aec7dd00567afcc8ebecb33382d0a5e8d90332d80f0efe67236dc7432828b1b8040a13849270552e35e48f
+DIST lens-family-th-0.4.1.0.tar.gz 4562 SHA256 754fdc4c7c292b160a87974ec3690b755fb93f3877c8080d331cfa6ec4b39e20 SHA512 ab4283fcb833c68a838f006a71d30ed129c1d5f8ba030c4cbec6443ebeedc83e09a707a609c3c30c4420675bf5187227ce11f39218a3afb7ee563ad26104b774 WHIRLPOOL c8b76e3edea0575383dbeaff63427fab59af66a46b48fb5fe89d1258311ca6b38d38debecd79cdd05eda0809020c652757153465d679f51a3671d9952d0d406c
+EBUILD lens-family-th-0.4.1.0.ebuild 613 SHA256 3742748077b05e132ed7001f5f6657d079143384f17327a3f7bc3c9cb6ddf610 SHA512 bc5041d546d42df9e1456227812c5fd51b715b45db6ee87bd0e8f47eb127b610c338d6a97d63876d904300fd11996b5a4677ea77f733a8e316327fe545cb4e3e WHIRLPOOL c6c5e9030b4b49fd35559d903810f86937ea4a2f79c3b4d07fa1e4c546bde3e82c4d303b276f638084bc227c3e4046b9f1783cf08175424c082e62b87b79fda5
+MISC metadata.xml 690 SHA256 3e0562b66da3d0d2f75fb68745300156edf6e9af947742587383f1f2be9c86a8 SHA512 55dc29a781ac230cf03c0d8f5907ddf60199804f9a37ceea31f361b3ce544b20a06c03b89615fe1076708ad76fe501c3dacf1907ba5f09ba345357ba68a80824 WHIRLPOOL f9346b748dfec9a19333e9391fbd302534a3a0063494c61dff32cbf553946244b0f8a78527138a711bd3930379e38f9527cfccfbdf778a0570a5c69cd3f99a72
diff --git a/dev-haskell/lens-family-th/files/lens-family-th-0.4.1.0-ghc-8.patch b/dev-haskell/lens-family-th/files/lens-family-th-0.4.1.0-ghc-8.patch
new file mode 100644
index 000000000000..06be29a8131b
--- /dev/null
+++ b/dev-haskell/lens-family-th/files/lens-family-th-0.4.1.0-ghc-8.patch
@@ -0,0 +1,40 @@
+diff --git a/Lens/Family/THCore.hs b/Lens/Family/THCore.hs
+index d4f2740..2f53db6 100644
+--- a/Lens/Family/THCore.hs
++++ b/Lens/Family/THCore.hs
+@@ -1 +1,2 @@
++{-# LANGUAGE CPP #-}
+ {-# LANGUAGE TemplateHaskell #-}
+@@ -52,4 +53,9 @@ extractLensTypeInfo datatype = do
+ return $ case i of
++#if MIN_VERSION_template_haskell(2,11,0)
++ TyConI (DataD _ n ts _ _ _) -> (n, ts)
++ TyConI (NewtypeD _ n ts _ _ _) -> (n, ts)
++#else
+ TyConI (DataD _ n ts _ _) -> (n, ts)
+ TyConI (NewtypeD _ n ts _ _) -> (n, ts)
++#endif
+ _ -> error $ "Can't derive Lens for: " ++ datatypeStr
+@@ -63,2 +69,8 @@ extractConstructorFields datatype = do
+ return $ case i of
++#if MIN_VERSION_template_haskell(2,11,0)
++ TyConI (DataD _ _ _ _ [RecC _ fs] _) -> fs
++ TyConI (NewtypeD _ _ _ _ (RecC _ fs) _) -> fs
++ TyConI (DataD _ _ _ _ [_] _) ->
++ error $ "Can't derive Lens without record selectors: " ++ datatypeStr
++#else
+ TyConI (DataD _ _ _ [RecC _ fs] _) -> fs
+@@ -67,2 +79,3 @@ extractConstructorFields datatype = do
+ error $ "Can't derive Lens without record selectors: " ++ datatypeStr
++#endif
+ TyConI NewtypeD{} ->
+@@ -134,4 +147,9 @@ extractConstructorInfo datatype = do
+ return $ case i of
++#if MIN_VERSION_template_haskell(2,11,0)
++ TyConI (DataD _ _ _ _ fs _) -> fs
++ TyConI (NewtypeD _ _ _ _ f _) -> [f]
++#else
+ TyConI (DataD _ _ _ fs _) -> fs
+ TyConI (NewtypeD _ _ _ f _) -> [f]
++#endif
+ _ -> error $ "Can't derive traversal for: " ++ datatypeStr
diff --git a/dev-haskell/lens-family-th/lens-family-th-0.4.1.0.ebuild b/dev-haskell/lens-family-th/lens-family-th-0.4.1.0.ebuild
new file mode 100644
index 000000000000..29c2dee5065e
--- /dev/null
+++ b/dev-haskell/lens-family-th/lens-family-th-0.4.1.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.7.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Generate lens-family style lenses"
+HOMEPAGE="https://github.com/DanBurton/lens-family-th#readme"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ghc-8.patch
+}
diff --git a/dev-haskell/lens-family-th/metadata.xml b/dev-haskell/lens-family-th/metadata.xml
new file mode 100644
index 000000000000..1651186a0a1f
--- /dev/null
+++ b/dev-haskell/lens-family-th/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <longdescription>
+ Due to a cabal/hackage defect, curly braces cannot be
+ adequately displayed here. Please see
+ &lt;https://github.com/DanBurton/lens-family-th#readme&gt;
+ for a proper description of this package.
+
+ (See &lt;https://github.com/haskell/cabal/issues/968&gt;
+ for the ticket I created regarding the defect.)
+ </longdescription>
+ <upstream>
+ <remote-id type="github">DanBurton/lens-family-th</remote-id>
+ </upstream>
+</pkgmetadata>