On 2019/11/25 23:43, Henrik Friedrichsen wrote: > On Mon, Nov 25, 2019 at 10:06:22PM +0000, Stuart Henderson wrote: > > +cc semarie@, wondering if you have any suggestions? > > > > > > I imported this, but unfortunately when I tested before import, it was > > on a machine not setup with _pbuild blocked from network access - now I'm > > trying to build on another machine I see that it downloads during the build > > which is not allowed. > > > > Also it seems some of the crates listed by modcargo-gen-crates are missing? > > I generated that crate list with modcargo-gen-crates on a Cargo.lock > file that is generated when building the crate on OpenBSD. As it has a > different feature list, it needs different dependencies. E.g., alsa et > al are not required on OpenBSD as the feature "alsa_backend" is not > enabled, and thus not included in the Makefile. Sorry, didn't mean to > break the build on dpb. Though I don't understand why it's missing > crates.
If it needs a different generated Cargo.lock file then I guess that needs to either make it into the distfile (or a supplementary distfile and moved into place), or into a patch .. As it is now, with the files in the current distfile, running modcargo-gen-crates adds those others. > > I suspect part of the problem is to do with patching Cargo.toml, maybe > > we want something like "MODCARGO_FEATURES = portaudio_backend > > cursive/pancurses-backend" instead of patching, but even if I remove > > the patch I still see it attempt and fail to fetch crates.io-index. > > This is what I initially tried, but there is currently no way in > cargo.port.mk to disable the default features (pass --no-default > features), or at least I couldn't figure out the correct way to do it, > which is why I went for the patch. This makes it pull in the alsa > backend. The alsa backend has a dependency on the nix crate, which does > not build on OpenBSD. I think "MODCARGO_BUILD_ARGS = --no-default-features", you can check what it will run for the build with "show=MODCARGO_BUILD_TARGET".