Date: Monday, December 5, 2016 @ 15:11:48 Author: felixonmars Revision: 198050
upgpkg: idris 0.99-1 Added: idris/trunk/datadir.patch Modified: idris/trunk/PKGBUILD ---------------+ PKGBUILD | 30 +++++++++++++------- datadir.patch | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 10 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-12-05 11:25:36 UTC (rev 198049) +++ PKGBUILD 2016-12-05 15:11:48 UTC (rev 198050) @@ -3,37 +3,47 @@ # Contributor: Arch Haskell Team <arch-hask...@haskell.org> pkgname=idris -pkgver=0.12.3 -pkgrel=4 +pkgver=0.99 +pkgrel=1 pkgdesc="Functional Programming Language with Dependent Types" url="http://www.idris-lang.org/" license=("custom:BSD3") arch=('i686' 'x86_64') depends=('gmp' 'libffi' 'zlib' 'gcc') -makedepends=("ghc=8.0.1" "haskell-aeson" "haskell-annotated-wl-pprint" "haskell-ansi-terminal" +makedepends=("ghc=8.0.1" "git" "haskell-aeson" "haskell-annotated-wl-pprint" "haskell-ansi-terminal" "haskell-ansi-wl-pprint" "haskell-async" "haskell-base64-bytestring" "haskell-blaze-html" "haskell-blaze-markup" "haskell-cheapskate" "haskell-fingertree" "haskell-fsnotify" "haskell-ieee754" "haskell-mtl" "haskell-libffi" "haskell-network" - "haskell-optparse-applicative0.12" "haskell-parsers" "haskell-regex-tdfa" + "haskell-optparse-applicative" "haskell-parsers" "haskell-regex-tdfa" "haskell-safe" "haskell-split" "haskell-terminal-size" "haskell-text" "haskell-transformers-compat" "haskell-trifecta" "haskell-uniplate" "haskell-unordered-containers" "haskell-utf8-string" "haskell-vector" "haskell-vector-binary-instances" "haskell-zip-archive") -source=("http://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz") -sha256sums=('3a9f3d5aeb032b1d987402cf4ca54a2fbfc7b02d852a629f528943a5fe5b59c6') +source=("git+https://github.com/idris-lang/Idris-dev.git#tag=v$pkgver" + datadir.patch) +sha256sums=('SKIP' + 'e7cf290770a7ee08cc4089eccf23a7501300d70e85df03d84652b3045d568371') +prepare() { + sed -i 's/, safe == 0.3.9/, safe >= 0.3.9/' Idris-dev/${pkgname}.cabal + + cd Idris-dev + # https://github.com/idris-lang/Idris-dev/issues/3544 + patch -p1 -i ../datadir.patch +} + build() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/Idris-dev" runhaskell Setup configure -O --enable-library-profiling --enable-shared \ - --prefix=/usr --docdir="/usr/share/doc/${pkgbase}" --datasubdir="$pkgbase" \ + --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" \ --libsubdir=\$compiler/site-local/\$pkgid \ - -fFFI -fGMP + -fFFI -fGMP -frelease -f-freestanding -f-CI -f-execonly LC_CTYPE=en_US.UTF-8 runhaskell Setup build } package() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/Idris-dev" runhaskell Setup copy --destdir="${pkgdir}" rm -r "$pkgdir"/usr/{lib,share/doc} } Added: datadir.patch =================================================================== --- datadir.patch (rev 0) +++ datadir.patch 2016-12-05 15:11:48 UTC (rev 198050) @@ -0,0 +1,84 @@ +From d1bc3fa3c704bc233f0036ea13204d7790d26477 Mon Sep 17 00:00:00 2001 +From: Jan de Muijnck-Hughes <j...@st-andrews.ac.uk> +Date: Mon, 5 Dec 2016 11:17:51 +0000 +Subject: [PATCH] Make fetching of data files more robust. Fixes #3544 + +`getDataFileName` didn't take into account possible changes in Idris' datadir that were not cabal made. This fix adds a more robust variant of `getDataFileName`. +--- + src/IRTS/System.hs | 7 ++++++- + src/Idris/IdrisDoc.hs | 4 ++-- + src/Idris/Info.hs | 5 +++++ + 3 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/IRTS/System.hs b/src/IRTS/System.hs +index def563e..9d3d11a 100644 +--- a/src/IRTS/System.hs ++++ b/src/IRTS/System.hs +@@ -6,7 +6,7 @@ License : BSD3 + Maintainer : The Idris Community. + -} + {-# LANGUAGE CPP #-} +-module IRTS.System( getDataFileName ++module IRTS.System( getIdrisDataFileByName + , getCC + , getLibFlags + , getIdrisDataDir +@@ -42,6 +42,11 @@ getIdrisDataDir = do + return ddir + Just ddir -> return ddir + ++getIdrisDataFileByName :: String -> IO FilePath ++getIdrisDataFileByName fn = do ++ dir <- getIdrisDataDir ++ return $ dir </> fn ++ + overrideIdrisSubDirWith :: String -- ^ Sub directory in `getDataDir` location. + -> String -- ^ Environment variable to get new location from. + -> IO FilePath +diff --git a/src/Idris/IdrisDoc.hs b/src/Idris/IdrisDoc.hs +index 012554f..6c144ae 100644 +--- a/src/Idris/IdrisDoc.hs ++++ b/src/Idris/IdrisDoc.hs +@@ -19,7 +19,7 @@ import Idris.Docs + import Idris.Docstrings (nullDocstring) + import qualified Idris.Docstrings as Docstrings + import Idris.Parser.Helpers (opChars) +-import IRTS.System (getDataFileName) ++import IRTS.System (getIdrisDataFileByName) + + import Control.Applicative ((<|>)) + import Control.Monad (forM_) +@@ -708,5 +708,5 @@ copyDependencies :: FilePath -- ^ The base directory to which + -- dependencies should be written + -> IO () + copyDependencies dir = +- do styles <- getDataFileName $ "idrisdoc" </> "styles.css" ++ do styles <- getIdrisDataFileByName $ "idrisdoc" </> "styles.css" + copyFile styles (dir </> "styles.css") +diff --git a/src/Idris/Info.hs b/src/Idris/Info.hs +index 4ffe3d4..eb77a8c 100644 +--- a/src/Idris/Info.hs ++++ b/src/Idris/Info.hs +@@ -22,6 +22,7 @@ module Idris.Info + , getIdrisHistoryFile + , getIdrisInstalledPackages + , getIdrisLoggingCategories ++ , getIdrisDataFileByName + ) where + + import Idris.AbsSyntax (loggingCatsStr) +@@ -34,6 +35,7 @@ import Version_idris (gitHash) + import Data.Version + import System.Directory + import System.FilePath ++ + getIdrisDataDir :: IO String + getIdrisDataDir = S.getIdrisDataDir + +@@ -88,3 +90,6 @@ getIdrisInstalledPackages = installedPackages + + getIdrisLoggingCategories :: IO [String] + getIdrisLoggingCategories = return $ words loggingCatsStr ++ ++getIdrisDataFileByName :: String -> IO FilePath ++getIdrisDataFileByName = S.getIdrisDataFileByName