[cairo-commit] rcairo ChangeLog,1.200,1.201 pkg-config.rb,1.4,1.5

Kouhei Sutou commit at pdx.freedesktop.org
Fri Feb 29 15:50:58 PST 2008


Committed by: kou

Update of /cvs/cairo/rcairo
In directory kemper:/tmp/cvs-serv13379

Modified Files:
	ChangeLog pkg-config.rb 
Log Message:
* pkg-config.rb: searched default path too.


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/rcairo/ChangeLog,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- ChangeLog	24 Feb 2008 07:42:58 -0000	1.200
+++ ChangeLog	29 Feb 2008 23:52:28 -0000	1.201
@@ -1,3 +1,7 @@
+2008-03-01  Kouhei Sutou  <kou at cozmixng.org>
+
+	* pkg-config.rb: searched default path too.
+
 2008-02-24  Kouhei Sutou  <kou at cozmixng.org>
 
 	* pkg-config.rb: implemented --cflags-only-I.

Index: pkg-config.rb
===================================================================
RCS file: /cvs/cairo/rcairo/pkg-config.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pkg-config.rb	24 Feb 2008 07:47:00 -0000	1.4
+++ pkg-config.rb	29 Feb 2008 23:52:28 -0000	1.5
@@ -9,7 +9,8 @@
   attr_accessor :msvc_syntax
   def initialize(name, path=nil, msvc_syntax=false)
     @name = name
-    @path = path || ENV["PKG_CONFIG_PATH"] || guess_path
+    @path = path || ENV["PKG_CONFIG_PATH"]
+    @path = [@path, guess_default_path].compact.join(separator)
     @msvc_syntax = msvc_syntax
     @variables = @declarations = nil
   end
@@ -105,6 +106,7 @@
 
   IDENTIFIER_RE = /[\w\d_.]+/
   def parse_pc
+    raise ".pc for #{@name} doesn't exist." unless exist?
     @variables = {}
     @declarations = {}
     File.open(pc) do |input|
@@ -134,7 +136,7 @@
     end
   end
 
-  def guess_path
+  def guess_default_path
     pkg_config = with_config("pkg-config", ENV["PKG_CONFIG"] || "pkg-config")
     pkg_config = Pathname.new(pkg_config)
     unless pkg_config.absolute?



More information about the cairo-commit mailing list