Import upstream version 1.6.45+git20221125.1.7d76b2a
Kali Janitor
1 year, 4 months ago
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 | ||
0 | 5 | ## 1.6.44 / 2020-12-31 |
1 | 6 | |
2 | 7 | * Add binary gem support for ruby-3.0. #66 |
2 | 2 | * http://github.com/larskanis/fxruby |
3 | 3 | * Full API-description: http://rubydoc.info/gems/fxruby/frames or https://larskanis.github.io/fxruby/ |
4 | 4 | * 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] | |
8 | 6 | |
9 | 7 | |
10 | 8 | == DESCRIPTION: |
33 | 31 | FXRuby runs on Linux, Windows and OS-X with Ruby-2.2 or newer. Installation on Unix requires |
34 | 32 | FOX development headers and libraries installed: |
35 | 33 | * 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 | |
36 | 36 | * 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 | |
38 | 37 | |
39 | 38 | Then, install the gem: |
40 | 39 | * 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>) | |
41 | 44 | |
42 | 45 | == DIRECTORIES |
43 | 46 | The directory structure is: |
91 | 91 | |
92 | 92 | ext_task = Rake::ExtensionTask.new("fox16_c", gem_spec) do |ext| |
93 | 93 | ext.cross_compile = true |
94 | ext.cross_platform = ['x86-mingw32', 'x64-mingw32'] | |
94 | ext.cross_platform = ['x86-mingw32', 'x64-mingw-ucrt', 'x64-mingw32'] | |
95 | 95 | # Enable FXTRACE and FXASSERT for 'rake compile' |
96 | 96 | ext.config_options << "--enable-debug" |
97 | 97 | |
108 | 108 | |
109 | 109 | platform_host_map = { |
110 | 110 | 'x86-mingw32' => ['i686-w64-mingw32'], |
111 | 'x64-mingw-ucrt' => ['x86_64-w64-mingw32'], | |
111 | 112 | 'x64-mingw32' => ['x86_64-w64-mingw32'], |
112 | 113 | } |
113 | 114 | |
116 | 117 | |
117 | 118 | 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] |
118 | 119 | |
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}") } | |
120 | 121 | dlls += [ |
121 | 122 | "libfxscintilla-20.dll", |
122 | 123 | "libFOX-1.6-0.dll", |
126 | 127 | "zlib1.dll", |
127 | 128 | ] |
128 | 129 | |
129 | spec.files += dlls.map{|dll| "ports/#{host}/bin/#{dll}" } | |
130 | spec.files += dlls.map{|dll| "ports/#{gemplat}/bin/#{dll}" } | |
130 | 131 | |
131 | 132 | unless ENV['FXRUBY_MINGW_DEBUG'] |
132 | 133 | dlls.each do |dll| |
133 | task "ports/#{host}/bin/#{dll}" do |t| | |
134 | task "ports/#{gemplat}/bin/#{dll}" do |t| | |
134 | 135 | sh "#{host}-strip", t.name |
135 | 136 | end |
136 | 137 | end |
203 | 204 | line.gsub! /rb_ensure\(VALUEFUNC\((.*)\), self, VALUEFUNC\((.*)\), self\);/, 'rb_ensure(RUBY_VALUE_METHOD_FUNC(\\1), self, RUBY_VALUE_METHOD_FUNC(\\2), self);' |
204 | 205 | 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)' |
205 | 206 | |
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 | ||
206 | 222 | line |
207 | 223 | end |
208 | 224 |
2 | 2 | clone_depth: 1 |
3 | 3 | |
4 | 4 | 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% | |
7 | 6 | install: |
8 | 7 | - ps: | |
9 | 8 | if ($env:ruby_version -like "*head*") { |
13 | 12 | - ruby --version |
14 | 13 | - gem --version |
15 | 14 | - ridk version |
15 | - ridk enable | |
16 | 16 | # Remove gcc-ada and gcc-objc, since they are no longer supported by msys2 and therefore cause a dependency issue |
17 | 17 | - 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" |
18 | 18 | - c:/msys64/usr/bin/bash -lc "pacman -Syu --noconfirm --ask 20" |
19 | 19 | - 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 | |
21 | 22 | - swig -version |
22 | 23 | - gem install bundler --conservative |
23 | 24 | - bundle config set force_ruby_platform true |
29 | 30 | environment: |
30 | 31 | matrix: |
31 | 32 | - ruby_version: "head-x64" |
32 | MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64" | |
33 | MSYSTEM: "MINGW64" | |
34 | 33 | - ruby_version: "24" |
35 | MINGW_PACKAGE_PREFIX: "mingw-w64-i686" | |
36 | MSYSTEM: "MINGW32" |
19 | 19 | !with_config("fxscintilla", true) |
20 | 20 | end |
21 | 21 | |
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' | |
24 | 23 | LIBZ_SOURCE_URI = "http://zlib.net/fossils/zlib-#{LIBZ_VERSION}.tar.gz" |
25 | 24 | |
26 | 25 | LIBPNG_VERSION = ENV['LIBPNG_VERSION'] || '1.6.37' |
29 | 28 | # LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '9b' |
30 | 29 | # LIBJPEG_SOURCE_URI = "http://www.ijg.org/files/jpegsrc.v#{LIBJPEG_VERSION}.tar.gz" |
31 | 30 | |
32 | LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '2.0.6' | |
31 | LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '2.1.2' | |
33 | 32 | LIBJPEG_SOURCE_URI = "https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-#{LIBJPEG_VERSION}.tar.gz" |
34 | 33 | |
35 | LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.1.0' | |
34 | LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.3.0' | |
36 | 35 | LIBTIFF_SOURCE_URI = "http://download.osgeo.org/libtiff/tiff-#{LIBTIFF_VERSION}.tar.gz" |
37 | 36 | |
38 | 37 | LIBFOX_VERSION = ENV['LIBFOX_VERSION'] || '1.6.57' |
54 | 53 | end |
55 | 54 | |
56 | 55 | def port_path |
57 | "#{target}/#{host}" | |
56 | "#{target}/#{RUBY_PLATFORM}" | |
58 | 57 | end |
59 | 58 | |
60 | 59 | # When using rake-compiler-dock on Windows, the underlying Virtualbox shared |
68 | 67 | end |
69 | 68 | |
70 | 69 | 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") | |
72 | 71 | unless File.exist?(checkpoint) |
73 | 72 | chdir_for_build do |
74 | 73 | self.cook |
177 | 176 | "--without-xft", |
178 | 177 | "--without-x", |
179 | 178 | 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", | |
181 | 180 | "LDFLAGS=-L#{libjpeg_recipe.path}/lib -L#{libpng_recipe.path}/lib -L#{libtiff_recipe.path}/lib -L#{libz_recipe.path}/lib #{debug ? "-ggdb" : ""}", |
182 | 181 | ] |
183 | 182 | recipe.cook_and_activate |
32 | 32 | spec.summary = %q{FXRuby is the Ruby binding to the FOX GUI toolkit.} |
33 | 33 | spec.homepage = "https://github.com/larskanis/fxruby" |
34 | 34 | 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" | |
35 | 37 | |
36 | 38 | spec.files = `git ls-files -z`.split("\x0").reject do |f| |
37 | 39 | f=~/^fox-includes|^web/ |
50 | 52 | spec.required_ruby_version = [">= 2.3", "< 4"] |
51 | 53 | |
52 | 54 | 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") | |
53 | 61 | end |
17 | 17 | end |
18 | 18 | end |
19 | 19 | |
20 | ruby_plat = RUBY_PLATFORM.gsub("i386", "x86") | |
20 | 21 | # 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__) | |
25 | 23 | add_dll_path.call(ports_bin) do |
26 | 24 | require "#{major_minor}/fox16_c" |
27 | 25 | end |
44 | 44 | |
45 | 45 | def assert_same_file_contents(expected, actual) |
46 | 46 | 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) } | |
48 | 48 | File.open(actual, 'rb') { |f| actual_contents = crlf_to_lf(f.read) } |
49 | 49 | assert_equal(expected_contents, actual_contents) |
50 | 50 | end |