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

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1df74fbb576c28ebefaeadfc86037b37c6b95910
4
- data.tar.gz: 5e9d5153a286bce4a812ddbb69dc781f894c207e
3
+ metadata.gz: e897067a47cd15fe0fe5e12ffcc644efd379154c
4
+ data.tar.gz: a33ad3ee30b68ebd5dc740adde0ff2a51ac978bb
5
5
  SHA512:
6
- metadata.gz: cc48ac8e98eeeafef1450e7163870f7c14b67ada4d75dc5aa2efec2b9205c209d609966f9a72dbf4fdcefe91c617f86f3e8d088754ad6b20891b0b18eaffaa6e
7
- data.tar.gz: 472a790b49ab071f301fd44d3e7e26d4c7222027835fffbb98d8da9f2e7e5ead4369e7c8c154b864bad876bfa4fb0e62f193b12c161885475dc92ef3d74ba83a
6
+ metadata.gz: cc028ed43c13ebd367710d85f6b6705e6da1f871205680804b8fb853bb9e8004abc6f8ef6d210bec5aee409590d8274224846acb7ba117dd1450c055051c5255
7
+ data.tar.gz: 460c420691dad2052a4c157526a01db01fa5efb5d6ceec962178aed6458e98ec6003ed233b64c69bfbe473cbd363b46fdab235f0baf20d71c7c14e22f4ee6d33
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/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: x64-mingw32
6
6
  authors:
7
7
  - Lyle Johnson
@@ -489,15 +489,15 @@ files:
489
489
  - lib/fox16/tkcompat.rb
490
490
  - lib/fox16/undolist.rb
491
491
  - lib/fox16/version.rb
492
- - lib/x64-mingw32/libFOX-1.6-0.dll
493
- - lib/x64-mingw32/libfxscintilla-20.dll
494
- - lib/x64-mingw32/libgcc_s_sjlj-1.dll
495
- - lib/x64-mingw32/libjpeg-8.dll
496
- - lib/x64-mingw32/libpng15-15.dll
497
- - lib/x64-mingw32/libstdc++-6.dll
498
- - lib/x64-mingw32/libtiff-5.dll
499
- - lib/x64-mingw32/libwinpthread-1.dll
500
- - lib/x64-mingw32/zlib1.dll
492
+ - ports/x86_64-w64-mingw32/bin/libFOX-1.6-0.dll
493
+ - ports/x86_64-w64-mingw32/bin/libfxscintilla-20.dll
494
+ - ports/x86_64-w64-mingw32/bin/libgcc_s_sjlj-1.dll
495
+ - ports/x86_64-w64-mingw32/bin/libjpeg-8.dll
496
+ - ports/x86_64-w64-mingw32/bin/libpng15-15.dll
497
+ - ports/x86_64-w64-mingw32/bin/libstdc++-6.dll
498
+ - ports/x86_64-w64-mingw32/bin/libtiff-5.dll
499
+ - ports/x86_64-w64-mingw32/bin/libwinpthread-1.dll
500
+ - ports/x86_64-w64-mingw32/bin/zlib1.dll
501
501
  - rdoc-sources/FX4Splitter.rb
502
502
  - rdoc-sources/FX7Segment.rb
503
503
  - rdoc-sources/FXAccelTable.rb