Let it build with ghc-8.6.4.
Also, enable it on i386. Joint work with Greg Steuck.
This commit is contained in:
parent
98d593d261
commit
7f1a854685
@ -1,14 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2019/09/10 13:51:28 kili Exp $
|
||||
|
||||
BROKEN-i386 = needs a fixed rts/Linker.c in ghc
|
||||
# $OpenBSD: Makefile,v 1.6 2019/09/30 12:50:08 kili Exp $
|
||||
|
||||
COMMENT-main = shell script analysis tool
|
||||
COMMENT-lib = ShellCheck library
|
||||
|
||||
V = 0.4.7
|
||||
DISTNAME = ShellCheck-${V}
|
||||
REVISION-main = 0
|
||||
REVISION-lib = 2
|
||||
REVISION-main = 1
|
||||
REVISION-lib = 3
|
||||
PKGNAME-main = shellcheck-${V}
|
||||
PKGNAME-lib = hs-shellcheck-${V}
|
||||
CATEGORIES = devel
|
||||
@ -20,23 +18,23 @@ MAINTAINER = Caspar Schutijser <caspar@schutijser.com>
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
MULTI_PACKAGES = -main -lib
|
||||
WANTLIB-main = c iconv m pthread util
|
||||
WANTLIB-main = c charset ffi gmp iconv m pthread util
|
||||
WANTLIB-lib =
|
||||
|
||||
MODULES = lang/ghc
|
||||
|
||||
MODGHC_BUILD = cabal hackage haddock register
|
||||
|
||||
MODGHC_PACKAGE_KEY = FGszl8wDu4DoQ1UCsbZPa
|
||||
MODGHC_PACKAGE_KEY = 1v0sx5oDTF9BoGzz61tUYo
|
||||
|
||||
BUILD_DEPENDS = ${RUN_DEPENDS-lib}
|
||||
RUN_DEPENDS-lib = devel/hs-mtl>=2.2.1 \
|
||||
devel/hs-parsec \
|
||||
devel/hs-QuickCheck>=2.7.4 \
|
||||
RUN_DEPENDS-lib = devel/hs-QuickCheck>=2.7.4 \
|
||||
devel/hs-regex-tdfa \
|
||||
lang/ghc=${MODGHC_VER} \
|
||||
textproc/hs-json
|
||||
LIB_DEPENDS-main = converters/libiconv
|
||||
LIB_DEPENDS-main = converters/libiconv \
|
||||
devel/gmp \
|
||||
devel/libffi
|
||||
RUN_DEPENDS-main =
|
||||
|
||||
NO_TEST = Yes
|
||||
|
44
devel/shellcheck/patches/patch-ShellCheck_AnalyzerLib_hs
Normal file
44
devel/shellcheck/patches/patch-ShellCheck_AnalyzerLib_hs
Normal file
@ -0,0 +1,44 @@
|
||||
$OpenBSD: patch-ShellCheck_AnalyzerLib_hs,v 1.1 2019/09/30 12:50:08 kili Exp $
|
||||
|
||||
Index: ShellCheck/AnalyzerLib.hs
|
||||
--- ShellCheck/AnalyzerLib.hs.orig
|
||||
+++ ShellCheck/AnalyzerLib.hs
|
||||
@@ -57,17 +57,19 @@ runChecker params checker = notes
|
||||
check = perScript checker `composeAnalyzers` (\(Root x) -> void $ doAnalysis (perToken checker) x)
|
||||
notes = snd $ evalRWS (check $ Root root) params Cache
|
||||
|
||||
+instance Semigroup Checker where
|
||||
+ x <> y = Checker {
|
||||
+ perScript = perScript x `composeAnalyzers` perScript y,
|
||||
+ perToken = perToken x `composeAnalyzers` perToken y
|
||||
+ }
|
||||
+
|
||||
instance Monoid Checker where
|
||||
mempty = Checker {
|
||||
perScript = nullCheck,
|
||||
perToken = nullCheck
|
||||
}
|
||||
- mappend x y = Checker {
|
||||
- perScript = perScript x `composeAnalyzers` perScript y,
|
||||
- perToken = perToken x `composeAnalyzers` perToken y
|
||||
- }
|
||||
+ mappend = (<>)
|
||||
|
||||
-
|
||||
composeAnalyzers :: (a -> Analysis) -> (a -> Analysis) -> a -> Analysis
|
||||
composeAnalyzers f g x = f x >> g x
|
||||
|
||||
@@ -232,9 +234,10 @@ getParentTree t =
|
||||
where
|
||||
pre t = modify (first ((:) t))
|
||||
post t = do
|
||||
- (_:rest, map) <- get
|
||||
- case rest of [] -> put (rest, map)
|
||||
- (x:_) -> put (rest, Map.insert (getId t) x map)
|
||||
+ (x, map) <- get
|
||||
+ case x of
|
||||
+ _:rest -> case rest of [] -> put (rest, map)
|
||||
+ (x:_) -> put (rest, Map.insert (getId t) x map)
|
||||
|
||||
-- Given a root node, make a map from Id to Token
|
||||
getTokenMap :: Token -> Map.Map Id Token
|
54
devel/shellcheck/patches/patch-ShellCheck_cabal
Normal file
54
devel/shellcheck/patches/patch-ShellCheck_cabal
Normal file
@ -0,0 +1,54 @@
|
||||
$OpenBSD: patch-ShellCheck_cabal,v 1.1 2019/09/30 12:50:08 kili Exp $
|
||||
|
||||
Index: ShellCheck.cabal
|
||||
--- ShellCheck.cabal.orig
|
||||
+++ ShellCheck.cabal
|
||||
@@ -1,12 +1,13 @@
|
||||
Name: ShellCheck
|
||||
Version: 0.4.7
|
||||
+x-revision: 1
|
||||
Synopsis: Shell script analysis tool
|
||||
License: GPL-3
|
||||
License-file: LICENSE
|
||||
Category: Static Analysis
|
||||
Author: Vidar Holen
|
||||
Maintainer: vidar@vidarholen.net
|
||||
-Homepage: http://www.shellcheck.net/
|
||||
+Homepage: https://www.shellcheck.net/
|
||||
Build-Type: Custom
|
||||
Cabal-Version: >= 1.8
|
||||
Bug-reports: https://github.com/koalaman/shellcheck/issues
|
||||
@@ -31,6 +32,12 @@ Extra-Source-Files:
|
||||
-- tests
|
||||
test/shellcheck.hs
|
||||
|
||||
+custom-setup
|
||||
+ setup-depends:
|
||||
+ base >= 4 && <5,
|
||||
+ process >= 1.0 && <1.7,
|
||||
+ Cabal >= 1.10 && <3.0
|
||||
+
|
||||
source-repository head
|
||||
type: git
|
||||
location: git://github.com/koalaman/shellcheck.git
|
||||
@@ -38,7 +45,7 @@ source-repository head
|
||||
library
|
||||
build-depends:
|
||||
base >= 4 && < 5,
|
||||
- containers,
|
||||
+ containers >= 0.5,
|
||||
directory,
|
||||
json,
|
||||
mtl >= 2.2.1,
|
||||
@@ -73,9 +80,9 @@ executable shellcheck
|
||||
base >= 4 && < 5,
|
||||
containers,
|
||||
directory,
|
||||
- json,
|
||||
+ json >= 0.3.6,
|
||||
mtl >= 2.2.1,
|
||||
- parsec,
|
||||
+ parsec >= 3.0,
|
||||
regex-tdfa,
|
||||
QuickCheck >= 2.7.4
|
||||
main-is: shellcheck.hs
|
21
devel/shellcheck/patches/patch-shellcheck_hs
Normal file
21
devel/shellcheck/patches/patch-shellcheck_hs
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-shellcheck_hs,v 1.1 2019/09/30 12:50:08 kili Exp $
|
||||
|
||||
Update to newer GHC (Semigroup proposal).
|
||||
|
||||
Index: shellcheck.hs
|
||||
--- shellcheck.hs.orig
|
||||
+++ shellcheck.hs
|
||||
@@ -56,9 +56,12 @@ data Status =
|
||||
| RuntimeException
|
||||
deriving (Ord, Eq, Show)
|
||||
|
||||
+instance Semigroup Status where
|
||||
+ (<>) = max
|
||||
+
|
||||
instance Monoid Status where
|
||||
mempty = NoProblems
|
||||
- mappend = max
|
||||
+ mappend = (<>)
|
||||
|
||||
data Options = Options {
|
||||
checkSpec :: CheckSpec,
|
@ -1,46 +1,64 @@
|
||||
@comment $OpenBSD: PLIST-lib,v 1.2 2019/09/10 13:51:28 kili Exp $
|
||||
@comment $OpenBSD: PLIST-lib,v 1.3 2019/09/30 12:50:08 kili Exp $
|
||||
@tag ghc-pkg-recache
|
||||
lib/ghc/${DISTNAME}/
|
||||
lib/ghc/${DISTNAME}/HS${DISTNAME}-${MODGHC_PACKAGE_KEY}.o
|
||||
lib/ghc/${DISTNAME}/Paths_ShellCheck.dyn_hi
|
||||
lib/ghc/${DISTNAME}/Paths_ShellCheck.hi
|
||||
lib/ghc/${DISTNAME}/Paths_ShellCheck.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/
|
||||
lib/ghc/${DISTNAME}/ShellCheck/AST.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/AST.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/AST.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/ASTLib.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/ASTLib.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/ASTLib.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Analytics.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Analytics.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Analytics.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Analyzer.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Analyzer.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Analyzer.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/AnalyzerLib.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/AnalyzerLib.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/AnalyzerLib.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checker.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checker.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checker.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/Commands.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/Commands.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/Commands.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/ShellSupport.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/ShellSupport.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Checks/ShellSupport.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Data.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Data.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Data.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/CheckStyle.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/CheckStyle.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/CheckStyle.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/Format.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/Format.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/Format.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/GCC.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/GCC.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/GCC.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/JSON.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/JSON.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/JSON.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/TTY.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/TTY.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Formatter/TTY.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Interface.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Interface.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Interface.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Parser.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Parser.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Parser.p_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Regex.dyn_hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Regex.hi
|
||||
lib/ghc/${DISTNAME}/ShellCheck/Regex.p_hi
|
||||
lib/ghc/${DISTNAME}/libHS${DISTNAME}-${MODGHC_PACKAGE_KEY}-ghc${MODGHC_VER}.so
|
||||
lib/ghc/${DISTNAME}/libHS${DISTNAME}-${MODGHC_PACKAGE_KEY}.a
|
||||
lib/ghc/${DISTNAME}/libHS${DISTNAME}-${MODGHC_PACKAGE_KEY}_p.a
|
||||
lib/ghc/package.conf.d/${DISTNAME}.conf
|
||||
@ -90,10 +108,12 @@ share/doc/hs-${DISTNAME}/html/doc-index-U.html
|
||||
share/doc/hs-${DISTNAME}/html/doc-index-V.html
|
||||
share/doc/hs-${DISTNAME}/html/doc-index-W.html
|
||||
share/doc/hs-${DISTNAME}/html/doc-index.html
|
||||
share/doc/hs-${DISTNAME}/html/haddock-util.js
|
||||
share/doc/hs-${DISTNAME}/html/haddock-bundle.min.js
|
||||
share/doc/hs-${DISTNAME}/html/hslogo-16.png
|
||||
share/doc/hs-${DISTNAME}/html/index.html
|
||||
share/doc/hs-${DISTNAME}/html/meta.json
|
||||
share/doc/hs-${DISTNAME}/html/minus.gif
|
||||
share/doc/hs-${DISTNAME}/html/ocean.css
|
||||
share/doc/hs-${DISTNAME}/html/plus.gif
|
||||
share/doc/hs-${DISTNAME}/html/quick-jump.css
|
||||
share/doc/hs-${DISTNAME}/html/synopsis.png
|
||||
|
Loading…
Reference in New Issue
Block a user