Re: git: eecf3562b01d - main - devel/jujutsu: fix install on other targets than amd64

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 24 Jan 2024 16:51:15 UTC
Stefan Eßer <se@FreeBSD.org> writes:

>     I'd appreciate any hint regarding a better way to install this program
>     to the stage directory than the hacked do-install target I use.

https://cgit.freebsd.org/ports/commit/?id=4eab6d126148
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271358

According to "rg -l CARGO_INSTALL_PATH" there're 30 examples in the tree.
For one, in games/veloren-weekly I use the following:

  # XXX https://github.com/rust-lang/cargo/issues/4101
  CARGO_INSTALL_PATH=	server-cli voxygen
  ...
  do-install:
  # XXX [workspace.dependencies] breaks rebuild in subdirs
  .for f in ${CARGO_INSTALL_PATH}
          ${INSTALL_PROGRAM} ${CARGO_TARGET_DIR}/*/*/${PORTNAME}-$f \
                  ${STAGEDIR}${PREFIX}/bin
  .endfor

> -		${INSTALL_PROGRAM} ${WRKDIR}/target/${__ARCH}/release/jj \
> +		${INSTALL_PROGRAM} ${WRKDIR}/target/*-unknown-freebsd/release/jj \

- Don't hardcode "freebsd" to avoid patching in DPorts (DragonFly)
- Don't hardcode "release" as it'd break WITH_DEBUG= builds