On Sat, Dec 23, 2023 at 04:46:40PM +0100, Volker Schlecht wrote: > This adds a patch to lang/deno to fix an issue reported by someone on github: > https://github.com/denoland/deno/issues/8012#issuecomment-1867982872 > > In addition, update-patches brought up an update to one of the existing > patches > that I must have missed before. > > Tested on amd64, fixes the reported bug, should not have any repercussions for > other platforms. > > ok?
> Index: Makefile > =================================================================== > RCS file: /cvs/ports/lang/deno/Makefile,v > retrieving revision 1.9 > diff -u -p -r1.9 Makefile > --- Makefile 19 Sep 2023 22:05:54 -0000 1.9 > +++ Makefile 23 Dec 2023 15:39:48 -0000 > @@ -8,6 +8,7 @@ USE_WXNEEDED = Yes > > VERSION = 1.36.4 > HOMEPAGE = https://deno.com/runtime > +REVISION = 0 > > DISTNAME = deno-${VERSION} > DISTFILES = ${DISTNAME}{deno_src}${EXTRACT_SUFX} > Index: patches/patch-cli_build_rs > =================================================================== > RCS file: /cvs/ports/lang/deno/patches/patch-cli_build_rs,v > retrieving revision 1.2 > diff -u -p -r1.2 patch-cli_build_rs > --- patches/patch-cli_build_rs 15 Jul 2023 20:30:41 -0000 1.2 > +++ patches/patch-cli_build_rs 23 Dec 2023 15:39:48 -0000 > @@ -1,7 +1,7 @@ > Index: cli/build.rs > --- cli/build.rs.orig > +++ cli/build.rs > -@@ -435,6 +435,13 @@ fn main() { > +@@ -424,6 +424,13 @@ fn main() { > symbols_path.display() > ); > > @@ -14,4 +14,4 @@ Index: cli/build.rs > + > #[cfg(target_os = "linux")] > { > - let ver = glibc_version::get_version().unwrap(); > + // If a custom compiler is set, the glibc version is not reliable. > Index: patches/patch-runtime_ops_os_mod_rs > =================================================================== > RCS file: patches/patch-runtime_ops_os_mod_rs > diff -N patches/patch-runtime_ops_os_mod_rs > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-runtime_ops_os_mod_rs 23 Dec 2023 15:39:48 -0000 > @@ -0,0 +1,20 @@ > +Index: runtime/ops/os/mod.rs > +--- runtime/ops/os/mod.rs.orig > ++++ runtime/ops/os/mod.rs > +@@ -14,6 +14,7 @@ use deno_node::NODE_ENV_VAR_ALLOWLIST; > + use serde::Serialize; > + use std::collections::HashMap; > + use std::env; > ++use std::path::PathBuf; > + > + mod sys_info; > + > +@@ -64,6 +65,8 @@ deno_core::extension!( > + #[op] > + fn op_exec_path(state: &mut OpState) -> Result<String, AnyError> { > + let current_exe = env::current_exe().unwrap(); > ++ let current_exe = > ++ > std::env::current_exe().unwrap_or(PathBuf::from("${LOCALBASE}/bin/deno")); You probably want PREFIX or TRUEPREFIX here. > + state > + .borrow_mut::<PermissionsContainer>() > + .check_read_blind(¤t_exe, "exec_path", "Deno.execPath()")?; -- Antoine