<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 2018-04-28 00:34, Marcus
      Calhoun-Lopez wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20180427223431.1476F1018D1@braeburn.macports.org">
      <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/68a34f577814e3e5b3f444530262b109093da515"
          moz-do-not-send="true">https://github.com/macports/macports-ports/commit/68a34f577814e3e5b3f444530262b109093da515</a></p>
      <pre style="white-space: pre; background: #F8F8F8"><span style="display:block; white-space:pre;color:#808000;">commit 68a34f577814e3e5b3f444530262b109093da515
</span>Author: Marcus Calhoun-Lopez <a class="moz-txt-link-rfc2396E" href="mailto:mcalhoun@macports.org"><mcalhoun@macports.org></a>
AuthorDate: Fri Apr 27 11:47:22 2018 -0700

<span style="display:block; white-space:pre;color:#404040;">    cargo PG: respect build_arch; allow universal build
</span>---
 _resources/port1.0/group/cargo-1.0.tcl | 56 ++++++++++++++++++++++++++++++++++
 devel/mesalink/Portfile                |  2 ++
 textproc/ripgrep/Portfile              | 31 +++++++++++--------
 3 files changed, 77 insertions(+), 12 deletions(-)</pre>
    </blockquote>
    <br>
    <blockquote type="cite"
      cite="mid:20180427223431.1476F1018D1@braeburn.macports.org">
      <pre style="white-space: pre; background: #F8F8F8">
<span style="display:block; white-space:pre;color:#808080;">diff --git a/textproc/ripgrep/Portfile b/textproc/ripgrep/Portfile
</span><span style="display:block; white-space:pre;color:#808080;">index c62e042..7dbba25 100644
</span><span style="display:block; white-space:pre;background:#e0e0ff;">--- a/textproc/ripgrep/Portfile
</span><span style="display:block; white-space:pre;background:#e0e0ff;">+++ b/textproc/ripgrep/Portfile
</span><span style="display:block; white-space:pre;background:#e0e0e0;">@@ -67,16 +67,23 @@ depends_build-append \
</span>                     port:asciidoc \
                     port:docbook-xsl
 
<span style="display:block; white-space:pre;background:#ffe0e0;">-destroot {
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -m 755 ${worksrcpath}/target/release/rg ${destroot}${prefix}/bin/
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    ln -s rg ${destroot}${prefix}/bin/ripgrep
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    set outpath ${worksrcpath}/target/release/build/ripgrep-65e5a64db1247a47/out/
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -m 644 ${outpath}/rg.1 ${destroot}${prefix}/share/man/man1/
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -d -m 755 ${destroot}${prefix}/share/bash-completion/completions
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -m 644 ${outpath}/rg.bash ${destroot}${prefix}/share/bash-completion/completions/rg
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -d -m 755 ${destroot}${prefix}/share/fish/completions
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -m 644 ${outpath}/rg.fish ${destroot}${prefix}/share/fish/completions/
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -d -m 755 ${destroot}${prefix}/share/zsh/site-functions
</span><span style="display:block; white-space:pre;background:#ffe0e0;">-    xinstall -m 644 ${worksrcpath}/complete/_rg ${destroot}${prefix}/share/zsh/site-functions/
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+# muniversal build requires Makefile
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+# OUTDIR contains a checksum, so it is not know until late in the build process and may
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+#     change with a change in the cargo PortGroup</span></pre>
    </blockquote>
    The out dir can be overriden with the environment variable OUT_DIR,
    used by build.rs. I was going to change this with the next update.<br>
    <blockquote type="cite"
      cite="mid:20180427223431.1476F1018D1@braeburn.macports.org">
      <pre style="white-space: pre; background: #F8F8F8"><span style="display:block; white-space:pre;background:#e0ffe0;">
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+destroot.args-append -f Makefile-Install
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+post-extract {
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    set makefile [open ${worksrcpath}/Makefile-Install "w"]
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    # from ci/utils.sh
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "OUTDIR=\$(shell find . -name ripgrep-stamp -print0 | xargs -0 ls -t | head -n1 | xargs dirname)"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "install:"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -m 0755 target/\$(CARGO_BUILD_TARGET)/release/rg \$(DESTDIR)${prefix}/bin"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tln -s rg \$(DESTDIR)${prefix}/bin/ripgrep"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -m 0644 \$(OUTDIR)/rg.1 \$(DESTDIR)${prefix}/share/man/man1"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -d -m 0755 \$(DESTDIR)${prefix}/share/bash-completion/completions"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -m 0644 \$(OUTDIR)/rg.bash \$(DESTDIR)${prefix}/share/bash-completion/completions"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -d -m 0755 \$(DESTDIR)${prefix}/share/fish/completions"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -m 0644 \$(OUTDIR)/rg.fish \$(DESTDIR)${prefix}/share/fish/completions"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -d -m 0755 \$(DESTDIR)${prefix}/share/zsh/site-functions"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    puts ${makefile} "\tinstall -m 0644 complete/_rg \$(DESTDIR)${prefix}/share/zsh/site-functions/"
</span><span style="display:block; white-space:pre;background:#e0ffe0;">+    close ${makefile}
</span> }
</pre>
    </blockquote>
    Same comment for this Makefile as for the changes to fd. Why write a
    Makefile from the Portfile? Even shipping the Makefile in files/
    would be better than this hack.<br>
    <br>
    destroot {} is exactly meant for this kind of code. If muniversal
    cannot handle it, supporting +universal is not important enough for
    me to maintain this.<br>
    <br>
    I do not consider this a minor change under the openmaintainer
    policy. If you change the cargo port group in a way that requires
    such big changes in ports, please discuss them first. If you cannot
    wait to update your own ports, then commit the updated port group as
    cargo 1.1 instead.<br>
    <br>
    Rainer<br>
  </body>
</html>