rsvg2 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 CHANGED
@@ -1,3 +1,15 @@
1
+ 2011-01-30 Kouhei Sutou <kou@cozmixng.org>
2
+
3
+ * Rakefile, ext/rsvg2/extconf.rb: share depended packages vendor/local/.
4
+
5
+ 2011-01-22 Masaaki Aoyagi
6
+
7
+ * Rakefile: change to use gnome2-raketask.rb.
8
+
9
+ 2010-11-01 Kouhei Sutou <kou@clear-code.com>
10
+
11
+ * Rakefile: add missing libxml dependency.
12
+
1
13
  2010-09-29 Kouhei Sutou <kou@cozmixng.org>
2
14
 
3
15
  * Rakefile: fix dependencies.
data/Rakefile CHANGED
@@ -1,91 +1,13 @@
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 = "rsvg2"
31
-
32
- spec = Gem::Specification.new do |s|
33
- s.name = package_name
34
- s.summary = "Ruby/RSVG is a Ruby binding of librsvg-2.x."
35
- s.description = "Ruby/RSVG is a Ruby binding of librsvg-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
- s.add_dependency("cairo", ">= 1.10.0")
42
- compatible_version = version.split(/\./)[0, 3].join(".")
43
- s.add_dependency("glib2", ">= #{compatible_version}")
44
- s.extensions = FileList["ext/#{package_name}/extconf.rb"]
45
- s.require_paths = ["lib"]
46
- s.files = FileList["ChangeLog", "README", "Rakefile", "extconf.rb",
47
- "lib/**/*.rb", "{ext,sample}/**/*"]
5
+ package = GNOME2Package.new do |_package|
6
+ _package.summary = "Ruby/RSVG is a Ruby binding of librsvg-2.x."
7
+ _package.description = "Ruby/RSVG is a Ruby binding of librsvg-2.x."
8
+ _package.dependency.gem.runtime = [["cairo", ">= 1.10.0"], "gdk_pixbuf2"]
9
+ _package.win32.packages = ["librsvg", "libcroco"]
10
+ _package.win32.dependencies = ["libxml2"]
48
11
  end
12
+ package.define_tasks
49
13
 
50
- Rake::GemPackageTask.new(spec) do |pkg|
51
- end
52
-
53
- Rake::ExtensionTask.new(package_name, spec) do |ext|
54
- ext.cross_compile = true
55
- ext.cross_compiling do |spec|
56
- if /mingw|mswin/ =~ spec.platform.to_s
57
- win32_dir = File.join("vendor", "local")
58
- win32_files = []
59
- Find.find(win32_dir) do |file|
60
- next if /\.zip\z/ =~ file
61
- win32_files << file
62
- end
63
- spec.files += win32_files
64
- end
65
- end
66
-
67
- def ext.define_compile_tasks(for_platform=nil, ruby_ver=RUBY_VERSION)
68
- super
69
- platf = for_platform || platform
70
- return unless /mingw|mswin/ =~ platf
71
- lib_path = lib_dir
72
- tmp_path = "#{@tmp_dir}/#{platf}/#{@name}/#{ruby_ver}"
73
- lib_a = "#{tmp_path}/libruby-#{@name}.a"
74
- task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_path, lib_a] do
75
- cp lib_a, lib_path
76
- end
77
- end
78
- end
79
-
80
- namespace :win32 do
81
- desc "download Windows binaries"
82
- task :download do
83
- $LOAD_PATH.unshift((@rb_glib2_dir + "lib").to_s)
84
- require 'gnome2-win32-binary-downloader'
85
- packages = ["glib", "gdk-pixbuf", "pango", "librsvg", "libcroco", "libgsf"]
86
- dependencies = ["gettext-runtime", "zlib", "freetype", "expat",
87
- "fontconfig", "cairo", "libpng"]
88
- GNOME2Win32BinaryDownloader.download(:packages => packages,
89
- :dependencies => dependencies)
90
- end
91
- end
@@ -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/rsvg2/ext/rsvg2
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/librsvg-2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/home/kou/work/ruby/rcairo/ext/cairo
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/rsvg2/ext/rsvg2
49
+ DEFS =
50
+ CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DHAVE_NODE_ATTRASGN -DHAVE_RSVG_SET_DEFAULT_DPI -DHAVE_RSVG_SET_DEFAULT_DPI_X_Y -DHAVE_RSVG_HANDLE_SET_DPI -DHAVE_RSVG_HANDLE_SET_DPI_X_Y -DHAVE_RSVG_HANDLE_GET_METADATA -DHAVE_RSVG_HANDLE_FREE -DHAVE_RSVG_HANDLE_GET_PIXBUF_SUB -DHAVE_TYPE_RSVGDIMENSIONDATA -DHAVE_LIBRSVG_RSVG_CAIRO_H -DHAVE_RB_CAIRO_H -DRUBY_RSVG2_COMPILATION -DHAVE_LIBRSVG_LIBRSVG_ENUM_TYPES_H
51
+ CXXFLAGS = $(CFLAGS)
52
+ ldflags = -L. -rdynamic -Wl,-export-dynamic -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) -lrsvg-2 -lm -lglib-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lgmodule-2.0 -lcairo -lcairo -lpthread -lrt -ldl -lcrypt -lm -lc
90
+ SRCS = rbrsvg.c
91
+ OBJS = rbrsvg.o
92
+ TARGET = rsvg2
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-rsvg2.pc $(pkgconfigdir); \
162
+ fi
data/ext/rsvg2/extconf.rb CHANGED
@@ -24,6 +24,29 @@ package_id = "librsvg-2.0"
24
24
 
25
25
  require 'mkmf-gnome2'
26
26
 
27
+ ["glib2", "gdk_pixbuf2"].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
+
36
+ rcairo_options = {}
37
+ rcairo_source_dir_names = ["rcairo"]
38
+ if /mingw|cygwin|mswin32/ =~ RUBY_PLATFORM
39
+ rcairo_source_dir_names.unshift("rcairo.win32")
40
+ end
41
+ rcairo_source_dir_names.each do |rcairo_source_dir_name|
42
+ rcairo_source_dir = top_dir.parent.expand_path + rcairo_source_dir_name
43
+ if rcairo_source_dir.exist?
44
+ rcairo_options[:rcairo_source_dir] = rcairo_source_dir.to_s
45
+ break
46
+ end
47
+ end
48
+ check_cairo(rcairo_options)
49
+
27
50
  setup_win32(module_name, base_dir)
28
51
 
29
52
  PKGConfig.have_package(package_id) or exit 1
@@ -39,30 +62,7 @@ have_func("rsvg_handle_get_pixbuf_sub", rsvg_header)
39
62
  have_header("librsvg/rsvg-gz.h")
40
63
  have_type("RsvgDimensionData", "librsvg/rsvg.h")
41
64
 
42
- if have_header("librsvg/rsvg-cairo.h")
43
- options = {}
44
- rcairo_source_dir_names = ["rcairo"]
45
- if /mingw|cygwin|mswin32/ =~ RUBY_PLATFORM
46
- rcairo_source_dir_names.unshift("rcairo.win32")
47
- end
48
- rcairo_source_dir_names.each do |rcairo_source_dir_name|
49
- rcairo_source_dir = top_dir.parent.expand_path + rcairo_source_dir_name
50
- if rcairo_source_dir.exist?
51
- options[:rcairo_source_dir] = rcairo_source_dir.to_s
52
- break
53
- end
54
- end
55
- check_cairo(options)
56
- end
57
-
58
- ["glib2"].each do |package|
59
- directory = "#{package}#{version_suffix}"
60
- build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
61
- add_depend_package(package, "#{directory}/ext/#{package}",
62
- top_dir.to_s,
63
- :top_build_dir => top_build_dir.to_s,
64
- :target_build_dir => build_dir)
65
- end
65
+ have_header("librsvg/rsvg-cairo.h")
66
66
 
67
67
  create_pkg_config_file("Ruby/RSVG", package_id, nil, "ruby-rsvg2.pc")
68
68
 
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ Name: Ruby/RSVG
2
+ Description: Ruby bindings for library that renders svg files
3
+ Version: 0.90.6
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsvg2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 381
4
+ hash: 379
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 90
9
- - 5
10
- version: 0.90.5
9
+ - 6
10
+ version: 0.90.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - The Ruby-GNOME2 Proejct Team
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-29 00:00:00 +09:00
18
+ date: 2011-01-30 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -35,19 +35,19 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: glib2
38
+ name: gdk_pixbuf2
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- hash: 381
45
+ hash: 379
46
46
  segments:
47
47
  - 0
48
48
  - 90
49
- - 5
50
- version: 0.90.5
49
+ - 6
50
+ version: 0.90.6
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  description: Ruby/RSVG is a Ruby binding of librsvg-2.x.
@@ -64,10 +64,14 @@ files:
64
64
  - Rakefile
65
65
  - extconf.rb
66
66
  - lib/rsvg2.rb
67
+ - ext/rsvg2/Makefile
68
+ - ext/rsvg2/rbrsvg.o
67
69
  - ext/rsvg2/extconf.rb
70
+ - ext/rsvg2/rsvg2.def
71
+ - ext/rsvg2/rsvg2.so
68
72
  - ext/rsvg2/depend
73
+ - ext/rsvg2/ruby-rsvg2.pc
69
74
  - ext/rsvg2/rbrsvg.c
70
- - ext/rsvg2/rsvg2.def
71
75
  - sample/svg2.rb
72
76
  - sample/svg-viewer.rb
73
77
  has_rdoc: true
@@ -84,10 +88,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
88
  requirements:
85
89
  - - ">="
86
90
  - !ruby/object:Gem::Version
87
- hash: 3
91
+ hash: 61
88
92
  segments:
89
- - 0
90
- version: "0"
93
+ - 1
94
+ - 8
95
+ - 5
96
+ version: 1.8.5
91
97
  required_rubygems_version: !ruby/object:Gem::Requirement
92
98
  none: false
93
99
  requirements: