pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/idris Import idris-1.3.2



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c1cfb91ccbd2
branches:  trunk
changeset: 410351:c1cfb91ccbd2
user:      pho <pho%pkgsrc.org@localhost>
date:      Mon Jan 20 23:32:38 2020 +0000

description:
Import idris-1.3.2

Idris is a general purpose language with full dependent types. It is
compiled, with eager evaluation. Dependent types allow types to be
predicated on values, meaning that some aspects of a program's
behaviour can be specified precisely in the type. The language is
closely related to Epigram and Agda. There is a tutorial at
http://www.idris-lang.org/documentation

diffstat:

 lang/idris/DESCR                                     |   6 +
 lang/idris/Makefile                                  |  74 ++++++++++++++++++
 lang/idris/buildlink3.mk                             |  41 ++++++++++
 lang/idris/distinfo                                  |  19 ++++
 lang/idris/options.mk                                |  25 ++++++
 lang/idris/patches/patch-Setup.hs                    |  80 ++++++++++++++++++++
 lang/idris/patches/patch-idris.cabal                 |  38 +++++++++
 lang/idris/patches/patch-rts_Makefile                |  15 +++
 lang/idris/patches/patch-rts_idris__net.c            |  15 +++
 lang/idris/patches/patch-src_IRTS_System.hs          |  34 ++++++++
 lang/idris/patches/patch-src_Idris_CmdOptions.hs     |  24 ++++++
 lang/idris/patches/patch-src_Idris_Core_CaseTree.hs  |  15 +++
 lang/idris/patches/patch-src_Idris_Core_TT.hs        |  23 +++++
 lang/idris/patches/patch-src_Idris_Package_Parser.hs |  15 +++
 lang/idris/patches/patch-src_Idris_Parser_Data.hs    |  15 +++
 lang/idris/patches/patch-src_Idris_Parser_Helpers.hs |  15 +++
 lang/idris/patches/patch-src_Idris_Parser_Ops.hs     |  51 ++++++++++++
 lang/idris/patches/patch-src_Idris_Parser_Stack.hs   |  30 +++++++
 18 files changed, 535 insertions(+), 0 deletions(-)

diffs (truncated from 607 to 300 lines):

diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/DESCR  Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,6 @@
+Idris is a general purpose language with full dependent types. It is
+compiled, with eager evaluation. Dependent types allow types to be
+predicated on values, meaning that some aspects of a program's
+behaviour can be specified precisely in the type. The language is
+closely related to Epigram and Agda. There is a tutorial at
+http://www.idris-lang.org/documentation
diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/Makefile       Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,74 @@
+# $NetBSD: Makefile,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+DISTNAME=      idris-1.3.2
+PKGNAME=       ${DISTNAME}
+CATEGORIES=    lang
+
+MAINTAINER=    pho%cielonegro.org@localhost
+COMMENT=       Functional Programming Language with Dependent Types
+LICENSE=       modified-bsd
+
+CONFIGURE_ARGS+=       -f release
+
+# ${WRKSRC}/Setup.hs has a postBuild hook that invokes gmake to build
+# its standard libraries.
+USE_TOOLS+=            gmake
+SUBST_CLASSES+=                tools
+SUBST_STAGE.tools=     pre-configure
+SUBST_FILES.tools=     Setup.hs
+SUBST_VARS.tools=      GMAKE PKGSRC_SETENV
+
+# ${WRKSRC}/src/IRTS/System.hs has several hardcoded paths to be used at
+# run time.
+SUBST_CLASSES+=                runtime
+SUBST_STAGE.runtime=   pre-configure
+SUBST_FILES.runtime=   src/IRTS/System.hs
+SUBST_VARS.runtime=    CC PREFIX COMPILER_RPATH_FLAG
+
+# When -O2 is in effect, GHC 8.8.1 uses whopping 1 TiB of virtual
+# memory (what?) to compile src/Idris/IBC.hs for some unknown reason,
+# possibly related to https://gitlab.haskell.org/ghc/ghc/issues/5642
+# or https://gitlab.haskell.org/ghc/ghc/issues/13535
+HASKELL_OPTIMIZATION_LEVEL=    1
+
+# Parallelization is unsafe because of the high memory consumption
+# even with -O1. Setting it to -O0 may seem desirable, but that makes
+# the resulting compiler way too slow.
+MAKE_JOBS_SAFE=        NO
+
+# bin/idris cannot survive PaX MPROTECT because of GHC rts not being
+# safe. We can hopefully get rid of this in the near future. See also
+# ../../lang/ghc88/Makefile
+NOT_PAX_MPROTECT_SAFE+=        bin/idris
+
+.include "options.mk"
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../textproc/hs-annotated-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-ansi-terminal/buildlink3.mk"
+.include "../../textproc/hs-ansi-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-async/buildlink3.mk"
+.include "../../converters/hs-base64-bytestring/buildlink3.mk"
+.include "../../textproc/hs-blaze-html/buildlink3.mk"
+.include "../../textproc/hs-blaze-markup/buildlink3.mk"
+.include "../../textproc/hs-cheapskate/buildlink3.mk"
+.include "../../devel/hs-code-page/buildlink3.mk"
+.include "../../devel/hs-fingertree/buildlink3.mk"
+.include "../../devel/hs-fsnotify/buildlink3.mk"
+.include "../../math/hs-ieee754/buildlink3.mk"
+.include "../../textproc/hs-megaparsec/buildlink3.mk"
+.include "../../net/hs-network/buildlink3.mk"
+.include "../../devel/hs-optparse-applicative/buildlink3.mk"
+.include "../../devel/hs-parser-combinators/buildlink3.mk"
+.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
+.include "../../devel/hs-safe/buildlink3.mk"
+.include "../../devel/hs-split/buildlink3.mk"
+.include "../../devel/hs-terminal-size/buildlink3.mk"
+.include "../../devel/hs-uniplate/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../devel/hs-utf8-string/buildlink3.mk"
+.include "../../devel/hs-vector/buildlink3.mk"
+.include "../../devel/hs-vector-binary-instances/buildlink3.mk"
+.include "../../archivers/hs-zip-archive/buildlink3.mk"
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/buildlink3.mk  Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,41 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+BUILDLINK_TREE+=       idris
+
+.if !defined(IDRIS_BUILDLINK3_MK)
+IDRIS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.idris+=  idris>=1.3.2
+BUILDLINK_ABI_DEPENDS.idris+=  idris>=1.3.2
+BUILDLINK_PKGSRCDIR.idris?=    ../../lang/idris
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../textproc/hs-annotated-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-ansi-terminal/buildlink3.mk"
+.include "../../textproc/hs-ansi-wl-pprint/buildlink3.mk"
+.include "../../devel/hs-async/buildlink3.mk"
+.include "../../converters/hs-base64-bytestring/buildlink3.mk"
+.include "../../textproc/hs-blaze-html/buildlink3.mk"
+.include "../../textproc/hs-blaze-markup/buildlink3.mk"
+.include "../../textproc/hs-cheapskate/buildlink3.mk"
+.include "../../devel/hs-code-page/buildlink3.mk"
+.include "../../devel/hs-fingertree/buildlink3.mk"
+.include "../../devel/hs-fsnotify/buildlink3.mk"
+.include "../../math/hs-ieee754/buildlink3.mk"
+.include "../../textproc/hs-megaparsec/buildlink3.mk"
+.include "../../net/hs-network/buildlink3.mk"
+.include "../../devel/hs-optparse-applicative/buildlink3.mk"
+.include "../../devel/hs-parser-combinators/buildlink3.mk"
+.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
+.include "../../devel/hs-safe/buildlink3.mk"
+.include "../../devel/hs-split/buildlink3.mk"
+.include "../../devel/hs-terminal-size/buildlink3.mk"
+.include "../../devel/hs-uniplate/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../devel/hs-utf8-string/buildlink3.mk"
+.include "../../devel/hs-vector/buildlink3.mk"
+.include "../../devel/hs-vector-binary-instances/buildlink3.mk"
+.include "../../archivers/hs-zip-archive/buildlink3.mk"
+.endif # IDRIS_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -idris
diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/distinfo       Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: distinfo,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+SHA1 (idris-1.3.2.tar.gz) = fb4ac3904368a3d8c935855873d73a6ffc90beec
+RMD160 (idris-1.3.2.tar.gz) = 6b1ec85978e62c32691920429e0d2f97e3685b63
+SHA512 (idris-1.3.2.tar.gz) = 2db0fbcad6b596b7e34dcbb0c4fbe30ccbbcfbb5f469d4b077bf010391a98bb743162656c608d154f62f78f607662548cc1f00fc710f59d89612a3552a3e037f
+Size (idris-1.3.2.tar.gz) = 2092794 bytes
+SHA1 (patch-Setup.hs) = 7ebb64474acee7d0c37978d912d47ea229bf89ec
+SHA1 (patch-idris.cabal) = 5ba95f0156d634207eb951ef123e8b83598a8c3e
+SHA1 (patch-rts_Makefile) = fe88269e184aa0d80e13723c9e4fe47aba68eb3e
+SHA1 (patch-rts_idris__net.c) = fcb226e8752c34661fc1a81fff11e41342c3e0f8
+SHA1 (patch-src_IRTS_System.hs) = 4451e03f4e9095fcac9e014eb7ad4b997d5e308d
+SHA1 (patch-src_Idris_CmdOptions.hs) = 01b8ecb9b02c214ebff8c46b74e1e2b82c18e206
+SHA1 (patch-src_Idris_Core_CaseTree.hs) = 273e8335623ff07ccf4206fdb68558a42644c785
+SHA1 (patch-src_Idris_Core_TT.hs) = d80aa0777f443d6487fa3349a3dad54ae4aedb08
+SHA1 (patch-src_Idris_Package_Parser.hs) = 3394ec6fbf1323f4331d614426b48377815b7347
+SHA1 (patch-src_Idris_Parser_Data.hs) = 5b6d2d3944233fba22e93d631f92de49e64b35a8
+SHA1 (patch-src_Idris_Parser_Helpers.hs) = bfd9b16dafa0581147c6b22e5d4e43ae2b701f96
+SHA1 (patch-src_Idris_Parser_Ops.hs) = 2ebc3ffc1c909362c4945e556056d5428a8d0a25
+SHA1 (patch-src_Idris_Parser_Stack.hs) = 35c903e02b5ec6f21cc04047d9c474082cd97663
diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/options.mk     Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: options.mk,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.idris
+PKG_SUPPORTED_OPTIONS=         idris-ffi gmp
+PKG_SUGGESTED_OPTIONS=         idris-ffi gmp
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+###
+### Build support for libffi
+###
+.if !empty(PKG_OPTIONS:Midris-ffi)
+CONFIGURE_ARGS+=       -f ffi
+.  include "../../devel/hs-libffi/buildlink3.mk"
+.endif
+
+###
+### Use GMP for Integers
+###
+.if !empty(PKG_OPTIONS:Mgmp)
+CONFIGURE_ARGS+=       -f gmp
+.  include "../../devel/gmp/buildlink3.mk"
+.  include "../../devel/hs-libffi/buildlink3.mk"
+.endif
diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/patches/patch-Setup.hs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/patches/patch-Setup.hs Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,80 @@
+$NetBSD: patch-Setup.hs,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+* Don't hard-code the gmake command (pkgsrc specific).
+
+* Set LD_LIBRARY_PATH while building its standard libraries. This is
+  needed because we link idris dynamically.
+
+* Don't try to invoke git. Cabal packages don't come with .git
+  directory.
+
+* Fix build with GHC 8.8
+
+--- Setup.hs.orig      2019-07-22 10:47:26.000000000 +0000
++++ Setup.hs
+@@ -42,19 +42,19 @@ import Distribution.Types.UnqualComponen
+ (<//>) = (Px.</>)
+ idrisCmd local = Px.joinPath $ splitDirectories $ ".." <//> ".." <//> buildDir local <//> "idris" <//> "idris"
+ #else
+-idrisCmd local = ".." </> ".." </>  buildDir local </>  "idris" </>  "idris"
++idrisCmd local = "@PKGSRC_SETENV@ " ++ "LD_LIBRARY_PATH=" ++ idrisLibPath ++
++                 " DYLD_LIBRARY_PATH=" ++ idrisLibPath ++ " " ++
++                 idrisCmdPath
++   where
++      idrisCmdPath = ".." </> ".." </>  buildDir local </>  "idris" </>  "idris"
++      idrisLibPath = ".." </> ".." </>  buildDir local
+ #endif
+ 
+ -- -----------------------------------------------------------------------------
+ -- Make Commands
+ 
+--- use GNU make on FreeBSD
+-#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)\
+-    || defined(openbsd_HOST_OS) || defined(netbsd_HOST_OS)
+-mymake = "gmake"
+-#else
+-mymake = "make"
+-#endif
++mymake = "@GMAKE@"
++
+ make verbosity =
+    P.runProgramInvocation verbosity . P.simpleProgramInvocation mymake
+ 
+@@ -117,9 +117,7 @@ idrisClean _ flags _ _ = cleanStdLib
+ -- Configure
+ 
+ gitHash :: IO String
+-gitHash = do h <- Control.Exception.catch (readProcess "git" ["rev-parse", "--short", "HEAD"] "")
+-                  (\e -> let e' = (e :: SomeException) in return "PRE")
+-             return $ takeWhile (/= '\n') h
++gitHash = return ""
+ 
+ -- Generate a module that contains extra library directories passed
+ -- via command-line to cabal
+@@ -215,6 +213,7 @@ idrisConfigure _ flags pkgdesc local = d
+       autogenComponentModulesDir lbi _ = autogenModulesDir lbi
+ #endif
+ 
++#if !MIN_VERSION_Cabal(3,0,0)
+ idrisPreSDist args flags = do
+   let dir = S.fromFlag (S.sDistDirectory flags)
+   let verb = S.fromFlag (S.sDistVerbosity flags)
+@@ -244,6 +243,7 @@ idrisPostSDist args flags desc lbi = do
+                               removeFile targetFile)
+              (\e -> let e' = (e :: SomeException) in return ())
+   postSDist simpleUserHooks args flags desc lbi
++#endif
+ 
+ #if !(MIN_VERSION_Cabal(2,0,0))
+ rewriteFileEx :: Verbosity -> FilePath -> String -> IO ()
+@@ -353,8 +353,10 @@ main = defaultMainWithHooks $ simpleUser
+    , postInst = \_ flags pkg local ->
+                   idrisInstall (S.fromFlag $ S.installVerbosity flags)
+                                NoCopyDest pkg local
++#if !MIN_VERSION_Cabal(3,0,0)
+    , preSDist = idrisPreSDist
+    , sDistHook = idrisSDist (sDistHook simpleUserHooks)
+    , postSDist = idrisPostSDist
++#endif
+    , testHook = idrisTestHook
+    }
diff -r 5e5b9205392b -r c1cfb91ccbd2 lang/idris/patches/patch-idris.cabal
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/idris/patches/patch-idris.cabal      Mon Jan 20 23:32:38 2020 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-idris.cabal,v 1.1 2020/01/20 23:32:38 pho Exp $
+
+Fix build with recent libraries.
+
+--- idris.cabal.orig   2019-07-22 10:47:26.000000000 +0000
++++ idris.cabal
+@@ -272,7 +272,7 @@ Library
+   Build-depends:  base >=4 && <5
+                 , aeson >= 0.6 && < 1.5
+                 , annotated-wl-pprint >= 0.7 && < 0.8
+-                , ansi-terminal < 0.9
++                , ansi-terminal < 0.11
+                 , ansi-wl-pprint < 0.7
+                 , array >= 0.4.0.1 && < 0.6
+                 , base64-bytestring < 1.1
+@@ -289,10 +289,10 @@ Library
+                 , fingertree >= 0.1.4.1 && < 0.2
+                 , haskeline >= 0.7 && < 0.8
+                 , ieee754 >= 0.7 && < 0.9
+-                , megaparsec >= 7.0.4 && < 8
++                , megaparsec >= 7.0.4 && < 9
+                 , mtl >= 2.1 && < 2.3
+-                , network >= 2.7 && < 2.9
+-                , optparse-applicative >= 0.13 && < 0.15
++                , network >= 2.7 && < 4
++                , optparse-applicative >= 0.13 && < 1
+                 , parser-combinators >= 1.0.0



Home | Main Index | Thread Index | Old Index