aboutsummaryrefslogtreecommitdiffstats
path: root/devel/flang-clang/Makefile
blob: c8578b2b50ac35d37b144d61a157e0a3ca92695f (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
# Created by: Johannes M Dieterich <jmd@FreeBSD.org>
# $FreeBSD$

PORTNAME=   flang-clang
DISTVERSION=    6.0-g20180904
PORTREVISION=   3
CATEGORIES= devel lang

MAINTAINER= jmd@FreeBSD.org
COMMENT=    Fortran compiler targeting LLVM (modified clang part)

LICENSE=    LLVM
LICENSE_NAME=   LLVM Release License
LICENSE_FILE=   ${WRKSRC}/LICENSE.TXT
LICENSE_PERMS=  dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

ONLY_FOR_ARCHS= amd64

BUILD_DEPENDS=  llvm60>=0:devel/llvm60
RUN_DEPENDS=    llvm60>=0:devel/llvm60

USES=       cmake:outsource compiler:c++11-lib libedit tar:xz perl5 \
        python shebangfix
USE_LDCONFIG=   ${PREFIX}/flang/lib
USE_GNOME=  libxml2

SHEBANG_FILES=  tools/scan-view/bin/scan-view \
        tools/clang-format/git-clang-format \
        tools/clang-format/clang-format-diff.py

USE_GITHUB= yes
GH_ACCOUNT= flang-compiler
GH_PROJECT= flang-driver
GH_TAGNAME= 742de5f

CMAKE_ARGS+=    -DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config60

CMAKE_INSTALL_PREFIX=   ${PREFIX}/flang

post-patch:
    @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/lib/Driver/ToolChains/FreeBSD.cpp

post-install:
    @${GZIP_CMD} ${STAGEDIR}/${PREFIX}/flang/man/man1/scan-build.1
    ${RLN} ${STAGEDIR}${PREFIX}/flang/bin/flang ${STAGEDIR}${PREFIX}/bin/flang

.include <bsd.port.mk>