@gjsify/terminal-native 0.64.4 → 0.64.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/meson.build +23 -5
  2. package/package.json +10 -10
package/meson.build CHANGED
@@ -8,10 +8,28 @@ project('GjsifyTerminal', ['c', 'vala'], version: '1.0',
8
8
 
9
9
  root_dir = meson.current_source_dir()
10
10
 
11
- dependencies = [
12
- dependency('glib-2.0'),
13
- dependency('gobject-2.0'),
14
- ]
11
+ host_system = host_machine.system()
12
+
13
+ # ----------------------------------------------------------------------------
14
+ # On darwin every GNOME library resolves against the HOST PROCESS and is NOT
15
+ # recorded as an `@rpath/` dependency. A Mach-O keys each dependency by the
16
+ # path that resolves it, so an `LC_RPATH` entry carrying its own copy — which
17
+ # `@gjsify/gtk-runtime-darwin-*` does — gives the process a SECOND GLib: two
18
+ # GType registries, then SIGSEGV. `-undefined dynamic_lookup` leaves these
19
+ # symbols to the flat namespace, where dyld binds them to the copy the host
20
+ # already loaded, whichever stack that is. docs/prebuilds.md § One GLib.
21
+ # ----------------------------------------------------------------------------
22
+ host_provided = ['glib-2.0', 'gobject-2.0']
23
+
24
+ dependencies = []
25
+ foreach pkg : host_provided
26
+ dep = dependency(pkg)
27
+ dependencies += host_system == 'darwin' \
28
+ ? dep.partial_dependency(compile_args: true, includes: true) \
29
+ : dep
30
+ endforeach
31
+
32
+ host_provided_link_args = host_system == 'darwin' ? ['-Wl,-undefined,dynamic_lookup'] : []
15
33
 
16
34
  sources = files(
17
35
  'src/vala/terminal.vala',
@@ -24,6 +42,7 @@ sources = files(
24
42
  # header comment.
25
43
  libGjsifyTerminal = library('gjsifyterminal', sources,
26
44
  dependencies: dependencies,
45
+ link_args: host_provided_link_args,
27
46
  vala_args: [
28
47
  '--pkg=posix',
29
48
  '--vapidir=' + meson.current_source_dir() / 'src/vala',
@@ -47,7 +66,6 @@ libGjsifyTerminal = library('gjsifyterminal', sources,
47
66
  # work, so `else` (ELF naming) is the honest fallback rather than a .dll branch
48
67
  # that would imply support which does not exist.
49
68
  # ----------------------------------------------------------------------------
50
- host_system = host_machine.system()
51
69
  if host_system == 'darwin'
52
70
  shared_lib_name = 'libgjsifyterminal.dylib'
53
71
  else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/terminal-native",
3
- "version": "0.64.4",
3
+ "version": "0.64.6",
4
4
  "description": "Optional Vala/GObject bridge providing Posix.isatty(), ioctl(TIOCGWINSZ), termios raw-mode and SIGWINCH for GJS. Enhances @gjsify/tty and @gjsify/process with correct terminal behaviour when installed.",
5
5
  "type": "module",
6
6
  "main": "lib/esm/index.js",
@@ -62,10 +62,10 @@
62
62
  "dependencies": {
63
63
  "@girs/glib-2.0": "5.4.0",
64
64
  "@girs/gobject-2.0": "5.4.0",
65
- "@gjsify/utils": "^0.64.4"
65
+ "@gjsify/utils": "^0.64.6"
66
66
  },
67
67
  "devDependencies": {
68
- "@gjsify/cli": "^0.64.4",
68
+ "@gjsify/cli": "^0.64.6",
69
69
  "@ts-for-gir/cli": "^4.1.0",
70
70
  "@types/node": "^25.9.2",
71
71
  "typescript": "^6.0.3"
@@ -81,12 +81,12 @@
81
81
  },
82
82
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/node/terminal-native#readme",
83
83
  "optionalDependencies": {
84
- "@gjsify/terminal-native-darwin-arm64": "0.64.4",
85
- "@gjsify/terminal-native-darwin-x64": "0.64.4",
86
- "@gjsify/terminal-native-linux-arm64": "0.64.4",
87
- "@gjsify/terminal-native-linux-ppc64": "0.64.4",
88
- "@gjsify/terminal-native-linux-riscv64": "0.64.4",
89
- "@gjsify/terminal-native-linux-s390x": "0.64.4",
90
- "@gjsify/terminal-native-linux-x64": "0.64.4"
84
+ "@gjsify/terminal-native-darwin-arm64": "0.64.6",
85
+ "@gjsify/terminal-native-darwin-x64": "0.64.6",
86
+ "@gjsify/terminal-native-linux-arm64": "0.64.6",
87
+ "@gjsify/terminal-native-linux-ppc64": "0.64.6",
88
+ "@gjsify/terminal-native-linux-riscv64": "0.64.6",
89
+ "@gjsify/terminal-native-linux-s390x": "0.64.6",
90
+ "@gjsify/terminal-native-linux-x64": "0.64.6"
91
91
  }
92
92
  }