On Wed, Jan 17, 2024 at 03:32:01PM +0100, Theo Buehler wrote: > On Tue, Dec 19, 2023 at 12:14:20PM +0100, Benjamin Stürz wrote: > > On 12/4/23 02:22, Greg Steuck wrote: > > > Greg Steuck <gne...@openbsd.org> writes: > > > > > > > I verified that this works well enough in emacs with eglot. Maybe others > > > > will find it useful enough to OK? If so, I'd apprecite a bit of extra > > > > diligence as this is my first rust port. > > > > > > > > rust-src seems important for this port, maybe it should be in > > > > RUN_DEPENDS? > > > > > > As reminded by mbhul@, tgz is easier for the initial imports. > > > > > > > Updated to the latest version 2023-12-18. > > Also added lang/rust-src to RUN_DEPENDS. > > Tested and works with emacs. > > I haven't run tested it, but if it works for Benjamin, gnezdo and edd, > this is > > ok tb > > to import with the following diff applied on top: the MODCARGO_WANTLIB > change is required for WANTLIB to be correct on all architectures > (sparc64 is special). I don't see where the dep on libutil came from. > > The MODCARGO_CRATES_UPDATE for libc and cc was necessary for riscv64 and > powerpc64 support, but the versions here are way past where that was an > issue. > > The RDEP on lang/rust,-src (notice the comma) makes sense to me, but > it is up to you, the users. It's a heavy dep, so if it is kind of > optional, maybe leave it optional.
And as semarie pointed out crates.inc should be regenerated to include the licenses (make modcargo-gen-crates-licenses) > > --- Makefile.orig Wed Jan 17 15:18:07 2024 > +++ Makefile Wed Jan 17 15:28:00 2024 > @@ -12,13 +12,12 @@ HOMEPAGE = https://rust-analyzer.github.io/ > # Apache 2.0 > PERMIT_PACKAGE = Yes > > -RUN_DEPENDS = lang/rust-src > +RUN_DEPENDS = lang/rust,-src > > -WANTLIB += c c++abi m pthread util > +WANTLIB += ${MODCARGO_WANTLIB} m > > MODULES = devel/cargo > > -MODCARGO_CRATES_UPDATE = cc libc > MODCARGO_RUSTFLAGS += -L${PREFIX}/lib > > MAKE_ENV = ${MODCARGO_ENV} >