glib2 3.1.0-x86-mingw32 → 3.1.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/ext/glib2/rbglib.c +2 -0
  4. data/ext/glib2/rbglib.h +1 -1
  5. data/ext/glib2/rbglib2conversions.h +3 -0
  6. data/ext/glib2/rbglib_datetime.c +250 -0
  7. data/ext/glib2/rbglib_timezone.c +82 -0
  8. data/ext/glib2/rbgprivate.h +2 -0
  9. data/lib/2.2/glib2.so +0 -0
  10. data/lib/2.3/glib2.so +0 -0
  11. data/lib/2.4/glib2.so +0 -0
  12. data/lib/glib2.rb +15 -7
  13. data/lib/gnome2/rake/external-package.rb +35 -5
  14. data/lib/gnome2/rake/source-download-task.rb +25 -5
  15. data/lib/mkmf-gnome2.rb +1 -6
  16. data/test/test-date-time.rb +112 -0
  17. data/test/test-time-zone.rb +31 -0
  18. data/vendor/local/bin/asn1Coding.exe +0 -0
  19. data/vendor/local/bin/asn1Decoding.exe +0 -0
  20. data/vendor/local/bin/asn1Parser.exe +0 -0
  21. data/vendor/local/bin/envsubst.exe +0 -0
  22. data/vendor/local/bin/gdbus.exe +0 -0
  23. data/vendor/local/bin/gettext.exe +0 -0
  24. data/vendor/local/bin/gio-querymodules.exe +0 -0
  25. data/vendor/local/bin/gio.exe +0 -0
  26. data/vendor/local/bin/glib-compile-resources.exe +0 -0
  27. data/vendor/local/bin/glib-compile-schemas.exe +0 -0
  28. data/vendor/local/bin/glib-genmarshal.exe +0 -0
  29. data/vendor/local/bin/gobject-query.exe +0 -0
  30. data/vendor/local/bin/gresource.exe +0 -0
  31. data/vendor/local/bin/gsettings.exe +0 -0
  32. data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
  33. data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
  34. data/vendor/local/bin/iconv.exe +0 -0
  35. data/vendor/local/bin/idn.exe +0 -0
  36. data/vendor/local/bin/libasprintf-0.dll +0 -0
  37. data/vendor/local/bin/libcharset-1.dll +0 -0
  38. data/vendor/local/bin/libffi-6.dll +0 -0
  39. data/vendor/local/bin/libgio-2.0-0.dll +0 -0
  40. data/vendor/local/bin/libglib-2.0-0.dll +0 -0
  41. data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
  42. data/vendor/local/bin/libgmp-10.dll +0 -0
  43. data/vendor/local/bin/libgnutls-30.dll +0 -0
  44. data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
  45. data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
  46. data/vendor/local/bin/libhogweed-4-2.dll +0 -0
  47. data/vendor/local/bin/libiconv-2.dll +0 -0
  48. data/vendor/local/bin/libidn-11.dll +0 -0
  49. data/vendor/local/bin/libintl-8.dll +0 -0
  50. data/vendor/local/bin/libnettle-6-2.dll +0 -0
  51. data/vendor/local/bin/libp11-kit-0.dll +0 -0
  52. data/vendor/local/bin/libpcre-1.dll +0 -0
  53. data/vendor/local/bin/libpcrecpp-0.dll +0 -0
  54. data/vendor/local/bin/libpcreposix-0.dll +0 -0
  55. data/vendor/local/bin/libtasn1-6.dll +0 -0
  56. data/vendor/local/bin/nettle-hash.exe +0 -0
  57. data/vendor/local/bin/nettle-lfib-stream.exe +0 -0
  58. data/vendor/local/bin/nettle-pbkdf2.exe +0 -0
  59. data/vendor/local/bin/ngettext.exe +0 -0
  60. data/vendor/local/bin/p11-kit.exe +0 -0
  61. data/vendor/local/bin/pcre-config +1 -1
  62. data/vendor/local/bin/pcregrep.exe +0 -0
  63. data/vendor/local/bin/pcretest.exe +0 -0
  64. data/vendor/local/bin/pkcs1-conv.exe +0 -0
  65. data/vendor/local/bin/sexp-conv.exe +0 -0
  66. data/vendor/local/bin/trust.exe +0 -0
  67. data/vendor/local/include/pcre.h +2 -2
  68. data/vendor/local/lib/gio/modules/libgiognutls.dll +0 -0
  69. data/vendor/local/lib/gio/modules/libgiognutls.dll.a +0 -0
  70. data/vendor/local/lib/libasprintf.dll.a +0 -0
  71. data/vendor/local/lib/libcharset.dll.a +0 -0
  72. data/vendor/local/lib/libffi.dll.a +0 -0
  73. data/vendor/local/lib/libgio-2.0.dll.a +0 -0
  74. data/vendor/local/lib/libglib-2.0.dll.a +0 -0
  75. data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
  76. data/vendor/local/lib/libgmp.dll.a +0 -0
  77. data/vendor/local/lib/libgnutls.dll.a +0 -0
  78. data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
  79. data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
  80. data/vendor/local/lib/libhogweed.dll.a +0 -0
  81. data/vendor/local/lib/libiconv.dll.a +0 -0
  82. data/vendor/local/lib/libidn.dll.a +0 -0
  83. data/vendor/local/lib/libintl.dll.a +0 -0
  84. data/vendor/local/lib/libnettle.dll.a +0 -0
  85. data/vendor/local/lib/libp11-kit.dll.a +0 -0
  86. data/vendor/local/lib/libpcre.a +0 -0
  87. data/vendor/local/lib/libpcre.dll.a +0 -0
  88. data/vendor/local/lib/libpcre.la +1 -1
  89. data/vendor/local/lib/libpcrecpp.dll.a +0 -0
  90. data/vendor/local/lib/libpcreposix.a +0 -0
  91. data/vendor/local/lib/libpcreposix.dll.a +0 -0
  92. data/vendor/local/lib/libpcreposix.la +1 -1
  93. data/vendor/local/lib/libtasn1.dll.a +0 -0
  94. data/vendor/local/lib/p11-kit/p11-kit-remote.exe +0 -0
  95. data/vendor/local/lib/pkcs11/p11-kit-trust.dll +0 -0
  96. data/vendor/local/lib/pkcs11/p11-kit-trust.dll.a +0 -0
  97. data/vendor/local/lib/pkgconfig/libpcre.pc +1 -1
  98. data/vendor/local/lib/pkgconfig/libpcrecpp.pc +1 -1
  99. data/vendor/local/lib/pkgconfig/libpcreposix.pc +1 -1
  100. data/vendor/local/share/doc/pcre/AUTHORS +3 -3
  101. data/vendor/local/share/doc/pcre/ChangeLog +140 -1
  102. data/vendor/local/share/doc/pcre/LICENCE +3 -3
  103. data/vendor/local/share/doc/pcre/NEWS +15 -0
  104. data/vendor/local/share/doc/pcre/html/pcreapi.html +4 -5
  105. data/vendor/local/share/doc/pcre/html/pcrecompat.html +1 -1
  106. data/vendor/local/share/doc/pcre/html/pcrepattern.html +20 -17
  107. data/vendor/local/share/doc/pcre/pcre.txt +2024 -2020
  108. data/vendor/local/share/glib-2.0/codegen/__init__.pyc +0 -0
  109. data/vendor/local/share/glib-2.0/codegen/__init__.pyo +0 -0
  110. data/vendor/local/share/glib-2.0/codegen/codegen.pyc +0 -0
  111. data/vendor/local/share/glib-2.0/codegen/codegen.pyo +0 -0
  112. data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyc +0 -0
  113. data/vendor/local/share/glib-2.0/codegen/codegen_docbook.pyo +0 -0
  114. data/vendor/local/share/glib-2.0/codegen/codegen_main.pyc +0 -0
  115. data/vendor/local/share/glib-2.0/codegen/codegen_main.pyo +0 -0
  116. data/vendor/local/share/glib-2.0/codegen/config.pyc +0 -0
  117. data/vendor/local/share/glib-2.0/codegen/config.pyo +0 -0
  118. data/vendor/local/share/glib-2.0/codegen/dbustypes.pyc +0 -0
  119. data/vendor/local/share/glib-2.0/codegen/dbustypes.pyo +0 -0
  120. data/vendor/local/share/glib-2.0/codegen/parser.pyc +0 -0
  121. data/vendor/local/share/glib-2.0/codegen/parser.pyo +0 -0
  122. data/vendor/local/share/glib-2.0/codegen/utils.pyc +0 -0
  123. data/vendor/local/share/glib-2.0/codegen/utils.pyo +0 -0
  124. data/vendor/local/share/license/pcre/AUTHORS +3 -3
  125. data/vendor/local/share/man/man3/pcreapi.3 +5 -6
  126. data/vendor/local/share/man/man3/pcrecompat.3 +1 -1
  127. data/vendor/local/share/man/man3/pcrepattern.3 +20 -17
  128. metadata +11 -3
@@ -44,15 +44,15 @@ module GNOME2
44
44
  end
45
45
 
46
46
  def compression_method
47
- super || "gz"
47
+ resolve_value(super) || "gz"
48
48
  end
49
49
 
50
50
  def base_name
51
- super || "#{name}-#{version}"
51
+ resolve_value(super) || "#{name}-#{version}"
52
52
  end
53
53
 
54
54
  def archive_base_name
55
- super || "#{base_name}.tar.#{compression_method}"
55
+ resolve_value(super) || "#{base_name}.tar.#{compression_method}"
56
56
  end
57
57
 
58
58
  def archive_url
@@ -60,7 +60,7 @@ module GNOME2
60
60
  end
61
61
 
62
62
  def download_base_url
63
- super || download_site_base_url
63
+ resolve_value(super) || download_site_base_url
64
64
  end
65
65
 
66
66
  def patches
@@ -76,7 +76,7 @@ module GNOME2
76
76
  end
77
77
 
78
78
  def base_dir_in_package
79
- super || "."
79
+ resolve_value(super) || "."
80
80
  end
81
81
 
82
82
  def windows
@@ -109,12 +109,22 @@ module GNOME2
109
109
  latest_version_freedesktop_gstreamer
110
110
  when :webkitgtk
111
111
  latest_version_webkitgtk
112
+ when :icu
113
+ latest_version_icu
112
114
  else
113
115
  nil
114
116
  end
115
117
  end
116
118
 
117
119
  private
120
+ def resolve_value(value)
121
+ if value.respond_to?(:call)
122
+ value.call(self)
123
+ else
124
+ value
125
+ end
126
+ end
127
+
118
128
  def download_site_base_url
119
129
  case download_site
120
130
  when :gnome
@@ -131,6 +141,8 @@ module GNOME2
131
141
  base_url = "http://ftp.gnu.org/pub/gnu/#{name}"
132
142
  when :webkitgtk
133
143
  base_url = webkitgtk_base_url
144
+ when :icu
145
+ base_url = "#{icu_base_url}/#{version}"
134
146
  else
135
147
  base_url = nil
136
148
  end
@@ -153,6 +165,10 @@ module GNOME2
153
165
  "https://webkitgtk.org/releases"
154
166
  end
155
167
 
168
+ def icu_base_url
169
+ "http://download.icu-project.org/files/icu4c"
170
+ end
171
+
156
172
  def sort_versions(versions)
157
173
  versions.sort_by do |version|
158
174
  version.split(".").collect(&:to_i)
@@ -247,6 +263,20 @@ module GNOME2
247
263
  sort_versions(versions).last
248
264
  end
249
265
 
266
+ def latest_version_icu
267
+ base_url = icu_base_url
268
+ versions = []
269
+ open(base_url) do |index|
270
+ index.read.scan(/<a (.+?)>/) do |content,|
271
+ case content
272
+ when /href="(\d+(?:\.\d+)+)\/"/x
273
+ versions << $1
274
+ end
275
+ end
276
+ end
277
+ sort_versions(versions).last
278
+ end
279
+
250
280
  class WindowsConfiguration < Struct.new(:build,
251
281
  :include_paths,
252
282
  :library_paths,
@@ -51,6 +51,7 @@ module GNOME2
51
51
  end
52
52
  end
53
53
 
54
+ private
54
55
  def define_download_tasks
55
56
  namespace :download do
56
57
  @package.external_packages.each do |package|
@@ -68,15 +69,34 @@ module GNOME2
68
69
  file tar_full_path.to_s => directory_path.to_s do
69
70
  archive_url = package.archive_url
70
71
  rake_output_message "Downloading... #{archive_url}"
71
- open(archive_url) do |downloaded_tar|
72
- tar_full_path.open("wb") do |tar_file|
73
- tar_file.print(downloaded_tar.read)
74
- end
75
- end
72
+ download(archive_url, tar_full_path)
76
73
  end
77
74
  end
78
75
  end
79
76
  end
77
+
78
+ def download(url, output_path)
79
+ OpenURI.singleton_class.class_eval do
80
+ alias_method :redirectable_original?, :redirectable?
81
+ def redirectable?(uri1, uri2)
82
+ redirectable_original?(uri1, uri2) or
83
+ (uri1.scheme.downcase == "http" and
84
+ uri2.scheme.downcase == "https")
85
+ end
86
+ end
87
+ begin
88
+ open(url) do |input|
89
+ output_path.open("wb") do |output_file|
90
+ output_file.print(input.read)
91
+ end
92
+ end
93
+ ensure
94
+ OpenURI.singleton_class.class_eval do
95
+ alias_method :redirectable?, :redirectable_original?
96
+ remove_method :redirectable_original?
97
+ end
98
+ end
99
+ end
80
100
  end
81
101
  end
82
102
  end
data/lib/mkmf-gnome2.rb CHANGED
@@ -140,12 +140,7 @@ end
140
140
 
141
141
  def find_gem_spec(package)
142
142
  begin
143
- require 'rubygems'
144
- if Gem::Specification.respond_to?(:find_by_name)
145
- Gem::Specification.find_by_name(package)
146
- else
147
- Gem.source_index.find_name(package).last
148
- end
143
+ Gem::Specification.find_by_name(package)
149
144
  rescue LoadError
150
145
  nil
151
146
  end
@@ -0,0 +1,112 @@
1
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestDateTime < Test::Unit::TestCase
18
+ def test_now_local
19
+ now = GLib::DateTime.now(:local)
20
+ format = "%Y-%m-%d-%H-%M"
21
+ assert_equal(Time.now.strftime(format), now.format(format))
22
+ end
23
+
24
+ sub_test_case "new" do
25
+
26
+ test "unix: :local" do
27
+ time = Time.now
28
+ format = "%Y-%m-%d-%H-%M"
29
+ datetime = GLib::DateTime.new(:unix => time.to_i,
30
+ :timezone => :local)
31
+ assert_equal(time.strftime(format), datetime.format(format))
32
+ end
33
+
34
+ test "unix: :utc" do
35
+ time = Time.now.utc
36
+ format = "%Y-%m-%d-%H-%M"
37
+ datetime = GLib::DateTime.new(:unix => time.to_i,
38
+ :timezone => :utc)
39
+ assert_equal(time.strftime(format), datetime.format(format))
40
+ end
41
+
42
+ test "timezone: :local" do
43
+ time = Time.now
44
+ datetime = GLib::DateTime.new(:timezone => :local,
45
+ :year => time.year,
46
+ :month => time.month,
47
+ :day => time.day,
48
+ :hour => time.hour,
49
+ :minute => time.min,
50
+ :second => time.sec)
51
+ assert_equal(time.year, datetime.year)
52
+ assert_equal(time.month, datetime.month)
53
+ assert_equal(time.day, datetime.day_of_month)
54
+ assert_equal(time.hour, datetime.hour)
55
+ assert_equal(time.min, datetime.minute)
56
+ assert_equal(time.sec, datetime.second)
57
+ end
58
+
59
+ test "timezone: :utc" do
60
+ time = Time.now.utc
61
+ datetime = GLib::DateTime.new(:timezone => :utc,
62
+ :year => time.year,
63
+ :month => time.month,
64
+ :day => time.day,
65
+ :hour => time.hour,
66
+ :minute => time.min,
67
+ :second => time.sec)
68
+ assert_equal(time.year, datetime.year)
69
+ assert_equal(time.month, datetime.month)
70
+ assert_equal(time.day, datetime.day_of_month)
71
+ assert_equal(time.hour, datetime.hour)
72
+ assert_equal(time.min, datetime.minute)
73
+ assert_equal(time.sec, datetime.second)
74
+ end
75
+
76
+ test "timezone: local time zone" do
77
+ time = Time.now
78
+ tz = GLib::TimeZone.local
79
+ datetime = GLib::DateTime.new(:timezone => tz,
80
+ :year => time.year,
81
+ :month => time.month,
82
+ :day => time.day,
83
+ :hour => time.hour,
84
+ :minute => time.min,
85
+ :second => time.sec)
86
+ assert_equal(time.year, datetime.year)
87
+ assert_equal(time.month, datetime.month)
88
+ assert_equal(time.day, datetime.day_of_month)
89
+ assert_equal(time.hour, datetime.hour)
90
+ assert_equal(time.min, datetime.minute)
91
+ assert_equal(time.sec, datetime.second)
92
+ end
93
+
94
+ test "timezone: UTC time zone" do
95
+ time = Time.now.utc
96
+ tz = GLib::TimeZone.utc
97
+ datetime = GLib::DateTime.new(:timezone => tz,
98
+ :year => time.year,
99
+ :month => time.month,
100
+ :day => time.day,
101
+ :hour => time.hour,
102
+ :minute => time.min,
103
+ :second => time.sec)
104
+ assert_equal(time.year, datetime.year)
105
+ assert_equal(time.month, datetime.month)
106
+ assert_equal(time.day, datetime.day_of_month)
107
+ assert_equal(time.hour, datetime.hour)
108
+ assert_equal(time.min, datetime.minute)
109
+ assert_equal(time.sec, datetime.second)
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,31 @@
1
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestTimeZone < Test::Unit::TestCase
18
+ sub_test_case "new" do
19
+ test "local" do
20
+ local_1 = GLib::TimeZone.local
21
+ local_2 = GLib::TimeZone.new
22
+ assert_equal(local_1.abbreviation(0), local_2.abbreviation(0))
23
+ end
24
+
25
+ test "UTC" do
26
+ utc_1 = GLib::TimeZone.utc
27
+ utc_2 = GLib::TimeZone.new("UTC")
28
+ assert_equal(utc_1.offset(0), utc_2.offset(0))
29
+ end
30
+ end
31
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -71,7 +71,7 @@ while test $# -gt 0; do
71
71
  echo $exec_prefix
72
72
  ;;
73
73
  --version)
74
- echo 8.38
74
+ echo 8.40
75
75
  ;;
76
76
  --cflags)
77
77
  if test ${prefix}/include != /usr/include ; then
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
42
42
  /* The current PCRE version information. */
43
43
 
44
44
  #define PCRE_MAJOR 8
45
- #define PCRE_MINOR 38
45
+ #define PCRE_MINOR 40
46
46
  #define PCRE_PRERELEASE
47
- #define PCRE_DATE 2015-11-23
47
+ #define PCRE_DATE 2017-01-11
48
48
 
49
49
  /* When an application links to a PCRE DLL in Windows, the symbols that are
50
50
  imported have to be identified as such. When building PCRE, the appropriate