[arch-commits] Commit in haskell-language-python/trunk (PKGBUILD ghc-8.2.1.patch)

Felix Yan felixonmars at archlinux.org
Tue Aug 15 22:51:55 UTC 2017


    Date: Tuesday, August 15, 2017 @ 22:51:55
  Author: felixonmars
Revision: 251211

upgpkg: haskell-language-python 0.5.4-3

GHC 8.2.1 rebuild

Added:
  haskell-language-python/trunk/ghc-8.2.1.patch
Modified:
  haskell-language-python/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   26 +++++----
 ghc-8.2.1.patch |  150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-08-15 22:21:03 UTC (rev 251210)
+++ PKGBUILD	2017-08-15 22:51:55 UTC (rev 251211)
@@ -5,25 +5,31 @@
 _hkgname=language-python
 pkgname=haskell-language-python
 pkgver=0.5.4
-pkgrel=2
+pkgrel=3
 pkgdesc="Parsing and pretty printing of Python code."
 url="https://hackage.haskell.org/package/${_hkgname}"
 license=("custom:BSD3")
 arch=('i686' 'x86_64')
-depends=("ghc" 'haskell-monads-tf' 'haskell-utf8-string')
-makedepends=('happy' 'alex')
-source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
-sha256sums=('ba93508e5e7b6b3c881eb9b04f9032c2e8c5f20255d812a0a365eba82ffbf129')
+depends=('ghc-libs' 'haskell-monads-tf' 'haskell-utf8-string')
+makedepends=('happy' 'alex' 'ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        ghc-8.2.1.patch)
+sha256sums=('ba93508e5e7b6b3c881eb9b04f9032c2e8c5f20255d812a0a365eba82ffbf129'
+            '55474f71fe722cff4ea0b7bbc960c3c0074295804a6a520e8f3818c71d05f810')
 
+prepare() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+    patch -p1 -i ../ghc-8.2.1.patch
+}
+
 build() {
     cd "${srcdir}/${_hkgname}-${pkgver}"
-    
+
     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic \
         --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \
-        --libsubdir=\$compiler/site-local/\$pkgid \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
             -fsplit-base
     runhaskell Setup build
-    runhaskell Setup haddock --hoogle --html
     runhaskell Setup register --gen-script
     runhaskell Setup unregister --gen-script
     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
@@ -32,11 +38,9 @@
 
 package() {
     cd "${srcdir}/${_hkgname}-${pkgver}"
-    
+
     install -D -m744 register.sh   "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
     install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
-    install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
-    ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
     runhaskell Setup copy --destdir="${pkgdir}"
     install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
     rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"

Added: ghc-8.2.1.patch
===================================================================
--- ghc-8.2.1.patch	                        (rev 0)
+++ ghc-8.2.1.patch	2017-08-15 22:51:55 UTC (rev 251211)
@@ -0,0 +1,150 @@
+From 416a0981a6c0185d5aa905a5de31bc8024ef1099 Mon Sep 17 00:00:00 2001
+From: Sergey Vinokurov <serg.foo at gmail.com>
+Date: Mon, 31 Jul 2017 23:18:58 +0300
+Subject: [PATCH] Fix unused import warnings and simultaneously fix ghc 8.2.1
+ build
+
+---
+ language-python.cabal                       | 9 +++++----
+ src/Language/Python/Common.hs               | 6 +++---
+ src/Language/Python/Common/LexerUtils.hs    | 5 +----
+ src/Language/Python/Common/ParseError.hs    | 1 -
+ src/Language/Python/Common/ParserMonad.hs   | 3 ---
+ src/Language/Python/Common/Token.hs         | 2 +-
+ src/Language/Python/Version2/Parser.hs      | 2 +-
+ src/Language/Python/Version2/Parser/Lexer.x | 3 ---
+ src/Language/Python/Version3/Parser.hs      | 2 +-
+ 9 files changed, 12 insertions(+), 21 deletions(-)
+
+diff --git a/language-python.cabal b/language-python.cabal
+index 2bb36b1..bb9d442 100644
+--- a/language-python.cabal
++++ b/language-python.cabal
+@@ -13,10 +13,11 @@ maintainer:          florbitous at gmail.com
+ homepage:            http://github.com/bjpop/language-python 
+ build-type:          Simple
+ stability:           experimental
+-extra-source-files:  src/Language/Python/Version3/Parser/Parser.y 
+-                     src/Language/Python/Version3/Parser/Lexer.x 
+-                     src/Language/Python/Version2/Parser/Parser.y 
+-                     src/Language/Python/Version2/Parser/Lexer.x 
++extra-source-files:  src/Language/Python/Version3/Parser/Parser.y
++                     src/Language/Python/Version3/Parser/Lexer.x
++                     src/Language/Python/Version2/Parser/Parser.y
++                     src/Language/Python/Version2/Parser/Lexer.x
++tested-with: GHC ==7.8.4, GHC ==7.10.3, GHC ==8.0.2, GHC ==8.2.1
+ 
+ source-repository head
+    type: git
+diff --git a/src/Language/Python/Common.hs b/src/Language/Python/Common.hs
+index 6fe22a6..871a434 100644
+--- a/src/Language/Python/Common.hs
++++ b/src/Language/Python/Common.hs
+@@ -33,8 +33,8 @@ module Language.Python.Common (
+ import Language.Python.Common.Pretty 
+ import Language.Python.Common.Token 
+ import Language.Python.Common.AST 
+-import Language.Python.Common.PrettyAST 
+-import Language.Python.Common.PrettyToken 
++import Language.Python.Common.PrettyAST ()
++import Language.Python.Common.PrettyToken ()
+ import Language.Python.Common.SrcLocation 
+-import Language.Python.Common.PrettyParseError 
++import Language.Python.Common.PrettyParseError ()
+ import Language.Python.Common.ParseError
+diff --git a/src/Language/Python/Common/LexerUtils.hs b/src/Language/Python/Common/LexerUtils.hs
+index 6aa00d6..fea39a1 100644
+--- a/src/Language/Python/Common/LexerUtils.hs
++++ b/src/Language/Python/Common/LexerUtils.hs
+@@ -16,11 +16,8 @@ module Language.Python.Common.LexerUtils where
+ import Control.Monad (liftM)
+ import Control.Monad.Error.Class (throwError)
+ import Data.List (foldl')
+-import Data.Map as Map hiding (null, map, foldl')
+ import Data.Word (Word8)
+-import Data.Char (ord)
+-import Numeric (readHex, readOct)
+-import Language.Python.Common.Token as Token 
++import Language.Python.Common.Token as Token
+ import Language.Python.Common.ParserMonad hiding (location)
+ import Language.Python.Common.SrcLocation 
+ import Codec.Binary.UTF8.String as UTF8 (encode)
+diff --git a/src/Language/Python/Common/ParseError.hs b/src/Language/Python/Common/ParseError.hs
+index 77e9eb9..53b33ef 100644
+--- a/src/Language/Python/Common/ParseError.hs
++++ b/src/Language/Python/Common/ParseError.hs
+@@ -12,7 +12,6 @@
+ 
+ module Language.Python.Common.ParseError ( ParseError (..) ) where
+ 
+-import Language.Python.Common.Pretty
+ import Language.Python.Common.SrcLocation (SrcLocation)
+ import Language.Python.Common.Token (Token)
+ import Control.Monad.Error.Class
+diff --git a/src/Language/Python/Common/ParserMonad.hs b/src/Language/Python/Common/ParserMonad.hs
+index 0087576..3c1c1fa 100644
+--- a/src/Language/Python/Common/ParserMonad.hs
++++ b/src/Language/Python/Common/ParserMonad.hs
+@@ -52,9 +52,6 @@ import Control.Applicative ((<$>))
+ import Control.Monad.State.Class
+ import Control.Monad.State.Strict as State
+ import Control.Monad.Error as Error
+-import Control.Monad.Error.Class
+-import Control.Monad.Identity as Identity
+-import Control.Monad.Trans as Trans
+ import Language.Python.Common.Pretty
+ 
+ internalError :: String -> P a 
+diff --git a/src/Language/Python/Common/Token.hs b/src/Language/Python/Common/Token.hs
+index d7840e8..5893590 100644
+--- a/src/Language/Python/Common/Token.hs
++++ b/src/Language/Python/Common/Token.hs
+@@ -25,7 +25,7 @@ module Language.Python.Common.Token (
+    ) where
+ 
+ import Language.Python.Common.Pretty
+-import Language.Python.Common.SrcLocation (SrcSpan (..), SrcLocation (..), Span(getSpan))
++import Language.Python.Common.SrcLocation (SrcSpan (..), Span(getSpan))
+ import Data.Data
+ 
+ -- | Lexical tokens.
+diff --git a/src/Language/Python/Version2/Parser.hs b/src/Language/Python/Version2/Parser.hs
+index e2379c4..1df90a6 100644
+--- a/src/Language/Python/Version2/Parser.hs
++++ b/src/Language/Python/Version2/Parser.hs
+@@ -35,7 +35,7 @@ import Language.Python.Version2.Parser.Lexer (initStartCodeStack)
+ import Language.Python.Common.AST (ModuleSpan, StatementSpan, ExprSpan)
+ import Language.Python.Common.Token (Token)
+ import Language.Python.Common.SrcLocation (initialSrcLocation)
+-import Language.Python.Common.ParserMonad (execParser, execParserKeepComments, ParseError, initialState)
++import Language.Python.Common.ParserMonad (execParserKeepComments, ParseError, initialState)
+ 
+ -- | Parse a whole Python source file. Return comments in addition to the parsed module.
+ parseModule :: String -- ^ The input stream (python module source code). 
+diff --git a/src/Language/Python/Version2/Parser/Lexer.x b/src/Language/Python/Version2/Parser/Lexer.x
+index 5b0458f..4e0e746 100644
+--- a/src/Language/Python/Version2/Parser/Lexer.x
++++ b/src/Language/Python/Version2/Parser/Lexer.x
+@@ -20,9 +20,6 @@ import Language.Python.Common.ParserMonad hiding (location)
+ import Language.Python.Common.SrcLocation
+ import Language.Python.Common.LexerUtils
+ import qualified Data.Map as Map
+-import Control.Monad (liftM)
+-import Data.List (foldl')
+-import Numeric (readHex, readOct)
+ }
+ 
+ -- character sets
+diff --git a/src/Language/Python/Version3/Parser.hs b/src/Language/Python/Version3/Parser.hs
+index 24ff613..1cd5f8f 100644
+--- a/src/Language/Python/Version3/Parser.hs
++++ b/src/Language/Python/Version3/Parser.hs
+@@ -35,7 +35,7 @@ import Language.Python.Version3.Parser.Lexer (initStartCodeStack)
+ import Language.Python.Common.AST (ModuleSpan, StatementSpan, ExprSpan)
+ import Language.Python.Common.Token (Token)
+ import Language.Python.Common.SrcLocation (initialSrcLocation)
+-import Language.Python.Common.ParserMonad (execParser, execParserKeepComments, ParseError, initialState)
++import Language.Python.Common.ParserMonad (execParserKeepComments, ParseError, initialState)
+ 
+ -- | Parse a whole Python source file. Return comments in addition to the parsed module.
+ parseModule :: String -- ^ The input stream (python module source code). 



More information about the arch-commits mailing list