Hello community,

here is the log from the commit of package rubygem-pkg-config for 
openSUSE:Factory checked in at 2020-10-03 18:51:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-pkg-config (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-pkg-config.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-pkg-config"

Sat Oct  3 18:51:38 2020 rev:21 rq:838065 version:1.4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-pkg-config/rubygem-pkg-config.changes    
2020-02-19 12:39:21.691488430 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-pkg-config.new.4249/rubygem-pkg-config.changes
  2020-10-03 18:51:41.921226351 +0200
@@ -1,0 +2,33 @@
+Fri Sep 25 14:39:21 UTC 2020 - Stephan Kulow <[email protected]>
+
+updated to version 1.4.4
+ see installed NEWS
+
+  == 1.4.4 - 2020-09-23
+  
+  === Fixes
+  
+    * Fixed a bug that NoMethodError instead of
+      PackageConfig::NotFoundError is raised.
+      [Fixed by kojix2][GitHub#21]
+  
+  === Thanks
+  
+    * kojix2
+  
+  == 1.4.3 - 2020-09-15
+  
+  === Improvements
+  
+    * Changed to use PackageConfig::NotFoundError instead of RuntimeError
+      for exception on no .pc is found.
+  
+  == 1.4.2 - 2020-08-10
+  
+  === Improvements
+  
+    * Added support for detecting pkgconfig path on RubyInstaller
+      without "ridk exec".
+  
+
+-------------------------------------------------------------------

Old:
----
  pkg-config-1.4.1.gem

New:
----
  pkg-config-1.4.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-pkg-config.spec ++++++
--- /var/tmp/diff_new_pack.W9oV24/_old  2020-10-03 18:51:43.585227457 +0200
+++ /var/tmp/diff_new_pack.W9oV24/_new  2020-10-03 18:51:43.589227460 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-pkg-config
-Version:        1.4.1
+Version:        1.4.4
 Release:        0
 %define mod_name pkg-config
 %define mod_full_name %{mod_name}-%{version}

++++++ pkg-config-1.4.1.gem -> pkg-config-1.4.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NEWS new/NEWS
--- old/NEWS    2020-02-10 03:33:39.000000000 +0100
+++ new/NEWS    2020-09-22 23:36:28.000000000 +0200
@@ -1,5 +1,31 @@
 = NEWS
 
+== 1.4.4 - 2020-09-23
+
+=== Fixes
+
+  * Fixed a bug that NoMethodError instead of
+    PackageConfig::NotFoundError is raised.
+    [Fixed by kojix2][GitHub#21]
+
+=== Thanks
+
+  * kojix2
+
+== 1.4.3 - 2020-09-15
+
+=== Improvements
+
+  * Changed to use PackageConfig::NotFoundError instead of RuntimeError
+    for exception on no .pc is found.
+
+== 1.4.2 - 2020-08-10
+
+=== Improvements
+
+  * Added support for detecting pkgconfig path on RubyInstaller
+    without "ridk exec".
+
 == 1.4.1 - 2020-02-10
 
 === Improvements
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     2020-02-10 03:33:39.000000000 +0100
+++ new/README.rdoc     2020-09-22 23:36:28.000000000 +0200
@@ -8,17 +8,13 @@
 
 A pkg-config implementation by Ruby.
 
-== Dependencies
-
-* ruby >= 1.8 (1.9.2 is also supported!)
-
 == Install
 
   # gem install pkg-config
 
 == Documents
 
-* TODO
+* https://rubydoc.info/gems/pkg-config
 
 == Source
 
@@ -27,7 +23,7 @@
 
 == Copyright
 
-Copyright 2008-2019 Kouhei Sutou <[email protected]>
+Copyright 2008-2020 Kouhei Sutou <[email protected]>
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -45,10 +41,6 @@
 
 See LGPL-2.1 file for details.
 
-== Mailing list
-
-TODO
-
 == Thanks
 
 * Funky Bibimbap
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pkg-config/version.rb 
new/lib/pkg-config/version.rb
--- old/lib/pkg-config/version.rb       2020-02-10 03:33:39.000000000 +0100
+++ new/lib/pkg-config/version.rb       2020-09-22 23:36:28.000000000 +0200
@@ -1,4 +1,4 @@
-# Copyright 2012-2019 Kouhei Sutou <[email protected]>
+# Copyright 2012-2020  Sutou Kouhei <[email protected]>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -15,5 +15,5 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
 
 module PKGConfig
-  VERSION = "1.4.1"
+  VERSION = "1.4.4"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pkg-config.rb new/lib/pkg-config.rb
--- old/lib/pkg-config.rb       2020-02-10 03:33:39.000000000 +0100
+++ new/lib/pkg-config.rb       2020-09-22 23:36:28.000000000 +0200
@@ -25,6 +25,12 @@
 require "shellwords"
 
 class PackageConfig
+  class Error < StandardError
+  end
+
+  class NotFoundError < Error
+  end
+
   SEPARATOR = File::PATH_SEPARATOR
 
   class << self
@@ -380,7 +386,7 @@
 
   IDENTIFIER_RE = /[a-zA-Z\d_\.]+/
   def parse_pc
-    raise ".pc for #{@name} doesn't exist." unless exist?
+    raise NotFoundError, ".pc doesn't exist: <#{@name}>" unless exist?
     @variables = {}
     @declarations = {}
     File.open(pc_path) do |input|
@@ -439,6 +445,11 @@
       "/opt/X11/lib/pkgconfig",
       "/usr/share/pkgconfig",
     ]
+    if Object.const_defined?(:RubyInstaller)
+      mingw_bin_path = RubyInstaller::Runtime.msys2_installation.mingw_bin_path
+      mingw_pkgconfig_path = Pathname.new(mingw_bin_path) + "../lib/pkgconfig"
+      default_paths.unshift(mingw_pkgconfig_path.cleanpath.to_s)
+    end
     libdir = ENV["PKG_CONFIG_LIBDIR"]
     default_paths.unshift(libdir) if libdir
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-02-10 03:33:39.000000000 +0100
+++ new/metadata        2020-09-22 23:36:28.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: pkg-config
 version: !ruby/object:Gem::Version
-  version: 1.4.1
+  version: 1.4.4
 platform: ruby
 authors:
 - Kouhei Sutou
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2020-02-10 00:00:00.000000000 Z
+date: 2020-09-22 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: test-unit
@@ -68,7 +68,7 @@
 - lib/pkg-config.rb
 - lib/pkg-config/version.rb
 - test/run-test.rb
-- test/test_pkg_config.rb
+- test/test-pkg-config.rb
 homepage: https://github.com/ruby-gnome/pkg-config
 licenses:
 - LGPLv2+
@@ -89,11 +89,10 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubyforge_project: 
-rubygems_version: 2.7.6.2
+rubygems_version: 3.2.0.rc.1
 signing_key: 
 specification_version: 4
 summary: A pkg-config implementation for Ruby
 test_files:
 - test/run-test.rb
-- test/test_pkg_config.rb
+- test/test-pkg-config.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/run-test.rb new/test/run-test.rb
--- old/test/run-test.rb        2020-02-10 03:33:39.000000000 +0100
+++ new/test/run-test.rb        2020-09-22 23:36:28.000000000 +0200
@@ -6,9 +6,6 @@
 lib_dir = File.join(base_dir, "lib")
 test_dir = File.join(base_dir, "test")
 
-ENV["BUNDLE_GEMFILE"] ||= File.join(base_dir, "Gemfile")
-require "bundler/setup"
-
 require 'test-unit'
 
 $LOAD_PATH.unshift(lib_dir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test-pkg-config.rb new/test/test-pkg-config.rb
--- old/test/test-pkg-config.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/test/test-pkg-config.rb 2020-09-22 23:36:28.000000000 +0200
@@ -0,0 +1,224 @@
+require "mkmf"
+require "pkg-config"
+
+class PkgConfigTest < Test::Unit::TestCase
+  def setup
+    @custom_libdir = "/tmp/local/lib"
+    options = {:override_variables => {"libdir" => @custom_libdir}}
+    @cairo = PackageConfig.new("cairo", options)
+    @cairo_png = PackageConfig.new("cairo-png", options)
+  end
+
+  def only_pkg_config_version(major, minor)
+    pkg_config_version = `pkg-config --version`.chomp
+    current_major, current_minor = 
pkg_config_version.split(".").collect(&:to_i)
+    return if ([major, minor] <=> [current_major, current_minor]) <= 0
+    omit("Require pkg-config #{pkg_config_version} or later")
+  end
+
+  def test_exist?
+    assert(system("pkg-config --exists cairo"))
+    assert(@cairo.exist?)
+
+    assert(system("pkg-config --exists cairo-png"))
+    assert(@cairo_png.exist?)
+  end
+
+  def test_cflags
+    assert_pkg_config("cairo", ["--cflags"], @cairo.cflags)
+    only_pkg_config_version(0, 29)
+    assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags)
+  end
+
+  def test_cflags_only_I
+    assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I)
+    only_pkg_config_version(0, 29)
+    assert_pkg_config("cairo-png", ["--cflags-only-I"], 
@cairo_png.cflags_only_I)
+  end
+
+  def split_lib_flags(libs_command_line)
+    @cairo.__send__(:split_lib_flags, libs_command_line)
+  end
+
+  def test_split_libs
+    assert_equal([
+                   "-L/usr/local/Cellar/gtk+3/3.24.10/lib",
+                   "-L/usr/local/Cellar/pango/1.44.3/lib",
+                   "-L/usr/local/Cellar/harfbuzz/2.5.3/lib",
+                   "-L/usr/local/Cellar/gdk-pixbuf/2.38.1_1/lib",
+                   "-L/usr/local/Cellar/cairo/1.16.0_2/lib",
+                   "-L/usr/local/Cellar/glib/2.60.6/lib",
+                   "-L/usr/local/opt/gettext/lib",
+                   "-lgdk-3",
+                   "-framework", "Cocoa",
+                   "-framework", "Carbon",
+                   "-framework", "CoreGraphics",
+                   "-lpangocairo-1.0",
+                   "-lpango-1.0",
+                   "-lharfbuzz",
+                   "-lgdk_pixbuf-2.0",
+                   "-lcairo-gobject",
+                   "-lcairo",
+                   "-lgobject-2.0",
+                   "-lglib-2.0",
+                   "-lintl"
+                 ],
+                 split_lib_flags("-L/usr/local/Cellar/gtk+3/3.24.10/lib " +
+                                 "-L/usr/local/Cellar/pango/1.44.3/lib " +
+                                 "-L/usr/local/Cellar/harfbuzz/2.5.3/lib " +
+                                 "-L/usr/local/Cellar/gdk-pixbuf/2.38.1_1/lib 
" +
+                                 "-L/usr/local/Cellar/cairo/1.16.0_2/lib " +
+                                 "-L/usr/local/Cellar/glib/2.60.6/lib " +
+                                 "-L/usr/local/opt/gettext/lib " +
+                                 "-lgdk-3 " +
+                                 "-framework Cocoa " +
+                                 "-framework Carbon " +
+                                 "-framework CoreGraphics " +
+                                 "-lpangocairo-1.0 " +
+                                 "-lpango-1.0 " +
+                                 "-lharfbuzz " +
+                                 "-lgdk_pixbuf-2.0 " +
+                                 "-lcairo-gobject " +
+                                 "-lcairo " +
+                                 "-lgobject-2.0 " +
+                                 "-lglib-2.0 " +
+                                 "-lintl"))
+  end
+
+  def test_libs
+    assert_pkg_config("cairo", ["--libs"], @cairo.libs)
+    assert_pkg_config("cairo-png", ["--libs"], @cairo_png.libs)
+  end
+
+  def test_libs_msvc
+    @cairo.msvc_syntax = true
+    result = pkg_config("cairo", "--libs")
+    msvc_result = result.gsub(/-lcairo\b/, "cairo.lib")
+    msvc_result = msvc_result.gsub(/-L/, "/libpath:")
+    assert_not_equal(msvc_result, result)
+    assert_equal(msvc_result, @cairo.libs)
+  end
+
+  def test_libs_only_l
+    assert_pkg_config("cairo", ["--libs-only-l"], @cairo.libs_only_l)
+    assert_pkg_config("cairo-png", ["--libs-only-l"], @cairo_png.libs_only_l)
+  end
+
+  def test_libs_only_l_msvc
+    @cairo_png.msvc_syntax = true
+    result = pkg_config("cairo-png", "--libs-only-l")
+    msvc_result = result.gsub(/-l(cairo|png[0-9]+|z)\b/, "\\1.lib")
+    assert_not_equal(msvc_result, result)
+    assert_equal(msvc_result, @cairo_png.libs_only_l)
+  end
+
+  def test_libs_only_L
+    assert_pkg_config("cairo", ["--libs-only-L"], @cairo.libs_only_L)
+    assert_pkg_config("cairo-png", ["--libs-only-L"], @cairo_png.libs_only_L)
+  end
+
+  def test_libs_only_L_msvc
+    @cairo_png.msvc_syntax = true
+    result = pkg_config("cairo-png", "--libs-only-L")
+    msvc_result = result.gsub(/-L/, "/libpath:")
+    assert_not_equal(msvc_result, result)
+    assert_equal(msvc_result, @cairo_png.libs_only_L)
+  end
+
+  def test_requires
+    assert_equal([], @cairo.requires)
+  end
+
+  def test_requires_private
+    requires_private = pkg_config("cairo", "--print-requires-private")
+    expected_requires = requires_private.split(/\n/).collect do |require|
+      require.split(/\s/, 2)[0]
+    end
+    assert_equal(expected_requires,
+                 @cairo.requires_private)
+  end
+
+  def test_version
+    assert_pkg_config("cairo", ["--modversion"], @cairo.version)
+  end
+
+  def test_parse_override_variables
+    assert_override_variables({}, nil)
+    assert_override_variables({"prefix" => "c:\\\\gtk-dev"},
+                              "prefix=c:\\\\gtk-dev")
+    assert_override_variables({
+                                "prefix" => "c:\\\\gtk-dev",
+                                "includdir" => "d:\\\\gtk\\include"
+                              },
+                              ["prefix=c:\\\\gtk-dev",
+                               "includdir=d:\\\\gtk\\include"].join(","))
+  end
+
+  def test_override_variables
+    overridden_prefix = "c:\\\\gtk-dev"
+    original_prefix = @cairo.variable("prefix")
+    assert_not_equal(overridden_prefix, original_prefix)
+    with_override_variables("prefix=#{overridden_prefix}") do
+      cairo = PackageConfig.new("cairo")
+      assert_equal(overridden_prefix, cairo.variable("prefix"))
+    end
+  end
+
+  def test_not_found
+    message = ".pc doesn't exist: <nonexistent>"
+    assert_raise(PackageConfig::NotFoundError.new(message)) do
+      PKGConfig.modversion("nonexistent")
+    end
+  end
+
+  private
+  def pkg_config(package, *args)
+    args.unshift("--define-variable=libdir=#{@custom_libdir}")
+    args = args.collect {|arg| arg.dump}.join(" ")
+    `pkg-config #{args} #{package}`.strip
+  end
+
+  def assert_pkg_config(package, pkg_config_args, actual)
+    result = pkg_config(package, *pkg_config_args)
+    result = nil if result.empty?
+    assert_equal(result, actual)
+  end
+
+  def assert_override_variables(expected, override_variables)
+    with_override_variables(override_variables) do
+      cairo = PackageConfig.new("cairo")
+      assert_equal(expected, 
cairo.instance_variable_get("@override_variables"))
+    end
+  end
+
+  def with_override_variables(override_variables)
+    if override_variables.nil?
+      args = {}
+    else
+      args = {"--with-override-variables" => override_variables}
+    end
+    PackageConfig.clear_configure_args_cache
+    configure_args(args) do
+      yield
+    end
+  end
+
+  def configure_args(args)
+    original_configure_args = $configure_args
+    $configure_args = $configure_args.merge(args)
+    yield
+  ensure
+    $configure_args = original_configure_args
+  end
+
+  sub_test_case("#parse_requires") do
+    def parse_requires(requires)
+      @cairo.__send__(:parse_requires, requires)
+    end
+
+    def test_broken_version
+      assert_equal(["fribidi"],
+                   parse_requires("fribidi >= fribidi_required_dep"))
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_pkg_config.rb new/test/test_pkg_config.rb
--- old/test/test_pkg_config.rb 2020-02-10 03:33:39.000000000 +0100
+++ new/test/test_pkg_config.rb 1970-01-01 01:00:00.000000000 +0100
@@ -1,217 +0,0 @@
-require "mkmf"
-require "pkg-config"
-
-class PkgConfigTest < Test::Unit::TestCase
-  def setup
-    @custom_libdir = "/tmp/local/lib"
-    options = {:override_variables => {"libdir" => @custom_libdir}}
-    @cairo = PackageConfig.new("cairo", options)
-    @cairo_png = PackageConfig.new("cairo-png", options)
-  end
-
-  def only_pkg_config_version(major, minor)
-    pkg_config_version = `pkg-config --version`.chomp
-    current_major, current_minor = 
pkg_config_version.split(".").collect(&:to_i)
-    return if ([major, minor] <=> [current_major, current_minor]) <= 0
-    omit("Require pkg-config #{pkg_config_version} or later")
-  end
-
-  def test_exist?
-    assert(system("pkg-config --exists cairo"))
-    assert(@cairo.exist?)
-
-    assert(system("pkg-config --exists cairo-png"))
-    assert(@cairo_png.exist?)
-  end
-
-  def test_cflags
-    assert_pkg_config("cairo", ["--cflags"], @cairo.cflags)
-    only_pkg_config_version(0, 29)
-    assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags)
-  end
-
-  def test_cflags_only_I
-    assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I)
-    only_pkg_config_version(0, 29)
-    assert_pkg_config("cairo-png", ["--cflags-only-I"], 
@cairo_png.cflags_only_I)
-  end
-
-  def split_lib_flags(libs_command_line)
-    @cairo.__send__(:split_lib_flags, libs_command_line)
-  end
-
-  def test_split_libs
-    assert_equal([
-                   "-L/usr/local/Cellar/gtk+3/3.24.10/lib",
-                   "-L/usr/local/Cellar/pango/1.44.3/lib",
-                   "-L/usr/local/Cellar/harfbuzz/2.5.3/lib",
-                   "-L/usr/local/Cellar/gdk-pixbuf/2.38.1_1/lib",
-                   "-L/usr/local/Cellar/cairo/1.16.0_2/lib",
-                   "-L/usr/local/Cellar/glib/2.60.6/lib",
-                   "-L/usr/local/opt/gettext/lib",
-                   "-lgdk-3",
-                   "-framework", "Cocoa",
-                   "-framework", "Carbon",
-                   "-framework", "CoreGraphics",
-                   "-lpangocairo-1.0",
-                   "-lpango-1.0",
-                   "-lharfbuzz",
-                   "-lgdk_pixbuf-2.0",
-                   "-lcairo-gobject",
-                   "-lcairo",
-                   "-lgobject-2.0",
-                   "-lglib-2.0",
-                   "-lintl"
-                 ],
-                 split_lib_flags("-L/usr/local/Cellar/gtk+3/3.24.10/lib " +
-                                 "-L/usr/local/Cellar/pango/1.44.3/lib " +
-                                 "-L/usr/local/Cellar/harfbuzz/2.5.3/lib " +
-                                 "-L/usr/local/Cellar/gdk-pixbuf/2.38.1_1/lib 
" +
-                                 "-L/usr/local/Cellar/cairo/1.16.0_2/lib " +
-                                 "-L/usr/local/Cellar/glib/2.60.6/lib " +
-                                 "-L/usr/local/opt/gettext/lib " +
-                                 "-lgdk-3 " +
-                                 "-framework Cocoa " +
-                                 "-framework Carbon " +
-                                 "-framework CoreGraphics " +
-                                 "-lpangocairo-1.0 " +
-                                 "-lpango-1.0 " +
-                                 "-lharfbuzz " +
-                                 "-lgdk_pixbuf-2.0 " +
-                                 "-lcairo-gobject " +
-                                 "-lcairo " +
-                                 "-lgobject-2.0 " +
-                                 "-lglib-2.0 " +
-                                 "-lintl"))
-  end
-
-  def test_libs
-    assert_pkg_config("cairo", ["--libs"], @cairo.libs)
-    assert_pkg_config("cairo-png", ["--libs"], @cairo_png.libs)
-  end
-
-  def test_libs_msvc
-    @cairo.msvc_syntax = true
-    result = pkg_config("cairo", "--libs")
-    msvc_result = result.gsub(/-lcairo\b/, "cairo.lib")
-    msvc_result = msvc_result.gsub(/-L/, "/libpath:")
-    assert_not_equal(msvc_result, result)
-    assert_equal(msvc_result, @cairo.libs)
-  end
-
-  def test_libs_only_l
-    assert_pkg_config("cairo", ["--libs-only-l"], @cairo.libs_only_l)
-    assert_pkg_config("cairo-png", ["--libs-only-l"], @cairo_png.libs_only_l)
-  end
-
-  def test_libs_only_l_msvc
-    @cairo_png.msvc_syntax = true
-    result = pkg_config("cairo-png", "--libs-only-l")
-    msvc_result = result.gsub(/-l(cairo|png[0-9]+|z)\b/, "\\1.lib")
-    assert_not_equal(msvc_result, result)
-    assert_equal(msvc_result, @cairo_png.libs_only_l)
-  end
-
-  def test_libs_only_L
-    assert_pkg_config("cairo", ["--libs-only-L"], @cairo.libs_only_L)
-    assert_pkg_config("cairo-png", ["--libs-only-L"], @cairo_png.libs_only_L)
-  end
-
-  def test_libs_only_L_msvc
-    @cairo_png.msvc_syntax = true
-    result = pkg_config("cairo-png", "--libs-only-L")
-    msvc_result = result.gsub(/-L/, "/libpath:")
-    assert_not_equal(msvc_result, result)
-    assert_equal(msvc_result, @cairo_png.libs_only_L)
-  end
-
-  def test_requires
-    assert_equal([], @cairo.requires)
-  end
-
-  def test_requires_private
-    requires_private = pkg_config("cairo", "--print-requires-private")
-    expected_requires = requires_private.split(/\n/).collect do |require|
-      require.split(/\s/, 2)[0]
-    end
-    assert_equal(expected_requires,
-                 @cairo.requires_private)
-  end
-
-  def test_version
-    assert_pkg_config("cairo", ["--modversion"], @cairo.version)
-  end
-
-  def test_parse_override_variables
-    assert_override_variables({}, nil)
-    assert_override_variables({"prefix" => "c:\\\\gtk-dev"},
-                              "prefix=c:\\\\gtk-dev")
-    assert_override_variables({
-                                "prefix" => "c:\\\\gtk-dev",
-                                "includdir" => "d:\\\\gtk\\include"
-                              },
-                              ["prefix=c:\\\\gtk-dev",
-                               "includdir=d:\\\\gtk\\include"].join(","))
-  end
-
-  def test_override_variables
-    overridden_prefix = "c:\\\\gtk-dev"
-    original_prefix = @cairo.variable("prefix")
-    assert_not_equal(overridden_prefix, original_prefix)
-    with_override_variables("prefix=#{overridden_prefix}") do
-      cairo = PackageConfig.new("cairo")
-      assert_equal(overridden_prefix, cairo.variable("prefix"))
-    end
-  end
-
-  private
-  def pkg_config(package, *args)
-    args.unshift("--define-variable=libdir=#{@custom_libdir}")
-    args = args.collect {|arg| arg.dump}.join(" ")
-    `pkg-config #{args} #{package}`.strip
-  end
-
-  def assert_pkg_config(package, pkg_config_args, actual)
-    result = pkg_config(package, *pkg_config_args)
-    result = nil if result.empty?
-    assert_equal(result, actual)
-  end
-
-  def assert_override_variables(expected, override_variables)
-    with_override_variables(override_variables) do
-      cairo = PackageConfig.new("cairo")
-      assert_equal(expected, 
cairo.instance_variable_get("@override_variables"))
-    end
-  end
-
-  def with_override_variables(override_variables)
-    if override_variables.nil?
-      args = {}
-    else
-      args = {"--with-override-variables" => override_variables}
-    end
-    PackageConfig.clear_configure_args_cache
-    configure_args(args) do
-      yield
-    end
-  end
-
-  def configure_args(args)
-    original_configure_args = $configure_args
-    $configure_args = $configure_args.merge(args)
-    yield
-  ensure
-    $configure_args = original_configure_args
-  end
-
-  sub_test_case("#parse_requires") do
-    def parse_requires(requires)
-      @cairo.__send__(:parse_requires, requires)
-    end
-
-    def test_broken_version
-      assert_equal(["fribidi"],
-                   parse_requires("fribidi >= fribidi_required_dep"))
-    end
-  end
-end


Reply via email to