aboutsummaryrefslogtreecommitdiff
path: root/lang/elm/Makefile
blob: 767ed722e7b368ef62a4f11d8b2c784a761783b5 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
PORTNAME=	elm
PORTVERSION=	0.19.1
PORTREVISION=	8
CATEGORIES=	lang
MASTER_SITES=	LOCAL/arrowd/:package_list
DISTFILES=	elm-compiler-bootstrap-${PORTVERSION}${EXTRACT_SUFX}:package_list

MAINTAINER=	haskell@FreeBSD.org
COMMENT=	Delightful language for reliable webapps
WWW=		https://elm-lang.org/

LICENSE=	BSD3CLAUSE

BUILD_DEPENDS=	ghc-9.2.8:lang/ghc92

USES=		cabal nodejs:run

USE_GITHUB=	yes
GH_ACCOUNT=	elm
GH_PROJECT=	compiler

CONFLICTS_INSTALL=	elm # bin/elm (from mail/elm)

USE_CABAL=	HTTP-4000.4.1_6 \
		HUnit-1.6.2.0 \
		SHA-1.6.4.4 \
		ansi-terminal-1.0.2 \
		ansi-terminal-types-0.11.5_1 \
		ansi-wl-pprint-0.6.9_4 \
		appar-0.1.8 \
		asn1-encoding-0.9.6_2 \
		asn1-parse-0.9.5 \
		asn1-types-0.3.4 \
		assoc-1.1.1_1 \
		async-2.2.5_3 \
		attoparsec-0.14.4_6 \
		base-orphans-0.9.3 \
		base16-bytestring-1.0.2.0_1 \
		base64-bytestring-1.2.1.0_1 \
		basement-0.0.16 \
		blaze-builder-0.4.3 \
		byteorder-1.0.4 \
		bytestring-builder-0.10.8.2.0 \
		call-stack-0.4.0 \
		case-insensitive-1.2.1.0 \
		cborg-0.2.10.0_2 \
		cereal-0.5.8.3 \
		clock-0.8.4 \
		colour-2.3.6 \
		cookie-0.5.1 \
		crypton-1.0.4 \
		crypton-connection-0.4.4 \
		crypton-x509-1.7.7 \
		crypton-x509-store-1.6.10 \
		crypton-x509-system-1.6.7 \
		crypton-x509-validation-1.6.14 \
		data-array-byte-0.1.0.1_4 \
		data-default-0.8.0.1 \
		data-default-class-0.2.0.0 \
		digest-0.0.2.1 \
		ech-config-0.0.1 \
		edit-distance-0.2.2.1_1 \
		file-embed-0.0.16.0 \
		filelock-0.1.1.7 \
		foldable1-classes-compat-0.1.1_2 \
		half-0.3.2 \
		hashable-1.4.7.0 \
		hourglass-0.2.12_1 \
		hpke-0.0.0 \
		hsc2hs-0.68.10_4 \
		http-client-0.7.19 \
		http-client-tls-0.3.6.4_2 \
		http-types-0.12.4 \
		integer-logarithms-1.0.4 \
		io-streams-1.5.2.2_6 \
		io-streams-haproxy-1.0.1.0_9 \
		iproute-1.7.15 \
		language-glsl-0.3.0_1 \
		lifted-base-0.2.3.12 \
		memory-0.18.0_1 \
		mime-types-0.1.2.0 \
		monad-control-1.0.3.1 \
		network-3.2.7.0 \
		network-byte-order-0.1.7 \
		network-uri-2.6.4.2_1 \
		old-locale-1.0.0.7_2 \
		old-time-1.1.0.4 \
		optparse-applicative-0.18.1.0_1 \
		os-string-2.0.7 \
		pem-0.2.4 \
		prettyclass-1.0.0.0 \
		prettyprinter-1.7.1 \
		prettyprinter-ansi-terminal-1.1.3 \
		primitive-0.9.1.0 \
		random-1.3.1 \
		raw-strings-qq-1.1 \
		readable-0.3.1_2 \
		regex-base-0.94.0.3 \
		regex-posix-0.96.0.2 \
		scientific-0.3.8.0_2 \
		serialise-0.2.6.1_4 \
		snap-core-1.0.5.1_6 \
		snap-server-1.1.2.1_5 \
		socks-0.6.1 \
		splitmix-0.1.1 \
		streaming-commons-0.2.3.0 \
		strict-0.5.1_1 \
		tagged-0.8.9 \
		tasty-1.5.3_1 \
		th-compat-0.1.6 \
		these-1.2.1_2 \
		tls-2.1.10 \
		transformers-base-0.4.6 \
		transformers-compat-0.7.2 \
		unix-compat-0.7.4 \
		unix-time-0.4.16 \
		unordered-containers-0.2.20_4 \
		utf8-string-1.0.2 \
		vector-0.13.2.0_1 \
		vector-stream-0.1.0.1_3 \
		zip-archive-0.4.3.2_1 \
		zlib-0.7.1.0_2 \
		zlib-bindings-0.1.1.5_2

MAKE_ENV=	ELM_HOME=${WRKDIR}/elm-compiler-bootstrap-${PORTVERSION}

.PHONY: create-bootstrap
# Create the bootstrapping elm packages and registry files
# This is needed because it builds the reactor app, which is written in elm!
create-bootstrap:
	# Prepare source
	${MKDIR} ${WRKDIR}
	${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${PORTVERSION}_GH${_GITHUB_REV}${EXTRACT_SUFX} -C ${WRKDIR}
	${RM} ${WRKSRC}/worker/elm.cabal
	# Build with a custom home
	cd ${WRKSRC} && \
		${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} cabal new-update && \
		${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} cabal new-build --disable-benchmarks --disable-tests --flags ${CABAL_FLAGS} ${BUILD_ARGS} ${BUILD_TARGET}
	# Prepare the bootstrap to /tmp
	${TAR} --numeric-owner -czf /tmp/elm-compiler-bootstrap-${PORTVERSION}${EXTRACT_SUFX} -C ${WRKDIR} \
		elm-compiler-bootstrap-${PORTVERSION}
	# Now all that's left is manually placing the bootstrap file in ${DISTDIR}/cabal/
	# And running make makesum to update the distfile

.include <bsd.port.mk>