@gjsify/webrtc-native 0.64.5 → 0.64.7

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 +41 -7
  2. package/package.json +10 -10
package/meson.build CHANGED
@@ -8,13 +8,46 @@ project('GjsifyWebrtc', ['c', 'vala'], version: '0.1',
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
- dependency('gstreamer-1.0'),
15
- dependency('gstreamer-sdp-1.0'),
16
- dependency('gstreamer-webrtc-1.0'),
17
- ]
11
+ host_system = host_machine.system()
12
+
13
+ # On darwin every GNOME library is resolved against the HOST PROCESS rather than
14
+ # recorded as an `@rpath/` dependency: a second GLib beside the one the host
15
+ # already loaded gives the process two GType registries, then SIGSEGV.
16
+ # docs/prebuilds.md § One GLib. The gstreamer packages are in the list because
17
+ # their own `--libs` carry `-lglib-2.0 -lgobject-2.0` — stripping only the glib
18
+ # pair would still let ld64 record a GLib load command.
19
+ #
20
+ # GLib alone is left to `dynamic_lookup`: gjs always loads it. GStreamer is not
21
+ # loaded by the host, so an unrecorded GStreamer leaves `gst_*` unbound and the
22
+ # class init dereferences NULL (SIGSEGV on a bare `imports.gi.<Ns>`). Those
23
+ # libraries are linked by path instead, which records THEIR load command while
24
+ # GLib — absent from the link line — still binds to the host.
25
+ host_provided = ['glib-2.0', 'gobject-2.0']
26
+ gstreamer_libs = {
27
+ 'gstreamer-1.0': 'gstreamer-1.0',
28
+ 'gstreamer-sdp-1.0': 'gstsdp-1.0',
29
+ 'gstreamer-webrtc-1.0': 'gstwebrtc-1.0',
30
+ }
31
+
32
+ dependencies = []
33
+ foreach pkg : host_provided
34
+ dep = dependency(pkg)
35
+ dependencies += host_system == 'darwin' \
36
+ ? dep.partial_dependency(compile_args: true, includes: true) \
37
+ : dep
38
+ endforeach
39
+ foreach pkg, lib : gstreamer_libs
40
+ dep = dependency(pkg)
41
+ if host_system == 'darwin'
42
+ dependencies += dep.partial_dependency(compile_args: true, includes: true)
43
+ dependencies += meson.get_compiler('c').find_library(lib,
44
+ dirs: dep.get_variable(pkgconfig: 'libdir'))
45
+ else
46
+ dependencies += dep
47
+ endif
48
+ endforeach
49
+
50
+ host_provided_link_args = host_system == 'darwin' ? ['-Wl,-undefined,dynamic_lookup'] : []
18
51
 
19
52
  sources = files(
20
53
  'src/vala/promise-bridge.vala',
@@ -25,6 +58,7 @@ sources = files(
25
58
 
26
59
  libGjsifyWebrtc = library('gjsifywebrtc', sources,
27
60
  dependencies: dependencies,
61
+ link_args: host_provided_link_args,
28
62
  vala_gir: meson.project_name() + '-0.1.gir',
29
63
  install: true,
30
64
  install_dir: [true, true, true, true],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/webrtc-native",
3
- "version": "0.64.5",
3
+ "version": "0.64.7",
4
4
  "description": "Vala-based main-thread signal bridge for @gjsify/webrtc. Marshals webrtcbin signals and GstPromise callbacks from GStreamer's streaming thread onto the GLib main context so GJS can safely handle them.",
5
5
  "type": "module",
6
6
  "main": "lib/esm/index.js",
@@ -61,10 +61,10 @@
61
61
  "@girs/gobject-2.0": "5.4.0",
62
62
  "@girs/gst-1.0": "5.4.0",
63
63
  "@girs/gstwebrtc-1.0": "5.4.0",
64
- "@gjsify/utils": "^0.64.5"
64
+ "@gjsify/utils": "^0.64.7"
65
65
  },
66
66
  "devDependencies": {
67
- "@gjsify/cli": "^0.64.5",
67
+ "@gjsify/cli": "^0.64.7",
68
68
  "@types/node": "^25.9.2",
69
69
  "typescript": "^6.0.3"
70
70
  },
@@ -79,12 +79,12 @@
79
79
  },
80
80
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/webrtc-native#readme",
81
81
  "optionalDependencies": {
82
- "@gjsify/webrtc-native-darwin-arm64": "0.64.5",
83
- "@gjsify/webrtc-native-darwin-x64": "0.64.5",
84
- "@gjsify/webrtc-native-linux-arm64": "0.64.5",
85
- "@gjsify/webrtc-native-linux-ppc64": "0.64.5",
86
- "@gjsify/webrtc-native-linux-riscv64": "0.64.5",
87
- "@gjsify/webrtc-native-linux-s390x": "0.64.5",
88
- "@gjsify/webrtc-native-linux-x64": "0.64.5"
82
+ "@gjsify/webrtc-native-darwin-arm64": "0.64.7",
83
+ "@gjsify/webrtc-native-darwin-x64": "0.64.7",
84
+ "@gjsify/webrtc-native-linux-arm64": "0.64.7",
85
+ "@gjsify/webrtc-native-linux-ppc64": "0.64.7",
86
+ "@gjsify/webrtc-native-linux-riscv64": "0.64.7",
87
+ "@gjsify/webrtc-native-linux-s390x": "0.64.7",
88
+ "@gjsify/webrtc-native-linux-x64": "0.64.7"
89
89
  }
90
90
  }