<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/eed6a42cfffb7f41e5a42d8ccb86a22fee57c42a">https://github.com/macports/macports-ports/commit/eed6a42cfffb7f41e5a42d8ccb86a22fee57c42a</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit eed6a42cfffb7f41e5a42d8ccb86a22fee57c42a
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Fri Apr 27 04:55:36 2018 -0700

<span style='display:block; white-space:pre;color:#404040;'>    cargo PG: modify comments
</span>---
 _resources/port1.0/group/cargo-1.0.tcl | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/cargo-1.0.tcl b/_resources/port1.0/group/cargo-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 7e2fb52..1a65a54 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/cargo-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/cargo-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,6 +1,7 @@
</span> # -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
 #
 # Copyright (c) 2018 The MacPorts Project
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# All rights reserved.
</span> #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,7 +12,7 @@
</span> # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in the
 #    documentation and/or other materials provided with the distribution.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# 3. Neither the name of Apple Computer, Inc. nor the names of its
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# 3. Neither the name of The MacPorts Project nor the names of its
</span> #    contributors may be used to endorse or promote products derived from
 #    this software without specific prior written permission.
 #
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,7 +28,7 @@
</span> # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span> # This PortGroup supports the cargo build system
 #
 # Usage:
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -38,7 +39,7 @@
</span> #     foo  1.0.1  abcdef123456... \
 #     bar  2.5.0  fedcba654321...
 #
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# The cargo.crates option expects a list with 4-tuples consisting of name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The cargo.crates option expects a list with 3-tuples consisting of name,
</span> # version, and sha256 checksum. Only sha256 is supported at this time as
 # the checksum will be reused by cargo internally.
 #
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,6 +47,10 @@
</span> # the upstream source code. The cargo2port generator can be used to automate
 # updates of this list for new releases.
 #
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# To get a list of these, run in worksrcdir:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#     cargo update
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#     grep \"checksum Cargo.lock | perl -pe 's/"checksum (\S*) (\S*) \S* = "(\S*)"/cargo.crates $1 $2 $3/'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span> # https://github.com/macports/macports-contrib/tree/master/cargo2port/cargo2port.tcl
 #
 # If Cargo.lock references pre-release versions, or in general references
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -72,6 +77,11 @@ proc handle_cargo_crates {option action {value ""}} {
</span>             # a combination of crate name and checksum as unique identifier.
             # As the :disttag cannot contain dots, the version number cannot be
             # used.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+            #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # To download the crate file curl-0.4.11.crate, the URL is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            #    https://crates.io/api/v1/crates/curl/0.4.11/download.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # Use ?dummy= to ignore ${distfile}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # see https://trac.macports.org/wiki/PortfileRecipes#fetchwithgetparams
</span>             set cratetag        crate-${cname}-${chksum}
             distfiles-append    ${cratefile}:${cratetag}
             master_sites-append https://crates.io/api/v1/crates/${cname}/${cversion}/download?dummy=:${cratetag}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -146,6 +156,7 @@ depends_build           port:cargo
</span> post-extract {
     file mkdir "${cargo.home}/macports"
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    # avoid downloading files from online repository during build phase
</span>     # use a replacement for crates.io
     # https://doc.rust-lang.org/cargo/reference/source-replacement.html
     set conf [open "${cargo.home}/config" "w"]
</pre><pre style='margin:0'>

</pre>