fxruby 1.6.32.pre1-x86-mingw32 → 1.6.32.pre2-x86-mingw32

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: 2e5e7cd46f52afe225d1e85ad3decbef00cb7dbd
4
- data.tar.gz: 941c719f951e7f0c93ccb3e1c58eb45bbbd6c689
3
+ metadata.gz: e59b61f4c365d40f67de2544c6fcdcc811b65f01
4
+ data.tar.gz: 2bec786ad90d8c0ee2ec2fb38bec16ee2199e80e
5
5
  SHA512:
6
- metadata.gz: eab80d0e82739585e6c944a039e2521054a9d0e2eed04f3951fabb8ba74182f5e6e738554b33073c876901f80b8c3119b83c0d183cbd43e60eeb169d0ab30ffb
7
- data.tar.gz: 450524756d456a2e1864522c68f78cf76495dc63d8c6056f924e863bf1b3e95025e2b3dcc5c976770807126aebf12f9db6602fa38de317565702a058caf05df3
6
+ metadata.gz: 2b74fd7152adb6301a088483b2778df1a3dd7d14b360327c187bde113e208494470a31baedec248a76b15934959d9ab0b96547ad345064c2ee88a41c0af69ecc
7
+ data.tar.gz: b51e58802b0f274676d7482130a5fcf3be5ab8ef494221138c86b7ee6025bc937d486e690180cb1c3fe5183d6a1d75e3372bd404920034802f42ed1ee90bb8ce
data/History.txt CHANGED
@@ -3,6 +3,8 @@
3
3
  * Avoid call to rb_class2name() during GC. Fixes #21
4
4
  * Use release mode, unless extconf.rb is called with --enable-debug,
5
5
  so that all FXTRACE() and FXASSERT() calls are skiped, per default.
6
+ * Remove self made GC detection by ruby's rb_during_gc().
7
+ * Fix Windows binary x86-mingw32.gem for Ruby versions < 2.0
6
8
 
7
9
  === 1.6.31 / 2015-07-21
8
10
 
data/Rakefile CHANGED
@@ -98,19 +98,33 @@ Rake::ExtensionTask.new("fox16_c", hoe.spec) do |ext|
98
98
 
99
99
  # Add dependent DLLs to the cross gems
100
100
  ext.cross_compiling do |spec|
101
- plat = spec.platform
102
- dlls = Dir["tmp/#{plat}/#{ext.name}/*/*.dll"].map{|dll| File.basename(dll) }.uniq
103
- spec.files += dlls.map{|dll| "lib/#{plat}/#{dll}" }
104
-
105
- directory "tmp/#{plat}/stage/lib/#{plat}/"
106
- dlls.each do |dll|
107
- ENV['RUBY_CC_VERSION'].to_s.split(':').last.tap do |ruby_version|
108
- file "tmp/#{plat}/stage/lib/#{plat}/#{dll}" => ["tmp/#{plat}/stage/lib/#{plat}/", "tmp/#{plat}/#{ext.name}/#{ruby_version}/#{dll}"] do
109
- cp "tmp/#{plat}/#{ext.name}/#{ruby_version}/#{dll}", "tmp/#{plat}/stage/lib/#{plat}"
110
- sh "x86_64-w64-mingw32-strip", "tmp/#{plat}/stage/lib/#{plat}/#{dll}"
101
+ platform_host_map = {
102
+ 'x86-mingw32' => ['i586-mingw32msvc', 'i686-w64-mingw32'],
103
+ 'x64-mingw32' => ['x86_64-w64-mingw32'],
104
+ }
105
+
106
+ gemplat = spec.platform.to_s
107
+ platform_host_map[gemplat].each do |host|
108
+
109
+ gcc_shared_dlls = %w[libwinpthread-1.dll libgcc_s_dw2-1.dll libgcc_s_sjlj-1.dll libgcc_s_seh-1.dll libstdc++-6.dll]
110
+
111
+ dlls = gcc_shared_dlls.select{|dll| File.exist?("ports/#{host}/bin/#{dll}") }
112
+ dlls += [
113
+ "libfxscintilla-20.dll",
114
+ "libFOX-1.6-0.dll",
115
+ "libjpeg-8.dll",
116
+ "libpng15-15.dll",
117
+ "libtiff-5.dll",
118
+ "zlib1.dll",
119
+ ]
120
+
121
+ spec.files += dlls.map{|dll| "ports/#{host}/bin/#{dll}" }
122
+
123
+ dlls.each do |dll|
124
+ task "ports/#{host}/bin/#{dll}" do |t|
125
+ sh "x86_64-w64-mingw32-strip", t.name
111
126
  end
112
127
  end
113
- file "lib/#{plat}/#{dll}" => "tmp/#{plat}/stage/lib/#{plat}/#{dll}"
114
128
  end
115
129
  end
116
130
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'fileutils'
4
4
  require 'mkmf'
5
+ require 'mini_portile'
5
6
 
6
7
  def find_installed_fox_version
7
8
  stddirs = ["/usr/include/fox-1.6",
@@ -103,19 +104,64 @@ LIBFOX_SOURCE_URI = "http://ftp.fox-toolkit.org/pub/fox-#{LIBFOX_VERSION
103
104
  LIBFXSCINTILLA_VERSION = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0'
104
105
  LIBFXSCINTILLA_SOURCE_URI = "http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-#{LIBFXSCINTILLA_VERSION}.tar.gz"
105
106
 
107
+
108
+ class BuildRecipe < MiniPortile
109
+ def initialize(name, version, files)
110
+ super(name, version)
111
+ self.files = files
112
+ self.target = File.expand_path('../../../ports', __FILE__)
113
+ # Prefer host_alias over host in order to use i586-mingw32msvc as
114
+ # correct compiler prefix for cross build, but use host if not set.
115
+ self.host = consolidated_host(RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"])
116
+ self.patch_files = Dir[File.join(self.target, "patches", self.name, self.version, "*.diff")].sort
117
+ end
118
+
119
+ def consolidated_host(name)
120
+ name.gsub('i686-pc-mingw32', 'i586-mingw32msvc')
121
+ end
122
+
123
+ def configure_defaults
124
+ [
125
+ "--host=#{host}", # build for specific target (host)
126
+ "--disable-static",
127
+ "--enable-shared",
128
+ ]
129
+ end
130
+
131
+ def port_path
132
+ "#{target}/#{host}"
133
+ end
134
+
135
+ # When using rake-compiler-dock on Windows, the underlying Virtualbox shared
136
+ # folders don't support symlinks, but libiconv expects it for a build on
137
+ # Linux. We work around this limitation by using the temp dir for cooking.
138
+ def chdir_for_build
139
+ build_dir = ENV['RCD_HOST_RUBY_PLATFORM'].to_s =~ /mingw|mswin|cygwin/ ? '/tmp' : '.'
140
+ Dir.chdir(build_dir) do
141
+ yield
142
+ end
143
+ end
144
+
145
+ def cook_and_activate
146
+ checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{self.host}.installed")
147
+ unless File.exist?(checkpoint)
148
+ chdir_for_build do
149
+ self.cook
150
+ end
151
+ FileUtils.touch checkpoint
152
+ end
153
+ self.activate
154
+ self
155
+ end
156
+ end
157
+
106
158
  def do_rake_compiler_setup
107
159
  if enable_config("win32-cross")
108
160
  require 'mini_portile'
109
161
 
110
162
  dir_config("installed")
111
163
 
112
- host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
113
- libz_recipe = MiniPortile.new("libz", LIBZ_VERSION).tap do |recipe|
114
- recipe.files = [LIBZ_SOURCE_URI]
115
- recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
116
- # Prefer host_alias over host in order to use i586-mingw32msvc as
117
- # correct compiler prefix for cross build, but use host if not set.
118
- recipe.host = host
164
+ libz_recipe = BuildRecipe.new("libz", LIBZ_VERSION, [LIBZ_SOURCE_URI]).tap do |recipe|
119
165
  class << recipe
120
166
  def configure
121
167
  Dir.chdir work_path do
@@ -145,91 +191,30 @@ def do_rake_compiler_setup
145
191
  end
146
192
  end
147
193
 
148
- checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
149
- unless File.exist?(checkpoint)
150
- recipe.cook
151
- FileUtils.touch checkpoint
152
- end
153
- recipe.activate
194
+ recipe.cook_and_activate
154
195
  end
155
196
 
156
- libpng_recipe = MiniPortile.new("libpng", LIBPNG_VERSION).tap do |recipe|
157
- recipe.files = [LIBPNG_SOURCE_URI]
158
- recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
159
- # Prefer host_alias over host in order to use i586-mingw32msvc as
160
- # correct compiler prefix for cross build, but use host if not set.
161
- recipe.host = host
162
- recipe.configure_options = [
163
- "--host=#{recipe.host}",
164
- "--enable-shared",
165
- "--disable-static",
166
- ]
167
-
168
- checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
169
- unless File.exist?(checkpoint)
170
- with_env(
171
- 'CPPFLAGS' => "-I#{libz_recipe.path}/include",
172
- 'LDFLAGS' => "-L#{libz_recipe.path}/lib"
173
- ) do
174
- recipe.cook
175
- FileUtils.touch checkpoint
176
- end
197
+ libpng_recipe = BuildRecipe.new("libpng", LIBPNG_VERSION, [LIBPNG_SOURCE_URI]).tap do |recipe|
198
+ with_env(
199
+ 'CPPFLAGS' => "-I#{libz_recipe.path}/include",
200
+ 'LDFLAGS' => "-L#{libz_recipe.path}/lib"
201
+ ) do
202
+ recipe.cook_and_activate
177
203
  end
178
- recipe.activate
179
204
  end
180
205
 
181
- libjpeg_recipe = MiniPortile.new("libjpeg", LIBJPEG_VERSION).tap do |recipe|
182
- recipe.files = [LIBJPEG_SOURCE_URI]
183
- recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
184
- # Prefer host_alias over host in order to use i586-mingw32msvc as
185
- # correct compiler prefix for cross build, but use host if not set.
186
- recipe.host = host
187
- recipe.configure_options = [
188
- "--host=#{recipe.host}",
189
- "--enable-shared",
190
- "--disable-static",
191
- ]
192
-
193
- checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
194
- unless File.exist?(checkpoint)
195
- recipe.cook
196
- FileUtils.touch checkpoint
197
- end
198
- recipe.activate
206
+ libjpeg_recipe = BuildRecipe.new("libjpeg", LIBJPEG_VERSION, [LIBJPEG_SOURCE_URI]).tap do |recipe|
207
+ recipe.cook_and_activate
199
208
  end
200
209
 
201
- libtiff_recipe = MiniPortile.new("libtiff", LIBTIFF_VERSION).tap do |recipe|
202
- recipe.files = [LIBTIFF_SOURCE_URI]
203
- recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
204
- # Prefer host_alias over host in order to use i586-mingw32msvc as
205
- # correct compiler prefix for cross build, but use host if not set.
206
- recipe.host = host
207
- recipe.configure_options = [
208
- "--host=#{recipe.host}",
209
- "--enable-shared",
210
- "--disable-static",
211
- ]
212
-
213
- checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
214
- unless File.exist?(checkpoint)
215
- recipe.cook
216
- FileUtils.touch checkpoint
217
- end
218
- recipe.activate
210
+ libtiff_recipe = BuildRecipe.new("libtiff", LIBTIFF_VERSION, [LIBTIFF_SOURCE_URI]).tap do |recipe|
211
+ recipe.cook_and_activate
219
212
  end
220
213
 
221
- libfox_recipe = MiniPortile.new("libfox", LIBFOX_VERSION).tap do |recipe|
222
- recipe.files = [LIBFOX_SOURCE_URI]
223
- recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
224
- # Prefer host_alias over host in order to use i586-mingw32msvc as
225
- # correct compiler prefix for cross build, but use host if not set.
226
- recipe.host = host
227
- recipe.configure_options = [
228
- "--host=#{recipe.host}",
214
+ libfox_recipe = BuildRecipe.new("libfox", LIBFOX_VERSION, [LIBFOX_SOURCE_URI]).tap do |recipe|
215
+ recipe.configure_options += [
229
216
  "--without-xft",
230
217
  "--without-x",
231
- "--enable-shared",
232
- "--disable-static",
233
218
  enable_config("debug") ? "--enable-debug" : "--enable-release",
234
219
  ]
235
220
  class << recipe
@@ -239,30 +224,15 @@ def do_rake_compiler_setup
239
224
  end
240
225
  end
241
226
 
242
- checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
243
- unless File.exist?(checkpoint)
244
- with_env(
245
- "CPPFLAGS" => "-I#{libjpeg_recipe.path}/include -I#{libpng_recipe.path}/include -I#{libtiff_recipe.path}/include -I#{libz_recipe.path}/include",
246
- "LDFLAGS" => "-L#{libjpeg_recipe.path}/lib -L#{libpng_recipe.path}/lib -L#{libtiff_recipe.path}/lib -L#{libz_recipe.path}/lib"
247
- ) do
248
- recipe.cook
249
- FileUtils.touch checkpoint
250
- end
227
+ with_env(
228
+ "CPPFLAGS" => "-I#{libjpeg_recipe.path}/include -I#{libpng_recipe.path}/include -I#{libtiff_recipe.path}/include -I#{libz_recipe.path}/include",
229
+ "LDFLAGS" => "-L#{libjpeg_recipe.path}/lib -L#{libpng_recipe.path}/lib -L#{libtiff_recipe.path}/lib -L#{libz_recipe.path}/lib"
230
+ ) do
231
+ recipe.cook_and_activate
251
232
  end
252
- recipe.activate
253
233
  end
254
234
 
255
- libfxscintills_recipe = MiniPortile.new("libfxscintilla", LIBFXSCINTILLA_VERSION).tap do |recipe|
256
- recipe.files = [LIBFXSCINTILLA_SOURCE_URI]
257
- recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
258
- # Prefer host_alias over host in order to use i586-mingw32msvc as
259
- # correct compiler prefix for cross build, but use host if not set.
260
- recipe.host = host
261
- recipe.configure_options = [
262
- "--host=#{recipe.host}",
263
- "--enable-shared",
264
- "--disable-static",
265
- ]
235
+ libfxscintills_recipe = BuildRecipe.new("libfxscintilla", LIBFXSCINTILLA_VERSION, [LIBFXSCINTILLA_SOURCE_URI]).tap do |recipe|
266
236
  class << recipe
267
237
  attr_accessor :libfox_path
268
238
  def mk
@@ -282,44 +252,27 @@ def do_rake_compiler_setup
282
252
  end
283
253
  recipe.libfox_path = libfox_recipe.path
284
254
 
285
- checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
286
- unless File.exist?(checkpoint)
287
- with_env(
288
- 'PKG_CONFIG_PATH' => "#{libfox_recipe.path}/lib/pkgconfig"
289
- ) do
290
- recipe.cook
291
- FileUtils.touch checkpoint
292
- end
255
+ with_env(
256
+ 'PKG_CONFIG_PATH' => "#{libfox_recipe.path}/lib/pkgconfig"
257
+ ) do
258
+ recipe.cook_and_activate
293
259
  end
294
- recipe.activate
295
260
  end
296
261
  $autodetected_fxscintilla = true
297
262
 
298
263
  dir_config('libfox', "#{libfox_recipe.path}/include/fox-1.6", "#{libfox_recipe.path}/lib")
299
264
  dir_config('libfxscintilla', "#{libfxscintills_recipe.path}/include/fxscintilla", "#{libfxscintills_recipe.path}/lib")
300
265
 
301
- shared_dlls = [
302
- "#{libfxscintills_recipe.path}/bin/libfxscintilla-20.dll",
303
- "#{libfox_recipe.path}/bin/libFOX-1.6-0.dll",
304
- "#{libjpeg_recipe.path}/bin/libjpeg-8.dll",
305
- "#{libpng_recipe.path}/bin/libpng15-15.dll",
306
- "#{libtiff_recipe.path}/bin/libtiff-5.dll",
307
- "#{libz_recipe.path}/bin/zlib1.dll",
308
- ]
309
- shared_dlls.each do |dll|
310
- FileUtils.cp dll, '.', verbose: true
311
- end
312
-
313
266
  gcc_shared_dlls = %w[libwinpthread-1.dll libgcc_s_dw2-1.dll libgcc_s_sjlj-1.dll libgcc_s_seh-1.dll libstdc++-6.dll]
314
267
  gcc_shared_dlls.each do |dll|
315
- cmd = "#{CONFIG['CC']} -print-file-name=#{dll}"
268
+ cmd = "#{CONFIG['CC']} -print-file-name=\"#{dll}\""
316
269
  res = `#{cmd}`.chomp
317
270
  next if dll == res
318
271
  puts "#{cmd} => #{res}"
319
- FileUtils.cp `#{cmd}`.chomp, '.', verbose: true
272
+ FileUtils.cp `#{cmd}`.chomp, "#{libfox_recipe.path}/bin/", verbose: true
320
273
  end
321
274
 
322
- CONFIG['CXX'] = "#{host}-g++" # CXX setting must be prefixed for cross build
275
+ CONFIG['CXX'] = "#{libfox_recipe.host}-g++" # CXX setting must be prefixed for cross build
323
276
  CONFIG['CC'] += "\nCXX=#{CONFIG['CXX']}" # Hack CXX into Makefile for cross compilation
324
277
  CONFIG['LDSHARED'].gsub!('gcc', 'g++') # ensure C++ linker is used, so that libstdc++ is linked static
325
278
  $LDFLAGS += " -s" # remove symbol table informations from shared lib
data/lib/1.8/fox16_c.so CHANGED
Binary file
data/lib/1.9/fox16_c.so CHANGED
Binary file
data/lib/2.0/fox16_c.so CHANGED
Binary file
data/lib/2.1/fox16_c.so CHANGED
Binary file
data/lib/2.2/fox16_c.so CHANGED
Binary file
data/lib/fox16.rb CHANGED
@@ -6,11 +6,17 @@ rescue LoadError
6
6
  major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or
7
7
  raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}"
8
8
 
9
- # Set the PATH environment variable, so that libpq.dll can be found.
9
+ # Set the PATH environment variable, so that the DLLs can be found.
10
10
  old_path = ENV['PATH']
11
- ENV['PATH'] = "#{File.expand_path("../#{RUBY_PLATFORM.gsub("i386", "x86")}", __FILE__)};#{old_path}"
12
- require "#{major_minor}/fox16_c"
13
- ENV['PATH'] = old_path
11
+ begin
12
+ ports_dir = RbConfig::CONFIG["host"].gsub('i686-pc-mingw32') do
13
+ major_minor < '2.0' ? 'i586-mingw32msvc' : 'i686-w64-mingw32'
14
+ end
15
+ ENV['PATH'] = "#{File.expand_path("../../ports/#{ports_dir}/bin", __FILE__)};#{old_path}"
16
+ require "#{major_minor}/fox16_c"
17
+ ensure
18
+ ENV['PATH'] = old_path
19
+ end
14
20
  else
15
21
  raise
16
22
  end
data/lib/fox16/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Fox
2
2
  def Fox.fxrubyversion
3
- "1.6.32.pre1"
3
+ "1.6.32.pre2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fxruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.32.pre1
4
+ version: 1.6.32.pre2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Lyle Johnson
@@ -491,15 +491,21 @@ files:
491
491
  - lib/fox16/tkcompat.rb
492
492
  - lib/fox16/undolist.rb
493
493
  - lib/fox16/version.rb
494
- - lib/x86-mingw32/libFOX-1.6-0.dll
495
- - lib/x86-mingw32/libfxscintilla-20.dll
496
- - lib/x86-mingw32/libgcc_s_sjlj-1.dll
497
- - lib/x86-mingw32/libjpeg-8.dll
498
- - lib/x86-mingw32/libpng15-15.dll
499
- - lib/x86-mingw32/libstdc++-6.dll
500
- - lib/x86-mingw32/libtiff-5.dll
501
- - lib/x86-mingw32/libwinpthread-1.dll
502
- - lib/x86-mingw32/zlib1.dll
494
+ - ports/i586-mingw32msvc/bin/libFOX-1.6-0.dll
495
+ - ports/i586-mingw32msvc/bin/libfxscintilla-20.dll
496
+ - ports/i586-mingw32msvc/bin/libjpeg-8.dll
497
+ - ports/i586-mingw32msvc/bin/libpng15-15.dll
498
+ - ports/i586-mingw32msvc/bin/libtiff-5.dll
499
+ - ports/i586-mingw32msvc/bin/zlib1.dll
500
+ - ports/i686-w64-mingw32/bin/libFOX-1.6-0.dll
501
+ - ports/i686-w64-mingw32/bin/libfxscintilla-20.dll
502
+ - ports/i686-w64-mingw32/bin/libgcc_s_sjlj-1.dll
503
+ - ports/i686-w64-mingw32/bin/libjpeg-8.dll
504
+ - ports/i686-w64-mingw32/bin/libpng15-15.dll
505
+ - ports/i686-w64-mingw32/bin/libstdc++-6.dll
506
+ - ports/i686-w64-mingw32/bin/libtiff-5.dll
507
+ - ports/i686-w64-mingw32/bin/libwinpthread-1.dll
508
+ - ports/i686-w64-mingw32/bin/zlib1.dll
503
509
  - rdoc-sources/FX4Splitter.rb
504
510
  - rdoc-sources/FX7Segment.rb
505
511
  - rdoc-sources/FXAccelTable.rb