diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-02-16 08:37:25 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-02-16 10:21:55 +0000 |
commit | 941c47b24d3eab6b10f53b16cb406f069700506b (patch) | |
tree | 51b5a967d0bc2a7565f44fffec508a14e4afa49a /dev-haskell/lens-family-th | |
parent | dev-haskell/lens-family: new package, a depend of dev-haskell/persistent-2.6 (diff) | |
download | gentoo-941c47b24d3eab6b10f53b16cb406f069700506b.tar.gz gentoo-941c47b24d3eab6b10f53b16cb406f069700506b.tar.bz2 gentoo-941c47b24d3eab6b10f53b16cb406f069700506b.zip |
dev-haskell/lens-family-th: new package, a depend of dev-haskell/persistent-2.6
Generate lens-family style lenses
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-haskell/lens-family-th')
-rw-r--r-- | dev-haskell/lens-family-th/Manifest | 1 | ||||
-rw-r--r-- | dev-haskell/lens-family-th/files/lens-family-th-0.4.1.0-ghc-8.patch | 40 | ||||
-rw-r--r-- | dev-haskell/lens-family-th/lens-family-th-0.4.1.0.ebuild | 29 | ||||
-rw-r--r-- | dev-haskell/lens-family-th/metadata.xml | 17 |
4 files changed, 87 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..b39ed65a6a23 --- /dev/null +++ b/dev-haskell/lens-family-th/Manifest @@ -0,0 +1 @@ +DIST lens-family-th-0.4.1.0.tar.gz 4562 SHA256 754fdc4c7c292b160a87974ec3690b755fb93f3877c8080d331cfa6ec4b39e20 SHA512 ab4283fcb833c68a838f006a71d30ed129c1d5f8ba030c4cbec6443ebeedc83e09a707a609c3c30c4420675bf5187227ce11f39218a3afb7ee563ad26104b774 WHIRLPOOL c8b76e3edea0575383dbeaff63427fab59af66a46b48fb5fe89d1258311ca6b38d38debecd79cdd05eda0809020c652757153465d679f51a3671d9952d0d406c 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..082c45154288 --- /dev/null +++ b/dev-haskell/lens-family-th/lens-family-th-0.4.1.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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..ead3c316a48d --- /dev/null +++ b/dev-haskell/lens-family-th/metadata.xml @@ -0,0 +1,17 @@ +<?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 + <http://github.com/DanBurton/lens-family-th#readme> + for a proper description of this package. + + (See <https://github.com/haskell/cabal/issues/968> + for the ticket I created regarding the defect.) + </longdescription> +</pkgmetadata> |