glib2 0.90.5 → 0.90.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +79 -0
- data/Rakefile +8 -65
- data/ext/glib2/Makefile +169 -0
- data/ext/glib2/glib-enum-types.c +1065 -0
- data/ext/glib2/glib-enum-types.h +144 -0
- data/ext/glib2/glib-enum-types.o +0 -0
- data/ext/glib2/glib2.so +0 -0
- data/ext/glib2/rbglib.h +1 -1
- data/ext/glib2/rbglib.o +0 -0
- data/ext/glib2/rbglib_bookmarkfile.o +0 -0
- data/ext/glib2/rbglib_completion.o +0 -0
- data/ext/glib2/rbglib_convert.o +0 -0
- data/ext/glib2/rbglib_error.o +0 -0
- data/ext/glib2/rbglib_fileutils.o +0 -0
- data/ext/glib2/rbglib_i18n.o +0 -0
- data/ext/glib2/rbglib_int64.o +0 -0
- data/ext/glib2/rbglib_iochannel.o +0 -0
- data/ext/glib2/rbglib_keyfile.o +0 -0
- data/ext/glib2/rbglib_maincontext.o +0 -0
- data/ext/glib2/rbglib_mainloop.o +0 -0
- data/ext/glib2/rbglib_messages.o +0 -0
- data/ext/glib2/rbglib_pollfd.o +0 -0
- data/ext/glib2/rbglib_shell.o +0 -0
- data/ext/glib2/rbglib_source.o +0 -0
- data/ext/glib2/rbglib_spawn.o +0 -0
- data/ext/glib2/rbglib_threads.o +0 -0
- data/ext/glib2/rbglib_timer.o +0 -0
- data/ext/glib2/rbglib_unicode.o +0 -0
- data/ext/glib2/rbglib_utils.o +0 -0
- data/ext/glib2/rbglib_win32.o +0 -0
- data/ext/glib2/rbgobj_boxed.o +0 -0
- data/ext/glib2/rbgobj_closure.o +0 -0
- data/ext/glib2/rbgobj_convert.o +0 -0
- data/ext/glib2/rbgobj_enums.o +0 -0
- data/ext/glib2/rbgobj_fundamental.o +0 -0
- data/ext/glib2/rbgobj_object.o +0 -0
- data/ext/glib2/rbgobj_param.o +0 -0
- data/ext/glib2/rbgobj_paramspecs.o +0 -0
- data/ext/glib2/rbgobj_signal.o +0 -0
- data/ext/glib2/rbgobj_strv.o +0 -0
- data/ext/glib2/rbgobj_type.c +1 -1
- data/ext/glib2/rbgobj_type.o +0 -0
- data/ext/glib2/rbgobj_typeinstance.o +0 -0
- data/ext/glib2/rbgobj_typeinterface.o +0 -0
- data/ext/glib2/rbgobj_typemodule.o +0 -0
- data/ext/glib2/rbgobj_typeplugin.o +0 -0
- data/ext/glib2/rbgobj_value.o +0 -0
- data/ext/glib2/rbgobj_valuearray.o +0 -0
- data/ext/glib2/rbgobj_valuetypes.o +0 -0
- data/ext/glib2/rbgobject.o +0 -0
- data/ext/glib2/rbgutil.o +0 -0
- data/ext/glib2/rbgutil_callback.o +0 -0
- data/ext/glib2/ruby-glib2.pc +3 -0
- data/lib/glib2.rb +2 -2
- data/lib/gnome2-raketask.rb +185 -0
- data/lib/gnome2-win32-binary-downloader.rb +49 -9
- data/lib/mkmf-gnome2.rb +55 -43
- data/test-unit/History.txt +5 -0
- data/test-unit/html/index.html +2 -2
- data/test-unit/html/index.html.ja +2 -2
- data/test-unit/lib/test/unit/assertions.rb +9 -4
- data/test-unit/lib/test/unit/autorunner.rb +13 -1
- data/test-unit/lib/test/unit/testsuite.rb +4 -2
- data/test-unit/lib/test/unit/version.rb +1 -1
- data/test-unit/test/test-testcase.rb +11 -3
- data/test-unit/test/test_assertions.rb +24 -3
- metadata +205 -153
@@ -0,0 +1,144 @@
|
|
1
|
+
|
2
|
+
/* Generated by glib-mkenums.rb ($Id: glib-mkenums.rb 3990 2010-10-27 03:38:42Z ktou $) */
|
3
|
+
|
4
|
+
#ifndef __GLIB_ENUM_TYPES_H__
|
5
|
+
#define __GLIB_ENUM_TYPES_H__
|
6
|
+
|
7
|
+
#include <glib-object.h>
|
8
|
+
|
9
|
+
G_BEGIN_DECLS
|
10
|
+
|
11
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gthread.h" */
|
12
|
+
GType g_thread_error_get_type (void);
|
13
|
+
#define G_TYPE_THREAD_ERROR (g_thread_error_get_type())
|
14
|
+
GType g_thread_priority_get_type (void);
|
15
|
+
#define G_TYPE_THREAD_PRIORITY (g_thread_priority_get_type())
|
16
|
+
GType g_once_status_get_type (void);
|
17
|
+
#define G_TYPE_ONCE_STATUS (g_once_status_get_type())
|
18
|
+
|
19
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gvariant.h" */
|
20
|
+
GType g_variant_class_get_type (void);
|
21
|
+
#define G_TYPE_VARIANT_CLASS (g_variant_class_get_type())
|
22
|
+
|
23
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gslice.h" */
|
24
|
+
GType g_slice_config_get_type (void);
|
25
|
+
#define G_TYPE_SLICE_CONFIG (g_slice_config_get_type())
|
26
|
+
|
27
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gbookmarkfile.h" */
|
28
|
+
GType g_bookmark_file_error_get_type (void);
|
29
|
+
#define G_TYPE_BOOKMARK_FILE_ERROR (g_bookmark_file_error_get_type())
|
30
|
+
|
31
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gstrfuncs.h" */
|
32
|
+
GType g_ascii_type_get_type (void);
|
33
|
+
#define G_TYPE_ASCII_TYPE (g_ascii_type_get_type())
|
34
|
+
|
35
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gkeyfile.h" */
|
36
|
+
GType g_key_file_error_get_type (void);
|
37
|
+
#define G_TYPE_KEY_FILE_ERROR (g_key_file_error_get_type())
|
38
|
+
GType g_key_file_flags_get_type (void);
|
39
|
+
#define G_TYPE_KEY_FILE_FLAGS (g_key_file_flags_get_type())
|
40
|
+
|
41
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gunicode.h" */
|
42
|
+
GType g_unicode_type_get_type (void);
|
43
|
+
#define G_TYPE_UNICODE_TYPE (g_unicode_type_get_type())
|
44
|
+
GType g_unicode_break_type_get_type (void);
|
45
|
+
#define G_TYPE_UNICODE_BREAK_TYPE (g_unicode_break_type_get_type())
|
46
|
+
GType g_unicode_script_get_type (void);
|
47
|
+
#define G_TYPE_UNICODE_SCRIPT (g_unicode_script_get_type())
|
48
|
+
GType g_normalize_mode_get_type (void);
|
49
|
+
#define G_TYPE_NORMALIZE_MODE (g_normalize_mode_get_type())
|
50
|
+
|
51
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gtestutils.h" */
|
52
|
+
GType g_test_trap_flags_get_type (void);
|
53
|
+
#define G_TYPE_TEST_TRAP_FLAGS (g_test_trap_flags_get_type())
|
54
|
+
GType g_test_log_type_get_type (void);
|
55
|
+
#define G_TYPE_TEST_LOG_TYPE (g_test_log_type_get_type())
|
56
|
+
|
57
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gdate.h" */
|
58
|
+
GType g_date_dmy_get_type (void);
|
59
|
+
#define G_TYPE_DATE_DMY (g_date_dmy_get_type())
|
60
|
+
GType g_date_weekday_get_type (void);
|
61
|
+
#define G_TYPE_DATE_WEEKDAY (g_date_weekday_get_type())
|
62
|
+
GType g_date_month_get_type (void);
|
63
|
+
#define G_TYPE_DATE_MONTH (g_date_month_get_type())
|
64
|
+
|
65
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gconvert.h" */
|
66
|
+
GType g_convert_error_get_type (void);
|
67
|
+
#define G_TYPE_CONVERT_ERROR (g_convert_error_get_type())
|
68
|
+
|
69
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gmarkup.h" */
|
70
|
+
GType g_markup_error_get_type (void);
|
71
|
+
#define G_TYPE_MARKUP_ERROR (g_markup_error_get_type())
|
72
|
+
GType g_markup_parse_flags_get_type (void);
|
73
|
+
#define G_TYPE_MARKUP_PARSE_FLAGS (g_markup_parse_flags_get_type())
|
74
|
+
GType g_markup_collect_type_get_type (void);
|
75
|
+
#define G_TYPE_MARKUP_COLLECT_TYPE (g_markup_collect_type_get_type())
|
76
|
+
|
77
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gregex.h" */
|
78
|
+
GType g_regex_error_get_type (void);
|
79
|
+
#define G_TYPE_REGEX_ERROR (g_regex_error_get_type())
|
80
|
+
GType g_regex_compile_flags_get_type (void);
|
81
|
+
#define G_TYPE_REGEX_COMPILE_FLAGS (g_regex_compile_flags_get_type())
|
82
|
+
GType g_regex_match_flags_get_type (void);
|
83
|
+
#define G_TYPE_REGEX_MATCH_FLAGS (g_regex_match_flags_get_type())
|
84
|
+
|
85
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gfileutils.h" */
|
86
|
+
GType g_file_error_get_type (void);
|
87
|
+
#define G_TYPE_FILE_ERROR (g_file_error_get_type())
|
88
|
+
GType g_file_test_get_type (void);
|
89
|
+
#define G_TYPE_FILE_TEST (g_file_test_get_type())
|
90
|
+
|
91
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gnode.h" */
|
92
|
+
GType g_traverse_flags_get_type (void);
|
93
|
+
#define G_TYPE_TRAVERSE_FLAGS (g_traverse_flags_get_type())
|
94
|
+
GType g_traverse_type_get_type (void);
|
95
|
+
#define G_TYPE_TRAVERSE_TYPE (g_traverse_type_get_type())
|
96
|
+
|
97
|
+
/* enumerations from "/usr/include/glib-2.0/glib/ghook.h" */
|
98
|
+
GType g_hook_flag_mask_get_type (void);
|
99
|
+
#define G_TYPE_HOOK_FLAG_MASK (g_hook_flag_mask_get_type())
|
100
|
+
|
101
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gmessages.h" */
|
102
|
+
GType g_log_level_flags_get_type (void);
|
103
|
+
#define G_TYPE_LOG_LEVEL_FLAGS (g_log_level_flags_get_type())
|
104
|
+
|
105
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gchecksum.h" */
|
106
|
+
GType g_checksum_type_get_type (void);
|
107
|
+
#define G_TYPE_CHECKSUM_TYPE (g_checksum_type_get_type())
|
108
|
+
|
109
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gshell.h" */
|
110
|
+
GType g_shell_error_get_type (void);
|
111
|
+
#define G_TYPE_SHELL_ERROR (g_shell_error_get_type())
|
112
|
+
|
113
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gspawn.h" */
|
114
|
+
GType g_spawn_error_get_type (void);
|
115
|
+
#define G_TYPE_SPAWN_ERROR (g_spawn_error_get_type())
|
116
|
+
GType g_spawn_flags_get_type (void);
|
117
|
+
#define G_TYPE_SPAWN_FLAGS (g_spawn_flags_get_type())
|
118
|
+
|
119
|
+
/* enumerations from "/usr/include/glib-2.0/glib/goption.h" */
|
120
|
+
GType g_option_flags_get_type (void);
|
121
|
+
#define G_TYPE_OPTION_FLAGS (g_option_flags_get_type())
|
122
|
+
GType g_option_arg_get_type (void);
|
123
|
+
#define G_TYPE_OPTION_ARG (g_option_arg_get_type())
|
124
|
+
GType g_option_error_get_type (void);
|
125
|
+
#define G_TYPE_OPTION_ERROR (g_option_error_get_type())
|
126
|
+
|
127
|
+
/* enumerations from "/usr/include/glib-2.0/glib/gutils.h" */
|
128
|
+
GType g_user_directory_get_type (void);
|
129
|
+
#define G_TYPE_USER_DIRECTORY (g_user_directory_get_type())
|
130
|
+
|
131
|
+
/* enumerations from "/usr/include/glib-2.0/gobject/gsignal.h" */
|
132
|
+
GType g_signal_flags_get_type (void);
|
133
|
+
#define G_TYPE_SIGNAL_FLAGS (g_signal_flags_get_type())
|
134
|
+
GType g_connect_flags_get_type (void);
|
135
|
+
#define G_TYPE_CONNECT_FLAGS (g_connect_flags_get_type())
|
136
|
+
GType g_signal_match_type_get_type (void);
|
137
|
+
#define G_TYPE_SIGNAL_MATCH_TYPE (g_signal_match_type_get_type())
|
138
|
+
|
139
|
+
G_END_DECLS
|
140
|
+
|
141
|
+
#endif /* __GLIB_ENUM_TYPES_H__ */
|
142
|
+
|
143
|
+
/* Generated data ends here */
|
144
|
+
|
Binary file
|
data/ext/glib2/glib2.so
ADDED
Binary file
|
data/ext/glib2/rbglib.h
CHANGED
data/ext/glib2/rbglib.o
ADDED
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
|
data/ext/glib2/rbgobj_type.c
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ext/glib2/rbgutil.o
ADDED
Binary file
|
Binary file
|
data/lib/glib2.rb
CHANGED
@@ -65,11 +65,11 @@ module GLib
|
|
65
65
|
path = Pathname(path) unless path.is_a?(Pathname)
|
66
66
|
if path.exist?
|
67
67
|
environment_name = "PATH"
|
68
|
-
separator = File::PATH_SEPARATOR
|
68
|
+
separator = ::File::PATH_SEPARATOR
|
69
69
|
|
70
70
|
paths = (ENV[environment_name] || '').split(/#{separator}/)
|
71
71
|
dir = path.to_s
|
72
|
-
dir = dir.gsub(/\//, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
|
72
|
+
dir = dir.gsub(/\//, ::File::ALT_SEPARATOR) if ::File::ALT_SEPARATOR
|
73
73
|
unless paths.include?(dir)
|
74
74
|
paths = [dir] + paths
|
75
75
|
ENV[environment_name] = paths.join(separator)
|
@@ -0,0 +1,185 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
# Copyright(C) 2011 Ruby-GNOME2 Project.
|
4
|
+
#
|
5
|
+
# This program is licenced under the same license of Ruby-GNOME2.
|
6
|
+
|
7
|
+
require 'find'
|
8
|
+
|
9
|
+
require 'rubygems'
|
10
|
+
require 'rake/extensiontask'
|
11
|
+
|
12
|
+
class GNOME2Package
|
13
|
+
attr_accessor :name, :summary, :description, :author, :email, :homepage, :post_install_message
|
14
|
+
def initialize
|
15
|
+
initialize_variables
|
16
|
+
initialize_configurations
|
17
|
+
file, line, method = caller[1].scan(/^(.*):(\d+)(?::.*`(.*)')?\Z/).first
|
18
|
+
@package_root = File.dirname(file)
|
19
|
+
@glib2_root = File.expand_path("#{@package_root}/../glib2")
|
20
|
+
@packages = FileList["#{File.dirname(@package_root)}/*"].map{|f| File.directory?(f) ? File.basename(f) : nil}.compact
|
21
|
+
@name = File.basename(@package_root)
|
22
|
+
yield(self) if block_given?
|
23
|
+
end
|
24
|
+
|
25
|
+
def define_tasks
|
26
|
+
task :default => :build
|
27
|
+
define_gem_tasks
|
28
|
+
define_win32_tasks
|
29
|
+
end
|
30
|
+
|
31
|
+
def ruby_gnome2_package?(name)
|
32
|
+
@packages.include?(name)
|
33
|
+
end
|
34
|
+
|
35
|
+
def dependency
|
36
|
+
@dependency_configuration
|
37
|
+
end
|
38
|
+
|
39
|
+
def win32
|
40
|
+
@win32_configuration
|
41
|
+
end
|
42
|
+
|
43
|
+
def version
|
44
|
+
ENV["VERSION"] || guess_version
|
45
|
+
end
|
46
|
+
|
47
|
+
def guess_version
|
48
|
+
versions = {}
|
49
|
+
File.open("#{@glib2_root}/ext/glib2/rbglib.h") do |rbglib_h|
|
50
|
+
rbglib_h.each_line do |line|
|
51
|
+
if /#define\s+RBGLIB_([A-Z]+)_VERSION\s+(\d+)/ =~ line
|
52
|
+
versions[$1.downcase] = $2.to_i
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
["major", "minor", "micro"].collect {|type| versions[type]}.compact.join(".")
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
def initialize_variables
|
61
|
+
@name = ""
|
62
|
+
@summary = ""
|
63
|
+
@description = ""
|
64
|
+
@author = "The Ruby-GNOME2 Proejct Team"
|
65
|
+
@email = "ruby-gnome2-devel-en@lists.sourceforge.net"
|
66
|
+
@homepage = "http://ruby-gnome2.sourceforge.jp/"
|
67
|
+
end
|
68
|
+
|
69
|
+
def initialize_configurations
|
70
|
+
@dependency_configuration = DependencyConfiguration.new(self)
|
71
|
+
@win32_configuration = Win32Configuration.new(self)
|
72
|
+
end
|
73
|
+
|
74
|
+
def define_gem_tasks
|
75
|
+
@spec = Gem::Specification.new do |s|
|
76
|
+
s.name = @name
|
77
|
+
s.summary = @summary
|
78
|
+
s.description = @description
|
79
|
+
s.author = @author
|
80
|
+
s.email = @email
|
81
|
+
s.homepage = @homepage
|
82
|
+
s.version = version
|
83
|
+
s.extensions = FileList["ext/#{@name}/extconf.rb"]
|
84
|
+
s.require_paths = ["lib"]
|
85
|
+
s.files = FileList[
|
86
|
+
"ChangeLog", "README", "Rakefile", "extconf.rb",
|
87
|
+
"lib/**/*.rb", "{ext,sample,test,test-unit}/**/*"]
|
88
|
+
s.post_install_message = @post_install_message
|
89
|
+
@dependency_configuration.apply(s)
|
90
|
+
end
|
91
|
+
|
92
|
+
Rake::GemPackageTask.new(@spec) do |pkg|
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def define_win32_tasks
|
97
|
+
Rake::ExtensionTask.new(@name, @spec) do |ext|
|
98
|
+
ext.cross_compile = true
|
99
|
+
ext.cross_compiling do |spec|
|
100
|
+
if /mingw|mswin/ =~ spec.platform.to_s
|
101
|
+
win32_dir = File.join("vendor", "local")
|
102
|
+
win32_files = []
|
103
|
+
if File.exist?(win32_dir)
|
104
|
+
Find.find(win32_dir) do |file|
|
105
|
+
next if /\.zip\z/ =~ file
|
106
|
+
win32_files << file
|
107
|
+
end
|
108
|
+
end
|
109
|
+
spec.files += win32_files
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
namespace :win32 do
|
115
|
+
desc "download Windows binaries"
|
116
|
+
task :download do
|
117
|
+
$LOAD_PATH.unshift("#{@glib2_root}/lib")
|
118
|
+
require 'gnome2-win32-binary-downloader'
|
119
|
+
GNOME2Win32BinaryDownloader.download(@win32_configuration.to_hash)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
class DependencyConfiguration
|
125
|
+
attr_accessor :platform, :ruby
|
126
|
+
def initialize(package)
|
127
|
+
@package = package
|
128
|
+
@platform = Gem::Platform::RUBY
|
129
|
+
@ruby = ">=1.8.5"
|
130
|
+
@gem_configuration = GemConfiguration.new(@package)
|
131
|
+
end
|
132
|
+
|
133
|
+
def gem
|
134
|
+
@gem_configuration
|
135
|
+
end
|
136
|
+
|
137
|
+
def apply(spec)
|
138
|
+
spec.platform = @platform
|
139
|
+
spec.required_ruby_version = @ruby
|
140
|
+
@gem_configuration.apply(spec)
|
141
|
+
end
|
142
|
+
|
143
|
+
class GemConfiguration
|
144
|
+
attr_accessor :runtime, :development
|
145
|
+
def initialize(package)
|
146
|
+
@package = package
|
147
|
+
@runtime = []
|
148
|
+
@development = []
|
149
|
+
end
|
150
|
+
|
151
|
+
def apply(spec)
|
152
|
+
@runtime.each do |dependency|
|
153
|
+
spec.add_runtime_dependency(*append_version(dependency))
|
154
|
+
end
|
155
|
+
|
156
|
+
@development.each do |dependency|
|
157
|
+
spec.add_development_dependency(*append_version(dependency))
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
def append_version(dependency)
|
162
|
+
name, *ver = dependency.is_a?(Array) ? dependency : [dependency]
|
163
|
+
ver << ">= #{@package.version}" if @package.ruby_gnome2_package?(name)
|
164
|
+
[name, *ver]
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
class Win32Configuration
|
170
|
+
attr_accessor :packages, :dependencies
|
171
|
+
def initialize(package)
|
172
|
+
@package = package
|
173
|
+
@packages = []
|
174
|
+
@dependencies = []
|
175
|
+
end
|
176
|
+
|
177
|
+
def to_hash
|
178
|
+
{
|
179
|
+
:packages => @packages,
|
180
|
+
:dependencies => @dependencies,
|
181
|
+
}
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|