On 2019/11/26 09:08, Sebastien Marie wrote:
> On Mon, Nov 25, 2019 at 10:06:22PM +0000, Stuart Henderson wrote:
> > +cc semarie@, wondering if you have any suggestions?
> 
> CONFIGURE_STYLE = cargo
> 
> is missing. so cargo isn't configured properly.

Thank you.

Would it be OK to add one or both parts of this?

- mention CONFIGURE_STYLE in a comment so it can be found more easily,
- allow modcargo-gen-crates-licenses to continue with a missing license

Index: cargo.port.mk
===================================================================
RCS file: /cvs/ports/devel/cargo/cargo.port.mk,v
retrieving revision 1.9
diff -u -p -r1.9 cargo.port.mk
--- cargo.port.mk       14 Sep 2019 17:34:46 -0000      1.9
+++ cargo.port.mk       26 Nov 2019 10:25:22 -0000
@@ -68,7 +68,7 @@ MODCARGO_post-patch += \
 .endfor
 
 # configure hook. Place a config file for overriding crates-io index by
-# local source directory.
+# local source directory. Enabled by use of "CONFIGURE_STYLE=cargo".
 MODCARGO_configure = \
        mkdir -p ${WRKDIR}/.cargo; \
        \
@@ -219,5 +219,5 @@ modcargo-gen-crates: extract
 modcargo-gen-crates-licenses: configure
 .for _cratename _cratever in ${MODCARGO_CRATES}
        @echo -n "MODCARGO_CRATES +=    ${_cratename}   ${_cratever}    # "
-       @sed -ne 's/^license.*= *"\([^"]*\)".*/\1/p' 
"${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/Cargo.toml"
+       @sed -ne 's/^license.*= *"\([^"]*\)".*/\1/p' 
"${MODCARGO_VENDOR_DIR}/${_cratename}-${_cratever}/Cargo.toml" 2>/dev/null || 
echo '(XXX missing)'
 .endfor


> I will take look to cargo.devel.mk. cargo has, since few releases, a new
> --offline flag, which should avoid the need to use pf(4) to catch network
> problem (cargo will just abort without trying network).

That would be helpful.


Reply via email to