bluecloth 2.0.6.pre120-x86-mswin32 → 2.0.6.pre122-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,10 @@
1
- 120[tip] 5bae8ff5846f 2010-01-15 20:06 -0800 ged
1
+ 122[tip] 0cc074237b75 2010-01-16 16:32 -0800 ged
2
+ Rakefile changes:
3
+
4
+ 121 0e3195e9fb3e 2010-01-16 16:24 -0800 ged
5
+ It helps if you require the right library...
6
+
7
+ 120 5bae8ff5846f 2010-01-15 20:06 -0800 ged
2
8
  Add version-specific extension-loading for native gems.
3
9
 
4
10
  119 e04eccd695ee 2010-01-14 09:00 -0800 ged
data/Rakefile CHANGED
@@ -265,12 +265,6 @@ GEMSPEC = Gem::Specification.new do |gem|
265
265
  end
266
266
  end
267
267
 
268
-
269
- task :prerelease do
270
- GEMSPEC.version.version += '.' + PKG_BUILD
271
- end
272
-
273
-
274
268
  $trace = Rake.application.options.trace ? true : false
275
269
  $dryrun = Rake.application.options.dryrun ? true : false
276
270
  $include_dev_dependencies = false
data/Rakefile.local CHANGED
@@ -37,7 +37,5 @@ Rake::ExtensionTask.new do |ext|
37
37
  ext.cross_platform = %w[i386-mswin32 i386-mingw32]
38
38
  end
39
39
 
40
- WINFAT_DIRS = Rake::FileList[ LIBDIR + '{1.8,1.9}' ]
41
-
42
- CLEAN.include( WINFAT_DIRS )
40
+ CLEAN.include( "#{LIBDIR + '1.8'}", "#{LIBDIR + '1.9'}" )
43
41
 
Binary file
Binary file
data/lib/bluecloth.rb CHANGED
@@ -151,7 +151,7 @@ end # class BlueCloth
151
151
  if RUBY_PLATFORM =~/(mswin|mingw)/i
152
152
  major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or
153
153
  raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}"
154
- require "#{major_minor}/nokogiri"
154
+ require "#{major_minor}/bluecloth_ext"
155
155
  else
156
156
  require 'bluecloth_ext'
157
157
  end
data/rake/helpers.rb CHANGED
@@ -174,6 +174,7 @@ end
174
174
 
175
175
  ### Return the fully-qualified path to the specified +program+ in the PATH.
176
176
  def which( program )
177
+ return nil unless ENV['PATH']
177
178
  ENV['PATH'].split(/:/).
178
179
  collect {|dir| Pathname.new(dir) + program }.
179
180
  find {|path| path.exist? && path.executable? }
data/rake/packaging.rb CHANGED
@@ -4,12 +4,17 @@
4
4
 
5
5
  require 'rbconfig'
6
6
  require 'pathname'
7
- require 'rake/packagetask'
8
- require 'rake/gempackagetask'
7
+ require 'rubygems/package_task'
9
8
 
10
9
 
11
10
  include Config
12
11
 
12
+ desc "Append the package build number to package versions"
13
+ task :prerelease do
14
+ GEMSPEC.version.version += ".#{PKG_BUILD}"
15
+ end
16
+
17
+
13
18
  ### Task: gem
14
19
  ### Task: package
15
20
  Rake::PackageTask.new( PKG_NAME, PKG_VERSION ) do |task|
@@ -22,20 +27,11 @@ end
22
27
  task :package => [:gem]
23
28
 
24
29
 
25
- ### Task: gem
26
- # gempath = PKGDIR + GEM_FILE_NAME
27
- #
28
- # desc "Build a RubyGem package (#{GEM_FILE_NAME})"
29
- # task :gem => gempath.to_s
30
- # file gempath.to_s => [PKGDIR.to_s] + GEMSPEC.files do
31
- # when_writing( "Creating GEM" ) do
32
- # Gem::Builder.new( GEMSPEC ).build
33
- # verbose( true ) do
34
- # mv GEM_FILE_NAME, gempath
35
- # end
36
- # end
37
- # end
38
- #
30
+ Gem::PackageTask.new( GEMSPEC ) do |pkg|
31
+ pkg.need_zip = true
32
+ pkg.need_tar = true
33
+ end
34
+
39
35
 
40
36
  ### Task: install
41
37
  desc "Install #{PKG_NAME} as a conventional library"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluecloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6.pre120
4
+ version: 2.0.6.pre122
5
5
  platform: x86-mswin32
6
6
  authors:
7
7
  - Michael Granger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-15 00:00:00 -08:00
12
+ date: 2010-01-17 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -87,7 +87,6 @@ files:
87
87
  - rake/svn.rb
88
88
  - rake/testing.rb
89
89
  - rake/verifytask.rb
90
- - rake/win32.rb
91
90
  - ./LICENSE.discount
92
91
  - ./spec/data/antsugar.txt
93
92
  - ./spec/data/ml-announce.txt
data/rake/win32.rb DELETED
@@ -1,190 +0,0 @@
1
- #
2
- # Win32-specific tasks (cross-compiling, etc.)
3
- #
4
- # Thanks to some people that understand this stuff better than me for
5
- # posting helpful blog posts. This stuff is an amalgam of stuff they did:
6
- #
7
- # * Mauricio Fernandez
8
- # http://eigenclass.org/hiki/cross+compiling+rcovrt
9
- #
10
- # * Jeremy Hinegardner
11
- # http://www.copiousfreetime.org/articles/2008/10/12/building-gems-for-windows.html
12
- #
13
- # * Aaron Patterson
14
- # http://tenderlovemaking.com/2008/11/21/cross-compiling-ruby-gems-for-win32/
15
-
16
- require 'rubygems'
17
- require 'rake'
18
- require 'pathname'
19
- require 'rubygems/platform'
20
- require 'rbconfig'
21
- require 'uri'
22
- require 'net/ftp'
23
-
24
- HOMEDIR = Pathname( '~' ).expand_path
25
- RUBYVERSION = '1.8.6-p287'
26
- RUBYVERSION_MAJORMINOR = RUBYVERSION[/^\d+\.\d+/]
27
-
28
- RUBY_DL_BASE = "ftp://ftp.ruby-lang.org/pub/ruby/#{RUBYVERSION_MAJORMINOR}/"
29
- RUBY_DL_URI = URI( RUBY_DL_BASE + "ruby-#{RUBYVERSION}.tar.gz" )
30
-
31
- XCOMPILER_DIR = HOMEDIR + '.ruby_mingw32'
32
-
33
- XCOMPILER_DL = XCOMPILER_DIR + "ruby-#{RUBYVERSION}.tar.gz"
34
- XCOMPILER_SRC = XCOMPILER_DIR + "ruby-#{RUBYVERSION}"
35
-
36
- XCOMPILER_BIN = XCOMPILER_DIR + 'bin'
37
- XCOMPILER_LIB = XCOMPILER_DIR + 'lib'
38
- XCOMPILER_RUBY = XCOMPILER_BIN + 'ruby.exe'
39
-
40
- XCOMPILER_LOAD_PATH = XCOMPILER_LIB + "ruby/#{RUBYVERSION_MAJORMINOR}/i386-mingw32"
41
-
42
- TAR_OPTS = { :compression => :gzip }
43
-
44
- WIN32_GEMSPEC = GEMSPEC.dup
45
- WIN32_GEMSPEC.files += FileList[ EXTDIR + '**.{dll,so}' ]
46
- WIN32_GEMSPEC.platform = Gem::Platform.new( 'i386-mingw32' )
47
- WIN32_GEMSPEC.extensions = []
48
-
49
-
50
- CONFIGURE_CMD = %W[
51
- env
52
- ac_cv_func_getpgrp_void=no
53
- ac_cv_func_setpgrp_void=yes
54
- rb_cv_negative_time_t=no
55
- ac_cv_func_memcmp_working=yes
56
- rb_cv_binary_elf=no
57
- ./configure
58
- --host=i386-mingw32
59
- --target=i386-mingw32
60
- --build=#{Config::CONFIG['build']}
61
- --prefix=#{XCOMPILER_DIR}
62
- ]
63
-
64
- ### Archive::Tar::Reader#extract (as of 0.9.0) is broken w.r.t.
65
- ### permissions, so we have to do this ourselves.
66
- def untar( tarfile, targetdir )
67
- targetdir = Pathname( targetdir )
68
- raise "No such directory: #{targetdir}" unless targetdir.directory?
69
-
70
- reader = Archive::Tar::Reader.new( tarfile.to_s, TAR_OPTS )
71
-
72
- mkdir_p( targetdir )
73
- reader.each( true ) do |header, body|
74
- path = targetdir + header[:path]
75
- # trace "Header is: %p" % [ header ]
76
-
77
- case header[:type]
78
- when :file
79
- trace " #{path}"
80
- path.open( File::WRONLY|File::EXCL|File::CREAT|File::TRUNC, header[:mode] ) do |fio|
81
- bytesize = header[:size]
82
- fio.write( body[0,bytesize] )
83
- end
84
-
85
- when :directory
86
- trace " #{path}"
87
- path.mkpath
88
-
89
- when :link
90
- linktarget = targetdir + header[:dest]
91
- trace " #{path} => #{linktarget}"
92
- path.make_link( linktarget.to_s )
93
-
94
- when :symlink
95
- linktarget = targetdir + header[:dest]
96
- trace " #{path} -> #{linktarget}"
97
- path.make_symlink( linktarget )
98
- end
99
- end
100
-
101
- end
102
-
103
-
104
- begin
105
- require 'archive/tar'
106
-
107
- namespace :win32 do
108
- directory XCOMPILER_DIR.to_s
109
-
110
- file XCOMPILER_DL => XCOMPILER_DIR do
111
- # openuri can't handle this -- passive ftp required?
112
- # run 'wget', '-O', XCOMPILER_DL, RUBY_DL_URI
113
- log "Downloading ruby distro from %s" % [ RUBY_DL_URI ]
114
- ftp = Net::FTP.new( RUBY_DL_URI.host )
115
- ftp.login
116
- ftp.getbinaryfile( RUBY_DL_URI.path, XCOMPILER_DL, 4096 )
117
- ftp.close
118
- end
119
-
120
- directory XCOMPILER_SRC.to_s
121
- task XCOMPILER_SRC => [ XCOMPILER_DIR, XCOMPILER_DL ] do
122
- if XCOMPILER_SRC.exist?
123
- trace "Rake fails. #{XCOMPILER_SRC} already exists."
124
- else
125
- untar( XCOMPILER_DL, XCOMPILER_DIR )
126
- end
127
- end
128
-
129
- file XCOMPILER_RUBY => XCOMPILER_SRC do
130
- Dir.chdir( XCOMPILER_SRC ) do
131
- unless File.exist?( 'Makefile.in.orig' )
132
- File.open( 'Makefile.in.new', IO::CREAT|IO::WRONLY|IO::EXCL ) do |ofh|
133
- IO.readlines( 'Makefile.in' ).each do |line|
134
- next if line.include?( 0.chr )
135
- trace " copying line: %p" % [ line ]
136
- line.sub!( /ALT_SEPARATOR = ".*?"/, "ALT_SEPARATOR = 92.chr" )
137
- ofh.write( line )
138
- end
139
- end
140
-
141
- mv 'Makefile.in', 'Makefile.in.orig'
142
- mv 'Makefile.in.new', 'Makefile.in'
143
- end
144
-
145
- run *CONFIGURE_CMD
146
- run 'make', 'ruby'
147
- run 'make', 'rubyw.exe'
148
- run 'make', 'install'
149
- end
150
- end
151
-
152
- file XCOMPILER_LOAD_PATH => XCOMPILER_RUBY
153
-
154
- desc "Cross-compile the library for Win32 systems, installing a cross-" +
155
- "compiled Ruby if necessary"
156
- task :build => [ EXTDIR, XCOMPILER_LOAD_PATH.to_s ] do
157
- in_subdirectory( EXTDIR ) do
158
- ruby "-I#{XCOMPILER_LOAD_PATH}", 'extconf.rb'
159
- sh 'make'
160
- end
161
- end
162
-
163
- desc "Build a binary gem for win32 systems"
164
- task :gem => ['win32:build', PKGDIR.to_s] + WIN32_GEMSPEC.files do
165
- when_writing( "Creating win32 GEM" ) do
166
- pkgname = WIN32_GEMSPEC.file_name
167
- builder = Gem::Builder.new( WIN32_GEMSPEC )
168
- builder.build
169
- mv pkgname, PKGDIR + pkgname, :verbose => $trace
170
- end
171
- end
172
- end
173
-
174
- rescue LoadError => err
175
- trace "Couldn't load the win32 tasks: %s: %s" % [ err.class.name, err.message ]
176
-
177
- task :no_win32_build do
178
- abort "No win32 build: %s: %s" % [ err.class.name, err.message ]
179
- end
180
-
181
- namespace :win32 do
182
- desc "Build a binary Gem for Win32 systems, installing a cross " +
183
- "compiled Ruby if necessary"
184
- task :gem => :no_win32_build
185
- task :build => :no_win32_build
186
- end
187
-
188
- end
189
-
190
-