hitimes 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,5 +1,11 @@
1
1
  = Changelog
2
2
 
3
+ == Version 0.3.0
4
+
5
+ * switched to extconf for building extensions
6
+ * first release of windows binary gem
7
+ * reverted back to normal rdoc
8
+
3
9
  == Version 0.2.1
4
10
 
5
11
  * added Timer#rate method
@@ -0,0 +1,15 @@
1
+ require 'rbconfig'
2
+ require 'mkmf'
3
+
4
+ if Config::CONFIG['host_os'] =~ /darwin/ then
5
+ $CFLAGS += " -DUSE_INSTANT_OSX=1"
6
+ $LDFLAGS += " -framework CoreServices"
7
+ elsif Config::CONFIG['host_os'] =~ /win32/ or Config::CONFIG['host_os'] =~ /mingw/ then
8
+ $CFLAGS += " -DUSE_INSTANT_WINDOWS=1"
9
+ else
10
+ if have_library("rt", "clock_gettime") then
11
+ $CFLAGS += " -DUSE_INSTANT_CLOCK_GETTIME=1"
12
+ end
13
+ end
14
+
15
+ create_makefile('hitimes_ext')
@@ -0,0 +1,178 @@
1
+
2
+ # This file was created by mkconfig.rb when ruby was built. Any
3
+ # changes made to this file will be lost the next time ruby is built.
4
+
5
+ module Config
6
+ RUBY_VERSION == "1.8.6" or
7
+ raise "ruby lib version (1.8.6) doesn't match executable version (#{RUBY_VERSION})"
8
+
9
+ TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
10
+ DESTDIR = '' unless defined? DESTDIR
11
+ CONFIG = {}
12
+ CONFIG["DESTDIR"] = DESTDIR
13
+ CONFIG["INSTALL"] = '/opt/local/bin/ginstall -c'
14
+ CONFIG["prefix"] = (TOPDIR || DESTDIR + "#{ENV["HOME"]}/ruby-mingw32")
15
+ CONFIG["EXEEXT"] = ".exe"
16
+ CONFIG["ruby_install_name"] = "ruby"
17
+ CONFIG["RUBY_INSTALL_NAME"] = "ruby"
18
+ CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
19
+ CONFIG["SHELL"] = "/bin/sh"
20
+ CONFIG["PATH_SEPARATOR"] = ":"
21
+ CONFIG["PACKAGE_NAME"] = ""
22
+ CONFIG["PACKAGE_TARNAME"] = ""
23
+ CONFIG["PACKAGE_VERSION"] = ""
24
+ CONFIG["PACKAGE_STRING"] = ""
25
+ CONFIG["PACKAGE_BUGREPORT"] = ""
26
+ CONFIG["exec_prefix"] = "$(prefix)"
27
+ CONFIG["bindir"] = "$(exec_prefix)/bin"
28
+ CONFIG["sbindir"] = "$(exec_prefix)/sbin"
29
+ CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
30
+ CONFIG["datarootdir"] = "$(prefix)/share"
31
+ CONFIG["datadir"] = "$(datarootdir)"
32
+ CONFIG["sysconfdir"] = "$(prefix)/etc"
33
+ CONFIG["sharedstatedir"] = "$(prefix)/com"
34
+ CONFIG["localstatedir"] = "$(prefix)/var"
35
+ CONFIG["includedir"] = "$(prefix)/include"
36
+ CONFIG["oldincludedir"] = "/usr/include"
37
+ CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
38
+ CONFIG["infodir"] = "$(datarootdir)/info"
39
+ CONFIG["htmldir"] = "$(docdir)"
40
+ CONFIG["dvidir"] = "$(docdir)"
41
+ CONFIG["pdfdir"] = "$(docdir)"
42
+ CONFIG["psdir"] = "$(docdir)"
43
+ CONFIG["libdir"] = "$(exec_prefix)/lib"
44
+ CONFIG["localedir"] = "$(datarootdir)/locale"
45
+ CONFIG["mandir"] = "$(datarootdir)/man"
46
+ CONFIG["ECHO_C"] = ""
47
+ CONFIG["ECHO_N"] = "-n"
48
+ CONFIG["ECHO_T"] = ""
49
+ CONFIG["LIBS"] = "-lwsock32 "
50
+ CONFIG["build_alias"] = "i686-darwin9.2.2"
51
+ CONFIG["host_alias"] = "i386-mingw32"
52
+ CONFIG["target_alias"] = "i386-mingw32"
53
+ CONFIG["MAJOR"] = "1"
54
+ CONFIG["MINOR"] = "8"
55
+ CONFIG["TEENY"] = "6"
56
+ CONFIG["build"] = "i686-pc-darwin9.2.2"
57
+ CONFIG["build_cpu"] = "i686"
58
+ CONFIG["build_vendor"] = "pc"
59
+ CONFIG["build_os"] = "darwin9.2.2"
60
+ CONFIG["host"] = "i386-pc-mingw32"
61
+ CONFIG["host_cpu"] = "i386"
62
+ CONFIG["host_vendor"] = "pc"
63
+ CONFIG["host_os"] = "mingw32"
64
+ CONFIG["target"] = "i386-pc-mingw32"
65
+ CONFIG["target_cpu"] = "i386"
66
+ CONFIG["target_vendor"] = "pc"
67
+ CONFIG["target_os"] = "mingw32"
68
+ CONFIG["CC"] = "i386-mingw32-gcc"
69
+ CONFIG["CFLAGS"] = "-g -O2 "
70
+ CONFIG["LDFLAGS"] = "-L. "
71
+ CONFIG["CPPFLAGS"] = ""
72
+ CONFIG["OBJEXT"] = "o"
73
+ CONFIG["CPP"] = "i386-mingw32-gcc -E"
74
+ CONFIG["GREP"] = "/usr/bin/grep"
75
+ CONFIG["EGREP"] = "/usr/bin/grep -E"
76
+ CONFIG["GNU_LD"] = "yes"
77
+ CONFIG["CPPOUTFILE"] = "-o conftest.i"
78
+ CONFIG["OUTFLAG"] = "-o "
79
+ CONFIG["YACC"] = "bison -y"
80
+ CONFIG["YFLAGS"] = ""
81
+ CONFIG["RANLIB"] = "i386-mingw32-ranlib"
82
+ CONFIG["AR"] = "i386-mingw32-ar"
83
+ CONFIG["AS"] = "i386-mingw32-as"
84
+ CONFIG["ASFLAGS"] = ""
85
+ CONFIG["NM"] = "i386-mingw32-nm"
86
+ CONFIG["WINDRES"] = "i386-mingw32-windres"
87
+ CONFIG["DLLWRAP"] = "i386-mingw32-dllwrap"
88
+ CONFIG["OBJDUMP"] = "i386-mingw32-objdump"
89
+ CONFIG["LN_S"] = "ln -s"
90
+ CONFIG["SET_MAKE"] = ""
91
+ CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
92
+ CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
93
+ CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
94
+ CONFIG["RM"] = "rm -f"
95
+ CONFIG["CP"] = "cp"
96
+ CONFIG["MAKEDIRS"] = "mkdir -p"
97
+ CONFIG["ALLOCA"] = ""
98
+ CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
99
+ CONFIG["ARCH_FLAG"] = ""
100
+ CONFIG["STATIC"] = ""
101
+ CONFIG["CCDLFLAGS"] = ""
102
+ CONFIG["LDSHARED"] = "i386-mingw32-gcc -shared -s"
103
+ CONFIG["DLEXT"] = "so"
104
+ CONFIG["DLEXT2"] = "dll"
105
+ CONFIG["LIBEXT"] = "a"
106
+ CONFIG["LINK_SO"] = ""
107
+ CONFIG["LIBPATHFLAG"] = " -L\"%s\""
108
+ CONFIG["RPATHFLAG"] = ""
109
+ CONFIG["LIBPATHENV"] = ""
110
+ CONFIG["TRY_LINK"] = ""
111
+ CONFIG["STRIP"] = "strip"
112
+ CONFIG["EXTSTATIC"] = ""
113
+ CONFIG["setup"] = "Setup"
114
+ CONFIG["MINIRUBY"] = "ruby -I/Users/jeremy/pkgs/ruby-1.8.6-p114 -rfake"
115
+ CONFIG["PREP"] = "fake.rb"
116
+ CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
117
+ CONFIG["EXTOUT"] = ".ext"
118
+ CONFIG["ARCHFILE"] = ""
119
+ CONFIG["RDOCTARGET"] = ""
120
+ CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
121
+ CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000"
122
+ CONFIG["LIBRUBY_LDSHARED"] = "i386-mingw32-gcc -shared -s"
123
+ CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
124
+ CONFIG["rubyw_install_name"] = "rubyw"
125
+ CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
126
+ CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
127
+ CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
128
+ CONFIG["LIBRUBY_ALIASES"] = ""
129
+ CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
130
+ CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
131
+ CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
132
+ CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
133
+ CONFIG["SOLIBS"] = "$(LIBS)"
134
+ CONFIG["DLDLIBS"] = ""
135
+ CONFIG["ENABLE_SHARED"] = "yes"
136
+ CONFIG["MAINLIBS"] = ""
137
+ CONFIG["COMMON_LIBS"] = "m"
138
+ CONFIG["COMMON_MACROS"] = ""
139
+ CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
140
+ CONFIG["EXPORT_PREFIX"] = ""
141
+ CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
142
+ CONFIG["arch"] = "i386-mingw32"
143
+ CONFIG["sitearch"] = "i386-msvcrt"
144
+ CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
145
+ CONFIG["configure_args"] = " '--host=i386-mingw32' '--target=i386-mingw32' '--build=i686-darwin9.2.2' '--prefix=/Users/jeremy/ruby-mingw32' 'build_alias=i686-darwin9.2.2' 'host_alias=i386-mingw32' 'target_alias=i386-mingw32'"
146
+ CONFIG["NROFF"] = "/usr/bin/nroff"
147
+ CONFIG["MANTYPE"] = "doc"
148
+ CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
149
+ CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
150
+ CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
151
+ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
152
+ CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
153
+ CONFIG["topdir"] = File.dirname(__FILE__)
154
+ MAKEFILE_CONFIG = {}
155
+ CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
156
+ def Config::expand(val, config = CONFIG)
157
+ val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
158
+ if !(v = $1 || $2)
159
+ '$'
160
+ elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
161
+ pat, sub = $1, $2
162
+ config[v] = false
163
+ Config::expand(key, config)
164
+ config[v] = key
165
+ key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
166
+ key
167
+ else
168
+ var
169
+ end
170
+ end
171
+ val
172
+ end
173
+ CONFIG.each_value do |val|
174
+ Config::expand(val)
175
+ end
176
+ end
177
+ RbConfig = Config # compatibility for ruby-1.9
178
+ CROSS_COMPILING = nil unless defined? CROSS_COMPILING
@@ -0,0 +1,178 @@
1
+
2
+ # This file was created by mkconfig.rb when ruby was built. Any
3
+ # changes made to this file will be lost the next time ruby is built.
4
+
5
+ module Config
6
+ RUBY_VERSION == "1.8.6" or
7
+ raise "ruby lib version (1.8.6) doesn't match executable version (#{RUBY_VERSION})"
8
+
9
+ TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
10
+ DESTDIR = '' unless defined? DESTDIR
11
+ CONFIG = {}
12
+ CONFIG["DESTDIR"] = DESTDIR
13
+ CONFIG["INSTALL"] = '/opt/local/bin/ginstall -c'
14
+ CONFIG["prefix"] = (TOPDIR || DESTDIR + "#{ENV["HOME"]}/ruby-mingw32")
15
+ CONFIG["EXEEXT"] = ".exe"
16
+ CONFIG["ruby_install_name"] = "ruby"
17
+ CONFIG["RUBY_INSTALL_NAME"] = "ruby"
18
+ CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
19
+ CONFIG["SHELL"] = "/bin/sh"
20
+ CONFIG["PATH_SEPARATOR"] = ":"
21
+ CONFIG["PACKAGE_NAME"] = ""
22
+ CONFIG["PACKAGE_TARNAME"] = ""
23
+ CONFIG["PACKAGE_VERSION"] = ""
24
+ CONFIG["PACKAGE_STRING"] = ""
25
+ CONFIG["PACKAGE_BUGREPORT"] = ""
26
+ CONFIG["exec_prefix"] = "$(prefix)"
27
+ CONFIG["bindir"] = "$(exec_prefix)/bin"
28
+ CONFIG["sbindir"] = "$(exec_prefix)/sbin"
29
+ CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
30
+ CONFIG["datarootdir"] = "$(prefix)/share"
31
+ CONFIG["datadir"] = "$(datarootdir)"
32
+ CONFIG["sysconfdir"] = "$(prefix)/etc"
33
+ CONFIG["sharedstatedir"] = "$(prefix)/com"
34
+ CONFIG["localstatedir"] = "$(prefix)/var"
35
+ CONFIG["includedir"] = "$(prefix)/include"
36
+ CONFIG["oldincludedir"] = "/usr/include"
37
+ CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
38
+ CONFIG["infodir"] = "$(datarootdir)/info"
39
+ CONFIG["htmldir"] = "$(docdir)"
40
+ CONFIG["dvidir"] = "$(docdir)"
41
+ CONFIG["pdfdir"] = "$(docdir)"
42
+ CONFIG["psdir"] = "$(docdir)"
43
+ CONFIG["libdir"] = "$(exec_prefix)/lib"
44
+ CONFIG["localedir"] = "$(datarootdir)/locale"
45
+ CONFIG["mandir"] = "$(datarootdir)/man"
46
+ CONFIG["ECHO_C"] = ""
47
+ CONFIG["ECHO_N"] = "-n"
48
+ CONFIG["ECHO_T"] = ""
49
+ CONFIG["LIBS"] = "-lwsock32 "
50
+ CONFIG["build_alias"] = "i686-darwin9.2.2"
51
+ CONFIG["host_alias"] = "i386-mingw32"
52
+ CONFIG["target_alias"] = "i386-mingw32"
53
+ CONFIG["MAJOR"] = "1"
54
+ CONFIG["MINOR"] = "8"
55
+ CONFIG["TEENY"] = "6"
56
+ CONFIG["build"] = "i686-pc-darwin9.2.2"
57
+ CONFIG["build_cpu"] = "i686"
58
+ CONFIG["build_vendor"] = "pc"
59
+ CONFIG["build_os"] = "darwin9.2.2"
60
+ CONFIG["host"] = "i386-pc-mingw32"
61
+ CONFIG["host_cpu"] = "i386"
62
+ CONFIG["host_vendor"] = "pc"
63
+ CONFIG["host_os"] = "mingw32"
64
+ CONFIG["target"] = "i386-pc-mingw32"
65
+ CONFIG["target_cpu"] = "i386"
66
+ CONFIG["target_vendor"] = "pc"
67
+ CONFIG["target_os"] = "mingw32"
68
+ CONFIG["CC"] = "i386-mingw32-gcc"
69
+ CONFIG["CFLAGS"] = "-g -O2 "
70
+ CONFIG["LDFLAGS"] = "-L. "
71
+ CONFIG["CPPFLAGS"] = ""
72
+ CONFIG["OBJEXT"] = "o"
73
+ CONFIG["CPP"] = "i386-mingw32-gcc -E"
74
+ CONFIG["GREP"] = "/usr/bin/grep"
75
+ CONFIG["EGREP"] = "/usr/bin/grep -E"
76
+ CONFIG["GNU_LD"] = "yes"
77
+ CONFIG["CPPOUTFILE"] = "-o conftest.i"
78
+ CONFIG["OUTFLAG"] = "-o "
79
+ CONFIG["YACC"] = "bison -y"
80
+ CONFIG["YFLAGS"] = ""
81
+ CONFIG["RANLIB"] = "i386-mingw32-ranlib"
82
+ CONFIG["AR"] = "i386-mingw32-ar"
83
+ CONFIG["AS"] = "i386-mingw32-as"
84
+ CONFIG["ASFLAGS"] = ""
85
+ CONFIG["NM"] = "i386-mingw32-nm"
86
+ CONFIG["WINDRES"] = "i386-mingw32-windres"
87
+ CONFIG["DLLWRAP"] = "i386-mingw32-dllwrap"
88
+ CONFIG["OBJDUMP"] = "i386-mingw32-objdump"
89
+ CONFIG["LN_S"] = "ln -s"
90
+ CONFIG["SET_MAKE"] = ""
91
+ CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
92
+ CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
93
+ CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
94
+ CONFIG["RM"] = "rm -f"
95
+ CONFIG["CP"] = "cp"
96
+ CONFIG["MAKEDIRS"] = "mkdir -p"
97
+ CONFIG["ALLOCA"] = ""
98
+ CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
99
+ CONFIG["ARCH_FLAG"] = ""
100
+ CONFIG["STATIC"] = ""
101
+ CONFIG["CCDLFLAGS"] = ""
102
+ CONFIG["LDSHARED"] = "i386-mingw32-gcc -shared -s"
103
+ CONFIG["DLEXT"] = "so"
104
+ CONFIG["DLEXT2"] = "dll"
105
+ CONFIG["LIBEXT"] = "a"
106
+ CONFIG["LINK_SO"] = ""
107
+ CONFIG["LIBPATHFLAG"] = " -L\"%s\""
108
+ CONFIG["RPATHFLAG"] = ""
109
+ CONFIG["LIBPATHENV"] = ""
110
+ CONFIG["TRY_LINK"] = ""
111
+ CONFIG["STRIP"] = "strip"
112
+ CONFIG["EXTSTATIC"] = ""
113
+ CONFIG["setup"] = "Setup"
114
+ CONFIG["MINIRUBY"] = "ruby -I/Users/jeremy/pkgs/ruby-1.8.6-p114 -rfake"
115
+ CONFIG["PREP"] = "fake.rb"
116
+ CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
117
+ CONFIG["EXTOUT"] = ".ext"
118
+ CONFIG["ARCHFILE"] = ""
119
+ CONFIG["RDOCTARGET"] = ""
120
+ CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
121
+ CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000"
122
+ CONFIG["LIBRUBY_LDSHARED"] = "i386-mingw32-gcc -shared -s"
123
+ CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
124
+ CONFIG["rubyw_install_name"] = "rubyw"
125
+ CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
126
+ CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
127
+ CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
128
+ CONFIG["LIBRUBY_ALIASES"] = ""
129
+ CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
130
+ CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
131
+ CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
132
+ CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
133
+ CONFIG["SOLIBS"] = "$(LIBS)"
134
+ CONFIG["DLDLIBS"] = ""
135
+ CONFIG["ENABLE_SHARED"] = "yes"
136
+ CONFIG["MAINLIBS"] = ""
137
+ CONFIG["COMMON_LIBS"] = "m"
138
+ CONFIG["COMMON_MACROS"] = ""
139
+ CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
140
+ CONFIG["EXPORT_PREFIX"] = ""
141
+ CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
142
+ CONFIG["arch"] = "i386-mingw32"
143
+ CONFIG["sitearch"] = "i386-msvcrt"
144
+ CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
145
+ CONFIG["configure_args"] = " '--host=i386-mingw32' '--target=i386-mingw32' '--build=i686-darwin9.2.2' '--prefix=/Users/jeremy/ruby-mingw32' 'build_alias=i686-darwin9.2.2' 'host_alias=i386-mingw32' 'target_alias=i386-mingw32'"
146
+ CONFIG["NROFF"] = "/usr/bin/nroff"
147
+ CONFIG["MANTYPE"] = "doc"
148
+ CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
149
+ CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
150
+ CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
151
+ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
152
+ CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
153
+ CONFIG["topdir"] = File.dirname(__FILE__)
154
+ MAKEFILE_CONFIG = {}
155
+ CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
156
+ def Config::expand(val, config = CONFIG)
157
+ val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
158
+ if !(v = $1 || $2)
159
+ '$'
160
+ elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
161
+ pat, sub = $1, $2
162
+ config[v] = false
163
+ Config::expand(key, config)
164
+ config[v] = key
165
+ key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
166
+ key
167
+ else
168
+ var
169
+ end
170
+ end
171
+ val
172
+ end
173
+ CONFIG.each_value do |val|
174
+ Config::expand(val)
175
+ end
176
+ end
177
+ RbConfig = Config # compatibility for ruby-1.9
178
+ CROSS_COMPILING = nil unless defined? CROSS_COMPILING
data/gemspec.rb CHANGED
@@ -45,5 +45,11 @@ Hitimes::GEM_SPEC = Gem::Specification.new do |spec|
45
45
  if rf = Configuration.for_if_exist?('rubyforge') then
46
46
  spec.rubyforge_project = rf.project
47
47
  end
48
-
49
48
  end
49
+
50
+ Hitimes::GEM_SPEC_WIN = Hitimes::GEM_SPEC.clone
51
+ Hitimes::GEM_SPEC_WIN.platform = ::Gem::Platform.new( "i386-mswin32_60" )
52
+ Hitimes::GEM_SPEC_WIN.extensions = []
53
+ Hitimes::GEM_SPEC_WIN.files += ["lib/hitimes_ext.so"]
54
+
55
+ Hitimes::SPECS = [ Hitimes::GEM_SPEC, Hitimes::GEM_SPEC_WIN ]
@@ -10,8 +10,8 @@ module Hitimes
10
10
  module Version
11
11
 
12
12
  MAJOR = 0
13
- MINOR = 2
14
- BUILD = 1
13
+ MINOR = 3
14
+ BUILD = 0
15
15
 
16
16
  #
17
17
  # :call-seq:
@@ -83,7 +83,7 @@ Configuration.for('rdoc') {
83
83
  files Configuration.for('packaging').files.rdoc
84
84
  main_page files.first
85
85
  title Configuration.for('project').name
86
- options %w[ --line-numbers --inline-source -f darkfish ]
86
+ options %w[ --line-numbers --inline-source ]#-f darkfish ]
87
87
  output_dir "doc"
88
88
  }
89
89
 
@@ -34,12 +34,20 @@ if pkg_config = Configuration.for_if_exist?("packaging") then
34
34
  desc "reinstall gem"
35
35
  task :reinstall => [:uninstall, :repackage, :install]
36
36
 
37
+ desc "package up a windows gem"
38
+ task :package_win => "ext:build_win" do
39
+ cp "ext/hitimes_ext.so", "lib", :verbose => true
40
+ Gem::Builder.new( Hitimes::GEM_SPEC_WIN ).build
41
+ mv Dir["*.gem"].first, "pkg"
42
+ end
43
+
37
44
  desc "distribute copiously"
38
- task :copious => [:package] do
39
- Rake::SshFilePublisher.new('jeremy@copiousfreetime.org',
45
+ task :copious => [:package, :package_win ] do
46
+ gems = Hitimes::SPECS.collect { |s| "#{s.full_name}.gem" }
47
+ Rake::SshFilePublisher.new('jeremy@copiousfreetime.org',
40
48
  '/var/www/vhosts/www.copiousfreetime.org/htdocs/gems/gems',
41
- 'pkg',"#{Hitimes::GEM_SPEC.full_name}.gem").upload
42
- sh "ssh jeremy@copiousfreetime.org rake -f /var/www/vhosts/www.copiousfreetime.org/htdocs/gems/Rakefile"
49
+ 'pkg', *gems).upload
50
+ sh "ssh jeremy@copiousfreetime.org rake -f /var/www/vhosts/www.copiousfreetime.org/htdocs/gems/Rakefile"
43
51
  end
44
52
  end
45
53
  end
@@ -9,8 +9,8 @@ if rdoc_config = Configuration.for_if_exist?('rdoc') then
9
9
  namespace :doc do
10
10
 
11
11
  require 'rake/rdoctask'
12
- gem 'darkfish-rdoc'
13
- require 'darkfish-rdoc'
12
+ #gem 'darkfish-rdoc'
13
+ #require 'darkfish-rdoc'
14
14
 
15
15
  # generating documentation locally
16
16
  Rake::RDocTask.new do |rdoc|
@@ -15,18 +15,34 @@ if ext_config = Configuration.for_if_exist?('extension') then
15
15
  conf = parts.last
16
16
  Dir.chdir(path.dirname) do |d|
17
17
  ruby conf.to_s
18
- sh "rake default"
18
+ #sh "rake default"
19
+ sh "make"
19
20
  end
20
21
  end
21
22
  end
22
23
 
24
+ desc "Build the extension for windows"
25
+ task :build_win => :clobber do
26
+ Hitimes::GEM_SPEC.extensions.each do |extension|
27
+ path = Pathname.new(extension)
28
+ parts = path.split
29
+ conf = parts.last
30
+ Dir.chdir(path.dirname) do |d|
31
+ cp "rbconfig-mingw.rb", "rbconfig.rb"
32
+ sh "ruby -I. extconf.rb"
33
+ sh "make"
34
+ end
35
+ end
36
+ end
37
+
23
38
  task :clean do
24
39
  ext_config.configs.each do |extension|
25
40
  path = Pathname.new(extension)
26
41
  parts = path.split
27
42
  conf = parts.last
28
43
  Dir.chdir(path.dirname) do |d|
29
- sh "rake clean"
44
+ #sh "rake clean"
45
+ sh "make clean"
30
46
  end
31
47
  end
32
48
  end
@@ -37,7 +53,10 @@ if ext_config = Configuration.for_if_exist?('extension') then
37
53
  parts = path.split
38
54
  conf = parts.last
39
55
  Dir.chdir(path.dirname) do |d|
40
- sh "rake clobber"
56
+ #sh "rake clobber"
57
+ if File.exist?( "Makefile" ) then
58
+ sh "make distclean"
59
+ end
41
60
  end
42
61
  end
43
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Hinegardner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-28 00:00:00 -06:00
12
+ date: 2008-10-11 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -47,7 +47,7 @@ email: jeremy@copiousfreetime.org
47
47
  executables: []
48
48
 
49
49
  extensions:
50
- - ext/mkrf_conf.rb
50
+ - ext/extconf.rb
51
51
  extra_rdoc_files:
52
52
  - README
53
53
  - HISTORY
@@ -73,7 +73,9 @@ files:
73
73
  - ext/hitimes_stats.c
74
74
  - ext/hitimes_interval.h
75
75
  - ext/hitimes_stats.h
76
- - ext/mkrf_conf.rb
76
+ - ext/extconf.rb
77
+ - ext/rbconfig-mingw.rb
78
+ - ext/rbconfig.rb
77
79
  - lib/hitimes/paths.rb
78
80
  - lib/hitimes/timer.rb
79
81
  - lib/hitimes/version.rb
@@ -103,8 +105,6 @@ post_install_message:
103
105
  rdoc_options:
104
106
  - --line-numbers
105
107
  - --inline-source
106
- - -f
107
- - darkfish
108
108
  - --main
109
109
  - README
110
110
  require_paths:
@@ -1,20 +0,0 @@
1
- require 'rubygems'
2
- require 'mkrf'
3
- require 'rbconfig'
4
-
5
- Mkrf::Generator.new('hitimes_ext') do |g|
6
- g.logger.level = Logger::WARN
7
-
8
- if Config::CONFIG['host_os'] =~ /darwin/ then
9
- g.add_define "USE_INSTANT_OSX=1"
10
- g.additional_code = "LIBS.concat(' -framework CoreServices')"
11
- elsif Config::CONFIG['host_os'] =~ /win32/ then
12
- g.add_define "USE_INSTANT_WINDOWS=1"
13
- else
14
- g.include_library("rt")
15
- if g.has_function?( 'clock_gettime' ) then
16
- g.add_define "USE_INSTANT_CLOCK_GETTIME=1"
17
- end
18
- end
19
-
20
- end