PORTNAME=	stack
DISTVERSIONPREFIX=	v
DISTVERSION=	3.7.1
CATEGORIES=	devel haskell

MAINTAINER=	haskell@FreeBSD.org
COMMENT=	Cross-platform program for developing Haskell programs
WWW=		https://www.haskellstack.org/

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	${LOCALBASE}/lib/compat/libffi.so.6:devel/libffi321 \
		${LOCALBASE}/lib/compat/libffi.so.7:devel/libffi33 \
		ca_root_nss>0:security/ca_root_nss \
		gmake:devel/gmake

USES=		cabal gmake iconv:wchar_t perl5 pkgconfig
USE_GITHUB=	yes
GH_ACCOUNT=	commercialhaskell
USE_PERL5=	run

USE_CABAL=	Glob-0.10.2_3 \
		OneTuple-0.4.2_1 \
		QuickCheck-2.14.3 \
		StateVar-1.2.2 \
		aeson-2.2.3.0_4 \
		aeson-warning-parser-0.1.1 \
		annotated-wl-pprint-0.7.0_1 \
		ansi-terminal-1.1.2 \
		ansi-terminal-types-1.1 \
		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 \
		attoparsec-aeson-2.2.2.0 \
		auto-update-0.2.6 \
		base-orphans-0.9.3 \
		base16-bytestring-1.0.2.0_1 \
		base64-bytestring-1.2.1.0_1 \
		basement-0.0.16 \
		bifunctors-5.6.2_2 \
		bitvec-1.1.5.0_3 \
		blaze-builder-0.4.3 \
		blaze-html-0.9.2.0_1 \
		blaze-markup-0.8.3.0_2 \
		byteorder-1.0.4 \
		casa-client-0.0.2 \
		casa-types-0.0.2 \
		case-insensitive-1.2.1.0 \
		cborg-0.2.10.0_3 \
		cereal-0.5.8.3 \
		character-ps-0.1 \
		clock-0.8.4 \
		cmdargs-0.10.22 \
		colour-2.3.6 \
		comonad-5.0.9_1 \
		companion-0.1.0 \
		conduit-1.3.6.1 \
		conduit-combinators-1.3.0 \
		conduit-extra-1.3.7 \
		contravariant-1.5.5 \
		cookie-0.5.1 \
		cryptohash-sha256-0.11.102.1_6 \
		crypton-1.0.4 \
		crypton-conduit-0.2.3 \
		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-default-0.7.1.3 \
		data-default-class-0.1.2.2 \
		data-default-instances-containers-0.1.0.3 \
		data-default-instances-dlist-0.0.1.2 \
		data-default-instances-old-locale-0.0.1.2 \
		data-fix-0.3.4_1 \
		digest-0.0.2.1 \
		distributive-0.6.2.1_1 \
		dlist-1.0_2 \
		easy-file-0.2.5 \
		echo-0.1.4 \
		ed25519-0.0.5.0_9 \
		extra-1.7.16_1 \
		fast-logger-3.2.5 \
		file-embed-0.0.16.0 \
		filelock-0.1.1.7 \
		fsnotify-0.4.3.0 \
		generic-deriving-1.14.6_1 \
		generically-0.1.1_4 \
		githash-0.1.7.0 \
		hackage-security-0.6.3.0 \
		half-0.3.2_1 \
		happy-2.1.6 \
		happy-lib-2.1.6 \
		hashable-1.4.7.0 \
		haskell-src-exts-1.23.1 \
		haskell-src-meta-0.8.15 \
		hi-file-parser-0.1.7.0 \
		hourglass-0.2.12_1 \
		hpack-0.38.1 \
		hsc2hs-0.68.10_4 \
		http-api-data-0.6.2 \
		http-client-0.7.19 \
		http-client-tls-0.3.6.4_2 \
		http-conduit-2.3.9.1 \
		http-download-0.2.1.0 \
		http-types-0.12.4 \
		indexed-traversable-0.1.4_1 \
		indexed-traversable-instances-0.1.2_1 \
		infer-license-0.2.0 \
		integer-conversion-0.1.1_1 \
		integer-logarithms-1.0.4 \
		iproute-1.7.15 \
		libyaml-0.1.4 \
		libyaml-clib-0.2.5 \
		lift-type-0.1.2.0 \
		lifted-base-0.2.3.12 \
		megaparsec-9.6.1 \
		memory-0.18.0_1 \
		microlens-0.4.13.1_1 \
		microlens-mtl-0.2.0.3_1 \
		microlens-th-0.4.3.17 \
		mime-types-0.1.2.0 \
		monad-control-1.0.3.1 \
		monad-logger-0.3.42 \
		monad-loops-0.4.3 \
		mono-traversable-1.0.21.0 \
		mtl-compat-0.2.2 \
		mustache-2.4.3.1 \
		neat-interpolation-0.5.1.4 \
		network-3.2.7.0 \
		network-uri-2.6.4.2_1 \
		old-locale-1.0.0.7_2 \
		old-time-1.1.0.4 \
		open-browser-0.2.1.1 \
		optparse-applicative-0.18.1.0_1 \
		optparse-simple-0.1.1.4 \
		os-string-2.0.7_1 \
		pantry-0.10.1 \
		parser-combinators-1.3.0_1 \
		path-0.9.5 \
		path-io-1.8.2 \
		path-pieces-0.2.1_1 \
		pem-0.2.4 \
		persistent-2.17.0.0 \
		persistent-sqlite-2.13.3.0 \
		persistent-template-2.12.0.0 \
		prettyprinter-1.7.1 \
		prettyprinter-ansi-terminal-1.1.3 \
		primitive-0.9.1.0 \
		project-template-0.2.1.0 \
		random-1.2.1.3 \
		replace-megaparsec-1.5.0.1 \
		resource-pool-0.4.0.0 \
		resourcet-1.3.0 \
		retry-0.9.3.1 \
		rio-0.1.22.0 \
		rio-orphans-0.1.2.0 \
		rio-prettyprint-0.1.8.0 \
		safe-0.3.21_1 \
		safe-exceptions-0.1.7.4_1 \
		scientific-0.3.8.0_2 \
		semialign-1.3.1_2 \
		semigroupoids-6.0.1_2 \
		serialise-0.2.6.1_5 \
		silently-1.2.5.4 \
		socks-0.6.1 \
		split-0.2.5 \
		splitmix-0.1.1 \
		static-bytes-0.1.1 \
		stm-chans-3.0.0.9 \
		streaming-commons-0.2.3.0 \
		strict-0.5.1_1 \
		string-interpolate-0.3.4.0_3 \
		syb-0.7.2.4 \
		tagged-0.8.8_1 \
		tar-0.6.3.0_1 \
		tar-conduit-0.4.1 \
		tasty-1.5.3_2 \
		temporary-1.3 \
		text-conversions-0.3.1.1 \
		text-iso8601-0.1.1_2 \
		text-metrics-0.3.3 \
		text-short-0.1.6_3 \
		th-abstraction-0.7.1.0_1 \
		th-compat-0.1.6 \
		th-expand-syns-0.4.12.0 \
		th-lift-0.8.6 \
		th-lift-instances-0.1.20 \
		th-orphans-0.13.16 \
		th-reify-many-0.1.10 \
		these-1.2.1_2 \
		time-compat-1.9.7_2 \
		tls-2.1.8 \
		transformers-base-0.4.6 \
		transformers-compat-0.7.2 \
		typed-process-0.2.13.0 \
		unix-compat-0.7.4 \
		unix-time-0.4.16 \
		unliftio-0.2.25.1 \
		unliftio-core-0.2.1.0_4 \
		unordered-containers-0.2.20_4 \
		utf8-string-1.0.2 \
		uuid-types-1.0.6_3 \
		vault-0.3.1.5_10 \
		vector-0.13.2.0_1 \
		vector-algorithms-0.9.1.0 \
		vector-stream-0.1.0.1_3 \
		witherable-0.5_1 \
		yaml-0.11.11.2_2 \
		zip-archive-0.4.3.2_1 \
		zlib-0.7.1.0_2

CABAL_FLAGS=	-support_aesni
CABAL_PROJECT=	remove

.include <bsd.port.pre.mk>

.if ${ARCH} != powerpc64
LIB_DEPENDS+=	libncursesw.so.8:misc/compat12x
.endif

.include <bsd.port.post.mk>
