openvfs-rb 1.4.3 → 1.4.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2264cbd1a6e350ebb264c23c7fdb85b6daa6ac4748388a87bbc08ca3a97f7a1
4
- data.tar.gz: 5af02d75846f235a3b90d9dffc8ca49f60132019543564c4fdb1ff41aa1c985b
3
+ metadata.gz: 970985dff576a4e51d8bf0c1a636d4756c1787fc2b101861bbf28b1d552d2558
4
+ data.tar.gz: f85f06fa366a075b93f30f5242c0479764fefd23f26a8f4f2cae4e594d86df54
5
5
  SHA512:
6
- metadata.gz: ecf8012c79f089ca2a00552636f620571643cd12d2f388b1b8d28a5f1016037796c40aedadef2cb3d7315c981b236db6f558412f19752242784cf5bf76d4dcd0
7
- data.tar.gz: 5c7e1f022dcf009a60e5ad28552552b369c84313c82e7c2dc64837e32b24afb85a72402f918d9c68722459ea355d0d03496d25bbc95ea6fa4ff57f221cb1fd9b
6
+ metadata.gz: 46a76967f5a59926eb14b5c1c0650d66ddd29b7a28eee6bd8f609681817ba1364aaf5ef957e07d5557ba30f75302804140b2f8c0d8ef13c0db982c39df3ef03f
7
+ data.tar.gz: 05a1caa2afb2537ee369bd20a6eef01028a738c640512d3db243bdb9e787847a0f0558516f05766eff4a06a3d2b688eab7f9570eb4dad015c3216426e0b5be63
@@ -11,8 +11,20 @@ openvfs_library_dir = File.join(prefix, "lib")
11
11
 
12
12
  dir_config("openvfs", openvfs_include_dir, openvfs_library_dir)
13
13
  $CXXFLAGS << " -std=c++23 -Wno-array-bounds -ftemplate-backtrace-limit=0"
14
+ # __FILE__ expands to the source path at the point a macro like Q_ASSERT or Q_D is reached, and in a nix build that path is under /nix/store, so the shipped object would otherwise name nix store paths through every assertion message. -ffile-prefix-map rewrites it.
15
+ $CXXFLAGS << " -ffile-prefix-map=/nix/store=/__nix"
14
16
  $LDFLAGS << " -Wl,-rpath,#{openvfs_library_dir}"
15
17
 
18
+ # mkmf puts LIBRUBYARG_SHARED on the link line whenever Ruby was built --enable-shared, and nixpkgs configures Ruby with --with-soname=ruby-<full version>, so an object compiled in `nix develop` asks the loader for libruby-4.0.9.so.4.0 - a soname only a nixpkgs Ruby of that exact patch release carries, and one no other Ruby provides under any name. A precompiled object has to load on every patch release of the ABI it was built for, so resolve Ruby's symbols from the process which dlopens it instead; that is what a rake-compiler gem gets for free by building against a --disable-shared Ruby, whose LIBRUBYARG is empty. Windows keeps the link because mingw resolves every symbol at link time, and its import library is named for the ABI rather than the patch release.
19
+ unless RbConfig::CONFIG["host_os"].match?(/mswin|mingw/)
20
+ $LIBRUBYARG = ""
21
+ end
22
+
23
+ # A mach-o bundle which links no libruby has to leave its Ruby symbols for the loader to find in the process which opens it. Ruby's own configure probes the flag into ADDITIONAL_DLDFLAGS and mkmf appends that for a gem build, so this only covers a Ruby configured without it.
24
+ if RbConfig::CONFIG["host_os"].match?(/darwin/)
25
+ $DLDFLAGS << " -Wl,-undefined,dynamic_lookup"
26
+ end
27
+
16
28
  unless have_header("openvfs/openvfs.h")
17
29
  abort "missing OpenVFS headers"
18
30
  end
@@ -12,6 +12,8 @@ unless pkg_config("opencloud-upload")
12
12
  end
13
13
 
14
14
  $CXXFLAGS << " -std=c++23 -fPIC -Wno-array-bounds"
15
+ # __FILE__ expands to the source path at the point a macro like Q_ASSERT or Q_D is reached, and in a nix build that path is under /nix/store, so the shipped object would otherwise name nix store paths through every assertion message. -ffile-prefix-map rewrites it.
16
+ $CXXFLAGS << " -ffile-prefix-map=/nix/store=/__nix"
15
17
 
16
18
  # The static library is built with -ffunction-sections, so the link can drop every function the extension never calls. ld64 spells that -dead_strip and has no equivalent of --exclude-libs.
17
19
  if RbConfig::CONFIG["host_os"].match?(/darwin/)
@@ -20,6 +22,16 @@ else
20
22
  $LDFLAGS << " -Wl,--gc-sections -Wl,--exclude-libs,ALL"
21
23
  end
22
24
 
25
+ # mkmf puts LIBRUBYARG_SHARED on the link line whenever Ruby was built --enable-shared, and nixpkgs configures Ruby with --with-soname=ruby-<full version>, so an object compiled in `nix develop` asks the loader for libruby-4.0.9.so.4.0 - a soname only a nixpkgs Ruby of that exact patch release carries, and one no other Ruby provides under any name. A precompiled object has to load on every patch release of the ABI it was built for, so resolve Ruby's symbols from the process which dlopens it instead; that is what a rake-compiler gem gets for free by building against a --disable-shared Ruby, whose LIBRUBYARG is empty. Windows keeps the link because mingw resolves every symbol at link time, and its import library is named for the ABI rather than the patch release.
26
+ unless RbConfig::CONFIG["host_os"].match?(/mswin|mingw/)
27
+ $LIBRUBYARG = ""
28
+ end
29
+
30
+ # A mach-o bundle which links no libruby has to leave its Ruby symbols for the loader to find in the process which opens it. Ruby's own configure probes the flag into ADDITIONAL_DLDFLAGS and mkmf appends that for a gem build, so this only covers a Ruby configured without it.
31
+ if RbConfig::CONFIG["host_os"].match?(/darwin/)
32
+ $DLDFLAGS << " -Wl,-undefined,dynamic_lookup"
33
+ end
34
+
23
35
  # opencloudsynclib.h rather than a real header: mkmf puts ruby.h first in the program it compiles to probe, and on Windows that defines truncate and access as macros, which Qt refuses to be parsed after. The generated export header pulls in nothing, so it answers the only question being asked - whether the development files are installed.
24
36
  unless have_header("libsync/opencloudsynclib.h")
25
37
  abort "missing OpenCloud Desktop upload headers"
@@ -5,6 +5,6 @@
5
5
 
6
6
  module OpenVFS
7
7
  module Rb
8
- VERSION = "1.4.3"
8
+ VERSION = "1.4.5"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvfs-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Kidd