Ticket #54166: Portfile

File Portfile, 1.8 KB (added by RJVB (René Bertin), 2 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2
3PortSystem 1.0
4
5name            gccas
6version         1.0
7description     a modern wrapper to use the clang assembler instead of GNU/Apple as
8
9set clang "/usr/bin/clang"
10foreach cdv {3.6 3.7 3.8 3.9 4.0} {
11    set cv [join [split ${cdv} "."] ""]
12    variant clang${cv} description "Use clang-mp-${cv} from port:clang-${cdv} as the default" {}
13    if {[variant_isset clang${cv}]} {
14        depends_run-append  port:clang-${cdv}
15        set clang "${prefix}/bin/clang-mp-${cdv}"
16    }
17}
18
19long_description This is a wrapper around the clang assembler that allows to call it \
20                in lieu and place of the `as` command (= Apple's version of GNU as, gas). \
21                It's name is taken from the old gccas tool that mimicked gas for use by \
22                the llvm-gcc front-end. The purpose remains the same: being able to \
23                use GCC compilers as a front-end for the LLVM assembler/linker toolchain \
24                with the goal of having access to the full x86_64 instruction set from \
25                those compilers (which include gfortran).\
26                By default the wrapper will invoke ${clang}\; this can be overriden using \
27                the CLANG_ASSEMBLER shell variable.
28
29license         Permissive
30maintainers     gmail.com:rjvbertin openmaintainer
31categories      devel
32platforms       darwin linux
33supported_archs noarch
34installs_libs   no
35
36homepage        {}
37master_sites    {}
38distfiles       {}
39
40use_configure   no
41
42fetch           {}
43extract         {}
44build           {}
45
46destroot {
47    xinstall -m 755 ${filespath}/gccas.sh ${destroot}${prefix}/bin/gccas
48    reinplace "s|@CLANG@|${clang}|g" ${destroot}${prefix}/bin/gccas
49}