source: trunk/dports/devel/cargo/Portfile @ 148198

Last change on this file since 148198 was 146911, checked in by raimue@…, 3 years ago

devel/cargo:
Move bash-completion file to new location for on-demand loading

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
2# $Id: Portfile 146911 2016-03-20 17:52:54Z raimue@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        rust-lang cargo 0.9.0
8revision            1
9categories          devel
10platforms           darwin
11
12universal_variant   no
13license             {MIT Apache-2}
14maintainers         sean openmaintainer
15
16description         The Rust package manager
17long_description    Cargo downloads your Rust project’s dependencies and compiles your project.
18homepage            http://crates.io
19
20# Fetch from git instead of distfile because it needs submodules
21fetch.type          git
22
23depends_lib         port:rust \
24                    port:pkgconfig
25depends_build       bin:python2.6:python27 \
26                    bin:cmake:cmake \
27                    port:cctools \
28                    port:gawk
29
30depends_skip_archcheck  python27
31
32build.type          gnu
33
34# the DYLD_FALLBACK_LIBRARY_PATH is ugly but currently the only way to have
35# rust find the libraries installed via rpath; using install_name_tool wouldn't
36# help in this situation because rust and cargo both download binaries to
37# bootstrap themselves. Since this is just a build argument, I think it's fine
38# for now.
39build.args          VERBOSE=1 \
40                    CC=${configure.cc} \
41                    CXX=${configure.cxx} \
42                    CPP="${configure.cc} -E" \
43                    DYLD_FALLBACK_LIBRARY_PATH="${prefix}/lib"
44
45destroot.args       VERBOSE=1
46
47post-fetch {
48    system -W ${worksrcpath} "git submodule update --init"
49}
50
51post-destroot {
52    move ${destroot}${prefix}/lib/rustlib/components ${destroot}${prefix}/lib/rustlib/components-cargo
53    file delete ${destroot}${prefix}/lib/rustlib/install.log
54    file delete ${destroot}${prefix}/lib/rustlib/uninstall.sh
55    file delete ${destroot}${prefix}/lib/rustlib/rust-installer-version
56
57    # move bash-completion file to new location for on-demand loading
58    xinstall -d -m 0755 ${destroot}${prefix}/share/bash-completion/completions
59    move ${destroot}${prefix}/etc/bash_completion.d/cargo ${destroot}${prefix}/share/bash-completion/completions/cargo
60}
Note: See TracBrowser for help on using the repository browser.