mutant-melbourne 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,11 +4,11 @@ require "rubygems/package_task"
4
4
  desc "Compile the C extension"
5
5
  Rake::ExtensionTask.new('melbourne')
6
6
 
7
- gemspec = eval(File.read("melbourne.gemspec"))
7
+ gemspec = eval(File.read("mutant-melbourne.gemspec"))
8
8
  desc "Build the gem"
9
9
  Gem::PackageTask.new(gemspec).define
10
10
 
11
11
  desc "Install the gem"
12
12
  task :install => :repackage do
13
- sh "gem install pkg/melbourne-*.gem"
13
+ sh "gem install pkg/mutant-melbourne-*.gem"
14
14
  end
@@ -1,87 +1,86 @@
1
- unless(defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx')
2
- require 'mkmf'
1
+ unless(defined?(RUBY_ENGINE) and %w(rbx jruby).include?(RUBY_ENGINE))
2
+ require 'mkmf'
3
3
 
4
- def add_lib(name)
5
- i, lib = dir_config(name)
6
- $libs << " #{lib}/lib#{name}.a "
7
- end
8
-
9
- # add_lib("mquark")
10
- # add_lib("bstring")
11
- # add_lib("ptr_array")
12
- # add_lib("cchash")
13
-
14
- #have_library("bstring")
15
- #have_library("mquark")
16
- #have_library("ptr_array")
17
- #have_library("cchash")
18
-
19
- $CFLAGS += " -ggdb3"
20
-
21
- # Courtesy of EventMachine. Thank you EventMachine and tmm1 !
22
- case RUBY_PLATFORM
23
- when /mswin32/, /mingw32/, /bccwin32/
24
- check_heads(%w[windows.h winsock.h], true)
25
- check_libs(%w[kernel32 rpcrt4 gdi32], true)
26
-
27
- if GNU_CHAIN
28
- CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++"
29
- else
30
- $defs.push "-EHs"
31
- $defs.push "-GR"
4
+ def add_lib(name)
5
+ i, lib = dir_config(name)
6
+ $libs << " #{lib}/lib#{name}.a "
32
7
  end
33
8
 
34
- when /solaris/
35
- add_define 'OS_SOLARIS8'
9
+ # add_lib("mquark")
10
+ # add_lib("bstring")
11
+ # add_lib("ptr_array")
12
+ # add_lib("cchash")
13
+
14
+ #have_library("bstring")
15
+ #have_library("mquark")
16
+ #have_library("ptr_array")
17
+ #have_library("cchash")
18
+
19
+ $CFLAGS += " -ggdb3"
20
+
21
+ # Courtesy of EventMachine. Thank you EventMachine and tmm1 !
22
+ case RUBY_PLATFORM
23
+ when /mswin32/, /mingw32/, /bccwin32/
24
+ check_heads(%w[windows.h winsock.h], true)
25
+ check_libs(%w[kernel32 rpcrt4 gdi32], true)
26
+
27
+ if GNU_CHAIN
28
+ CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++"
29
+ else
30
+ $defs.push "-EHs"
31
+ $defs.push "-GR"
32
+ end
33
+
34
+ when /solaris/
35
+ add_define 'OS_SOLARIS8'
36
+
37
+ if CONFIG['CC'] == 'cc' and `cc -flags 2>&1` =~ /Sun/ # detect SUNWspro compiler
38
+ # SUN CHAIN
39
+ add_define 'CC_SUNWspro'
40
+ $preload = ["\nCXX = CC"] # hack a CXX= line into the makefile
41
+ $CFLAGS = CONFIG['CFLAGS'] = "-KPIC"
42
+ CONFIG['CCDLFLAGS'] = "-KPIC"
43
+ CONFIG['LDSHARED'] = "$(CXX) -G -KPIC -lCstd"
44
+ else
45
+ # GNU CHAIN
46
+ # on Unix we need a g++ link, not gcc.
47
+ CONFIG['LDSHARED'] = "$(CXX) -shared"
48
+ end
49
+
50
+ when /openbsd/
51
+ # OpenBSD branch contributed by Guillaume Sellier.
52
+
53
+ # on Unix we need a g++ link, not gcc. On OpenBSD, linking against libstdc++ have to be explicitly done for shared libs
54
+ CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++ -fPIC"
55
+ CONFIG['LDSHAREDXX'] = "$(CXX) -shared -lstdc++ -fPIC"
56
+
57
+ when /darwin/
58
+ # on Unix we need a g++ link, not gcc.
59
+ # Ff line contributed by Daniel Harple.
60
+ CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ')
61
+
62
+ when /aix/
63
+ CONFIG['LDSHARED'] = "$(CXX) -shared -Wl,-G -Wl,-brtl"
36
64
 
37
- if CONFIG['CC'] == 'cc' and `cc -flags 2>&1` =~ /Sun/ # detect SUNWspro compiler
38
- # SUN CHAIN
39
- add_define 'CC_SUNWspro'
40
- $preload = ["\nCXX = CC"] # hack a CXX= line into the makefile
41
- $CFLAGS = CONFIG['CFLAGS'] = "-KPIC"
42
- CONFIG['CCDLFLAGS'] = "-KPIC"
43
- CONFIG['LDSHARED'] = "$(CXX) -G -KPIC -lCstd"
44
65
  else
45
- # GNU CHAIN
46
66
  # on Unix we need a g++ link, not gcc.
47
67
  CONFIG['LDSHARED'] = "$(CXX) -shared"
48
68
  end
49
69
 
50
- when /openbsd/
51
- # OpenBSD branch contributed by Guillaume Sellier.
52
-
53
- # on Unix we need a g++ link, not gcc. On OpenBSD, linking against libstdc++ have to be explicitly done for shared libs
54
- CONFIG['LDSHARED'] = "$(CXX) -shared -lstdc++ -fPIC"
55
- CONFIG['LDSHAREDXX'] = "$(CXX) -shared -lstdc++ -fPIC"
56
-
57
- when /darwin/
58
- # on Unix we need a g++ link, not gcc.
59
- # Ff line contributed by Daniel Harple.
60
- CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ')
61
-
62
- when /aix/
63
- CONFIG['LDSHARED'] = "$(CXX) -shared -Wl,-G -Wl,-brtl"
64
-
65
- else
66
- # on Unix we need a g++ link, not gcc.
67
- CONFIG['LDSHARED'] = "$(CXX) -shared"
68
- end
69
-
70
- create_makefile('melbourne')
71
-
72
- File.open("Makefile","a+") do |f|
73
- f.puts <<END
70
+ create_makefile('melbourne')
74
71
 
72
+ File.open("Makefile","a+") do |f|
73
+ f.puts <<END
75
74
  grammar.cpp: grammar.y
76
- bison -o grammar.cpp grammar.y
75
+ bison -o grammar.cpp grammar.y
77
76
  END
78
- end
79
- else
80
- File.open("Makefile","w+") do |f|
81
- f.puts <<END
77
+ end
78
+ else
79
+ File.open("Makefile","w+") do |f|
80
+ f.puts <<END
82
81
  all:
83
82
 
84
83
  install:
85
84
  END
86
- end
85
+ end
87
86
  end
data/lib/melbourne.rb CHANGED
@@ -1,4 +1,4 @@
1
- unless(defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx')
1
+ unless(defined?(RUBY_ENGINE) and %w(rbx jruby).include?(RUBY_ENGINE))
2
2
  module Rubinius
3
3
 
4
4
  unless singleton_methods.map { |name| name.to_s }.include?('ruby18?')
@@ -1,3 +1,3 @@
1
1
  module Melbourne
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant-melbourne
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: