From: Kirill A. Korinsky Subject: Re: editors/helix: drop current_exe() workaround To: Laurent Cheylus Cc: OpenBSD ports Date: Sun, 06 Sep 2026 12:45:53 +0200 On Sun, 06 Sep 2026 11:09:36 +0200, Laurent Cheylus wrote: > > [1 ] > Hi Kirill, > > ----- Mail original ----- > > Laurent, > > > > rust in ports contains a patch to use getexecpath() for current_exe() > > that makes this workaround outdate. > > > > Ok to drop it? > > Thanks for your patch: build and tests OK on current/amd64 with Rust 1.98.1 (including support for getexecpath()). > > But without my previous patch, HELIX_DEFAULT_RUNTIME must be defined in Makefile (see comment in helix-loader/src/lib.rs). > > Attached a new version of your patch, add HELIX_DEFAULT_RUNTIME variable for MAKE_ENV. > Thanks, commited > regards, Laurent > > [2 helix-25.07.1.diff ] > Index: Makefile > =================================================================== > RCS file: /cvs/ports/editors/helix/Makefile,v > diff -u -p -r1.14 Makefile > --- Makefile 20 Jul 2025 14:09:22 -0000 1.14 > +++ Makefile 6 Sep 2026 09:01:35 -0000 > @@ -1,6 +1,7 @@ > COMMENT = modal text editor > > VER = 25.07.1 > +REVISION = 0 > DISTNAME = helix-${VER} > > CATEGORIES = editors > @@ -30,12 +31,10 @@ MODULES = devel/cargo > CONFIGURE_STYLE = cargo > SEPARATE_BUILD = Yes > > +MAKE_ENV += HELIX_DEFAULT_RUNTIME=${PREFIX}/share/helix/runtime > + > pre-extract: > @mkdir -p ${WRKDIST} > - > -pre-configure: > - grep -F -Rls '%%DATADIR%%' ${WRKSRC} | xargs sed -i \ > - 's,%%DATADIR%%,${PREFIX}/share/helix,' > > do-install: > ${INSTALL_PROGRAM} ${MODCARGO_TARGET_DIR}/release/hx ${PREFIX}/bin/ > Index: patches/patch-helix-loader_src_lib_rs > =================================================================== > RCS file: /cvs/ports/editors/helix/patches/patch-helix-loader_src_lib_rs,v > diff -u -p -r1.5 patch-helix-loader_src_lib_rs > --- patches/patch-helix-loader_src_lib_rs 13 Apr 2024 13:03:29 -0000 1.5 > +++ patches/patch-helix-loader_src_lib_rs 6 Sep 2026 09:01:35 -0000 > @@ -1,19 +0,0 @@ > -Index: helix-loader/src/lib.rs > ---- helix-loader/src/lib.rs.orig > -+++ helix-loader/src/lib.rs > -@@ -67,11 +67,15 @@ fn prioritize_runtime_dirs() -> Vec { > - > - // fallback to location of the executable being run > - // canonicalize the path in case the executable is symlinked > -+ #[cfg(not(target_os = "openbsd"))] > - let exe_rt_dir = std::env::current_exe() > - .ok() > - .and_then(|path| std::fs::canonicalize(path).ok()) > - .and_then(|path| path.parent().map(|path| path.to_path_buf().join(RT_DIR))) > - .unwrap(); > -+ #[cfg(target_os = "openbsd")] > -+ let exe_rt_dir = std::path::PathBuf::from("%%DATADIR%%").join(RT_DIR); > -+ > - rt_dirs.push(exe_rt_dir); > - rt_dirs > - } -- wbr, Kirill