[cairo-commit] rcairo ChangeLog,1.209,1.210 pkg-config.rb,1.8,1.9
Kouhei Sutou
commit at pdx.freedesktop.org
Thu Apr 3 20:13:47 PDT 2008
Committed by: kou
Update of /cvs/cairo/rcairo
In directory kemper:/tmp/cvs-serv28485
Modified Files:
ChangeLog pkg-config.rb
Log Message:
* pkg-config.rb: detect MSVC environment.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/rcairo/ChangeLog,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -d -r1.209 -r1.210
--- ChangeLog 4 Apr 2008 02:44:15 -0000 1.209
+++ ChangeLog 4 Apr 2008 03:17:53 -0000 1.210
@@ -1,5 +1,7 @@
2008-04-04 Kouhei Sutou <kou at cozmixng.org>
+ * pkg-config.rb: detect MSVC environment.
+
* pkg-config.rb: handle DL error.
2008-04-03 Kouhei Sutou <kou at cozmixng.org>
Index: pkg-config.rb
===================================================================
RCS file: /cvs/cairo/rcairo/pkg-config.rb,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pkg-config.rb 4 Apr 2008 02:44:15 -0000 1.8
+++ pkg-config.rb 4 Apr 2008 03:17:53 -0000 1.9
@@ -180,28 +180,36 @@
module PKGConfig
module_function
+ def msvc?
+ /mswin32/.match(RUBY_PLATFORM) and /^cl\b/.match(Config::CONFIG['CC'])
+ end
+
+ def package_config(package)
+ PackageConfig.new(package, nil, msvc?)
+ end
+
def exist?(pkg)
- PackageConfig.new(pkg).exist?
+ package_config(pkg).exist?
end
def libs(pkg)
- PackageConfig.new(pkg).libs
+ package_config(pkg).libs
end
def libs_only_l(pkg)
- PackageConfig.new(pkg).libs_only_l
+ package_config(pkg).libs_only_l
end
def cflags(pkg)
- PackageConfig.new(pkg).cflags
+ package_config(pkg).cflags
end
def cflags_only_I(pkg)
- PackageConfig.new(pkg).cflags_only_I
+ package_config(pkg).cflags_only_I
end
def modversion(pkg)
- PackageConfig.new(pkg).version
+ package_config(pkg).version
end
def check_version?(pkg, major = 0, minor = 0, micro = 0)
More information about the cairo-commit
mailing list