gtkmozembed 0.90.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,163 @@
1
+ 2011-01-30 Kouhei Sutou <kou@cozmixng.org>
2
+
3
+ * ext/gtkmozembed/extconf.rb: add missing dependency.
4
+
5
+ * Rakefile: remove needless dependency.
6
+
7
+ 2011-01-22 Masaaki Aoyagi
8
+
9
+ * src/lib/: -> lib/.
10
+
11
+ * src/: -> ext/gtkmozembed/.
12
+
13
+ * extconf.rb: -> ext/gtkmozembed/extconf.rb
14
+
15
+ * ext/gtkmozembed/extconf.rb: support directory structure change.
16
+
17
+ * extconf.rb: add.
18
+
19
+ * Rakefile: add.
20
+
21
+ 2010-09-28 Kouhei Sutou <kou@cozmixng.org>
22
+
23
+ * test/run-test.rb: add missing path.
24
+
25
+ * test/run-test.rb: fix path.
26
+
27
+ 2010-09-23 Kouhei Sutou <kou@cozmixng.org>
28
+
29
+ * extconf.rb: support Ruby/GLib2 directory structure change.
30
+
31
+ 2010-03-19 Kouhei Sutou <kou@cozmixng.org>
32
+
33
+ * extconf.rb: add libxul-embedding to PACKAGED_IDS for xulrunner
34
+ 1.9.2.
35
+ Reported by OBATA Akio. Thanks!!!
36
+
37
+ 2010-02-28 Kouhei Sutou <kou@cozmixng.org>
38
+
39
+ * extconf.rb: generate collected flags type. [#2925285]
40
+ Reported by tobi. Thanks!!!
41
+
42
+ 2010-01-02 Kouhei Sutou <kou@cozmixng.org>
43
+
44
+ * extconf.rb: fix -Wl,-rpath syntax. [#2924766]
45
+ Reported by OBATA Akio. Thanks!!!
46
+
47
+ 2009-08-02 Kouhei Sutou <kou@cozmixng.org>
48
+
49
+ * extconf.rb: add seamonky to detect target list.
50
+ Suggested by OBATA Akio. Thanks!!!
51
+
52
+ * extconf.rb: auto-generate src/depend for existing GtkMozEmbed
53
+ package.
54
+ * src/depend: remove.
55
+ Reported by OBATA Akio. Thanks!!!
56
+
57
+ 2009-05-31 Kouhei Sutou <kou@cozmixng.org>
58
+
59
+ * extconf.rb: add missing existent check.
60
+ Patch by OBATA Akio. Thanks!!!
61
+
62
+ 2009-03-07 Kouhei Sutou <kou@cozmixng.org>
63
+
64
+ * extconf.rb, src/rbgtkmozembed.c: generate enum types automatically.
65
+
66
+ * test/run-test.rb, test/gtk-moz-embed-test-utils.rb: setup test
67
+ environment.
68
+
69
+ * src/lib/gtkmozembed.rb, test/test-gtk-moz-embed.rb: add aliases
70
+ for more readable constant name.
71
+
72
+ * extconf.rb, src/rbgtkmozembed.[ch], rbgtkmozembed-init.cpp:
73
+ support libxul-embedding-unstable.
74
+
75
+ 2007-12-28 Kouhei Sutou <kou@cozmixng.org>
76
+
77
+ * src/rbgtkmozembed.c: used RSTRING_PTR() and RSTRING_LEN().
78
+
79
+ 2007-07-08 Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>
80
+
81
+ * src/rbgtkmozembed.c: use rb_block_proc() directly instead of using
82
+ G_BLOCK_PROC().
83
+
84
+ 2006-11-05 Masao Mutoh <mutoh@highway.ne.jp>
85
+
86
+ * extconf.rb: Check xulrunner/firefox/mozilla packages.
87
+
88
+ 2006-06-28 Mirko Maischberger <mirko@lilik.it>
89
+ In response to #1511917
90
+ * extconf.rb: mozpath stripped.
91
+
92
+ 2006-06-17 Masao Mutoh <mutoh@highway.ne.jp>
93
+ * sample/ruby-gecko.rb: Remove Gtk.init.
94
+
95
+ 2006-06-14 Mirko Maischberger <mirko@lilik.it>
96
+ This should close bug #1495276
97
+ * src/rbgtkmozembed.c: set the moz comp_path in Init if
98
+ DEFAULT_MOZILLA_FIVE_HOME is defined.
99
+ * extconf.rb: Now defaults to xulrunner and defines
100
+ DEFAULT_MOZILLA_FIVE_HOME according to pkg-config.
101
+
102
+ 2005-10-10 Masao Mutoh <mutoh@highway.ne.jp>
103
+ * REAMDE: Revised.
104
+ * extconf.rb, src/rbgtkmozembed.c: Added Gtk::MozEmbed::BUILD_VERSION.
105
+
106
+ 2005-09-13 09:51 Mirko Maischberber <mirko@lilik.it>
107
+ GtkMozEmbed is now a core ruby-gnome2 package.
108
+ * extconf.rb: modified to be a part of ruby-gnome2 instead. This
109
+ is not a standalone package anymore.
110
+
111
+ 2005-03-26 20:00 Mirko Maischberger <mirko@lilik.it>
112
+ * extconf.rb: fixed LD_LIBRARY_PATH oddity, now this is handled
113
+ with -Wl,-rpath option of gcc.
114
+ * extconf.rb: fixed bugs and cleaned.
115
+ Reported by Kazuhiro NISHIYAMA, Paul van Tilburg
116
+
117
+ 2005-03-17 19:58 Mirko Maischberger <mirko@lilik.it>
118
+ * src/rbgtkmozembed.c: added Gtk::MozEmbed#on_new_window and
119
+ Gtk::MozEmbed#no_new_window to handle the new_window signal
120
+ correctly.
121
+ * sample/ruby-gecko.rb: Cleaned.
122
+
123
+ 2005-03-07 19:58 Mirko Maischberger <mirko@lilik.it>
124
+ * src/rbgtkmozembed.c: Added the #render_data method,
125
+ removed the "<<" overloading.
126
+ * sample/ruby-gecko.rb: Cleaned.
127
+
128
+ 2005-03-07 09:50 Mirko Maischberger <mirko@lilik.it>
129
+ * extconf.rb: Modified to compile as a standalone package.
130
+ * src/rbgtkmozembed.c: Added the stream related
131
+ functions. #open_stream, #append_data, #close_stream.
132
+ * COPYING.LIB.README: Some clarifications on licensing.
133
+
134
+ 2005-02-20 12:55 Mirko Maischberger <mirko@lilik.it>
135
+
136
+ * extconf.rb: The extconf script now generates a start up script
137
+ for the sample program automatically. The script sets the
138
+ MOZILLA_FIVE_HOME and LD_LIBRARY_PATH taking the value from
139
+ mozilla-gtkmozembed.pc at compile time.
140
+
141
+ Based on this
142
+ http://sourceforge.net/mailarchive/message.php?msg_id=10867575
143
+ suggestion from Masao.
144
+
145
+ 2005-02-19 22:27 Mirko Maischberger <mirko@lilik.it>
146
+
147
+ * src/rbgtkmozembed.c: GtkMozEmbed
148
+
149
+ 2005-02-19 19:50 Mirko Maischberger <mirko@lilik.it>
150
+
151
+ * sample/: COPYING, README, ruby-gecko.rb: Initial import of
152
+ RubyGecko sample app.
153
+
154
+ 2005-02-19 19:49 Mirko Maischberger <mirko@lilik.it>
155
+
156
+ * extconf.rb, src/rbgtkmozembed.c, src/lib/gtkmozembed.rb: Initial
157
+ import of gtkmozembed ruby binding sources.
158
+
159
+ 2005-02-19 19:45 Mirko Maischberger <mirko@lilik.it>
160
+
161
+ * COPYING.LIB, COPYING.LIB.README, README: Legalese and
162
+ informational files.
163
+
data/README ADDED
@@ -0,0 +1,46 @@
1
+ Ruby/GtkMozEmbed
2
+ =========
3
+ Ruby/GtkMozEmbed is a Ruby binding of GtkMozEmbed a widget embedding a
4
+ Mozilla Gecko renderer.
5
+
6
+ Requirements
7
+ ------------
8
+ Ruby: http://www.ruby-lang.org/
9
+ GTK+: http://www.gtk.org/
10
+ Pango: http://www.pango.org/
11
+ Mozilla 1.7.x or Mozilla-Firefox 1.0.x http://www.mozilla.org/
12
+
13
+ Install
14
+ -------
15
+ 0. install ruby-1.{8|9}.x, GTK+, mozilla/firefox,
16
+ Ruby/GLib2, Ruby/Pango, Ruby/GTK2.
17
+ 1. ruby extconf.rb
18
+ 2. make
19
+ 3. su
20
+ 4. make install
21
+
22
+ Copying
23
+ -------
24
+ Copyright (c) 2005 Ruby-GNOME2 Project Team
25
+ Copyright (c) 2005 Mirko Maischberger <mirko@lilik.it>
26
+
27
+ This program is free software.
28
+ You can distribute/modify this program under the terms of
29
+ the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
30
+
31
+ (The sample application ruby-gecko.rb is released under the GPL)
32
+
33
+ Please note.
34
+ I've placed all my library code under the terms of the GNU/LGPL and
35
+ the test application under the GNU/GPL. After doing this I've seen
36
+ that the GtkMozEmbed code is released under the triple license
37
+ MPL-1.1/GPL/LGPL, but some portions of Mozilla code might still be
38
+ covered by the MPL-1.1 only.
39
+
40
+ If you are unsure, please check that all the code that you are going
41
+ to use in your project is covered by compatible liceses.
42
+
43
+
44
+ Project Website
45
+ ---------------
46
+ http://ruby-gnome2.sourceforge.jp/
@@ -0,0 +1,13 @@
1
+ # -*- ruby -*-
2
+
3
+ require './../glib2/lib/gnome2-raketask'
4
+
5
+ package = GNOME2Package.new do |_package|
6
+ _package.summary = "Ruby/GtkMozEmbed is a Ruby binding of GtkMozEmbed a widget embedding a Mozilla Gecko renderer."
7
+ _package.description = "Ruby/GtkMozEmbed is a Ruby binding of GtkMozEmbed a widget embedding a Mozilla Gecko renderer."
8
+ _package.dependency.gem.runtime = ["gtk2"]
9
+ _package.win32.packages = []
10
+ _package.win32.dependencies = []
11
+ end
12
+ package.define_tasks
13
+
@@ -0,0 +1,163 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = /home/kou/work/ruby/ruby-gnome2/gtkmozembed/ext/gtkmozembed
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/gtk-2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -pthread -I/usr/include/xulrunner-1.9.1/unstable -DXPCOM_GLUE -DDEFAULT_MOZILLA_FIVE_HOME='"/usr/lib/xulrunner-devel-1.9.1/lib"'
48
+ INCFLAGS = -I. -I/home/kou/work/ruby/ruby-gnome2/gtk2/ext/gtk2 -I/home/kou/work/ruby/ruby-gnome2/gtk2/ext/gtk2 -I/home/kou/work/ruby/ruby-gnome2/gtk2/ext/gtk2 -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/gtkmozembed/ext/gtkmozembed
49
+ DEFS =
50
+ CPPFLAGS = -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_BLOCK_PROC -DHAVE_OBJECT_ALLOCATE -DHAVE_NODE_ATTRASGN -DHAVE_GTKMOZEMBED_GLUE_CPP -DRUBY_GTKMOZEMBED_COMPILATION
51
+ CXXFLAGS = $(CFLAGS)
52
+ ldflags = -L. -rdynamic -Wl,-export-dynamic -pthread -L/usr/lib/xulrunner-devel-1.9.1/lib -Wl,-rpath,/usr/lib/xulrunner-devel-1.9.1/lib
53
+ dldflags =
54
+ archflag =
55
+ DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
56
+ LDSHARED = $(CXX) -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 = rbgtkmozembedversion.h gtkmozembed-enum-types.h gtkmozembed-enum-types.c
84
+
85
+ extout =
86
+ extout_prefix =
87
+ target_prefix =
88
+ LOCAL_LIBS =
89
+ LIBS = $(LIBRUBYARG_SHARED) -lxpcomglue -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -lrt -lgmodule-2.0 -lpango-1.0 -lpangocairo-1.0 -lcairo -lgio-2.0 -latk-1.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lxpcomglue -ldl -lpthread -lrt -ldl -lcrypt -lm -lc
90
+ SRCS = rbgtkmozembed.c gtkmozembed-enum-types.c rbgtkmozembed-init.c
91
+ OBJS = rbgtkmozembed.o gtkmozembed-enum-types.o rbgtkmozembed-init.o
92
+ TARGET = gtkmozembed
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-gtkmozembed.pc $(pkgconfigdir); \
162
+ fi
163
+
@@ -0,0 +1,6 @@
1
+ install:
2
+ if test -n "$(pkgconfigdir)"; then \
3
+ $(MAKEDIRS) $(pkgconfigdir); \
4
+ $(INSTALL_DATA) ../ruby-gtkmozembed.pc $(pkgconfigdir); \
5
+ fi
6
+
@@ -0,0 +1,127 @@
1
+ =begin
2
+ extconf.rb for Ruby/GtkMozEmbed 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 = "gtkmozembed"
23
+ package_ids = ["libxul-embedding-unstable",
24
+ "libxul-embedding",
25
+ "xulrunner-gtkmozembed",
26
+ "firefox-gtkmozembed",
27
+ "seamonkey-gtkmozembed",
28
+ "mozilla-gtkmozembed"]
29
+
30
+ require 'mkmf-gnome2'
31
+
32
+ ["glib2", "atk", "pango", "gdk_pixbuf2", "gtk2"].each do |package|
33
+ directory = "#{package}#{version_suffix}"
34
+ build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
35
+ add_depend_package(package, "#{directory}/ext/#{package}",
36
+ top_dir.to_s,
37
+ :top_build_dir => top_build_dir.to_s,
38
+ :target_build_dir => build_dir)
39
+ end
40
+ rcairo_options = {}
41
+ rcairo_source_dir_names = ["rcairo"]
42
+ if /mingw|cygwin|mswin32/ =~ RUBY_PLATFORM
43
+ rcairo_source_dir_names.unshift("rcairo.win32")
44
+ end
45
+ rcairo_source_dir_names.each do |rcairo_source_dir_name|
46
+ rcairo_source_dir = top_dir.parent.expand_path + rcairo_source_dir_name
47
+ if rcairo_source_dir.exist?
48
+ rcairo_options[:rcairo_source_dir] = rcairo_source_dir.to_s
49
+ break
50
+ end
51
+ end
52
+ check_cairo(rcairo_options)
53
+
54
+ setup_win32(module_name, base_dir)
55
+
56
+ package_id = nil
57
+ package_ids.each do |v|
58
+ if PKGConfig.exist?(v)
59
+ package_id = v
60
+ $stderr.puts "#{v} is found."
61
+ break
62
+ else
63
+ $stderr.puts "#{v} is not found."
64
+ end
65
+ end
66
+
67
+ unless package_id
68
+ $stderr.puts "No gtkmozembed is found. Abort."
69
+ exit 1
70
+ end
71
+
72
+
73
+ #
74
+ # detect GTK+ configurations
75
+ #
76
+
77
+ PKGConfig.have_package('gtk+-2.0')
78
+ PKGConfig.have_package(package_id)
79
+
80
+ mozilla_library_path = PKGConfig.libs_only_L(package_id)
81
+ mozilla_path = mozilla_library_path.strip.sub(/^-L/, "")
82
+
83
+ if mozilla_path
84
+ # please comment the CFLAGS line if you don't want a default comp_path
85
+ $CFLAGS << " -DDEFAULT_MOZILLA_FIVE_HOME='\"#{mozilla_path}\"' "
86
+ $LDFLAGS << " -Wl,-rpath,#{mozilla_path}"
87
+ else
88
+ $stderr.puts "${package_id}.pc cannot be found."
89
+ exit 1
90
+ end
91
+
92
+ if have_library("xpcomglue")
93
+ have_header("gtkmozembed_glue.cpp") or exit 1
94
+ CONFIG['LDSHARED'].gsub!(/\$\(CC\)/, "$(CXX)")
95
+ elsif have_library("gtkembedmoz")
96
+ have_func('gtk_moz_embed_new') or exit 1
97
+ have_func('gtk_moz_embed_set_profile_path') or exit 1
98
+ else
99
+ exit 1
100
+ end
101
+
102
+ make_version_header("GTKMOZEMBED", package_id, ".")
103
+
104
+ create_pkg_config_file('Ruby/GtkMozEmbed', package_id)
105
+ $defs << "-DRUBY_GTKMOZEMBED_COMPILATION"
106
+ create_makefile_at_srcdir(module_name, (base_dir + "ext" + module_name).to_s) do
107
+ enum_type_prefix = "gtkmozembed-enum-types"
108
+ include_paths = PKGConfig.cflags_only_I(package_id)
109
+ include_paths = include_paths.split.collect do |path|
110
+ path.strip.sub(/^-I/, '')
111
+ end
112
+ headers = include_paths.inject([]) do |result, path|
113
+ gtkmozembed_h = File.join(path, "gtkmozembed.h")
114
+ result += [gtkmozembed_h] if File.exist?(gtkmozembed_h)
115
+ result
116
+ end
117
+ glib_mkenums(enum_type_prefix, headers, "GTK_TYPE_", ["gtkmozembed.h"],
118
+ :force_flags => [/Flags/])
119
+ end
120
+ pkg_config_dir = with_config("pkg-config-dir")
121
+ if pkg_config_dir.is_a?(String)
122
+ File.open("Makefile", "ab") do |makefile|
123
+ makefile.puts
124
+ makefile.puts("pkgconfigdir=#{pkg_config_dir}")
125
+ end
126
+ end
127
+