Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-pkg-config for openSUSE:Factory checked in at 2022-12-14 14:10:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-pkg-config (Old) and /work/SRC/openSUSE:Factory/.rubygem-pkg-config.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-pkg-config" Wed Dec 14 14:10:51 2022 rev:25 rq:1042652 version:1.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-pkg-config/rubygem-pkg-config.changes 2022-08-07 18:34:04.081176962 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-pkg-config.new.1835/rubygem-pkg-config.changes 2022-12-14 14:11:02.919508801 +0100 @@ -1,0 +2,24 @@ +Wed Dec 7 11:29:44 UTC 2022 - Stephan Kulow <[email protected]> + +updated to version 1.5.1 + see installed NEWS + + == 1.5.1 - 2022-11-23 + + === Improvements + + * Improved the default search path. "/usr" in "/usr/bin/pkg-config" + isn't used for buidling the default search path if "pkg-config + --variable=pc_path pkg-config" is available. + [Reported by Watson][GitHub:#22] + + == 1.5.0 - 2022-11-23 + + === Improvements + + * Improved the default search path. "pkg-config --variable=pc_path + pkg-config" is used as the default search path if it's available. + [Reported by Watson][GitHub:#22] + + +------------------------------------------------------------------- Old: ---- pkg-config-1.4.9.gem New: ---- pkg-config-1.5.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-pkg-config.spec ++++++ --- /var/tmp/diff_new_pack.NgYrlL/_old 2022-12-14 14:11:03.759513121 +0100 +++ /var/tmp/diff_new_pack.NgYrlL/_new 2022-12-14 14:11:03.767513162 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-pkg-config -Version: 1.4.9 +Version: 1.5.1 Release: 0 %define mod_name pkg-config %define mod_full_name %{mod_name}-%{version} ++++++ pkg-config-1.4.9.gem -> pkg-config-1.5.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NEWS new/NEWS --- old/NEWS 2022-07-30 22:18:46.000000000 +0200 +++ new/NEWS 2022-11-23 08:22:05.000000000 +0100 @@ -1,5 +1,22 @@ = NEWS +== 1.5.1 - 2022-11-23 + +=== Improvements + + * Improved the default search path. "/usr" in "/usr/bin/pkg-config" + isn't used for buidling the default search path if "pkg-config + --variable=pc_path pkg-config" is available. + [Reported by Watson][GitHub:#22] + +== 1.5.0 - 2022-11-23 + +=== Improvements + + * Improved the default search path. "pkg-config --variable=pc_path + pkg-config" is used as the default search path if it's available. + [Reported by Watson][GitHub:#22] + == 1.4.9 - 2022-07-31 This is a bug fix release of 1.4.8. All 1.4.8 users should be upgraded 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 2022-07-30 22:18:46.000000000 +0200 +++ new/lib/pkg-config/version.rb 2022-11-23 08:22:05.000000000 +0100 @@ -15,5 +15,5 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA module PKGConfig - VERSION = "1.4.9" + VERSION = "1.5.1" 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 2022-07-30 22:18:46.000000000 +0200 +++ new/lib/pkg-config.rb 2022-11-23 08:22:05.000000000 +0100 @@ -44,6 +44,11 @@ @native_pkg_config_prefix ||= compute_native_pkg_config_prefix end + @default_path = nil + def default_path + @default_path ||= compute_default_path + end + @custom_override_variables = nil def custom_override_variables @custom_override_variables ||= with_config("override-variables", "") @@ -52,6 +57,7 @@ def clear_configure_args_cache @native_pkg_config = nil @native_pkg_config_prefix = nil + @default_path = nil @custom_override_variables = nil end @@ -138,6 +144,111 @@ pkg_config_prefix end end + + def compute_default_path + default_paths = nil + if native_pkg_config + pc_path = run_command(native_pkg_config.to_s, + "--variable=pc_path", + "pkg-config") + if pc_path + default_paths = pc_path.strip.split(SEPARATOR) + default_paths = nil if default_paths.empty? + end + end + if default_paths.nil? + arch_depended_path = Dir.glob("/usr/lib/*/pkgconfig") + default_paths = [] + pkg_config_prefix = native_pkg_config_prefix + if pkg_config_prefix + pkg_config_arch_depended_paths = + Dir.glob((pkg_config_prefix + "lib/*/pkgconfig").to_s) + default_paths.concat(pkg_config_arch_depended_paths) + default_paths << (pkg_config_prefix + "lib64/pkgconfig").to_s + default_paths << (pkg_config_prefix + "libx32/pkgconfig").to_s + default_paths << (pkg_config_prefix + "lib/pkgconfig").to_s + default_paths << (pkg_config_prefix + "libdata/pkgconfig").to_s + default_paths << (pkg_config_prefix + "share/pkgconfig").to_s + end + default_paths << "/usr/local/lib64/pkgconfig" + default_paths << "/usr/local/libx32/pkgconfig" + default_paths << "/usr/local/lib/pkgconfig" + default_paths << "/usr/local/libdata/pkgconfig" + default_paths << "/usr/local/share/pkgconfig" + default_paths << "/opt/local/lib/pkgconfig" + default_paths.concat(arch_depended_path) + default_paths << "/usr/lib64/pkgconfig" + default_paths << "/usr/libx32/pkgconfig" + default_paths << "/usr/lib/pkgconfig" + default_paths << "/usr/libdata/pkgconfig" + default_paths << "/usr/X11R6/lib/pkgconfig" + default_paths << "/usr/X11R6/share/pkgconfig" + default_paths << "/usr/X11/lib/pkgconfig" + default_paths << "/opt/X11/lib/pkgconfig" + default_paths << "/usr/share/pkgconfig" + end + 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 + + paths = [] + if /-darwin\d[\d\.]*\z/ =~ RUBY_PLATFORM and + /\A(\d+\.\d+)/ =~ run_command("sw_vers", "-productVersion") + mac_os_version = $1 + homebrew_repository_candidates = [] + if pkg_config_prefix + brew_path = pkg_config_prefix + "bin" + "brew" + if brew_path.exist? + homebrew_repository = run_command(brew_path.to_s, "--repository") + if homebrew_repository + homebrew_repository_candidates << + Pathname.new(homebrew_repository.strip) + end + else + homebrew_repository_candidates << pkg_config_prefix + "Homebrew" + homebrew_repository_candidates << pkg_config_prefix + end + end + brew = search_executable_from_path("brew") + if brew + homebrew_repository = run_command("brew", "--repository") + if homebrew_repository + homebrew_repository_candidates << + Pathname(homebrew_repository.to_s) + end + end + homebrew_repository_candidates.uniq.each do |candidate| + pkgconfig_base_path = candidate + "Library/Homebrew/os/mac/pkgconfig" + path = pkgconfig_base_path + mac_os_version + unless path.exist? + path = pkgconfig_base_path + mac_os_version.gsub(/\.\d+\z/, "") + end + paths << path.to_s if path.exist? + end + end + paths.concat(default_paths) + paths.join(SEPARATOR) + end + + def run_command(*command_line) + IO.pipe do |input, output| + begin + pid = spawn(*command_line, + out: output, + err: File::NULL) + output.close + _, status = Process.waitpid2(pid) + return nil unless status.success? + input.read + rescue SystemCallError + nil + end + end + end end attr_reader :name @@ -155,7 +266,7 @@ end @options = options path = @options[:path] || ENV["PKG_CONFIG_PATH"] - @paths = [path, guess_default_path].compact.join(SEPARATOR).split(SEPARATOR) + @paths = [path, self.class.default_path].compact.join(SEPARATOR).split(SEPARATOR) @paths.unshift(*(@options[:paths] || [])) @paths = normalize_paths(@paths) @msvc_syntax = @options[:msvc_syntax] @@ -425,79 +536,6 @@ end end - def guess_default_path - arch_depended_path = Dir.glob("/usr/lib/*/pkgconfig") - default_paths = [ - "/usr/local/lib64/pkgconfig", - "/usr/local/libx32/pkgconfig", - "/usr/local/lib/pkgconfig", - "/usr/local/libdata/pkgconfig", - "/usr/local/share/pkgconfig", - "/opt/local/lib/pkgconfig", - *arch_depended_path, - "/usr/lib64/pkgconfig", - "/usr/libx32/pkgconfig", - "/usr/lib/pkgconfig", - "/usr/libdata/pkgconfig", - "/usr/X11R6/lib/pkgconfig", - "/usr/X11R6/share/pkgconfig", - "/usr/X11/lib/pkgconfig", - "/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 - - paths = [] - pkg_config_prefix = self.class.native_pkg_config_prefix - if pkg_config_prefix - pkg_config_arch_depended_paths = - Dir.glob((pkg_config_prefix + "lib/*/pkgconfig").to_s) - paths.concat(pkg_config_arch_depended_paths) - paths << (pkg_config_prefix + "lib64/pkgconfig").to_s - paths << (pkg_config_prefix + "libx32/pkgconfig").to_s - paths << (pkg_config_prefix + "lib/pkgconfig").to_s - paths << (pkg_config_prefix + "libdata/pkgconfig").to_s - paths << (pkg_config_prefix + "share/pkgconfig").to_s - end - if /-darwin\d[\d\.]*\z/ =~ RUBY_PLATFORM and - /\A(\d+\.\d+)/ =~ `sw_vers -productVersion` - mac_os_version = $1 - homebrew_repository_candidates = [] - if pkg_config_prefix - brew_path = pkg_config_prefix + "bin" + "brew" - if brew_path.exist? - escaped_brew_path = Shellwords.escape(brew_path.to_s) - homebrew_repository = `#{escaped_brew_path} --repository`.chomp - homebrew_repository_candidates << Pathname.new(homebrew_repository) - else - homebrew_repository_candidates << pkg_config_prefix + "Homebrew" - homebrew_repository_candidates << pkg_config_prefix - end - end - brew = self.class.__send__(:search_executable_from_path, "brew") - if brew - homebrew_repository = `brew --repository`.chomp - homebrew_repository_candidates << Pathname(homebrew_repository) - end - homebrew_repository_candidates.uniq.each do |candidate| - pkgconfig_base_path = candidate + "Library/Homebrew/os/mac/pkgconfig" - path = pkgconfig_base_path + mac_os_version - unless path.exist? - path = pkgconfig_base_path + mac_os_version.gsub(/\.\d+\z/, "") - end - paths << path.to_s if path.exist? - end - end - paths.concat(default_paths) - paths.join(SEPARATOR) - end - def required_packages collect_requires do |package| package.requires diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2022-07-30 22:18:46.000000000 +0200 +++ new/metadata 2022-11-23 08:22:05.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: pkg-config version: !ruby/object:Gem::Version - version: 1.4.9 + version: 1.5.1 platform: ruby authors: - Kouhei Sutou -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2022-07-30 00:00:00.000000000 Z +date: 2022-11-23 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: test-unit @@ -74,7 +74,7 @@ - LGPLv2+ metadata: msys2_mingw_dependencies: pkg-config -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -90,7 +90,7 @@ version: '0' requirements: [] rubygems_version: 3.4.0.dev -signing_key: +signing_key: specification_version: 4 summary: A pkg-config implementation for Ruby test_files:
