I was trying to package https://github.com/bugzmanov/bookokrat/ (a terminal based epub reader) which is in Rust. The pkgsrc guide tells me to do this to update cargo-depends.mk (I started with an empty one): make CARGO_ARGS="build --release" build but this failed for me: error: no matching package named `anyhow` found location searched: directory source `/tmpfs/wip/bookokrat/work.x86_64/vendor` (which is replacing registry `crates-io`) required by package `bookokrat v0.3.9 (/tmpfs/wip/bookokrat/work.x86_64/bookokrat-0.3.9)` It didn't try to download any crates but was expecting them to be already present in the mentioned directory. It took some experimenting to find that the target cargo-vendor-crates in ../../lang/rust/cargo.mk was responsible for that. While using PKG_DEBUG_LEVEL=1 I noticed there were some deliberate proxy settings like https_proxy=downloads-forbidden-except-during-fetch to prevent downloads, but that can be disabled by adding ALLOW_NETWORK_ACCESS=yes. I got it to work by commenting out this line in cargo.mk: post-extract: cargo-vendor-crates but surely I am missing a better way? I am making a package because it tries to compile some C and it fails. We do have a package for that C library (mupdf-sys@0.6.0, from 2006 if we should believe the file dates!?!?) and it has some patches (print/mupdf/patches/patch-source_fitz_*). So either I need to copy the patches into this build (somehow), or (probably better) make it use the pkgsrc package for this. I managed to copy and massage the patches. Then setting an RPATH (copied from another package) makes a working program. -Olaf. -- ___ Olaf 'Rhialto' Seibert <rhialto/at/falu.nl> \X/ There is no AI. There is just someone else's work. --I. Rose
Attachment:
signature.asc
Description: PGP signature