ccharts 3.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 77f69db3ea0dde380f4427aedf9dd54b2034adf8186d71982c57a8cd7316cee3
4
+ data.tar.gz: 843b54a0e0bd0bd3be41d05639fd7664d50d504010028e5d51e3d91bc6db9b27
5
+ SHA512:
6
+ metadata.gz: ac4b5b17ae6ba253488bb80c691119184be7f0c4da78c9d77057dc1ea88d544fcf5cb505efb9ee09937c8b8bfc8c6d460fd6f0da0297d16040de3f58d834f314
7
+ data.tar.gz: ae745d9cd085c1978e22c89003504120ea9d96817bd437b02c2fbd09d237271e7665cb65bf4185da4a4afd6e9af5f7ed697fa9f0029eb43de1fa5ac635d60324
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Builds the ccharts native library (ccharts_ext.so) from the vendored C ABI.
4
+ #
5
+ # The extension declares no Ruby-facing functions of its own — it is plain
6
+ # object code (the ccharts_* symbols) that Fiddle dlopens, so the C compiler
7
+ # just needs to turn vendor/ccharts_abi.c into a shared object. This keeps the
8
+ # gem compile-from-source and platform-portable: any C compiler at install time
9
+ # produces a working FFI library, exactly like the Rust/Go bindings.
10
+ require "mkmf"
11
+
12
+ # ccharts.h uses math functions (lround, etc.), so link libm on non-Windows.
13
+ unless RUBY_PLATFORM =~ /mswin|mingw|cygwin/
14
+ $LDFLAGS << " -lm"
15
+ end
16
+
17
+ # The C ABI lives in vendor/; point mkmf's source directory there so
18
+ # vendor/ccharts_abi.c becomes the extension's object code. The .so is still
19
+ # written to this directory (ext/ccharts/).
20
+ create_makefile("ccharts_ext", "vendor")