ruby2d 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37d2a3369a8992fde4b416dcc0ba572c48cb00cd
4
- data.tar.gz: 99e73cf77dc72bc0861885fb00c2860bc0e22bc8
3
+ metadata.gz: 1c9e9c76278333bb20cb12379dfaeafd628710a0
4
+ data.tar.gz: e13a4231805be5b544a9c90c30411b33ec2942b0
5
5
  SHA512:
6
- metadata.gz: bd5d0ce27ca5475632ca26c053ca786ff32c5b0e518017403456b2b06f4f91ae420b6e125b60b0eb0e7004986a41dd0c2fba71e396f435c6b18cd73f4f17724c
7
- data.tar.gz: 286ab214a7405f367328a8d6c6721f953636cf824fdc08310e04149c8f81ced3b52635e0574630dfc2eb73c09bc1c0587f6a5d4ba108700060844225699c44d7
6
+ metadata.gz: 62424165bcb15575ef6c88d671a93864ec036b61e80b7e81c551cee1abcd72a3bb317f1b7bd06d3ccd7660e66b03c0e81b358e4023910a808a3474218c732cfe
7
+ data.tar.gz: 0425d8e50531e783f6f32e6b2b1ee432ca0426a6417322206db2c5c0174d9d7e10e3ef4a8b3baf98c805c85e3dbd49e0e7e407413cb0cb4be8502cf4f5432a31
@@ -17,7 +17,7 @@ def print_errors
17
17
  end
18
18
 
19
19
  def check_s2d_version
20
- unless Gem::Version.new(`simple2d --version`) >= Gem::Version.new(S2D_VERSION)
20
+ unless Gem::Version.new(`bash simple2d --version`) >= Gem::Version.new(S2D_VERSION)
21
21
  $errors << "Simple 2D needs to be updated for this version of Ruby 2D." <<
22
22
  "Run the following, then try reinstalling this gem:\n" <<
23
23
  " simple2d update".bold
@@ -28,9 +28,10 @@ end
28
28
 
29
29
 
30
30
  # Install Simple 2D on supported platforms
31
+ case RUBY_PLATFORM
31
32
 
32
- # OS X
33
- if RUBY_PLATFORM =~ /darwin/
33
+ # macOS
34
+ when /darwin/
34
35
 
35
36
  # Simple 2D not installed
36
37
  if `which simple2d`.empty?
@@ -57,36 +58,25 @@ if RUBY_PLATFORM =~ /darwin/
57
58
  end
58
59
  end
59
60
 
60
- # Linux
61
- elsif RUBY_PLATFORM =~ /linux/
61
+ # Linux and Windows / MinGW
62
+ when /linux|mingw/
62
63
 
63
64
  # Simple 2D not installed
64
65
  if `which simple2d`.empty?
65
66
  $errors << "Ruby 2D uses a native library called Simple 2D.\n" <<
66
- "To install Simple 2D on Linux, follow the instructions" <<
67
- "in the README: #{"https://github.com/simple2d/simple2d".bold}"
67
+ "To install Simple 2D, follow the instructions in the README:" <<
68
+ " #{"https://github.com/simple2d/simple2d".bold}"
68
69
  print_errors
69
70
  exit
70
71
  end
71
-
72
- $CFLAGS << ' -std=c11'
73
-
74
- # Windows / MinGW
75
- elsif RUBY_PLATFORM =~ /mingw/
76
- # Add flags
77
- $CFLAGS << ' -std=c11 -I/usr/local/include'
78
- $LDFLAGS << ' -Dmain=SDL_main -L/usr/local/lib -lmingw32 -lsimple2d -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lopengl32 -lglew32 -mwindows'
79
72
  end
80
73
 
81
- unless RUBY_PLATFORM =~ /mingw/
82
- # Simple 2D installed, check version
83
- check_s2d_version
84
-
85
- # Add flags
86
- $LDFLAGS << ' ' << `simple2d --libs`
87
- end
88
74
 
75
+ check_s2d_version
89
76
 
77
+ # Add flags
78
+ $CFLAGS << ' -std=c11 -I/usr/local/include'
79
+ $LDFLAGS << ' ' << `bash simple2d --libs`
90
80
  $LDFLAGS.gsub!(/\n/, ' ') # Remove newlines in flags, they cause problems
91
81
 
92
82
  create_makefile('ruby2d/ruby2d')
@@ -1,5 +1,5 @@
1
1
  # version.rb
2
2
 
3
3
  module Ruby2D
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Black
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
11
+ date: 2017-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.6.10
94
+ rubygems_version: 2.6.11
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Ruby 2D