Codebase list ruby-fxruby / ecada23
Import upstream version 1.6.45+git20221125.1.7d76b2a Kali Janitor 1 year, 3 months ago
10 changed file(s) with 54 addition(s) and 54 deletion(s). Raw diff Collapse all Expand all
+0
-26
.gitignore less more
0 doap.rdf
1 *.tmproj
2 doc/api
3 users_guide/*.html
4 ext/fox16_c/*_wrap.cpp
5 ext/fox16_c/*.o
6 ext/fox16_c/conftest.dSYM
7 ext/fox16_c/include/inlinestubs.h
8 ext/fox16_c/extconf.h
9 ext/fox16_c/swigruby.h
10 ext/fox16_c/fox16.bundle
11 ext/fox16_c/mkmf.log
12 lib/fox16/kwargs.rb
13 lib/[0-9].[0-9]
14 lib/*.so
15 fox-includes/diffs.py
16 fox-includes/diffs.txt
17 pkg
18 tmp
19 vendor
20 *.orig
21 *.rej
22 /Gemfile.lock
23 /ports
24 /.bundle
25 /.yardoc
0 ## 1.6.45 / 2022-01-14
1
2 * Add binary gem support for ruby-3.1 on platform x64-mingw-ucrt and drop ruby-2.3.
3 * Update to libz-1.2.11, libjpeg-turbo-2.1.2, libtiff-4.3.0 for Windows binary gems.
4
05 ## 1.6.44 / 2020-12-31
16
27 * Add binary gem support for ruby-3.0. #66
22 * http://github.com/larskanis/fxruby
33 * Full API-description: http://rubydoc.info/gems/fxruby/frames or https://larskanis.github.io/fxruby/
44 * Latest fxruby {<img src="https://badge.fury.io/rb/fxruby.svg" alt="Gem Version" />}[http://badge.fury.io/rb/fxruby]
5 * Status on Linux: {<img src="https://travis-ci.com/larskanis/fxruby.svg?branch=1.6" alt="Build Status on Linux" />}[https://travis-ci.com/larskanis/fxruby]
6 on Windows: {<img src="https://ci.appveyor.com/api/projects/status/too7sj4gq643ts8w/branch/1.6?svg=true" alt="Build Status on Windows" />}[https://ci.appveyor.com/project/larskanis/fxruby/branch/1.6]
7
5 * CI-Status: {<img src="https://github.com/larskanis/fxruby/actions/workflows/ci.yml/badge.svg?branch=1.6" alt="Build Status" />}[https://github.com/larskanis/fxruby/actions/workflows/ci.yml] and on Windows: {<img src="https://ci.appveyor.com/api/projects/status/too7sj4gq643ts8w/branch/1.6?svg=true" alt="Build Status on Windows" />}[https://ci.appveyor.com/project/larskanis/fxruby/branch/1.6]
86
97
108 == DESCRIPTION:
3331 FXRuby runs on Linux, Windows and OS-X with Ruby-2.2 or newer. Installation on Unix requires
3432 FOX development headers and libraries installed:
3533 * on Debian/Ubuntu: <tt>sudo apt-get install g++ libxrandr-dev libfox-1.6-dev</tt>
34 * on Mac: <tt>sudo port install rb-fxruby</tt> OR <tt>brew install fox && brew install xquartz</tt>
35 * on Windows: the binary fxruby gems already contain all required libraries
3636 * see also detailed installation instructions in the {Wiki}[https://github.com/lylejohnson/fxruby/wiki]
37 * on Windows: the binary fxruby gems already contain all required libararies
3837
3938 Then, install the gem:
4039 * gem install fxruby
40
41 On Mac, before running applications, you must also run: <tt>open -a /Applications/Utilities/XQuartz.app</tt>
42
43 (otherwise, you end up getting this message when running applications on Mac: <tt>FXRbApp::openDisplay: unable to open display :0.0</tt>)
4144
4245 == DIRECTORIES
4346 The directory structure is:
9191
9292 ext_task = Rake::ExtensionTask.new("fox16_c", gem_spec) do |ext|
9393 ext.cross_compile = true
94 ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
94 ext.cross_platform = ['x86-mingw32', 'x64-mingw-ucrt', 'x64-mingw32']
9595 # Enable FXTRACE and FXASSERT for 'rake compile'
9696 ext.config_options << "--enable-debug"
9797
108108
109109 platform_host_map = {
110110 'x86-mingw32' => ['i686-w64-mingw32'],
111 'x64-mingw-ucrt' => ['x86_64-w64-mingw32'],
111112 'x64-mingw32' => ['x86_64-w64-mingw32'],
112113 }
113114
116117
117118 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]
118119
119 dlls = gcc_shared_dlls.select{|dll| File.exist?("ports/#{host}/bin/#{dll}") }
120 dlls = gcc_shared_dlls.select{|dll| File.exist?("ports/#{gemplat}/bin/#{dll}") }
120121 dlls += [
121122 "libfxscintilla-20.dll",
122123 "libFOX-1.6-0.dll",
126127 "zlib1.dll",
127128 ]
128129
129 spec.files += dlls.map{|dll| "ports/#{host}/bin/#{dll}" }
130 spec.files += dlls.map{|dll| "ports/#{gemplat}/bin/#{dll}" }
130131
131132 unless ENV['FXRUBY_MINGW_DEBUG']
132133 dlls.each do |dll|
133 task "ports/#{host}/bin/#{dll}" do |t|
134 task "ports/#{gemplat}/bin/#{dll}" do |t|
134135 sh "#{host}-strip", t.name
135136 end
136137 end
203204 line.gsub! /rb_ensure\(VALUEFUNC\((.*)\), self, VALUEFUNC\((.*)\), self\);/, 'rb_ensure(RUBY_VALUE_METHOD_FUNC(\\1), self, RUBY_VALUE_METHOD_FUNC(\\2), self);'
204205 line.gsub! /rb_rescue\(RUBY_METHOD_FUNC\((.*)\), \(VALUE\)a, RUBY_METHOD_FUNC\((.*)\), 0\)/, 'rb_rescue(RUBY_VALUE_METHOD_FUNC(\\1), (VALUE)a, RUBY_VALUE_METHOD_FUNC(\\2), 0)'
205206
207 # Allow Truffleruby-22.1.0 to compile the sources without fxscintilla.
208 # Unfortunately Truffleruby still fails with various runtime errors.
209 if RUBY_ENGINE == "truffleruby"
210 line.gsub! '#include <ruby.h>', <<-EOT
211 #include <ruby.h>
212 #define rb_define_virtual_variable(x,y,z)
213 EOT
214 line.gsub!('rb_define_class("swig_runtime_data", rb_cObject);', 'rb_define_class("SWIG_RUNTIME_DATA", rb_cObject);')
215 line.gsub! 'rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);', <<-EOT
216 if (rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME) == RUBY_Qnil) {
217 rb_gv_set("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, swig_runtime_data_type_pointer);
218 }
219 EOT
220 end
221
206222 line
207223 end
208224
22 clone_depth: 1
33
44 init:
5 - SET PATH=c:/Ruby%ruby_version%/bin;c:/msys64/%MSYSTEM%/bin;%PATH%
6 - SET RAKEOPT=-rdevkit
5 - SET PATH=c:/Ruby%ruby_version%/bin;%PATH%
76 install:
87 - ps: |
98 if ($env:ruby_version -like "*head*") {
1312 - ruby --version
1413 - gem --version
1514 - ridk version
15 - ridk enable
1616 # Remove gcc-ada and gcc-objc, since they are no longer supported by msys2 and therefore cause a dependency issue
1717 - c:/msys64/usr/bin/bash -lc "pacman --noconfirm --remove mingw-w64-i686-gcc-ada mingw-w64-i686-gcc-objc mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc"
1818 - c:/msys64/usr/bin/bash -lc "pacman -Syu --noconfirm --ask 20"
1919 - c:/msys64/usr/bin/bash -lc "pacman -Su --noconfirm"
20 - c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-fox ${MINGW_PACKAGE_PREFIX}-swig"
20 - c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-fox ${MINGW_PACKAGE_PREFIX}-swig ${MINGW_PACKAGE_PREFIX}-gcc"
21 - gcc -v
2122 - swig -version
2223 - gem install bundler --conservative
2324 - bundle config set force_ruby_platform true
2930 environment:
3031 matrix:
3132 - ruby_version: "head-x64"
32 MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
33 MSYSTEM: "MINGW64"
3433 - ruby_version: "24"
35 MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
36 MSYSTEM: "MINGW32"
1919 !with_config("fxscintilla", true)
2020 end
2121
22 # Stick at zlib-1.2.7 for compatibility to MSYS1 based RubyInstaller.
23 LIBZ_VERSION = ENV['LIBZ_VERSION'] || '1.2.7.3'
22 LIBZ_VERSION = ENV['LIBZ_VERSION'] || '1.2.11'
2423 LIBZ_SOURCE_URI = "http://zlib.net/fossils/zlib-#{LIBZ_VERSION}.tar.gz"
2524
2625 LIBPNG_VERSION = ENV['LIBPNG_VERSION'] || '1.6.37'
2928 # LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '9b'
3029 # LIBJPEG_SOURCE_URI = "http://www.ijg.org/files/jpegsrc.v#{LIBJPEG_VERSION}.tar.gz"
3130
32 LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '2.0.6'
31 LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '2.1.2'
3332 LIBJPEG_SOURCE_URI = "https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-#{LIBJPEG_VERSION}.tar.gz"
3433
35 LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.1.0'
34 LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.3.0'
3635 LIBTIFF_SOURCE_URI = "http://download.osgeo.org/libtiff/tiff-#{LIBTIFF_VERSION}.tar.gz"
3736
3837 LIBFOX_VERSION = ENV['LIBFOX_VERSION'] || '1.6.57'
5453 end
5554
5655 def port_path
57 "#{target}/#{host}"
56 "#{target}/#{RUBY_PLATFORM}"
5857 end
5958
6059 # When using rake-compiler-dock on Windows, the underlying Virtualbox shared
6867 end
6968
7069 def cook_and_activate
71 checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{self.host}.installed")
70 checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{RUBY_PLATFORM}.installed")
7271 unless File.exist?(checkpoint)
7372 chdir_for_build do
7473 self.cook
177176 "--without-xft",
178177 "--without-x",
179178 debug ? "--enable-debug" : "--enable-release",
180 "CPPFLAGS=-I#{libjpeg_recipe.path}/include -I#{libpng_recipe.path}/include -I#{libtiff_recipe.path}/include -I#{libz_recipe.path}/include -DUNICODE=1 #{debug ? "-ggdb" : ""}",
179 "CPPFLAGS=-I#{libjpeg_recipe.path}/include -I#{libpng_recipe.path}/include -I#{libtiff_recipe.path}/include -I#{libz_recipe.path}/include -DUNICODE=1 #{debug ? "-ggdb" : ""} -D__USE_MINGW_ANSI_STDIO=1 -DHAVE_VSSCANF",
181180 "LDFLAGS=-L#{libjpeg_recipe.path}/lib -L#{libpng_recipe.path}/lib -L#{libtiff_recipe.path}/lib -L#{libz_recipe.path}/lib #{debug ? "-ggdb" : ""}",
182181 ]
183182 recipe.cook_and_activate
3232 spec.summary = %q{FXRuby is the Ruby binding to the FOX GUI toolkit.}
3333 spec.homepage = "https://github.com/larskanis/fxruby"
3434 spec.license = 'LGPL-2.1'
35 spec.metadata["changelog_uri"] = "https://github.com/larskanis/fxruby/blob/1.6/History.md"
36 spec.metadata["documentation_uri"] = "https://rubydoc.info/gems/fxruby/frames"
3537
3638 spec.files = `git ls-files -z`.split("\x0").reject do |f|
3739 f=~/^fox-includes|^web/
5052 spec.required_ruby_version = [">= 2.3", "< 4"]
5153
5254 spec.add_runtime_dependency 'mini_portile2', '~> 2.1'
55
56 yardopts = File.read(".yardopts")
57 spec.rdoc_options = ["--main", "README.rdoc",
58 "--title", "FXRuby API Documentation"]
59 docfiles = yardopts.lines.map(&:strip).select{|r| r=~/^[^-]/ }
60 spec.extra_rdoc_files = `git ls-files -z #{docfiles.join(" ")}`.split("\x0")
5361 end
00 module Fox
11 def Fox.fxrubyversion
2 "1.6.44"
2 "1.6.45"
33 end
44 end
1717 end
1818 end
1919
20 ruby_plat = RUBY_PLATFORM.gsub("i386", "x86")
2021 # Temporary add this directory for DLL search, so that bundled DLLs can be found.
21 ports_dir = RbConfig::CONFIG["host"].gsub('i686-pc-mingw32') do
22 major_minor < '2.0' ? 'i586-mingw32msvc' : 'i686-w64-mingw32'
23 end
24 ports_bin = File.expand_path("../../ports/#{ports_dir}/bin", __FILE__)
22 ports_bin = File.expand_path("../../ports/#{ruby_plat}/bin", __FILE__)
2523 add_dll_path.call(ports_bin) do
2624 require "#{major_minor}/fox16_c"
2725 end
4444
4545 def assert_same_file_contents(expected, actual)
4646 expected_contents, actual_contents = nil, nil
47 File.open(expected, 'rb') { |f| expected_contents = f.read }
47 File.open(expected, 'rb') { |f| expected_contents = crlf_to_lf(f.read) }
4848 File.open(actual, 'rb') { |f| actual_contents = crlf_to_lf(f.read) }
4949 assert_equal(expected_contents, actual_contents)
5050 end