[cairo-commit] rcairo ChangeLog,1.199,1.200 pkg-config.rb,1.2,1.3
Kouhei Sutou
commit at pdx.freedesktop.org
Sat Feb 23 23:42:14 PST 2008
Committed by: kou
Update of /cvs/cairo/rcairo
In directory kemper:/tmp/cvs-serv17579
Modified Files:
ChangeLog pkg-config.rb
Log Message:
* pkg-config.rb: implemented --cflags-only-I.
* test/: added.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/rcairo/ChangeLog,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- ChangeLog 24 Feb 2008 07:37:17 -0000 1.199
+++ ChangeLog 24 Feb 2008 07:42:58 -0000 1.200
@@ -1,5 +1,8 @@
2008-02-24 Kouhei Sutou <kou at cozmixng.org>
+ * pkg-config.rb: implemented --cflags-only-I.
+ * test/: added.
+
* src/rb_cairo_surface.c: worked with cairo >= 1.2.0.
* src/rb_cairo_context.c: fixed declaration position.
Index: pkg-config.rb
===================================================================
RCS file: /cvs/cairo/rcairo/pkg-config.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pkg-config.rb 24 Feb 2008 07:26:52 -0000 1.2
+++ pkg-config.rb 24 Feb 2008 07:42:58 -0000 1.3
@@ -27,18 +27,14 @@
end
def cflags
- all_cflags = (requires_private + requires.reverse).collect do |package|
- self.class.new(package, @path, @msvc_syntax).cflags
- end
- all_cflags = [declaration("Cflags")] + all_cflags
- all_cflags = all_cflags.join(" ").gsub(/-I /, '-I').split.uniq
- path_flags, other_flags = all_cflags.partition {|flag| /\A-I/ =~ flag}
- path_flags = path_flags.reject do |flag|
- flag == "-I/usr/include"
- end
+ path_flags, other_flags = collect_cflags
(other_flags + path_flags).join(" ")
end
+ def cflags_only_I
+ collect_cflags[0].join(" ")
+ end
+
def libs
all_libs = requires.collect do |package|
self.class.new(package, @path, @msvc_syntax).libs
@@ -94,6 +90,19 @@
expand_value(@declarations[name])
end
+ def collect_cflags
+ all_cflags = (requires_private + requires.reverse).collect do |package|
+ self.class.new(package, @path, @msvc_syntax).cflags
+ end
+ all_cflags = [declaration("Cflags")] + all_cflags
+ all_cflags = all_cflags.join(" ").gsub(/-I /, '-I').split.uniq
+ path_flags, other_flags = all_cflags.partition {|flag| /\A-I/ =~ flag}
+ path_flags = path_flags.reject do |flag|
+ flag == "-I/usr/include"
+ end
+ [path_flags, other_flags]
+ end
+
IDENTIFIER_RE = /[\w\d_.]+/
def parse_pc
@variables = {}
More information about the cairo-commit
mailing list