blob: 7c23243f4c4ff36a78e21e7154dd77403b9039de (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
PORTNAME= haskell-language-server
DISTVERSION= 2.10.0.0
PORTREVISION= 2
CATEGORIES= devel haskell
MAINTAINER= haskell@FreeBSD.org
COMMENT= LSP provider implementation for Haskell language
WWW= https://haskell-language-server.readthedocs.io/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_aarch64= compiler crashes
NOT_FOR_ARCHS= i386
FLAVORS= default ghc94 ghc96
FLAVOR?= ${FLAVORS:[1]}
.if ${FLAVOR:U} != default
PKGNAMESUFFIX= -${FLAVOR}
.endif
# Do not use a flavor helper to let Uses/cabal.mk machinery to kick in
.if ${FLAVOR:U} == ghc94
BUILD_DEPENDS= ghc-9.4.8:lang/ghc94
GHC_VERSION= 9.4.8
.elif ${FLAVOR:U} == ghc96
BUILD_DEPENDS= ghc-9.6.7:lang/ghc96
GHC_VERSION= 9.6.7
.endif
USES= cabal
.for flavor in ${FLAVORS}
. include "Makefile.cabal.${flavor}"
.endfor
USE_CABAL= ${${FLAVOR}_USE_CABAL}
CABAL_PROJECT= append
CABAL_FLAGS= -dynamic
CABAL_EXECUTABLES= ${PORTNAME} \
${PORTNAME}-wrapper
.if ${FLAVOR:U} != default
SKIP_CABAL_PLIST= yes
PLIST_FILES= bin/${PORTNAME}-${GHC_VERSION}
.endif
# When running 'make makesum' we want USE_CABAL to include packages for all flavors
.ifmake makesum
.for f in ${FLAVORS}
USE_CABAL+= ${${f}_USE_CABAL}
.endfor
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == aarch64
# compiler goes out of memory
BUILD_ARGS+= --disable-optimization
.endif
.if ${FLAVOR:U} != default
post-install:
${RM} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-wrapper
${MV} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-${GHC_VERSION}
.endif
.include <bsd.port.post.mk>
|