summaryrefslogtreecommitdiff
path: root/devel/flang/Makefile
blob: 4ba430b8b9ad4f985026b3ef492f24dda5bf1283 (plain)
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
# Created by: Johannes M Dieterich <jmd@FreeBSD.org>
# $FreeBSD$

PORTNAME=	flang
DISTVERSION=	6.0-g20180904
PORTREVISION=	4
CATEGORIES=	devel

MAINTAINER=	jmd@FreeBSD.org
COMMENT=	Fortran compiler targeting LLVM

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

ONLY_FOR_ARCHS=	amd64

BUILD_DEPENDS=	llvm60>=0:devel/llvm60 \
		flang-clang>=0:devel/flang-clang
RUN_DEPENDS=	llvm60>=0:devel/llvm60 \
		flang-clang>=0:devel/flang-clang
LIB_DEPENDS=	libpgmath.so:math/libpgmath

USES=		cmake:noninja compiler:c++11-lib libedit perl5 tar:xz \
		shebangfix
_USES_PYTHON?=	python:build
USES+=		${_USES_PYTHON}
USE_LDCONFIG=	${PREFIX}/flang/lib

USE_GITHUB=	yes
GH_ACCOUNT=	flang-compiler
GH_TAGNAME=	53e368b

CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config60 \
		-DCMAKE_CXX_COMPILER=${LOCALBASE}flang/bin/clang++ \
		-DCMAKE_C_COMPILER=${LOCALBASE}/flang/bin/clang \
		-DCMAKE_Fortran_COMPILER=${LOCALBASE}/flang/bin/flang \
		-DFLANG_LIBOMP=${LOCALBASE}/llvm60/lib/libomp.so \
		-DLIBPGMATH="${LOCALBASE}/lib/libpgmath.a" \
		-WWITH_ERROR=OFF

CMAKE_INSTALL_PREFIX=	${PREFIX}/flang

MAKE_JOBS_UNSAFE=	yes

OPTIONS_DEFINE=	TESTS

TESTS_DESC=	build unit tests for flang

TESTS_CMAKE_BOOL=	FLANG_INCLUDE_TESTS

post-patch:
	@${CP} -r  ${WRKSRC}/tools/flang2/flang2exe/x86_64-Linux ${WRKSRC}/tools/flang2/flang2exe/x86_64-FreeBSD

.include <bsd.port.mk>