liblouis-rb 0.1.0 → 0.1.1
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/README.md +1 -1
- data/ext/liblouis/extconf.rb +8 -1
- data/ext/liblouis/liblouis.c +1 -1
- data/liblouis-rb.gemspec +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: f5092c42026ace0663c5cf13dabc59450690dfeb3b7e510093cb17d99807c86f
|
|
4
|
+
data.tar.gz: 0ba100f40dcd5f31c1f6c38bd7b7e274f07d1b56d4fe0b618478091f22ee18af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b41a35231e8c4c1a5969b1d4b5449f9f25efd5fb3af9c8a08d6865d8cdf60d0e95cf2822bb82233815c6e3fd4924647200a9b6fece3afd166b12545cdc39637
|
|
7
|
+
data.tar.gz: 9c5a163c7314a71b6bb09091dbdb77366fc219f5c153833cb135fc31b4360993bd9113dbd5b139c5abe66b4d1ad8d11555f8847b635f66eac7ccfec9f7229ca3
|
data/README.md
CHANGED
data/ext/liblouis/extconf.rb
CHANGED
|
@@ -16,6 +16,11 @@ end
|
|
|
16
16
|
liblouis_version = File.binread(configure_source)[/AC_INIT\(\[Liblouis\],\s*\[([0-9]+\.[0-9]+\.[0-9]+)\]/, 1]
|
|
17
17
|
abort "Could not read the Liblouis version from configure.ac" unless liblouis_version
|
|
18
18
|
|
|
19
|
+
# Strict C11 hides the POSIX and BSD interfaces used by Liblouis on glibc.
|
|
20
|
+
$defs << "-D_DEFAULT_SOURCE=1" if RbConfig::CONFIG["host_os"].match?(/linux/)
|
|
21
|
+
append_cflags("-std=c11")
|
|
22
|
+
have_header("strings.h")
|
|
23
|
+
|
|
19
24
|
# Encode paths as C strings in the header so the shell never splits them.
|
|
20
25
|
def c_string(value)
|
|
21
26
|
'"' + value.b.bytes.map { |byte| format("\\%03o", byte) }.join + '"'
|
|
@@ -39,6 +44,9 @@ File.write(
|
|
|
39
44
|
#define LIBLOUIS_RB_TABLES_DIR #{c_string(TABLES_PATH)}
|
|
40
45
|
#define LIBLOUIS_RB_DATA_DIR #{c_string(DATA_PATH)}
|
|
41
46
|
#include <stdbool.h>
|
|
47
|
+
#ifdef HAVE_STRINGS_H
|
|
48
|
+
#include <strings.h>
|
|
49
|
+
#endif
|
|
42
50
|
#endif
|
|
43
51
|
CONFIG
|
|
44
52
|
)
|
|
@@ -69,5 +77,4 @@ $srcs = extension_sources + liblouis_sources
|
|
|
69
77
|
$INCFLAGS = "-I$(srcdir) -I$(srcdir)/../../vendor/liblouis/liblouis #{$INCFLAGS}"
|
|
70
78
|
$defs << "-DWIDECHARS_ARE_UCS4=1"
|
|
71
79
|
|
|
72
|
-
append_cflags("-std=c11")
|
|
73
80
|
create_makefile("liblouis")
|
data/ext/liblouis/liblouis.c
CHANGED
|
@@ -148,7 +148,7 @@ Init_liblouis(void)
|
|
|
148
148
|
ll_eError = rb_define_class_under(ll_mLibLouis, "Error", rb_eStandardError);
|
|
149
149
|
ll_eTranslationError = rb_define_class_under(ll_mLibLouis, "TranslationError", ll_eError);
|
|
150
150
|
|
|
151
|
-
rb_define_const(ll_mLibLouis, "VERSION", rb_obj_freeze(rb_usascii_str_new_cstr("0.1.
|
|
151
|
+
rb_define_const(ll_mLibLouis, "VERSION", rb_obj_freeze(rb_usascii_str_new_cstr("0.1.1")));
|
|
152
152
|
|
|
153
153
|
rb_define_module_function(ll_mLibLouis, "version", ll_version, 0);
|
|
154
154
|
rb_define_module_function(ll_mLibLouis, "table_path", ll_table_path, 0);
|
data/liblouis-rb.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ end
|
|
|
9
9
|
|
|
10
10
|
Gem::Specification.new do |spec|
|
|
11
11
|
spec.name = "liblouis-rb"
|
|
12
|
-
spec.version = "0.1.
|
|
12
|
+
spec.version = "0.1.1"
|
|
13
13
|
spec.authors = ["Dawid Pieper", "liblouis contributors"]
|
|
14
14
|
spec.summary = "Native Ruby bindings for Liblouis"
|
|
15
15
|
spec.description = <<~DESCRIPTION.strip
|