On 2020/12/25 14:20, Aisha Tammy wrote: > On 12/25/20 2:10 PM, Sebastien Marie wrote: > > On Fri, Dec 25, 2020 at 01:49:43PM -0500, Aisha Tammy wrote: > >> On 12/25/20 1:23 PM, Daniel Jakots wrote: > >>> On Fri, 25 Dec 2020 13:10:04 -0500, Aisha Tammy > >>> <openbsd.po...@aisha.cc> wrote: > >>> > >>>> Is there any tool like portgen but for cargo files? > >>>> I haven't found any quick way to do this and add the dependencies. > >>> Search "cargo" in port-modules(5). > >>> > >>> Cheers, > >>> Daniel > >>> > >> > >> Hi, > >> Thanks Sebastien and Daniel! > >> That helped a lot. > >> > >> I am now stuck in a different problem where the crates > >> are not downloaded from crates.io but from a github with > >> a commit hash, like so - > >> > >> [[package]] > >> name = "devise" > >> version = "0.3.0" > >> source = > >> "git+https://github.com/SergioBenitez/Devise.git?rev=e58b3ac9a#e58b3ac9afc3b6ff10a8aaf02a3e768a8f530089" > >> dependencies = [ > >> "devise_codegen", > >> "devise_core", > >> ] > >> > > > > MODCARGO_CRATES stuff isn't designed for unpublished crates. > > > > the more simple might be to ship separately a tarball with all > > dependencies inside. cargo will be able to do it for you with 'cargo > > vendor' command. > > > > next, you should put the tarball on some site and add make the port > > downloads it: > > > > MASTER_SITES0 = http://myhost/path/to/ > > DISTFILES += vendored-1.0.0.tgz > > > > next, in post-extract target, move the extracted directory from > > $WRKDIR to $WRKSRC and create a .cargo/config file, to configure cargo > > to use it instead of using internet. > > > > Damn... That's a bit more complex than I was hoping but > should be doable :)
..or ask upstream if they can publish the relevant things as releases so they don't need to github url. > Thanks a lot for the information! > > Cheers, > Aisha >