zstd-ruby 2.0.2 → 2.0.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65a00efff2063419d15ec39be7fb8f30bc55adae0300544aa05acef44e3c18b7
|
|
4
|
+
data.tar.gz: a19e44f78c56c8b6711e6f857bfb9b29a8e05e47d0096b0471799e663e67a90f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9dd0a8b325b42e9ea0438f65a452c5c19f928e5d7848be16ea2cc3d81841d7bf820aa776ff10e717c669c0171ba6e5fc2951fff3771315996c8e483a9af9b85
|
|
7
|
+
data.tar.gz: 843ef5641e08729a1519c06a9408cc8b363cbd6c4cfc5d4df57da56ce0d7a7c33c22fa62f6a0ceca0922ebacf83cfb607541dff6788888e93a1cbfd6b13d03be
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_Init_zstdruby
|
data/ext/zstdruby/extconf.rb
CHANGED
|
@@ -2,12 +2,38 @@ require "mkmf"
|
|
|
2
2
|
|
|
3
3
|
have_func('rb_gc_mark_movable')
|
|
4
4
|
|
|
5
|
+
# Check if ruby_abi_version symbol is required
|
|
6
|
+
# Based on grpc's approach: https://github.com/grpc/grpc/blob/master/src/ruby/ext/grpc/extconf.rb
|
|
7
|
+
def have_ruby_abi_version?
|
|
8
|
+
# Only development/preview versions need the symbol
|
|
9
|
+
return false if RUBY_PATCHLEVEL >= 0
|
|
10
|
+
|
|
11
|
+
# Ruby 3.2+ development versions require ruby_abi_version
|
|
12
|
+
major, minor = RUBY_VERSION.split('.').map(&:to_i)
|
|
13
|
+
if major > 3 || (major == 3 && minor >= 2)
|
|
14
|
+
puts "Ruby version #{RUBY_VERSION} >= 3.2. Using ruby_abi_version symbol."
|
|
15
|
+
return true
|
|
16
|
+
else
|
|
17
|
+
puts "Ruby version #{RUBY_VERSION} < 3.2. Not using ruby_abi_version symbol."
|
|
18
|
+
return false
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Determine which export file to use based on Ruby version
|
|
23
|
+
def ext_export_filename
|
|
24
|
+
name = 'ext-export'
|
|
25
|
+
name += '-with-ruby-abi-version' if have_ruby_abi_version?
|
|
26
|
+
name
|
|
27
|
+
end
|
|
28
|
+
|
|
5
29
|
$CFLAGS = '-I. -O3 -std=c99 -DZSTD_STATIC_LINKING_ONLY -DZSTD_MULTITHREAD -pthread -DDEBUGLEVEL=0 -fvisibility=hidden -DZSTDLIB_VISIBLE=\'__attribute__((visibility("hidden")))\' -DZSTDLIB_HIDDEN=\'__attribute__((visibility("hidden")))\''
|
|
6
30
|
$CPPFLAGS += " -fdeclspec" if CONFIG['CXX'] =~ /clang/
|
|
7
31
|
|
|
8
32
|
# macOS specific: Use exported_symbols_list to control symbol visibility
|
|
9
33
|
if RUBY_PLATFORM =~ /darwin/
|
|
10
|
-
|
|
34
|
+
ext_export_file = File.join(__dir__, "#{ext_export_filename}.txt")
|
|
35
|
+
$LDFLAGS += " -exported_symbols_list #{ext_export_file}"
|
|
36
|
+
puts "Using export file: #{ext_export_file}"
|
|
11
37
|
end
|
|
12
38
|
|
|
13
39
|
Dir.chdir File.expand_path('..', __FILE__) do
|
data/lib/zstd-ruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zstd-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SpringMT
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-11-
|
|
10
|
+
date: 2025-11-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bundler
|
|
@@ -99,7 +99,8 @@ files:
|
|
|
99
99
|
- bin/console
|
|
100
100
|
- bin/setup
|
|
101
101
|
- ext/zstdruby/common.h
|
|
102
|
-
- ext/zstdruby/
|
|
102
|
+
- ext/zstdruby/ext-export-with-ruby-abi-version.txt
|
|
103
|
+
- ext/zstdruby/ext-export.txt
|
|
103
104
|
- ext/zstdruby/extconf.rb
|
|
104
105
|
- ext/zstdruby/libzstd/common/allocations.h
|
|
105
106
|
- ext/zstdruby/libzstd/common/bits.h
|
|
File without changes
|