rufus-lua 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +6 -0
- data/README.md +15 -3
- data/lib/rufus/lua/lib.rb +22 -22
- data/lib/rufus/lua/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b6380bbe4600f5987c4969d92612ef78d6fa7ae
|
4
|
+
data.tar.gz: 322ed326de3fafba81653d933f73648cd27b2945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ee45faf89f1e5f973d7586fa74ac3396556a9ed55d3b097a36cab0d7c50b29711e0d14c329c31dc7a8daa818011badea0cbf38ca788d418b1e789c99bbf79d2
|
7
|
+
data.tar.gz: 555fe2fa37f1d5e53be891468048615930e20416a331eb9265f66051269503eff4901a5c82075828d808d85340616b0f4df0dd79921af088a1190abe0eff6088
|
data/CHANGELOG.txt
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
= rufus-lua CHANGELOG.txt
|
3
3
|
|
4
4
|
|
5
|
+
== rufus-lua - 1.1.5 released 2019/10/19
|
6
|
+
|
7
|
+
- trust LUA_LIB or FFI.ffi_libs to find 'liblua5.1' else
|
8
|
+
glob only /usr/lib/*/liblua5.1.*so* (Andri Möll)
|
9
|
+
|
10
|
+
|
5
11
|
== rufus-lua - 1.1.4 released 2018/03/15
|
6
12
|
|
7
13
|
- Replace deprecated Fixnum by Integer, gh-40
|
data/README.md
CHANGED
@@ -34,6 +34,8 @@ http://www.lua.org/
|
|
34
34
|
|
35
35
|
## getting Lua on your system
|
36
36
|
|
37
|
+
### Debian GNU/Linux
|
38
|
+
|
37
39
|
On Debian GNU/Linux, I do
|
38
40
|
|
39
41
|
```
|
@@ -56,6 +58,16 @@ export LUA_LIB=~/mystuff/lualib.5.1.4.so
|
|
56
58
|
ruby myluacode.rb
|
57
59
|
```
|
58
60
|
|
61
|
+
### OSX
|
62
|
+
|
63
|
+
As of 2018-10-19, this [Homebrew](https://brew.sh/) command will install Lua and its .dylib on OSX:
|
64
|
+
|
65
|
+
```bash
|
66
|
+
brew install lua@5.1
|
67
|
+
```
|
68
|
+
|
69
|
+
### Windows
|
70
|
+
|
59
71
|
On Windows try using [rufus-lua-win](https://github.com/ukoloff/rufus-lua-win) gem.
|
60
72
|
|
61
73
|
## using rufus-lua
|
@@ -271,7 +283,7 @@ Modify the file `src/Makefile` as per http://lua-users.org/lists/lua-l/2006-09/m
|
|
271
283
|
|
272
284
|
It's mostly about adding that rule to the `src/Makefile`:
|
273
285
|
```make
|
274
|
-
|
286
|
+
liblua51.dylib: $(CORE_O) $(LIB_O)
|
275
287
|
$(CC) -dynamiclib -o $@ $^ $(LIBS)
|
276
288
|
```
|
277
289
|
|
@@ -279,8 +291,8 @@ Here's how to build the library file and deploy it:
|
|
279
291
|
```
|
280
292
|
make
|
281
293
|
make macosx
|
282
|
-
make -C src
|
283
|
-
sudo cp src/
|
294
|
+
make -C src liblua51.dylib
|
295
|
+
sudo cp src/liblua51.dylib /usr/local/lib/
|
284
296
|
|
285
297
|
sudo make macosx install
|
286
298
|
```
|
data/lib/rufus/lua/lib.rb
CHANGED
@@ -11,34 +11,34 @@ module Lua
|
|
11
11
|
#
|
12
12
|
# locate the dynamic library
|
13
13
|
|
14
|
-
|
15
|
-
ENV['LUA_LIB'] ||
|
16
|
-
# developer points to the right lib
|
17
|
-
(
|
18
|
-
Dir.glob('/usr/lib/liblua*.so') +
|
19
|
-
Dir.glob('/usr/lib/*/liblua*.so') +
|
20
|
-
Dir.glob('/usr/local/lib/liblua*.so') +
|
21
|
-
Dir.glob('/opt/local/lib/liblua*.so') +
|
22
|
-
Dir.glob('/usr/lib/liblua*.dylib') +
|
23
|
-
Dir.glob('/usr/local/lib/liblua*.dylib') +
|
24
|
-
Dir.glob('/opt/local/lib/liblua*.dylib')
|
25
|
-
)
|
26
|
-
# or else we attempt to find it from potential locations
|
14
|
+
ffi_lib_flags(:lazy, :global)
|
27
15
|
|
28
16
|
begin
|
29
17
|
|
30
|
-
|
18
|
+
# first attempt
|
31
19
|
|
32
|
-
ffi_lib(
|
20
|
+
ffi_lib(ENV['LUA_LIB'] || 'liblua5.1')
|
33
21
|
|
34
|
-
rescue LoadError =>
|
22
|
+
rescue LoadError => le0
|
35
23
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
24
|
+
paths =
|
25
|
+
%w[ /usr/lib/*/liblua5.1.*so* ]
|
26
|
+
.inject([]) { |a, e| a.concat(Dir.glob(e)) }
|
27
|
+
|
28
|
+
begin
|
29
|
+
|
30
|
+
# second attempt
|
31
|
+
|
32
|
+
ffi_lib(paths)
|
33
|
+
|
34
|
+
rescue LoadError => le1
|
35
|
+
|
36
|
+
fail RuntimeError.new(
|
37
|
+
"Didn't find the Lua dynamic library (liblua5.1.*) on your system. " +
|
38
|
+
"Set LUA_LIB in your environment if have that library or " +
|
39
|
+
"go to https://github.com/jmettraux/rufus-lua to learn how to " +
|
40
|
+
"get it.")
|
41
|
+
end
|
42
42
|
end
|
43
43
|
|
44
44
|
# Rufus::Lua::Lib.path returns the path to the library used.
|
data/lib/rufus/lua/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rufus-lua
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-10-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ffi
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project: rufus
|
84
|
-
rubygems_version: 2.6.
|
84
|
+
rubygems_version: 2.6.14.1
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: ruby-ffi based bridge from Ruby to Lua
|