summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorpho <pho@pkgsrc.org>2020-01-19 07:51:26 +0000
committerpho <pho@pkgsrc.org>2020-01-19 07:51:26 +0000
commit23081d9ef312b2006ea432366451ff5727ac4734 (patch)
tree5735cc2270e8528194db580b05f246f77a25b506 /misc
parent451c14828f1660047bdda29809fdf6fe2fa3da60 (diff)
downloadpkgsrc-23081d9ef312b2006ea432366451ff5727ac4734.tar.gz
Import cabal-install-3.0.0.0 from wip
The 'cabal' command-line program simplifies the process of managing Haskell software by automating the fetching, configuration, compilation and installation of Haskell libraries and programs.
Diffstat (limited to 'misc')
-rw-r--r--misc/cabal-install/DESCR3
-rw-r--r--misc/cabal-install/Makefile26
-rw-r--r--misc/cabal-install/distinfo8
-rw-r--r--misc/cabal-install/patches/patch-Distribution_Client_Security_HTTP.hs31
-rw-r--r--misc/cabal-install/patches/patch-cabal-install.cabal24
5 files changed, 92 insertions, 0 deletions
diff --git a/misc/cabal-install/DESCR b/misc/cabal-install/DESCR
new file mode 100644
index 00000000000..64d36a218e6
--- /dev/null
+++ b/misc/cabal-install/DESCR
@@ -0,0 +1,3 @@
+The 'cabal' command-line program simplifies the process of managing
+Haskell software by automating the fetching, configuration,
+compilation and installation of Haskell libraries and programs.
diff --git a/misc/cabal-install/Makefile b/misc/cabal-install/Makefile
new file mode 100644
index 00000000000..9c26b2ef849
--- /dev/null
+++ b/misc/cabal-install/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2020/01/19 07:51:26 pho Exp $
+
+DISTNAME= cabal-install-3.0.0.0
+PKGNAME= ${DISTNAME}
+CATEGORIES= misc
+
+MAINTAINER= pho@cielonegro.org
+COMMENT= Command-line interface for Cabal and Hackage
+LICENSE= modified-bsd
+
+.include "../../devel/hs-async/buildlink3.mk"
+.include "../../converters/hs-base16-bytestring/buildlink3.mk"
+.include "../../security/hs-cryptohash-sha256/buildlink3.mk"
+.include "../../devel/hs-echo/buildlink3.mk"
+.include "../../textproc/hs-edit-distance/buildlink3.mk"
+.include "../../security/hs-hackage-security/buildlink3.mk"
+.include "../../devel/hs-hashable/buildlink3.mk"
+.include "../../www/hs-HTTP/buildlink3.mk"
+.include "../../net/hs-network/buildlink3.mk"
+.include "../../net/hs-network-uri/buildlink3.mk"
+.include "../../devel/hs-random/buildlink3.mk"
+.include "../../archivers/hs-tar/buildlink3.mk"
+.include "../../archivers/hs-zlib/buildlink3.mk"
+.include "../../net/hs-resolv/buildlink3.mk"
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/misc/cabal-install/distinfo b/misc/cabal-install/distinfo
new file mode 100644
index 00000000000..82f6c7e7b84
--- /dev/null
+++ b/misc/cabal-install/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2020/01/19 07:51:26 pho Exp $
+
+SHA1 (cabal-install-3.0.0.0.tar.gz) = 2fe37726db987af6c23b933bb0e9b81446061449
+RMD160 (cabal-install-3.0.0.0.tar.gz) = 7217d6334bdf98f18341fb0aff8208b20717f695
+SHA512 (cabal-install-3.0.0.0.tar.gz) = 0b15313fc11bc6b6018e01b6a3a65242306977c16ce9333ea1191c1ce0020b180451235a7a65b47bc01791e05d1b246bf9d573fc7e981a46fcfc7da0fed04cca
+Size (cabal-install-3.0.0.0.tar.gz) = 654045 bytes
+SHA1 (patch-Distribution_Client_Security_HTTP.hs) = ba58ab3c0481b2b269e401121f2dc6f2b2bcf503
+SHA1 (patch-cabal-install.cabal) = 33633ae6970f52fcdf2a842bdc98f641c308957b
diff --git a/misc/cabal-install/patches/patch-Distribution_Client_Security_HTTP.hs b/misc/cabal-install/patches/patch-Distribution_Client_Security_HTTP.hs
new file mode 100644
index 00000000000..c4362376736
--- /dev/null
+++ b/misc/cabal-install/patches/patch-Distribution_Client_Security_HTTP.hs
@@ -0,0 +1,31 @@
+$NetBSD: patch-Distribution_Client_Security_HTTP.hs,v 1.1 2020/01/19 07:51:26 pho Exp $
+
+Fix build with hackage-security-0.6:
+https://github.com/haskell/cabal/commit/0165f0a739a634ed03e6c87f258ebb5810005d21
+
+--- Distribution/Client/Security/HTTP.hs.orig 2001-09-09 01:46:40.000000000 +0000
++++ Distribution/Client/Security/HTTP.hs
+@@ -35,7 +35,6 @@ import Hackage.Security.Client
+ import Hackage.Security.Client.Repository.HttpLib
+ import Hackage.Security.Util.Checked
+ import Hackage.Security.Util.Pretty
+-import qualified Hackage.Security.Util.Lens as Lens
+
+ {-------------------------------------------------------------------------------
+ 'HttpLib' implementation
+@@ -142,7 +141,14 @@ mkReqHeaders reqHeaders mRange = concat
+ finalize (name, strs) = [HTTP.Header name (intercalate ", " (reverse strs))]
+
+ insert :: Eq a => a -> [b] -> [(a, [b])] -> [(a, [b])]
+- insert x y = Lens.modify (Lens.lookupM x) (++ y)
++ insert x y = modifyAssocList x (++ y)
++
++ -- modify the first matching element
++ modifyAssocList :: Eq a => a -> (b -> b) -> [(a, b)] -> [(a, b)]
++ modifyAssocList a f = go where
++ go [] = []
++ go (p@(a', b) : xs) | a == a' = (a', f b) : xs
++ | otherwise = p : go xs
+
+ {-------------------------------------------------------------------------------
+ Custom exceptions
diff --git a/misc/cabal-install/patches/patch-cabal-install.cabal b/misc/cabal-install/patches/patch-cabal-install.cabal
new file mode 100644
index 00000000000..740daeaccdf
--- /dev/null
+++ b/misc/cabal-install/patches/patch-cabal-install.cabal
@@ -0,0 +1,24 @@
+$NetBSD: patch-cabal-install.cabal,v 1.1 2020/01/19 07:51:26 pho Exp $
+
+Fix build with GHC 8.8
+
+--- cabal-install.cabal.orig 2001-09-09 01:46:40.000000000 +0000
++++ cabal-install.cabal
+@@ -308,7 +308,7 @@ executable cabal
+ build-depends:
+ async >= 2.0 && < 2.3,
+ array >= 0.4 && < 0.6,
+- base >= 4.8 && < 4.13,
++ base >= 4.8 && < 4.14,
+ base16-bytestring >= 0.1.1 && < 0.2,
+ binary >= 0.7.3 && < 0.9,
+ bytestring >= 0.10.6.0 && < 0.11,
+@@ -332,7 +332,7 @@ executable cabal
+ tar >= 0.5.0.3 && < 0.6,
+ time >= 1.5.0.1 && < 1.10,
+ zlib >= 0.5.3 && < 0.7,
+- hackage-security >= 0.5.2.2 && < 0.6,
++ hackage-security >= 0.5.2.2 && < 0.7,
+ text >= 1.2.3 && < 1.3,
+ parsec >= 3.1.13.0 && < 3.2
+