[140143] trunk/dports/devel
sean at macports.org
sean at macports.org
Wed Sep 9 14:28:17 PDT 2015
Revision: 140143
https://trac.macports.org/changeset/140143
Author: sean at macports.org
Date: 2015-09-09 14:28:16 -0700 (Wed, 09 Sep 2015)
Log Message:
-----------
cargo: add rust package builder
Added Paths:
-----------
trunk/dports/devel/cargo/
trunk/dports/devel/cargo/Portfile
Added: trunk/dports/devel/cargo/Portfile
===================================================================
--- trunk/dports/devel/cargo/Portfile (rev 0)
+++ trunk/dports/devel/cargo/Portfile 2015-09-09 21:28:16 UTC (rev 140143)
@@ -0,0 +1,55 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+PortGroup github 1.0
+
+github.setup rust-lang cargo 0.4.0
+categories devel
+platforms darwin
+
+universal_variant no
+license {MIT Apache-2}
+maintainers sean openmaintainer
+
+description The Rust package manager
+long_description Cargo downloads your Rust project’s dependencies and compiles your project.
+homepage http://crates.io
+
+# Fetch from git instead of distfile because it needs submodules
+fetch.type git
+
+depends_lib port:rust \
+ port:pkgconfig
+depends_build bin:python2.6:python27 \
+ bin:cmake:cmake \
+ port:cctools \
+ port:gawk
+
+depends_skip_archcheck python27
+
+build.type gnu
+
+# the DYLD_FALLBACK_LIBRARY_PATH is ugly but currently the only way to have
+# rust find the libraries installed via rpath; using install_name_tool wouldn't
+# help in this situation because rust and cargo both download binaries to
+# bootstrap themselves. Since this is just a build argument, I think it's fine
+# for now.
+build.args VERBOSE=1 \
+ CC=${configure.cc} \
+ CXX=${configure.cxx} \
+ CPP="${configure.cc} -E" \
+ DYLD_FALLBACK_LIBRARY_PATH="${prefix}/lib"
+
+destroot.args VERBOSE=1
+
+post-fetch {
+ system -W ${worksrcpath} "git submodule update --init"
+}
+
+post-destroot {
+ move ${destroot}${prefix}/lib/rustlib/components ${destroot}${prefix}/lib/rustlib/components-cargo
+ file delete ${destroot}${prefix}/lib/rustlib/install.log
+ file delete ${destroot}${prefix}/lib/rustlib/uninstall.sh
+ file delete ${destroot}${prefix}/lib/rustlib/rust-installer-version
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150909/6ecdcb08/attachment.html>
More information about the macports-changes
mailing list