fastqr 1.0.5 → 1.0.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.
- checksums.yaml +4 -4
- data/CMakeLists.txt +1 -1
- data/VERSION +1 -1
- data/bindings/nodejs/package.json +1 -1
- data/bindings/ruby/extconf.rb +11 -9
- data/bindings/ruby/lib/fastqr/platform.rb +28 -4
- data/bindings/ruby/lib/fastqr/version.rb +1 -1
- data/bindings/ruby/prebuilt/macos-arm64/bin/fastqr +0 -0
- data/bindings/ruby/prebuilt/macos-arm64/lib/libfastqr.dylib +0 -0
- data/bindings/ruby/prebuilt/macos-arm64.tar.gz +0 -0
- data/bindings/ruby/prebuilt/macos-x86_64/bin/fastqr +0 -0
- data/bindings/ruby/prebuilt/macos-x86_64/lib/libfastqr.dylib +0 -0
- data/bindings/ruby/prebuilt/macos-x86_64.tar.gz +0 -0
- data/src/fastqr.cpp +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b06744eea866ba5302111b88bbb8f19ee25eef3c88c1f4c6cc2db04cfd358cc0
|
|
4
|
+
data.tar.gz: 2fca75cffbf6dd4b1751ecfe12c89899d40a8cfcf7b22183ad9ae04581579f8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f640f6a41cd6676e1ca5b91fa4c482c7eaead0d4d6561f9d20c8d7a7821d7f02ebf8a6fea28bd80ee23c635b4db7f507640d8866dc1a545d90c1cd38eccd8355
|
|
7
|
+
data.tar.gz: d556c90d8fcac826d99ee7be2b93041614870ddbecaf483edce992becb278c5c9995463f43ec8c659c2e8ffb0101a304a0b97d89054eb512b1da125df7e9013b
|
data/CMakeLists.txt
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.7
|
data/bindings/ruby/extconf.rb
CHANGED
|
@@ -5,7 +5,7 @@ require 'rbconfig'
|
|
|
5
5
|
def check_prebuilt_binary
|
|
6
6
|
os = RbConfig::CONFIG['host_os']
|
|
7
7
|
arch = RbConfig::CONFIG['host_cpu']
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
platform = case os
|
|
10
10
|
when /darwin/
|
|
11
11
|
case arch
|
|
@@ -28,26 +28,28 @@ def check_prebuilt_binary
|
|
|
28
28
|
else
|
|
29
29
|
nil
|
|
30
30
|
end
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
return false unless platform
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
|
|
34
|
+
# When installed as gem, binaries are in bindings/ruby/prebuilt/
|
|
35
|
+
# When running from repo, they're in ../../prebuilt/
|
|
36
|
+
prebuilt_dir = File.expand_path("./prebuilt/#{platform}", __dir__)
|
|
37
|
+
binary_path = File.join(prebuilt_dir, 'bin', 'fastqr')
|
|
38
|
+
|
|
37
39
|
if File.exist?(binary_path)
|
|
38
40
|
puts "✅ Found pre-built binary at #{binary_path}"
|
|
39
41
|
puts "⏭️ Skipping compilation"
|
|
40
|
-
|
|
42
|
+
|
|
41
43
|
# Create a dummy Makefile that does nothing
|
|
42
44
|
File.open('Makefile', 'w') do |f|
|
|
43
45
|
f.puts "all:\n\t@echo 'Using pre-built binary'\n"
|
|
44
46
|
f.puts "install:\n\t@echo 'Using pre-built binary'\n"
|
|
45
47
|
f.puts "clean:\n\t@echo 'Nothing to clean'\n"
|
|
46
48
|
end
|
|
47
|
-
|
|
49
|
+
|
|
48
50
|
return true
|
|
49
51
|
end
|
|
50
|
-
|
|
52
|
+
|
|
51
53
|
false
|
|
52
54
|
end
|
|
53
55
|
|
|
@@ -34,6 +34,30 @@ module FastQR
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# Check if pre-built binary is available
|
|
38
|
+
# @return [Boolean] true if binary exists
|
|
39
|
+
def prebuilt_available?
|
|
40
|
+
binary_path = find_binary
|
|
41
|
+
binary_path && File.exist?(binary_path)
|
|
42
|
+
rescue StandardError
|
|
43
|
+
false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Get path to the library file
|
|
47
|
+
# @return [String] Path to libfastqr.dylib or libfastqr.so
|
|
48
|
+
def lib_path
|
|
49
|
+
platform = detect
|
|
50
|
+
base_dir = File.expand_path('../../prebuilt', __dir__)
|
|
51
|
+
lib_file = platform.start_with?('macos') ? 'libfastqr.dylib' : 'libfastqr.so'
|
|
52
|
+
File.join(base_dir, platform, 'lib', lib_file)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Get binary name
|
|
56
|
+
# @return [String] 'fastqr'
|
|
57
|
+
def binary_name
|
|
58
|
+
'fastqr'
|
|
59
|
+
end
|
|
60
|
+
|
|
37
61
|
# Extracts pre-built binary from tarball
|
|
38
62
|
# @param tarball_path [String] Path to the tarball
|
|
39
63
|
# @param dest_dir [String] Destination directory
|
|
@@ -46,16 +70,16 @@ module FastQR
|
|
|
46
70
|
# @return [String] Path to fastqr binary
|
|
47
71
|
def find_binary
|
|
48
72
|
platform = detect
|
|
49
|
-
|
|
50
|
-
binary_path = File.join(
|
|
73
|
+
base_dir = File.expand_path('../../prebuilt', __dir__)
|
|
74
|
+
binary_path = File.join(base_dir, platform, 'bin', 'fastqr')
|
|
51
75
|
|
|
52
76
|
return binary_path if File.exist?(binary_path)
|
|
53
77
|
|
|
54
78
|
# Try to extract from tarball
|
|
55
|
-
tarball_path = File.
|
|
79
|
+
tarball_path = File.join(base_dir, "#{platform}.tar.gz")
|
|
56
80
|
if File.exist?(tarball_path)
|
|
57
81
|
puts "Extracting pre-built binary from #{tarball_path}..."
|
|
58
|
-
extract_binary(tarball_path,
|
|
82
|
+
extract_binary(tarball_path, File.join(base_dir, platform))
|
|
59
83
|
|
|
60
84
|
if File.exist?(binary_path)
|
|
61
85
|
File.chmod(0755, binary_path)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/src/fastqr.cpp
CHANGED