mkmf-lite 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ = 0.2.1 - 21-Jan-2011
2
+ * Minor platform detection adjustments for MS Windows.
3
+
1
4
  = 0.2.0 - 8-Jun-2010
2
5
  * Now works properly with JRuby (though it still requires a compiler
3
6
  somewhere on your system).
data/MANIFEST CHANGED
@@ -3,5 +3,8 @@
3
3
  * Rakefile
4
4
  * mkmf-lite.gemspec
5
5
  * lib/mkmf/lite.rb
6
+ * lib/mkmf/templates/have_func.erb
7
+ * lib/mkmf/templates/have_func_pointer.erb
6
8
  * lib/mkmf/templates/have_header.erb
9
+ * lib/mkmf/templates/have_struct_member.erb
7
10
  * test/test_mkmf_lite.rb
data/Rakefile CHANGED
@@ -1,14 +1,10 @@
1
1
  require 'rake'
2
+ require 'rake/clean'
2
3
  require 'rake/testtask'
3
- require 'rbconfig'
4
4
 
5
+ CLEAN.include("**/*.gem", "**/*.rbc")
5
6
 
6
7
  namespace 'gem' do
7
- desc 'Remove any existing .gem files'
8
- task :clean do
9
- Dir['**/*.gem'].each{ |f| File.delete(f) }
10
- end
11
-
12
8
  desc 'Create the mkmf-lite gem.'
13
9
  task :create => [:clean] do
14
10
  spec = eval(IO.read('mkmf-lite.gemspec'))
@@ -26,3 +22,5 @@ Rake::TestTask.new do |t|
26
22
  t.verbose = true
27
23
  t.warning = true
28
24
  end
25
+
26
+ task :default => :test
data/lib/mkmf/lite.rb CHANGED
@@ -6,11 +6,11 @@ require 'ptools'
6
6
  module Mkmf
7
7
  module Lite
8
8
  # The version of the mkmf-lite library
9
- MKMF_LITE_VERSION = '0.2.0'
9
+ MKMF_LITE_VERSION = '0.2.1'
10
10
 
11
- @@cpp_command = Config::CONFIG['CC'] || Config::CONFIG['CPP']
12
- @@cpp_outfile = Config::CONFIG['CPPOUTFILE'] || "-o conftest.i"
13
- @@cpp_srcfile = 'conftest.c'
11
+ @@cpp_command = Config::CONFIG['CC'] || Config::CONFIG['CPP']
12
+ @@cpp_outfile = Config::CONFIG['CPPOUTFILE'] || "-o conftest.i"
13
+ @@cpp_srcfile = 'conftest.c'
14
14
 
15
15
  if Config::CONFIG['LIBS']
16
16
  @@cpp_libraries = Config::CONFIG['LIBS'] + Config::CONFIG['LIBRUBYARG']
@@ -23,7 +23,7 @@ module Mkmf
23
23
  # JRuby, and possibly others
24
24
  unless @@cpp_command
25
25
  case Config::CONFIG['host_os']
26
- when /msdos|mswin|win32|mingw|cygwin/i
26
+ when /msdos|mswin|win32|windows|mingw|cygwin/i
27
27
  @@cpp_command = File.which('cl') || File.which('gcc')
28
28
  when /sunos|solaris|hpux/i
29
29
  @@cpp_command = File.which('cc') || File.which('gcc')
@@ -111,7 +111,7 @@ module Mkmf
111
111
  #
112
112
  def try_to_compile(code)
113
113
  begin
114
- bool = false
114
+ boolean = false
115
115
  stderr_orig = $stderr.dup
116
116
 
117
117
  Dir.chdir(Dir.tmpdir){
@@ -122,7 +122,7 @@ module Mkmf
122
122
  command += @@cpp_srcfile
123
123
 
124
124
  $stderr.reopen(File.null)
125
- bool = system(command)
125
+ boolean = system(command)
126
126
  }
127
127
  ensure
128
128
  File.delete(@@cpp_srcfile) if File.exists?(@@cpp_srcfile)
@@ -130,7 +130,7 @@ module Mkmf
130
130
  $stderr.reopen(stderr_orig)
131
131
  end
132
132
 
133
- bool
133
+ boolean
134
134
  end
135
135
 
136
136
  # Slurp the contents of the template file for evaluation later.
data/mkmf-lite.gemspec CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'mkmf-lite'
5
5
  spec.summary = 'A lighter version of mkmf designed for use as a library'
6
- spec.version = '0.2.0'
6
+ spec.version = '0.2.1'
7
7
  spec.author = 'Daniel J. Berger'
8
8
  spec.license = 'Artistic 2.0'
9
9
  spec.email = 'djberg96@gmail.com'
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.rubyforge_project = 'shards'
16
16
 
17
17
  spec.add_dependency('ptools')
18
- spec.add_development_dependency('test-unit', '>= 2.0.7')
18
+ spec.add_development_dependency('test-unit', '>= 2.1.2')
19
19
 
20
20
  spec.description = <<-EOF
21
21
  The mkmf-lite library is a light version of the the mkmf library
@@ -12,17 +12,17 @@ class TC_Mkmf_Lite < Test::Unit::TestCase
12
12
  include Mkmf::Lite
13
13
 
14
14
  def self.startup
15
- @@windows = Config::CONFIG['host_os'] =~ /mswin|msdos|win32|mingw|cygwin/i
15
+ @@windows = File::ALT_SEPARATOR
16
16
  end
17
17
 
18
18
  def setup
19
19
  @st_type = 'struct stat'
20
20
  @st_member = 'st_uid'
21
- @st_header = 'sys/stat.h'
21
+ @st_header = 'sys/stat.h'
22
22
  end
23
23
 
24
24
  test "version information" do
25
- assert_equal('0.2.0', MKMF_LITE_VERSION)
25
+ assert_equal('0.2.1', MKMF_LITE_VERSION)
26
26
  end
27
27
 
28
28
  test "have_header basic functionality" do
@@ -45,7 +45,7 @@ class TC_Mkmf_Lite < Test::Unit::TestCase
45
45
 
46
46
  test "have_func with no arguments returns expected boolean value" do
47
47
  assert_true(have_func('abort'))
48
- assert_false(have_header('abortxyz'))
48
+ assert_false(have_func('abortxyz'))
49
49
  end
50
50
 
51
51
  test "have_func with arguments returns expected boolean value" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mkmf-lite
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel J. Berger
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-08 00:00:00 -06:00
18
+ date: 2011-01-21 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -40,12 +40,12 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- hash: 1
43
+ hash: 15
44
44
  segments:
45
45
  - 2
46
- - 0
47
- - 7
48
- version: 2.0.7
46
+ - 1
47
+ - 2
48
+ version: 2.1.2
49
49
  type: :development
50
50
  version_requirements: *id002
51
51
  description: " The mkmf-lite library is a light version of the the mkmf library\n designed for use as a library. It does not create packages, builds,\n or log files of any kind. Instead, it provides mixin methods that you\n can use in FFI or tests to check for the presence of header files,\n constants, and so on.\n"
@@ -59,17 +59,17 @@ extra_rdoc_files:
59
59
  - README
60
60
  - MANIFEST
61
61
  files:
62
- - MANIFEST
63
62
  - CHANGES
64
- - README
65
- - mkmf-lite.gemspec
66
- - test/test_mkmf_lite.rb
67
- - Rakefile
68
63
  - lib/mkmf/lite.rb
64
+ - lib/mkmf/templates/have_func.erb
69
65
  - lib/mkmf/templates/have_func_pointer.erb
70
66
  - lib/mkmf/templates/have_header.erb
71
- - lib/mkmf/templates/have_func.erb
72
67
  - lib/mkmf/templates/have_struct_member.erb
68
+ - MANIFEST
69
+ - mkmf-lite.gemspec
70
+ - Rakefile
71
+ - README
72
+ - test/test_mkmf_lite.rb
73
73
  has_rdoc: true
74
74
  homepage: http://www.rubyforge.org/projects/shards
75
75
  licenses: