atk 0.20.1 → 0.90.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/ChangeLog +16 -0
  2. data/Rakefile +59 -50
  3. data/ext/atk/Makefile +160 -0
  4. data/ext/atk/atk.def +2 -0
  5. data/ext/atk/depend +8 -0
  6. data/ext/atk/extconf.rb +60 -0
  7. data/{src → ext/atk}/makeinits.rb +0 -0
  8. data/{src → ext/atk}/rbatk.c +0 -0
  9. data/{src → ext/atk}/rbatk.h +0 -0
  10. data/{src → ext/atk}/rbatkaction.c +0 -0
  11. data/{src → ext/atk}/rbatkcomponent.c +0 -0
  12. data/{src → ext/atk}/rbatkdocument.c +0 -0
  13. data/{src → ext/atk}/rbatkeditabletext.c +0 -0
  14. data/{src → ext/atk}/rbatkgobjectaccessible.c +0 -0
  15. data/{src → ext/atk}/rbatkhyperlink.c +0 -0
  16. data/{src → ext/atk}/rbatkhypertext.c +0 -0
  17. data/{src → ext/atk}/rbatkimage.c +0 -0
  18. data/{src → ext/atk}/rbatkimplementor.c +0 -0
  19. data/{src → ext/atk}/rbatkinits.c +0 -0
  20. data/{src → ext/atk}/rbatknoopobject.c +0 -0
  21. data/{src → ext/atk}/rbatknoopobjectfactory.c +0 -0
  22. data/{src → ext/atk}/rbatkobject.c +0 -0
  23. data/{src → ext/atk}/rbatkobjectfactory.c +0 -0
  24. data/{src → ext/atk}/rbatkregistry.c +0 -0
  25. data/{src → ext/atk}/rbatkrelation.c +0 -0
  26. data/{src → ext/atk}/rbatkrelationset.c +0 -0
  27. data/{src → ext/atk}/rbatkselection.c +0 -0
  28. data/{src → ext/atk}/rbatkstate.c +0 -0
  29. data/{src → ext/atk}/rbatkstateset.c +0 -0
  30. data/{src → ext/atk}/rbatkstreamablecontent.c +0 -0
  31. data/{src → ext/atk}/rbatktable.c +0 -0
  32. data/{src → ext/atk}/rbatktext.c +0 -0
  33. data/{src → ext/atk}/rbatktextrange.c +0 -0
  34. data/{src → ext/atk}/rbatktextrectangle.c +0 -0
  35. data/{src → ext/atk}/rbatkutil.c +0 -0
  36. data/{src → ext/atk}/rbatkvalue.c +0 -0
  37. data/{src → ext/atk}/rbatkversion.h +24 -24
  38. data/extconf.rb +48 -60
  39. data/lib/atk.rb +12 -0
  40. metadata +59 -63
  41. data/src/lib/atk.rb +0 -2
data/ChangeLog CHANGED
@@ -1,3 +1,19 @@
1
+ 2010-09-23 Kouhei Sutou <kou@cozmixng.org>
2
+
3
+ * Rakefile: don't add .zip into gem.
4
+
5
+ * lib/atk.rb: support bundled Windows DLL.
6
+
7
+ 2010-09-21 Kouhei Sutou <kou@cozmixng.org>
8
+
9
+ * Rakefile: add dependency.
10
+
11
+ * ./: make buildable with rake-compiler.
12
+
13
+ * src/: -> ext/atk/
14
+
15
+ * src/lib/: -> lib/
16
+
1
17
  2009-05-31 Kouhei Sutou <kou@cozmixng.org>
2
18
 
3
19
  * src/depend: use RUBYARCHDIR.
data/Rakefile CHANGED
@@ -1,65 +1,74 @@
1
- require 'rake/clean'
2
- CLEAN.include '**/*.o'
3
- CLEAN.include "**/*.#{Config::MAKEFILE_CONFIG['DLEXT']}"
4
- CLOBBER.include 'doc'
5
- CLOBBER.include '**/*.log'
6
- CLOBBER.include '**/Makefile'
7
- CLOBBER.include '**/extconf.h'
1
+ # -*- ruby -*-
8
2
 
9
- # Determine the current version of the software
10
- def ruby_atk_version
11
- "0.20.1"
12
- end
13
-
14
- CURRENT_VERSION = ruby_atk_version
3
+ require 'pathname'
4
+ require 'find'
5
+ require 'rubygems'
6
+ require 'rake/extensiontask'
15
7
 
16
- # Make tasks -----------------------------------------------------
17
- make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
18
- MAKECMD = ENV['MAKE_CMD'] || make_program
19
- MAKEOPTS = ENV['MAKE_OPTS'] || ''
8
+ @top_dir = Pathname(__FILE__).dirname.parent.expand_path
9
+ @rb_glib2_dir = @top_dir + "glib2"
20
10
 
21
- ATK_SO = "src/atk.#{Config::MAKEFILE_CONFIG['DLEXT']}"
11
+ task :default => :build
22
12
 
23
- file 'Makefile' => 'extconf.rb' do
24
- sh "ruby extconf.rb #{ENV['EXTCONF_OPTS']}"
13
+ def version
14
+ @version ||= ENV["VERSION"] || guess_version
25
15
  end
26
16
 
27
- def make(target = '')
28
- pid = system("#{MAKECMD} #{MAKEOPTS} #{target}")
29
- $?.exitstatus
30
- end
31
-
32
- # Let make handle dependencies between c/o/so - we'll just run it.
33
- file ATK_SO => (['Makefile'] + Dir['src/*.c'] + Dir['src/*.h']) do
34
- m = make
35
- fail "Make failed (status #{m})" unless m == 0
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(".")
36
28
  end
37
29
 
38
- desc "Configure atk"
39
- task :configure => ['Makefile']
30
+ package_name = "atk"
40
31
 
41
- desc "Compile the shared object"
42
- task :compile => [ATK_SO]
32
+ spec = Gem::Specification.new do |s|
33
+ s.name = package_name
34
+ s.summary = "Ruby/ATK is a Ruby binding of ATK-1.0.x."
35
+ s.description = "Ruby/ATK is a Ruby binding of ATK-1.0.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
+ s.add_dependency("glib2", "= #{version}")
42
+ s.extensions = FileList["ext/#{package_name}/extconf.rb"]
43
+ s.require_paths = ["lib"]
44
+ s.files = FileList["ChangeLog", "README", "Rakefile", "extconf.rb",
45
+ "lib/**/*.rb", "ext/**/*"]
46
+ end
43
47
 
44
- task :default => :compile
48
+ Rake::GemPackageTask.new(spec) do |pkg|
49
+ end
45
50
 
46
- desc 'Generate gem specification'
47
- task :gemspec do
48
- require 'erb'
49
- tspec = ERB.new(File.read(File.join(File.dirname(__FILE__),'src','atk.gemspec.erb')))
50
- File.open(File.join(File.dirname(__FILE__),'atk.gemspec'),'wb') do|f|
51
- f << tspec.result
51
+ Rake::ExtensionTask.new(package_name, spec) do |ext|
52
+ ext.cross_compile = true
53
+ ext.cross_compiling do |spec|
54
+ if /mingw|mswin/ =~ spec.platform.to_s
55
+ win32_dir = File.join("vendor", "local")
56
+ win32_files = []
57
+ Find.find(win32_dir) do |file|
58
+ next if /\.zip\z/ =~ file
59
+ win32_files << file
60
+ end
61
+ spec.files += win32_files
62
+ end
52
63
  end
53
64
  end
54
65
 
55
- desc 'Build gem'
56
- task :package => :gemspec do
57
- require 'rubygems/specification'
58
- spec_source = File.read File.join(File.dirname(__FILE__),'atk.gemspec')
59
- spec = nil
60
- # see: http://gist.github.com/16215
61
- Thread.new { spec = eval("$SAFE = 3\n#{spec_source}") }.join
62
- spec.validate
63
- Gem::Builder.new(spec).build
66
+ namespace :win32 do
67
+ desc "download Windows binaries"
68
+ task :download do
69
+ $LOAD_PATH.unshift((@rb_glib2_dir + "lib").to_s)
70
+ require 'gnome2-win32-binary-downloader'
71
+ GNOME2Win32BinaryDownloader.download(:packages => ["glib", "atk"],
72
+ :dependencies => ["gettext-runtime"])
73
+ end
64
74
  end
65
-
@@ -0,0 +1,160 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = /home/kou/work/ruby/ruby-gnome2/atk/src
7
+ topdir = /usr/lib/ruby/1.8/x86_64-linux
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+ prefix = $(DESTDIR)/usr
11
+ exec_prefix = $(prefix)
12
+ sitedir = $(DESTDIR)/usr/local/lib/site_ruby
13
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
14
+ docdir = $(datarootdir)/doc/$(PACKAGE)
15
+ dvidir = $(docdir)
16
+ datarootdir = $(prefix)/share
17
+ archdir = $(rubylibdir)/$(arch)
18
+ sbindir = $(exec_prefix)/sbin
19
+ psdir = $(docdir)
20
+ localedir = $(datarootdir)/locale
21
+ htmldir = $(docdir)
22
+ datadir = $(datarootdir)
23
+ includedir = $(prefix)/include
24
+ infodir = $(prefix)/share/info
25
+ sysconfdir = $(DESTDIR)/etc
26
+ mandir = $(prefix)/share/man
27
+ libdir = $(exec_prefix)/lib
28
+ sharedstatedir = $(prefix)/com
29
+ oldincludedir = $(DESTDIR)/usr/include
30
+ pdfdir = $(docdir)
31
+ sitearchdir = $(sitelibdir)/$(sitearch)
32
+ bindir = $(exec_prefix)/bin
33
+ localstatedir = $(DESTDIR)/var
34
+ sitelibdir = $(sitedir)/$(ruby_version)
35
+ libexecdir = $(prefix)/lib/ruby1.8
36
+
37
+ CC = cc
38
+ LIBRUBY = $(LIBRUBY_SO)
39
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
40
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
41
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
42
+
43
+ RUBY_EXTCONF_H =
44
+ CFLAGS = -fPIC -fno-strict-aliasing -g -O2 -fPIC -Wall -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
45
+ INCFLAGS = -I. -I/home/kou/work/ruby/ruby-gnome2/glib/src -I/home/kou/work/ruby/ruby-gnome2/glib/src -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/ruby-gnome2/atk
46
+ CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DHAVE_NODE_ATTRASGN -DHAVE_ATK_ACTION_GET_LOCALIZED_NAME -DHAVE_ATK_HYPERLINK_IS_INLINE -DHAVE_ATK_OBJECT_ADD_RELATIONSHIP -DHAVE_ATK_OBJECT_REMOVE_RELATIONSHIP -DHAVE_ATK_COMPONENT_GET_LAYER -DHAVE_ATK_HYPERLINK_IS_SELECTED_LINK -DHAVE_ATK_TEXT_GET_BOUNDED_RANGES -DHAVE_ATK_ROLE_GET_LOCALIZED_NAME -DHAVE_ATK_TEXT_CLIP_TYPE_GET_TYPE -DHAVE_ATK_TEXT_FREE_RANGES -DRUBY_ATK_COMPILATION -I/usr/local/lib/site_ruby/1.8/x86_64-linux
47
+ CXXFLAGS = $(CFLAGS)
48
+ DLDFLAGS = -L. -rdynamic -Wl,-export-dynamic
49
+ LDSHARED = $(CC) -shared
50
+ AR = ar
51
+ EXEEXT =
52
+
53
+ RUBY_INSTALL_NAME = ruby1.8
54
+ RUBY_SO_NAME = ruby1.8
55
+ arch = x86_64-linux
56
+ sitearch = x86_64-linux
57
+ ruby_version = 1.8
58
+ ruby = /usr/bin/ruby1.8
59
+ RUBY = $(ruby)
60
+ RM = rm -f
61
+ MAKEDIRS = mkdir -p
62
+ INSTALL = /usr/bin/install -c
63
+ INSTALL_PROG = $(INSTALL) -m 0755
64
+ INSTALL_DATA = $(INSTALL) -m 644
65
+ COPY = cp
66
+
67
+ #### End of system configuration section. ####
68
+
69
+ preload =
70
+
71
+ libpath = . $(libdir)
72
+ LIBPATH = -L"." -L"$(libdir)"
73
+ DEFFILE =
74
+
75
+ CLEANFILES = mkmf.log
76
+ DISTCLEANFILES = rbatkinits.c rbatkversion.h
77
+
78
+ extout =
79
+ extout_prefix =
80
+ target_prefix =
81
+ LOCAL_LIBS =
82
+ LIBS = $(LIBRUBYARG_SHARED) -latk-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lpthread -ldl -lcrypt -lm -lc
83
+ SRCS = rbatkstreamablecontent.c rbatkinits.c rbatk.c rbatkstate.c rbatkimplementor.c rbatkaction.c rbatkobject.c rbatkselection.c rbatkimage.c rbatkstateset.c rbatkhyperlink.c rbatktable.c rbatktext.c rbatkeditabletext.c rbatktextrectangle.c rbatkgobjectaccessible.c rbatknoopobjectfactory.c rbatkdocument.c rbatkhypertext.c rbatkutil.c rbatknoopobject.c rbatkvalue.c rbatktextrange.c rbatkobjectfactory.c rbatkrelation.c rbatkcomponent.c rbatkrelationset.c rbatkregistry.c
84
+ OBJS = rbatkstreamablecontent.o rbatkinits.o rbatk.o rbatkstate.o rbatkimplementor.o rbatkaction.o rbatkobject.o rbatkselection.o rbatkimage.o rbatkstateset.o rbatkhyperlink.o rbatktable.o rbatktext.o rbatkeditabletext.o rbatktextrectangle.o rbatkgobjectaccessible.o rbatknoopobjectfactory.o rbatkdocument.o rbatkhypertext.o rbatkutil.o rbatknoopobject.o rbatkvalue.o rbatktextrange.o rbatkobjectfactory.o rbatkrelation.o rbatkcomponent.o rbatkrelationset.o rbatkregistry.o
85
+ TARGET = atk
86
+ DLLIB = $(TARGET).so
87
+ EXTSTATIC =
88
+ STATIC_LIB =
89
+
90
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
91
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
92
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
93
+
94
+ TARGET_SO = $(DLLIB)
95
+ CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
96
+ CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
97
+
98
+ all: $(DLLIB)
99
+ static: $(STATIC_LIB)
100
+
101
+ clean:
102
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
103
+
104
+ distclean: clean
105
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
106
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
107
+
108
+ realclean: distclean
109
+ install: install-so install-rb
110
+
111
+ install-so: $(RUBYARCHDIR)
112
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
113
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
114
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
115
+ install-rb: pre-install-rb install-rb-default
116
+ install-rb-default: pre-install-rb-default
117
+ pre-install-rb: Makefile
118
+ pre-install-rb-default: Makefile
119
+ pre-install-rb-default: $(RUBYLIBDIR)
120
+ install-rb-default: $(RUBYLIBDIR)/atk.rb
121
+ $(RUBYLIBDIR)/atk.rb: /home/kou/work/ruby/ruby-gnome2/atk/src/lib/atk.rb
122
+ $(INSTALL_DATA) /home/kou/work/ruby/ruby-gnome2/atk/src/lib/atk.rb $(@D)
123
+ $(RUBYARCHDIR):
124
+ $(MAKEDIRS) $@
125
+ $(RUBYLIBDIR):
126
+ $(MAKEDIRS) $@
127
+
128
+ site-install: site-install-so site-install-rb
129
+ site-install-so: install-so
130
+ site-install-rb: install-rb
131
+
132
+ .SUFFIXES: .c .m .cc .cxx .cpp .C .o
133
+
134
+ .cc.o:
135
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
136
+
137
+ .cxx.o:
138
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
139
+
140
+ .cpp.o:
141
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
142
+
143
+ .C.o:
144
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
145
+
146
+ .c.o:
147
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
148
+
149
+ $(DLLIB): $(OBJS)
150
+ @-$(RM) $@
151
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
152
+
153
+
154
+
155
+ ###
156
+ install:
157
+ @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' $(srcdir)/rbatk.h $(sitearchdir)$(target_prefix)
158
+ @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' rbatkversion.h $(sitearchdir)$(target_prefix)
159
+
160
+
@@ -0,0 +1,2 @@
1
+ EXPORTS
2
+ Init_atk
@@ -0,0 +1,8 @@
1
+ install-so:
2
+ $(INSTALL_DATA) $(srcdir)/rbatk.h $(RUBYARCHDIR)
3
+ $(INSTALL_DATA) rbatkversion.h $(RUBYARCHDIR)
4
+
5
+
6
+ install:
7
+ $(MAKEDIRS) $(libdir)/pkgconfig
8
+ $(INSTALL_DATA) ruby-atk.pc $(libdir)/pkgconfig
@@ -0,0 +1,60 @@
1
+ =begin
2
+ extconf.rb for Ruby/Atk extention library
3
+ =end
4
+
5
+ require 'pathname'
6
+
7
+ base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
8
+ top_dir = base_dir.parent
9
+ top_build_dir = Pathname(".").parent.parent.parent.expand_path
10
+
11
+ mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
12
+ version_suffix = ""
13
+ unless mkmf_gnome2_dir.exist?
14
+ if /(-\d+\.\d+\.\d+)\z/ =~ base_dir.basename.to_s
15
+ version_suffix = $1
16
+ mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
17
+ end
18
+ end
19
+
20
+ $LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
21
+
22
+ module_name = "atk"
23
+ package_id = "atk"
24
+
25
+ require 'mkmf-gnome2'
26
+
27
+ setup_win32(module_name, base_dir)
28
+
29
+ PKGConfig.have_package(package_id) or exit 1
30
+
31
+ atk_header = "atk/atk.h"
32
+ have_func('atk_action_get_localized_name', atk_header)
33
+ have_func('atk_hyperlink_is_inline', atk_header)
34
+ have_func('atk_object_add_relationship', atk_header)
35
+ have_func('atk_object_remove_relationship', atk_header)
36
+ have_func('atk_component_get_layer', atk_header)
37
+ have_func('atk_component_get_mdi_zorder', atk_header)
38
+ have_func('atk_hyperlink_is_selected_link', atk_header)
39
+ have_func('atk_text_get_bounded_ranges', atk_header)
40
+ have_func('atk_role_get_localized_name', atk_header)
41
+ have_func('atk_text_clip_type_get_type', atk_header)
42
+
43
+ have_func('atk_text_free_ranges', atk_header)
44
+
45
+ ["glib2"].each do |package|
46
+ directory = "#{package}#{version_suffix}"
47
+ build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
48
+ add_depend_package(package, "#{directory}/ext/#{package}",
49
+ top_dir.to_s,
50
+ :top_build_dir => top_build_dir.to_s,
51
+ :target_build_dir => build_dir)
52
+ end
53
+
54
+ add_distcleanfile("rbatkinits.c")
55
+
56
+ make_version_header("ATK", package_id, ".")
57
+
58
+ create_pkg_config_file("Ruby/ATK", package_id)
59
+ $defs << " -DRUBY_ATK_COMPILATION"
60
+ create_makefile(module_name)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,24 +1,24 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbatkversion.h -
5
-
6
- This file was generated by mkmf-gnome2.rb.
7
-
8
- ************************************************/
9
-
10
- #ifndef __RBATK_VERSION_H__
11
- #define __RBATK_VERSION_H__
12
-
13
- #define ATK_MAJOR_VERSION (1)
14
- #define ATK_MINOR_VERSION (26)
15
- #define ATK_MICRO_VERSION (0)
16
-
17
- #define ATK_CHECK_VERSION(major,minor,micro) \
18
- (ATK_MAJOR_VERSION > (major) || \
19
- (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION > (minor)) || \
20
- (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION == (minor) && \
21
- ATK_MICRO_VERSION >= (micro)))
22
-
23
-
24
- #endif /* __RBATK_VERSION_H__ */
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /************************************************
3
+
4
+ rbatkversion.h -
5
+
6
+ This file was generated by mkmf-gnome2.rb.
7
+
8
+ ************************************************/
9
+
10
+ #ifndef __RBATK_VERSION_H__
11
+ #define __RBATK_VERSION_H__
12
+
13
+ #define ATK_MAJOR_VERSION (1)
14
+ #define ATK_MINOR_VERSION (22)
15
+ #define ATK_MICRO_VERSION (0)
16
+
17
+ #define ATK_CHECK_VERSION(major,minor,micro) \
18
+ (ATK_MAJOR_VERSION > (major) || \
19
+ (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION > (minor)) || \
20
+ (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION == (minor) && \
21
+ ATK_MICRO_VERSION >= (micro)))
22
+
23
+
24
+ #endif /* __RBATK_VERSION_H__ */
data/extconf.rb CHANGED
@@ -1,61 +1,49 @@
1
- =begin
2
- extconf.rb for Ruby/Atk extention library
3
- =end
4
-
5
- PACKAGE_NAME = "atk"
6
- PACKAGE_ID = "atk"
7
-
8
- begin
9
- require 'rubygems'
10
- require 'mkmf-gnome2'
11
- USE_GNOME_GEMS=true
12
- TOPDIR = File.expand_path(File.dirname(__FILE__))
13
- SRCDIR = TOPDIR + '/src'
14
- require 'glib2'
15
- rescue LoadError => e
16
- TOPDIR = File.expand_path(File.dirname(__FILE__) + '/..')
17
- SRCDIR = TOPDIR + '/atk/src'
18
- MKMF_GNOME2_DIR = TOPDIR + '/glib/src/lib'
19
-
20
- $LOAD_PATH.unshift MKMF_GNOME2_DIR
21
-
22
- require 'mkmf-gnome2'
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pathname'
4
+ require 'mkmf'
5
+ require 'rbconfig'
6
+ require 'fileutils'
7
+
8
+ package = "atk"
9
+
10
+ base_dir = Pathname(__FILE__).dirname.expand_path
11
+ ext_dir = base_dir + "ext" + package
12
+ mkmf_gnome2_dir = base_dir + 'lib'
13
+
14
+ ruby = File.join(RbConfig::CONFIG['bindir'],
15
+ RbConfig::CONFIG['ruby_install_name'] +
16
+ RbConfig::CONFIG["EXEEXT"])
17
+
18
+ build_dir = Pathname("ext") + package
19
+ FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
20
+ extconf_rb_path = ext_dir + "extconf.rb"
21
+ system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
22
+
23
+ create_makefile(package)
24
+ FileUtils.mv("Makefile", "Makefile.lib")
25
+
26
+ File.open("Makefile", "w") do |makefile|
27
+ makefile.puts(<<-EOM)
28
+ all:
29
+ (cd ext/#{package} && $(MAKE))
30
+ $(MAKE) -f Makefile.lib
31
+
32
+ install:
33
+ (cd ext/#{package} && $(MAKE) install)
34
+ $(MAKE) -f Makefile.lib install
35
+
36
+ site-install:
37
+ (cd ext/#{package} && $(MAKE) site-install)
38
+ $(MAKE) -f Makefile.lib site-install
39
+
40
+ clean:
41
+ (cd ext/#{package} && $(MAKE) clean)
42
+ $(MAKE) -f Makefile.lib clean
43
+
44
+ distclean:
45
+ (cd ext/#{package} && $(MAKE) distclean)
46
+ $(MAKE) -f Makefile.lib distclean
47
+ @rm -f Makefile.lib
48
+ EOM
23
49
  end
24
-
25
- PKGConfig.have_package(PACKAGE_ID) or exit 1
26
- setup_win32(PACKAGE_NAME)
27
-
28
- atk_header = "atk/atk.h"
29
- have_func('atk_action_get_localized_name', atk_header)
30
- have_func('atk_hyperlink_is_inline', atk_header)
31
- have_func('atk_object_add_relationship', atk_header)
32
- have_func('atk_object_remove_relationship', atk_header)
33
- have_func('atk_component_get_layer', atk_header)
34
- have_func('atk_component_get_mdi_zorder', atk_header)
35
- have_func('atk_hyperlink_is_selected_link', atk_header)
36
- have_func('atk_text_get_bounded_ranges', atk_header)
37
- have_func('atk_role_get_localized_name', atk_header)
38
- have_func('atk_text_clip_type_get_type', atk_header)
39
-
40
- have_func('atk_text_free_ranges', atk_header)
41
-
42
- if USE_GNOME_GEMS
43
- # locate the latest glib2 install and add the package dependency
44
- path = File.dirname(Gem.find_files('rbglib.h').first)
45
- add_depend_package("glib2", path, '/')
46
- else
47
- add_depend_package("glib2", "glib/src", TOPDIR)
48
- end
49
-
50
- add_distcleanfile("rbatkinits.c")
51
-
52
- make_version_header("ATK", PACKAGE_ID)
53
-
54
- create_pkg_config_file("Ruby/ATK", PACKAGE_ID)
55
- create_makefile_at_srcdir(PACKAGE_NAME, SRCDIR, "-DRUBY_ATK_COMPILATION") {
56
- SRCDIR_QUOTED = SRCDIR.gsub(' ', '\ ')
57
- system("#{$ruby} #{SRCDIR_QUOTED}/makeinits.rb #{SRCDIR_QUOTED}/*.c > rbatkinits.c") or raise "failed to make ATK inits"
58
- }
59
-
60
- create_top_makefile
61
-
@@ -0,0 +1,12 @@
1
+ require 'glib2'
2
+
3
+ base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
4
+ vendor_dir = base_dir + "vendor" + "local"
5
+ vendor_bin_dir = vendor_dir + "bin"
6
+ GLib.prepend_environment_path(vendor_bin_dir)
7
+ begin
8
+ major, minor, micro, = RUBY_VERSION.split(/\./)
9
+ require "#{major}.#{minor}/atk.so"
10
+ rescue LoadError
11
+ require 'atk.so'
12
+ end
metadata CHANGED
@@ -1,20 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atk
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 371
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 20
8
- - 1
9
- version: 0.20.1
8
+ - 90
9
+ - 2
10
+ version: 0.90.2
10
11
  platform: ruby
11
12
  authors:
12
- - ruby-gnome2/AUTHORS
13
+ - The Ruby-GNOME2 Proejct Team
13
14
  autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-07-11 00:00:00 -04:00
18
+ date: 2010-09-25 00:00:00 +09:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -23,86 +24,80 @@ dependencies:
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
26
- - - ">="
27
+ - - "="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 371
28
30
  segments:
29
31
  - 0
30
- version: "0"
32
+ - 90
33
+ - 2
34
+ version: 0.90.2
31
35
  type: :runtime
32
36
  version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: cairo
35
- prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
44
- type: :runtime
45
- version_requirements: *id002
46
- description: Ruby/ATK is a Ruby binding of ATK-1.0.x or later.
47
- email: todd.fisher@gmail.com
37
+ description: Ruby/ATK is a Ruby binding of ATK-1.0.x.
38
+ email: ruby-gnome2-devel-en@lists.sourceforge.net
48
39
  executables: []
49
40
 
50
41
  extensions:
51
- - extconf.rb
52
- extra_rdoc_files:
53
- - README
42
+ - ext/atk/extconf.rb
43
+ extra_rdoc_files: []
44
+
54
45
  files:
55
46
  - ChangeLog
56
47
  - README
57
48
  - Rakefile
58
49
  - extconf.rb
59
- - src/lib/atk.rb
60
- - src/makeinits.rb
61
- - src/rbatk.c
62
- - src/rbatkaction.c
63
- - src/rbatkcomponent.c
64
- - src/rbatkdocument.c
65
- - src/rbatkeditabletext.c
66
- - src/rbatkgobjectaccessible.c
67
- - src/rbatkhyperlink.c
68
- - src/rbatkhypertext.c
69
- - src/rbatkimage.c
70
- - src/rbatkimplementor.c
71
- - src/rbatkinits.c
72
- - src/rbatknoopobject.c
73
- - src/rbatknoopobjectfactory.c
74
- - src/rbatkobject.c
75
- - src/rbatkobjectfactory.c
76
- - src/rbatkregistry.c
77
- - src/rbatkrelation.c
78
- - src/rbatkrelationset.c
79
- - src/rbatkselection.c
80
- - src/rbatkstate.c
81
- - src/rbatkstateset.c
82
- - src/rbatkstreamablecontent.c
83
- - src/rbatktable.c
84
- - src/rbatktext.c
85
- - src/rbatktextrange.c
86
- - src/rbatktextrectangle.c
87
- - src/rbatkutil.c
88
- - src/rbatkvalue.c
89
- - src/rbatk.h
90
- - src/rbatkversion.h
50
+ - lib/atk.rb
51
+ - ext/atk/rbatkutil.c
52
+ - ext/atk/rbatknoopobject.c
53
+ - ext/atk/rbatkgobjectaccessible.c
54
+ - ext/atk/rbatkinits.c
55
+ - ext/atk/rbatkhyperlink.c
56
+ - ext/atk/rbatkcomponent.c
57
+ - ext/atk/rbatktext.c
58
+ - ext/atk/rbatkstateset.c
59
+ - ext/atk/rbatkregistry.c
60
+ - ext/atk/makeinits.rb
61
+ - ext/atk/rbatkimage.c
62
+ - ext/atk/rbatkdocument.c
63
+ - ext/atk/rbatkrelationset.c
64
+ - ext/atk/Makefile
65
+ - ext/atk/atk.def
66
+ - ext/atk/rbatkobjectfactory.c
67
+ - ext/atk/rbatk.c
68
+ - ext/atk/rbatkstreamablecontent.c
69
+ - ext/atk/rbatkimplementor.c
70
+ - ext/atk/rbatkvalue.c
71
+ - ext/atk/extconf.rb
72
+ - ext/atk/rbatkrelation.c
73
+ - ext/atk/rbatkaction.c
74
+ - ext/atk/rbatktable.c
75
+ - ext/atk/rbatktextrange.c
76
+ - ext/atk/rbatktextrectangle.c
77
+ - ext/atk/rbatkselection.c
78
+ - ext/atk/rbatk.h
79
+ - ext/atk/rbatkhypertext.c
80
+ - ext/atk/rbatkversion.h
81
+ - ext/atk/depend
82
+ - ext/atk/rbatkstate.c
83
+ - ext/atk/rbatkeditabletext.c
84
+ - ext/atk/rbatknoopobjectfactory.c
85
+ - ext/atk/rbatkobject.c
91
86
  has_rdoc: true
92
87
  homepage: http://ruby-gnome2.sourceforge.jp/
93
88
  licenses: []
94
89
 
95
90
  post_install_message:
96
- rdoc_options:
97
- - --main
98
- - README
91
+ rdoc_options: []
92
+
99
93
  require_paths:
100
- - src
94
+ - lib
101
95
  required_ruby_version: !ruby/object:Gem::Requirement
102
96
  none: false
103
97
  requirements:
104
98
  - - ">="
105
99
  - !ruby/object:Gem::Version
100
+ hash: 3
106
101
  segments:
107
102
  - 0
108
103
  version: "0"
@@ -111,15 +106,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
106
  requirements:
112
107
  - - ">="
113
108
  - !ruby/object:Gem::Version
109
+ hash: 3
114
110
  segments:
115
111
  - 0
116
112
  version: "0"
117
113
  requirements: []
118
114
 
119
- rubyforge_project: atk
115
+ rubyforge_project:
120
116
  rubygems_version: 1.3.7
121
117
  signing_key:
122
118
  specification_version: 3
123
- summary: Ruby atk bindings
119
+ summary: Ruby/ATK is a Ruby binding of ATK-1.0.x.
124
120
  test_files: []
125
121
 
@@ -1,2 +0,0 @@
1
- require 'glib2'
2
- require 'atk.so'