gio2 0.90.5 → 0.90.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/ChangeLog +41 -0
  2. data/Rakefile +9 -70
  3. data/ext/gio2/Makefile +162 -0
  4. data/ext/gio2/extconf.rb +9 -9
  5. data/ext/gio2/gappinfo.o +0 -0
  6. data/ext/gio2/gapplaunchcontext.o +0 -0
  7. data/ext/gio2/gasyncinitable.c +0 -1
  8. data/ext/gio2/gasyncinitable.o +0 -0
  9. data/ext/gio2/gasyncresult.o +0 -0
  10. data/ext/gio2/gbufferedinputstream.c +0 -19
  11. data/ext/gio2/gbufferedinputstream.o +0 -0
  12. data/ext/gio2/gbufferedoutputstream.c +0 -34
  13. data/ext/gio2/gbufferedoutputstream.o +0 -0
  14. data/ext/gio2/gcancellable.o +0 -0
  15. data/ext/gio2/gcharsetconverter.c +0 -17
  16. data/ext/gio2/gcharsetconverter.o +0 -0
  17. data/ext/gio2/gcontenttype.c +1 -8
  18. data/ext/gio2/gcontenttype.o +0 -0
  19. data/ext/gio2/gconverter.o +0 -0
  20. data/ext/gio2/gconverterinputstream.c +0 -7
  21. data/ext/gio2/gconverterinputstream.o +0 -0
  22. data/ext/gio2/gconverteroutputstream.c +0 -7
  23. data/ext/gio2/gconverteroutputstream.o +0 -0
  24. data/ext/gio2/gdatainputstream.c +34 -57
  25. data/ext/gio2/gdatainputstream.o +0 -0
  26. data/ext/gio2/gdataoutputstream.c +0 -18
  27. data/ext/gio2/gdataoutputstream.o +0 -0
  28. data/ext/gio2/gdesktopappinfo.c +0 -2
  29. data/ext/gio2/gdesktopappinfo.o +0 -0
  30. data/ext/gio2/gdrive.o +0 -0
  31. data/ext/gio2/gemblem.c +0 -19
  32. data/ext/gio2/gemblem.o +0 -0
  33. data/ext/gio2/gemblemedicon.o +0 -0
  34. data/ext/gio2/gfile.c +4 -6
  35. data/ext/gio2/gfile.o +0 -0
  36. data/ext/gio2/gfileattribute.c +3 -155
  37. data/ext/gio2/gfileattribute.o +0 -0
  38. data/ext/gio2/gfileattributeinfo.c +89 -0
  39. data/ext/gio2/gfileattributeinfo.o +0 -0
  40. data/ext/gio2/gfileattributeinfolist.c +109 -0
  41. data/ext/gio2/gfileattributeinfolist.o +0 -0
  42. data/ext/gio2/gfileattributematcher.o +0 -0
  43. data/ext/gio2/gfiledescriptorbased.o +0 -0
  44. data/ext/gio2/gfileenumerator.c +0 -2
  45. data/ext/gio2/gfileenumerator.o +0 -0
  46. data/ext/gio2/gfileicon.c +0 -7
  47. data/ext/gio2/gfileicon.o +0 -0
  48. data/ext/gio2/gfileinfo.c +4 -11
  49. data/ext/gio2/gfileinfo.o +0 -0
  50. data/ext/gio2/gfileinputstream.c +0 -2
  51. data/ext/gio2/gfileinputstream.o +0 -0
  52. data/ext/gio2/gfileiostream.c +0 -2
  53. data/ext/gio2/gfileiostream.o +0 -0
  54. data/ext/gio2/gfilemonitor.c +0 -19
  55. data/ext/gio2/gfilemonitor.o +0 -0
  56. data/ext/gio2/gfilenamecompleter.o +0 -0
  57. data/ext/gio2/gfileoutputstream.c +1 -5
  58. data/ext/gio2/gfileoutputstream.o +0 -0
  59. data/ext/gio2/gfilterinputstream.c +1 -30
  60. data/ext/gio2/gfilterinputstream.o +0 -0
  61. data/ext/gio2/gfilteroutputstream.c +1 -30
  62. data/ext/gio2/gfilteroutputstream.o +0 -0
  63. data/ext/gio2/gicon.c +0 -2
  64. data/ext/gio2/gicon.o +0 -0
  65. data/ext/gio2/ginetaddress.c +0 -72
  66. data/ext/gio2/ginetaddress.o +0 -0
  67. data/ext/gio2/ginetsocketaddress.c +0 -16
  68. data/ext/gio2/ginetsocketaddress.o +0 -0
  69. data/ext/gio2/ginitable.o +0 -0
  70. data/ext/gio2/ginputstream.c +0 -2
  71. data/ext/gio2/ginputstream.o +0 -0
  72. data/ext/gio2/gio2.c +11 -1
  73. data/ext/gio2/gio2.h +9 -1
  74. data/ext/gio2/gio2.o +0 -0
  75. data/ext/gio2/gio2.so +0 -0
  76. data/ext/gio2/gioerror.c +4 -1
  77. data/ext/gio2/gioerror.o +0 -0
  78. data/ext/gio2/giomodule.c +2 -2
  79. data/ext/gio2/giomodule.o +0 -0
  80. data/ext/gio2/gioscheduler.c +4 -6
  81. data/ext/gio2/gioscheduler.o +0 -0
  82. data/ext/gio2/giostream.c +0 -23
  83. data/ext/gio2/giostream.o +0 -0
  84. data/ext/gio2/gloadableicon.c +0 -1
  85. data/ext/gio2/gloadableicon.o +0 -0
  86. data/ext/gio2/gmemoryinputstream.o +0 -0
  87. data/ext/gio2/gmemoryoutputstream.c +0 -24
  88. data/ext/gio2/gmemoryoutputstream.o +0 -0
  89. data/ext/gio2/gmount.c +1 -0
  90. data/ext/gio2/gmount.o +0 -0
  91. data/ext/gio2/gmountoperation.c +1 -103
  92. data/ext/gio2/gmountoperation.o +0 -0
  93. data/ext/gio2/gnetworkaddress.c +0 -14
  94. data/ext/gio2/gnetworkaddress.o +0 -0
  95. data/ext/gio2/gnetworkservice.c +0 -21
  96. data/ext/gio2/gnetworkservice.o +0 -0
  97. data/ext/gio2/goutputstream.c +8 -18
  98. data/ext/gio2/goutputstream.o +0 -0
  99. data/ext/gio2/gresolver.c +0 -2
  100. data/ext/gio2/gresolver.o +0 -0
  101. data/ext/gio2/gseekable.o +0 -0
  102. data/ext/gio2/gsimpleasyncresult.o +0 -0
  103. data/ext/gio2/gsocket.c +2 -80
  104. data/ext/gio2/gsocket.o +0 -0
  105. data/ext/gio2/gsocketaddress.c +1 -13
  106. data/ext/gio2/gsocketaddress.o +0 -0
  107. data/ext/gio2/gsocketclient.c +0 -68
  108. data/ext/gio2/gsocketclient.o +0 -0
  109. data/ext/gio2/gsocketconnectable.o +0 -0
  110. data/ext/gio2/gsocketconnection.c +1 -8
  111. data/ext/gio2/gsocketconnection.o +0 -0
  112. data/ext/gio2/gsocketcontrolmessage.c +0 -2
  113. data/ext/gio2/gsocketcontrolmessage.o +0 -0
  114. data/ext/gio2/gsocketlistener.c +27 -21
  115. data/ext/gio2/gsocketlistener.o +0 -0
  116. data/ext/gio2/gsocketservice.o +0 -0
  117. data/ext/gio2/gsrvtarget.o +0 -0
  118. data/ext/gio2/gtcpconnection.c +1 -22
  119. data/ext/gio2/gtcpconnection.o +0 -0
  120. data/ext/gio2/gthemedicon.o +0 -0
  121. data/ext/gio2/gthreadedsocketservice.c +6 -5
  122. data/ext/gio2/gthreadedsocketservice.o +0 -0
  123. data/ext/gio2/gunixconnection.o +0 -0
  124. data/ext/gio2/gunixfdlist.c +1 -1
  125. data/ext/gio2/gunixfdlist.o +0 -0
  126. data/ext/gio2/gunixfdmessage.c +0 -9
  127. data/ext/gio2/gunixfdmessage.o +0 -0
  128. data/ext/gio2/gunixinputstream.c +0 -24
  129. data/ext/gio2/gunixinputstream.o +0 -0
  130. data/ext/gio2/gunixmounts.c +1 -4
  131. data/ext/gio2/gunixmounts.o +0 -0
  132. data/ext/gio2/gunixoutputstream.c +0 -24
  133. data/ext/gio2/gunixoutputstream.o +0 -0
  134. data/ext/gio2/gunixsocketaddress.c +5 -17
  135. data/ext/gio2/gunixsocketaddress.o +0 -0
  136. data/ext/gio2/gvfs.c +0 -2
  137. data/ext/gio2/gvfs.o +0 -0
  138. data/ext/gio2/gvolume.o +0 -0
  139. data/ext/gio2/gvolumemonitor.c +0 -2
  140. data/ext/gio2/gvolumemonitor.o +0 -0
  141. data/ext/gio2/gzlibcompressor.c +3 -0
  142. data/ext/gio2/gzlibcompressor.o +0 -0
  143. data/ext/gio2/gzlibdecompressor.o +0 -0
  144. data/ext/gio2/ruby-gio2.pc +3 -0
  145. data/ext/gio2/util.c +3 -0
  146. data/ext/gio2/util.o +0 -0
  147. data/lib/gio2.rb +19 -1
  148. data/test/load-test.rb +14 -0
  149. data/test/test_bufferedinputstream.rb +2 -0
  150. data/test/test_charsetconverter.rb +2 -0
  151. data/test/test_datainputstream.rb +7 -0
  152. data/test/test_fileenumerator.rb +8 -0
  153. data/test/test_filemonitor.rb +2 -0
  154. data/test/test_inetaddress.rb +8 -0
  155. metadata +173 -79
data/ChangeLog CHANGED
@@ -1,3 +1,44 @@
1
+ 2011-01-30 Kouhei Sutou <kou@cozmixng.org>
2
+
3
+ * Rakefile, ext/gio2/extconf.rb: share depended packages
4
+ vendor/local/.
5
+
6
+ 2011-01-29 Kouhei Sutou <kou@cozmixng.org>
7
+
8
+ * ext/gio2/gunixsocketaddress.c (Init_gunixsocketaddress): disable
9
+ G_TYPE_UNIX_SOCKET_ADDRESS_TYPE on GIO 2.24 because it was appeared
10
+ in GIO 2.26.
11
+
12
+ * ext/gio2/gdatainputstream.c: disable read_upto related methods
13
+ with GIO 2.24 because GIO 2.24 has those definition in *.c but no those
14
+ declarations in *.h.
15
+
16
+ 2011-01-22 Masaaki Aoyagi
17
+
18
+ * Rakefile: change to use gnome2-raketask.rb.
19
+
20
+ 2011-01-16 Nikolai Weibull
21
+
22
+ * ext/gio2/gfileattribute.c: Split into files for each separate class
23
+ and update names to match the rules of Ruby-GNOME2.
24
+ * ext/gio2/*: Remove methods for getting and setting properties that
25
+ are automatically generated.
26
+ * lib/gio2.rb: Make GLib::UnixFDList Enumerable.
27
+ * ext/gio2/*: Don’t use rb_undef_alloc_func. We would like to remove
28
+ .new from these classes, but I don’t know of a way of doing so. Using
29
+ rb_undef_alloc_func is incorrect, as it will make subclasses
30
+ unallocatable.
31
+ * ext/gio2/*: Fix some TODOs.
32
+
33
+ 2010-11-12 Nikolai Weibull
34
+
35
+ * *: Fix two compilation issues introduced in yesterdays bugfixing.
36
+ * *: Update various other small things.
37
+
38
+ 2010-11-11 Nikolai Weibull
39
+
40
+ * *: Fix various minor bugs.
41
+
1
42
  2010-10-23 Kouhei Sutou <kou@clear-code.com>
2
43
 
3
44
  * Rakefile: remove needless cairo dependency.
data/Rakefile CHANGED
@@ -1,75 +1,14 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'pathname'
4
- require 'find'
5
- require 'rubygems'
6
- require 'rake/extensiontask'
3
+ require './../glib2/lib/gnome2-raketask'
7
4
 
8
- @top_dir = Pathname(__FILE__).dirname.parent.expand_path
9
- @rb_glib2_dir = @top_dir + "glib2"
10
-
11
- task :default => :build
12
-
13
- def version
14
- @version ||= ENV["VERSION"] || guess_version
15
- end
16
-
17
- def guess_version
18
- versions = {}
19
- rbglib_h_path = @rb_glib2_dir + "ext" + "glib2" + "rbglib.h"
20
- rbglib_h_path.open do |rbglib_h|
21
- rbglib_h.each_line do |line|
22
- if /#define\s+RBGLIB_([A-Z]+)_VERSION\s+(\d+)/ =~ line
23
- versions[$1.downcase] = $2.to_i
24
- end
25
- end
26
- end
27
- ["major", "minor", "micro"].collect {|type| versions[type]}.compact.join(".")
28
- end
29
-
30
- package_name = "gio2"
31
-
32
- spec = Gem::Specification.new do |s|
33
- s.name = package_name
34
- s.summary = "Ruby/GIO2 is a Ruby binding of gio-2.x."
35
- s.description = "Ruby/GIO2 is a Ruby binding of gio-2.x."
36
- s.author = "The Ruby-GNOME2 Proejct Team"
37
- s.email = "ruby-gnome2-devel-en@lists.sourceforge.net"
38
- s.homepage = "http://ruby-gnome2.sourceforge.jp/"
39
- s.version = version
40
- s.platform = Gem::Platform::RUBY
41
- compatible_version = version.split(/\./)[0, 3].join(".")
42
- s.add_dependency("glib2", ">= #{compatible_version}")
43
- s.extensions = FileList["ext/#{package_name}/extconf.rb"]
44
- s.require_paths = ["lib"]
45
- s.files = FileList["ChangeLog", "README", "Rakefile", "extconf.rb",
46
- "lib/**/*.rb", "ext/**/*"]
47
- end
48
-
49
- Rake::GemPackageTask.new(spec) do |pkg|
5
+ package = GNOME2Package.new do |_package|
6
+ _package.summary = "Ruby/GIO2 is a Ruby binding of gio-2.x."
7
+ _package.description = "Ruby/GIO2 is a Ruby binding of gio-2.x."
8
+ _package.dependency.gem.runtime = ["glib2"]
9
+ _package.win32.packages = []
10
+ _package.win32.dependencies = []
11
+ _package.post_install_message = "This library is experimental."
50
12
  end
13
+ package.define_tasks
51
14
 
52
- Rake::ExtensionTask.new(package_name, spec) do |ext|
53
- ext.cross_compile = true
54
- ext.cross_compiling do |spec|
55
- if /mingw|mswin/ =~ spec.platform.to_s
56
- win32_dir = File.join("vendor", "local")
57
- win32_files = []
58
- Find.find(win32_dir) do |file|
59
- next if /\.zip\z/ =~ file
60
- win32_files << file
61
- end
62
- spec.files += win32_files
63
- end
64
- end
65
- end
66
-
67
- namespace :win32 do
68
- desc "download Windows binaries"
69
- task :download do
70
- $LOAD_PATH.unshift((@rb_glib2_dir + "lib").to_s)
71
- require 'gnome2-win32-binary-downloader'
72
- GNOME2Win32BinaryDownloader.download(:packages => ["glib"],
73
- :dependencies => ["gettext-runtime"])
74
- end
75
- end
data/ext/gio2/Makefile ADDED
@@ -0,0 +1,162 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = /home/kou/work/ruby/ruby-gnome2/gio2/ext/gio2
7
+ topdir = /usr/lib/ruby/1.8/x86_64-linux
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+ exec_prefix = $(prefix)
11
+ prefix = $(DESTDIR)/usr
12
+ sharedstatedir = $(prefix)/com
13
+ mandir = $(prefix)/share/man
14
+ psdir = $(docdir)
15
+ oldincludedir = $(DESTDIR)/usr/include
16
+ localedir = $(datarootdir)/locale
17
+ bindir = $(exec_prefix)/bin
18
+ libexecdir = $(prefix)/lib/ruby1.8
19
+ sitedir = $(DESTDIR)/usr/local/lib/site_ruby
20
+ htmldir = $(docdir)
21
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
22
+ includedir = $(prefix)/include
23
+ infodir = $(prefix)/share/info
24
+ vendorlibdir = $(vendordir)/$(ruby_version)
25
+ sysconfdir = $(DESTDIR)/etc
26
+ libdir = $(exec_prefix)/lib
27
+ sbindir = $(exec_prefix)/sbin
28
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
29
+ docdir = $(datarootdir)/doc/$(PACKAGE)
30
+ dvidir = $(docdir)
31
+ vendordir = $(libdir)/ruby/vendor_ruby
32
+ datarootdir = $(prefix)/share
33
+ pdfdir = $(docdir)
34
+ archdir = $(rubylibdir)/$(arch)
35
+ sitearchdir = $(sitelibdir)/$(sitearch)
36
+ datadir = $(datarootdir)
37
+ localstatedir = $(DESTDIR)/var
38
+ sitelibdir = $(sitedir)/$(ruby_version)
39
+
40
+ CC = gcc
41
+ LIBRUBY = $(LIBRUBY_SO)
42
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
43
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
44
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
45
+
46
+ RUBY_EXTCONF_H =
47
+ CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC $(cflags) -Wall -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -finline-functions -fno-common -Wall -Waggregate-return -Wcast-align -Wextra -Wformat=2 -Winit-self -Winline -Wlarger-than-65500 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wp,-D_FORTIFY_SOURCE=2 -Wpointer-arith -Wswitch-default -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -Wwrite-strings
48
+ INCFLAGS = -I. -I/home/kou/work/ruby/ruby-gnome2/glib2/ext/glib2 -I/home/kou/work/ruby/ruby-gnome2/glib2/ext/glib2 -I/home/kou/work/ruby/ruby-gnome2/glib2/ext/glib2 -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/ruby-gnome2/gio2/ext/gio2
49
+ DEFS =
50
+ CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DHAVE_NODE_ATTRASGN -DHAVE_RB_EXEC_RECURSIVE -DRUBY_GIO2_COMPILATION -DHAVE_GIO_UNIX
51
+ CXXFLAGS = $(CFLAGS)
52
+ ldflags = -L. -rdynamic -Wl,-export-dynamic -pthread -pthread -pthread
53
+ dldflags =
54
+ archflag =
55
+ DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
56
+ LDSHARED = $(CC) -shared
57
+ AR = ar
58
+ EXEEXT =
59
+
60
+ RUBY_INSTALL_NAME = ruby1.8
61
+ RUBY_SO_NAME = ruby1.8
62
+ arch = x86_64-linux
63
+ sitearch = x86_64-linux
64
+ ruby_version = 1.8
65
+ ruby = /usr/bin/ruby1.8
66
+ RUBY = $(ruby)
67
+ RM = rm -f
68
+ MAKEDIRS = mkdir -p
69
+ INSTALL = /usr/bin/install -c
70
+ INSTALL_PROG = $(INSTALL) -m 0755
71
+ INSTALL_DATA = $(INSTALL) -m 644
72
+ COPY = cp
73
+
74
+ #### End of system configuration section. ####
75
+
76
+ preload =
77
+
78
+ libpath = . $(libdir)
79
+ LIBPATH = -L. -L$(libdir)
80
+ DEFFILE =
81
+
82
+ CLEANFILES = mkmf.log
83
+ DISTCLEANFILES =
84
+
85
+ extout =
86
+ extout_prefix =
87
+ target_prefix =
88
+ LOCAL_LIBS =
89
+ LIBS = $(LIBRUBYARG_SHARED) -lgio-2.0 -lglib-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lgmodule-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -lrt -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -lrt -lpthread -lrt -ldl -lcrypt -lm -lc
90
+ SRCS = gunixfdlist.c gasyncinitable.c gfilemonitor.c gappinfo.c gfileiostream.c ginetaddress.c gzlibdecompressor.c ginetsocketaddress.c gfileenumerator.c gfileattributeinfo.c gfileinfo.c gemblemedicon.c gseekable.c gmountoperation.c gresolver.c gsrvtarget.c gfileinputstream.c gbufferedinputstream.c gicon.c gfiledescriptorbased.c gnetworkservice.c gnetworkaddress.c gsocketconnectable.c gsocketcontrolmessage.c gdesktopappinfo.c gfilteroutputstream.c gvolumemonitor.c gioerror.c gmemoryoutputstream.c gfileattributematcher.c gcancellable.c gconverteroutputstream.c gioscheduler.c gsocketservice.c gconverter.c gfile.c gunixoutputstream.c gdatainputstream.c gfileattribute.c gdataoutputstream.c gcontenttype.c gio2.c gmount.c ginitable.c gasyncresult.c gunixconnection.c gsocketconnection.c gsocket.c gzlibcompressor.c gvfs.c gmemoryinputstream.c gsimpleasyncresult.c gvolume.c goutputstream.c gsocketaddress.c gfileattributeinfolist.c gfilenamecompleter.c gdrive.c gtcpconnection.c gfileoutputstream.c giostream.c gunixfdmessage.c util.c gsocketlistener.c gfilterinputstream.c gthemedicon.c gloadableicon.c gapplaunchcontext.c gunixmounts.c gunixsocketaddress.c gcharsetconverter.c gsocketclient.c giomodule.c ginputstream.c gbufferedoutputstream.c gfileicon.c gunixinputstream.c gemblem.c gconverterinputstream.c gthreadedsocketservice.c
91
+ OBJS = gunixfdlist.o gasyncinitable.o gfilemonitor.o gappinfo.o gfileiostream.o ginetaddress.o gzlibdecompressor.o ginetsocketaddress.o gfileenumerator.o gfileattributeinfo.o gfileinfo.o gemblemedicon.o gseekable.o gmountoperation.o gresolver.o gsrvtarget.o gfileinputstream.o gbufferedinputstream.o gicon.o gfiledescriptorbased.o gnetworkservice.o gnetworkaddress.o gsocketconnectable.o gsocketcontrolmessage.o gdesktopappinfo.o gfilteroutputstream.o gvolumemonitor.o gioerror.o gmemoryoutputstream.o gfileattributematcher.o gcancellable.o gconverteroutputstream.o gioscheduler.o gsocketservice.o gconverter.o gfile.o gunixoutputstream.o gdatainputstream.o gfileattribute.o gdataoutputstream.o gcontenttype.o gio2.o gmount.o ginitable.o gasyncresult.o gunixconnection.o gsocketconnection.o gsocket.o gzlibcompressor.o gvfs.o gmemoryinputstream.o gsimpleasyncresult.o gvolume.o goutputstream.o gsocketaddress.o gfileattributeinfolist.o gfilenamecompleter.o gdrive.o gtcpconnection.o gfileoutputstream.o giostream.o gunixfdmessage.o util.o gsocketlistener.o gfilterinputstream.o gthemedicon.o gloadableicon.o gapplaunchcontext.o gunixmounts.o gunixsocketaddress.o gcharsetconverter.o gsocketclient.o giomodule.o ginputstream.o gbufferedoutputstream.o gfileicon.o gunixinputstream.o gemblem.o gconverterinputstream.o gthreadedsocketservice.o
92
+ TARGET = gio2
93
+ DLLIB = $(TARGET).so
94
+ EXTSTATIC =
95
+ STATIC_LIB =
96
+
97
+ BINDIR = $(bindir)
98
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
99
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
100
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
101
+
102
+ TARGET_SO = $(DLLIB)
103
+ CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
104
+ CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
105
+
106
+ all: $(DLLIB)
107
+ static: $(STATIC_LIB)
108
+
109
+ clean:
110
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
111
+
112
+ distclean: clean
113
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
114
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
115
+
116
+ realclean: distclean
117
+ install: install-so install-rb
118
+
119
+ install-so: $(RUBYARCHDIR)
120
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
121
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
122
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
123
+ install-rb: pre-install-rb install-rb-default
124
+ install-rb-default: pre-install-rb-default
125
+ pre-install-rb: Makefile
126
+ pre-install-rb-default: Makefile
127
+ $(RUBYARCHDIR):
128
+ $(MAKEDIRS) $@
129
+
130
+ site-install: site-install-so site-install-rb
131
+ site-install-so: install-so
132
+ site-install-rb: install-rb
133
+
134
+ .SUFFIXES: .c .m .cc .cxx .cpp .C .o
135
+
136
+ .cc.o:
137
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
138
+
139
+ .cxx.o:
140
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
141
+
142
+ .cpp.o:
143
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
144
+
145
+ .C.o:
146
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
147
+
148
+ .c.o:
149
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
150
+
151
+ $(DLLIB): $(OBJS) Makefile
152
+ @-$(RM) $@
153
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
154
+
155
+
156
+
157
+ ###
158
+ install:
159
+ if test -n "$(pkgconfigdir)"; then \
160
+ $(MAKEDIRS) $(pkgconfigdir); \
161
+ $(INSTALL_DATA) ruby-gio2.pc $(pkgconfigdir); \
162
+ fi
data/ext/gio2/extconf.rb CHANGED
@@ -24,6 +24,15 @@ package_id = "gio-2.0"
24
24
 
25
25
  require 'mkmf-gnome2'
26
26
 
27
+ ["glib2"].each do |package|
28
+ directory = "#{package}#{version_suffix}"
29
+ build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
30
+ add_depend_package(package, "#{directory}/ext/#{package}",
31
+ top_dir.to_s,
32
+ :top_build_dir => top_build_dir.to_s,
33
+ :target_build_dir => build_dir)
34
+ end
35
+
27
36
  win32 = setup_win32(module_name, base_dir)
28
37
 
29
38
  defines = '-DRUBY_GIO2_COMPILATION'
@@ -36,15 +45,6 @@ PKGConfig.have_package('gobject-2.0') or exit 1
36
45
 
37
46
  have_func('rb_exec_recursive')
38
47
 
39
- ["glib2"].each do |package|
40
- directory = "#{package}#{version_suffix}"
41
- build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
42
- add_depend_package(package, "#{directory}/ext/#{package}",
43
- top_dir.to_s,
44
- :top_build_dir => top_build_dir.to_s,
45
- :target_build_dir => build_dir)
46
- end
47
-
48
48
  def try_compiler_option(opt, &block)
49
49
  checking_for "#{opt} option to compiler" do
50
50
  $CFLAGS += " #{opt}" if try_compile '', opt, &block
Binary file
Binary file
@@ -239,6 +239,5 @@ Init_gasyncinitable(VALUE glib)
239
239
  rb_define_method(asyncinitable, "init_async", asyncinitable_init_async, -1);
240
240
  rb_define_method(asyncinitable, "init_finish", asyncinitable_init_finish, 1);
241
241
  rb_define_method(asyncinitable, "initialize", asyncinitable_initialize, -1);
242
- /* TODO: Ruby name? */
243
242
  rb_define_method(asyncinitable, "initialize_finish", asyncinitable_initialize_finish, 1);
244
243
  }
Binary file
Binary file
@@ -39,20 +39,6 @@ bufferedinputstream_initialize(int argc, VALUE *argv, VALUE self)
39
39
  return Qnil;
40
40
  }
41
41
 
42
- static VALUE
43
- bufferedinputstream_get_buffer_size(VALUE self)
44
- {
45
- return GSIZE2RVAL(g_buffered_input_stream_get_buffer_size(_SELF(self)));
46
- }
47
-
48
- static VALUE
49
- bufferedinputstream_set_buffer_size(VALUE self, VALUE size)
50
- {
51
- g_buffered_input_stream_set_buffer_size(_SELF(self), RVAL2GSIZE(size));
52
-
53
- return self;
54
- }
55
-
56
42
  static VALUE
57
43
  bufferedinputstream_get_available(VALUE self)
58
44
  {
@@ -80,8 +66,6 @@ bufferedinputstream_peek(VALUE self, VALUE rboffset, VALUE rbcount)
80
66
  RSTRING_PTR(result),
81
67
  offset,
82
68
  count);
83
- if (bytes_peeked == (gsize)-1)
84
- rb_raise(rb_eIOError, "cannot peek"); /* TODO: Better class and message */
85
69
 
86
70
  rb_str_set_len(result, bytes_peeked);
87
71
  rb_str_resize(result, bytes_peeked);
@@ -171,9 +155,6 @@ Init_gbufferedinputstream(VALUE glib)
171
155
  VALUE bufferedinputstream = G_DEF_CLASS(G_TYPE_BUFFERED_INPUT_STREAM, "BufferedInputStream", glib);
172
156
 
173
157
  rb_define_method(bufferedinputstream, "initialize", bufferedinputstream_initialize, -1);
174
- rb_define_method(bufferedinputstream, "buffer_size", bufferedinputstream_get_buffer_size, 0);
175
- rb_define_method(bufferedinputstream, "set_buffer_size", bufferedinputstream_set_buffer_size, 1);
176
- G_DEF_SETTER(bufferedinputstream, "buffer_size");
177
158
  rb_define_method(bufferedinputstream, "available", bufferedinputstream_get_available, 0);
178
159
  rb_define_method(bufferedinputstream, "peek_buffer", bufferedinputstream_peek_buffer, 0);
179
160
  rb_define_method(bufferedinputstream, "peek", bufferedinputstream_peek, 2);
Binary file
@@ -39,44 +39,10 @@ bufferedoutputstream_initialize(int argc, VALUE *argv, VALUE self)
39
39
  return Qnil;
40
40
  }
41
41
 
42
- static VALUE
43
- bufferedoutputstream_get_buffer_size(VALUE self)
44
- {
45
- return GSIZE2RVAL(g_buffered_output_stream_get_buffer_size(_SELF(self)));
46
- }
47
-
48
- static VALUE
49
- bufferedoutputstream_set_buffer_size(VALUE self, VALUE size)
50
- {
51
- g_buffered_output_stream_set_buffer_size(_SELF(self), RVAL2GSIZE(size));
52
-
53
- return self;
54
- }
55
-
56
- static VALUE
57
- bufferedoutputstream_get_auto_grow(VALUE self)
58
- {
59
- return CBOOL2RVAL(g_buffered_output_stream_get_auto_grow(_SELF(self)));
60
- }
61
-
62
- static VALUE
63
- bufferedoutputstream_set_auto_grow(VALUE self, VALUE grow)
64
- {
65
- g_buffered_output_stream_set_auto_grow(_SELF(self), RVAL2CBOOL(grow));
66
-
67
- return self;
68
- }
69
-
70
42
  void
71
43
  Init_gbufferedoutputstream(VALUE glib)
72
44
  {
73
45
  VALUE bufferedoutputstream = G_DEF_CLASS(G_TYPE_BUFFERED_OUTPUT_STREAM, "BufferedOutputStream", glib);
74
46
 
75
47
  rb_define_method(bufferedoutputstream, "initialize", bufferedoutputstream_initialize, -1);
76
- rb_define_method(bufferedoutputstream, "buffer_size", bufferedoutputstream_get_buffer_size, 0);
77
- rb_define_method(bufferedoutputstream, "set_buffer_size", bufferedoutputstream_set_buffer_size, 1);
78
- G_DEF_SETTER(bufferedoutputstream, "buffer_size");
79
- rb_define_method(bufferedoutputstream, "auto_grow", bufferedoutputstream_get_auto_grow, 0);
80
- rb_define_method(bufferedoutputstream, "set_auto_grow", bufferedoutputstream_set_auto_grow, 1);
81
- G_DEF_SETTER(bufferedoutputstream, "auto_grow");
82
48
  }
Binary file
Binary file
@@ -39,20 +39,6 @@ charsetconverter_initialize(VALUE self, VALUE to, VALUE from)
39
39
  return Qnil;
40
40
  }
41
41
 
42
- static VALUE
43
- charsetconverter_set_use_fallback(VALUE self, VALUE use_fallback)
44
- {
45
- g_charset_converter_set_use_fallback(_SELF(self), RVAL2CBOOL(use_fallback));
46
-
47
- return self;
48
- }
49
-
50
- static VALUE
51
- charsetconverter_get_use_fallback(VALUE self)
52
- {
53
- return CBOOL2RVAL(g_charset_converter_get_use_fallback(_SELF(self)));
54
- }
55
-
56
42
  static VALUE
57
43
  charsetconverter_get_num_fallbacks(VALUE self)
58
44
  {
@@ -65,8 +51,5 @@ Init_gcharsetconverter(VALUE glib)
65
51
  VALUE charsetconverter = G_DEF_CLASS(G_TYPE_CHARSET_CONVERTER, "CharsetConverter", glib);
66
52
 
67
53
  rb_define_method(charsetconverter, "initialize", charsetconverter_initialize, 2);
68
- rb_define_method(charsetconverter, "set_use_fallback", charsetconverter_set_use_fallback, 1);
69
- G_DEF_SETTER(charsetconverter, "use_fallback");
70
- rb_define_method(charsetconverter, "use_fallback?", charsetconverter_get_use_fallback, 0);
71
54
  rb_define_method(charsetconverter, "num_fallbacks", charsetconverter_get_num_fallbacks, 0);
72
55
  }
Binary file
@@ -75,7 +75,6 @@ contenttype_guess(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
75
75
  rbdata;
76
76
  const char *filename;
77
77
  const guchar *data;
78
- gsize data_size;
79
78
  gboolean result_uncertain;
80
79
  char *type;
81
80
 
@@ -87,16 +86,10 @@ contenttype_guess(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
87
86
 
88
87
  filename = RVAL2CSTR_ACCEPT_NIL(rbfilename);
89
88
  data = (guchar *)RVAL2CSTR_ACCEPT_NIL(rbdata);
90
- if (data != NULL) {
91
- StringValue(rbdata);
92
- data_size = RSTRING_LEN(rbdata);
93
- } else {
94
- data_size = 0;
95
- }
96
89
 
97
90
  type = g_content_type_guess(filename,
98
91
  data,
99
- data_size,
92
+ (gsize)((data != NULL) ? RSTRING_LEN(rbdata) : 0),
100
93
  &result_uncertain);
101
94
 
102
95
  return rb_assoc_new(CSTR2RVAL_FREE(type), CBOOL2RVAL(result_uncertain));
Binary file
Binary file
@@ -32,17 +32,10 @@ converterinputstream_initialize(VALUE self, VALUE base_stream, VALUE converter)
32
32
  return Qnil;
33
33
  }
34
34
 
35
- static VALUE
36
- converterinputstream_get_converter(VALUE self)
37
- {
38
- return GOBJ2RVAL(g_converter_input_stream_get_converter(_SELF(self)));
39
- }
40
-
41
35
  void
42
36
  Init_gconverterinputstream(VALUE glib)
43
37
  {
44
38
  VALUE converterinputstream = G_DEF_CLASS(G_TYPE_CONVERTER_INPUT_STREAM, "ConverterInputStream", glib);
45
39
 
46
40
  rb_define_method(converterinputstream, "initialize", converterinputstream_initialize, 2);
47
- rb_define_method(converterinputstream, "converter", converterinputstream_get_converter, 0);
48
41
  }
Binary file
@@ -32,17 +32,10 @@ converteroutputstream_initialize(VALUE self, VALUE base_stream, VALUE converter)
32
32
  return Qnil;
33
33
  }
34
34
 
35
- static VALUE
36
- converteroutputstream_get_converter(VALUE self)
37
- {
38
- return GOBJ2RVAL(g_converter_output_stream_get_converter(_SELF(self)));
39
- }
40
-
41
35
  void
42
36
  Init_gconverteroutputstream(VALUE glib)
43
37
  {
44
38
  VALUE converteroutputstream = G_DEF_CLASS(G_TYPE_CONVERTER_OUTPUT_STREAM, "ConverterOutputStream", glib);
45
39
 
46
40
  rb_define_method(converteroutputstream, "initialize", converteroutputstream_initialize, 2);
47
- rb_define_method(converteroutputstream, "converter", converteroutputstream_get_converter, 0);
48
41
  }
Binary file