Created attachment 250512 [details] v0 patch-Cargo.toml is a bit hackish but I couldn't find a better way to build with the ports framework. This version builds with rust 1.78.0, not tested with 1.77.0
(In reply to Mikael Urankar from comment #0) Hello Mikael! Nice that you find a way to buuld it. Testport are OK with rust 1.77.0 on main and supported releases amd64. Will test aarch64 later. Doubts: 1- openssl vendored It seems that it is building with openssl vendored. Tomorrow I will hack it so it uses base ossl instead and then do a run test with both versions. ------- Please make sure this port uses the system OpenSSL and consider removing CARGO_CRATES=openssl-src-300.2.3+3.2.1 (a vendored copy of OpenSSL) from the build, e.g., by patching Cargo.toml appropriately. ------- What's your opinion on this? 2- patch-Cargo.toml: fix "key rev is ignored for dependency (tracing)" There is an open PR at https://github.com/lapce/lapce/issues/3215 It would be nice that this could be fixed upstream to prevent future problems. Tomorrow I will dig into it and try to understand how this was fixed since I didn't found a port with similar problems. Cheers
(In reply to Nuno Teixeira from comment #1) (...) Tomorrow I will do run tests.
(In reply to Nuno Teixeira from comment #1) 1) It'd nice if you manage to build it with base ossl. I didnt' spend too much time on it TBH 2) It's our ports framework that is problematic. It comments out the "git" line in the workspace (dunno why). You can see it by yourself with: make extract cp xxx/Cargo.toml xxx/Cargo.toml.1 make configure diff -dup xxx/Cargo.toml.1 xxx/Cargo.toml
Bonus point if you remove the hardcoded /usr/local in patch-cargo-crates_fontdb*
(In reply to Mikael Urankar from comment #3) Related to Cargo.toml hack that you provided, I did uploaded to upstream to check their opion on that. But yes, for what you tolding me, our framework is interfering with configure. Run test shows me: -no errors or warning at start - menus doesn't work at all - it opens a file in command line: `lapce example.txt` It's broken, but at least it builds! I don't know why I care so much because I only use nvi from base :) ----- openssl-vendored hack: I reaply patch to remove openssl vendored and results changed from: vendored openssl: =>> Checking shared library dependencies 0x0000000000000001 NEEDED Shared library: [libc++.so.1] 0x0000000000000001 NEEDED Shared library: [libc.so.7] 0x0000000000000001 NEEDED Shared library: [libcxxrt.so.1] 0x0000000000000001 NEEDED Shared library: [libgcc_s.so.1] 0x0000000000000001 NEEDED Shared library: [libgit2.so.1.7] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libssh2.so.1] 0x0000000000000001 NEEDED Shared library: [libthr.so.3] 0x0000000000000001 NEEDED Shared library: [libutil.so.9] builded on 14.0 (openssl3 base): =>> Checking shared library dependencies 0x0000000000000001 NEEDED Shared library: [libc++.so.1] 0x0000000000000001 NEEDED Shared library: [libc.so.7] 0x0000000000000001 NEEDED Shared library: [libcrypto.so.30] 0x0000000000000001 NEEDED Shared library: [libcxxrt.so.1] 0x0000000000000001 NEEDED Shared library: [libgcc_s.so.1] 0x0000000000000001 NEEDED Shared library: [libgit2.so.1.7] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libssh2.so.1] 0x0000000000000001 NEEDED Shared library: [libssl.so.30] 0x0000000000000001 NEEDED Shared library: [libthr.so.3] 0x0000000000000001 NEEDED Shared library: [libutil.so.9] builded on 13.2 (openssl1 base) =>> Checking shared library dependencies 0x0000000000000001 NEEDED Shared library: [libc++.so.1] 0x0000000000000001 NEEDED Shared library: [libc.so.7] 0x0000000000000001 NEEDED Shared library: [libcrypto.so.111] 0x0000000000000001 NEEDED Shared library: [libcxxrt.so.1] 0x0000000000000001 NEEDED Shared library: [libgcc_s.so.1] 0x0000000000000001 NEEDED Shared library: [libgit2.so.1.7] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libssh2.so.1] 0x0000000000000001 NEEDED Shared library: [libssl.so.111] 0x0000000000000001 NEEDED Shared library: [libthr.so.3] 0x0000000000000001 NEEDED Shared library: [libutil.so.9] It confirms that it is working.
(In reply to Mikael Urankar from comment #4) > Bonus point if you remove the hardcoded /usr/local in patch-cargo-crates_fontdb* yes, I know. I could use a reinplace to fix that. Working on that and do more tests. Also, upstream sugested to use vendor tarball that includes all build deps. I will check how to use it. Cheers
Created attachment 250526 [details] v1: reformat patches, fix hardcoded prefix in fontsdb patch
(In reply to Nuno Teixeira from comment #7) (...) + reaply openssl-vendored removal
Interesting vendor tarball: https://github.com/lapce/lapce/releases/download/v0.4.0/vendor.tar.gz It have all crates that build needs. Thinking how to integrate them...
(In reply to Nuno Teixeira from comment #5) I don't have the menu with lapce 0.3.1, so it's not a regression ;)
(In reply to Mikael Urankar from comment #10) Ok. I'm thinking following nightly builds so we can track changes more frequently. One good thing about it is that upstream is using: $ git describe --tags 985b07c $ v0.4.0-16-g985b07cc What means that from time to time I could commit updates respecting port version: 0.4.0 -> 0.4.0.16 -> 0.4.1 -> 0.4.* Tomorrow I will test vendor tarball by extracting it to $wrksrc/cargo-crates and deleting Makefile.crates and see how it goes. For what I've read vendor tarball was created to help pkg builders that do not support cargo-crates fetching like our does. If it works it will be awesome! Thanks
(In reply to Nuno Teixeira from comment #11) I've built lapce without our ports tree and the menu is still missing. We also lack https://github.com/lapce/tree-sitter-grammars.git https://github.com/lapce/lapce/blob/master/lapce-app/src/app.rs#L3960
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=247d5632499f0905ad3d3f6de67dbd83417dee08 commit 247d5632499f0905ad3d3f6de67dbd83417dee08 Author: Mikael Urankar <mikael@FreeBSD.org> AuthorDate: 2024-05-09 11:40:26 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-05-09 11:41:55 +0000 editors/lapce: Update to latest commit 0.4.0-16 ChangeLog: https://github.com/lapce/lapce/compare/v0.3.1...0.4.0-16-g985b07c PR: 278837 editors/lapce/Makefile | 15 +- editors/lapce/Makefile.crates | 512 +- editors/lapce/distinfo | 1030 ++- editors/lapce/files/patch-Cargo.lock | 16 +- editors/lapce/files/patch-Cargo.toml (new) | 46 + ...osmic-text-0.7.2_src_font_fallback_mod.rs (new) | 11 + ...ch-cargo-crates_fontdb-0.16.0_src_lib.rs (gone) | 13 - ...tch-cargo-crates_fontdb-0.16.2_src_lib.rs (new) | 22 + ...tch-cargo-crates_slotmap-1.0.7_src_lib.rs (new) | 11 + editors/lapce/files/patch-cosmic (gone) | 11 - editors/lapce/files/patch-drm-sys (gone) | 6727 -------------------- editors/lapce/files/patch-lapce-proxy_Cargo.toml | 12 +- 12 files changed, 870 insertions(+), 7556 deletions(-)
I decided to commit with hope that more people could test. I will do some publicity on matrix chat :) > We also lack https://github.com/lapce/tree-sitter-grammars.git > https://github.com/lapce/lapce/blob/master/lapce-app/src/app.rs#L3960 Yes I noticed when run `lapce -w`
(In reply to Nuno Teixeira from comment #14) (...) Let's get this PR open and see if anyone shows up.
Related to vendor tarball, I've didn't get it to work yet. https://github.com/lapce/lapce/issues/2247