[packages/ruby-pkg-config] - updated to 1.4.0 - avoid-cycle patch rewritten for refactored code
qboosh
qboosh at pld-linux.org
Thu Feb 6 18:12:42 CET 2020
commit 479b375be2d5c78b108bd8275e4f0c85d5988cd0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Feb 6 18:13:01 2020 +0100
- updated to 1.4.0
- avoid-cycle patch rewritten for refactored code
ruby-pkg-config-avoid-cycle.patch | 52 ++++++++++++++-------------------------
ruby-pkg-config.spec | 6 +++--
2 files changed, 23 insertions(+), 35 deletions(-)
---
diff --git a/ruby-pkg-config.spec b/ruby-pkg-config.spec
index d385ffd..8561333 100644
--- a/ruby-pkg-config.spec
+++ b/ruby-pkg-config.spec
@@ -6,12 +6,14 @@
Summary: pkg-config module for Ruby
Summary(pl.UTF-8): Moduł pkg-config dla języka Ruby
Name: ruby-%{pkgname}
-Version: 1.3.7
+Version: 1.4.0
Release: 1
License: LGPL v2.1+
Group: Development/Languages
+# tarballs: https://github.com/ruby-gnome/pkg-config/releases
+# gems: https://rubygems.org/gems/pkg-config
Source0: https://rubygems.org/downloads/%{pkgname}-%{version}.gem
-# Source0-md5: 00e1e89361e2ba697fc02395345a1e43
+# Source0-md5: 5227a5ca2914de038f9c399c95cf3de5
Patch0: %{name}-avoid-cycle.patch
URL: https://github.com/ruby-gnome2/pkg-config
BuildRequires: pkgconfig
diff --git a/ruby-pkg-config-avoid-cycle.patch b/ruby-pkg-config-avoid-cycle.patch
index 00ad97a..59d65ce 100644
--- a/ruby-pkg-config-avoid-cycle.patch
+++ b/ruby-pkg-config-avoid-cycle.patch
@@ -1,36 +1,22 @@
---- pkg-config-1.1.5/lib/pkg-config.rb.orig 2014-04-18 21:04:38.587173463 +0200
-+++ pkg-config-1.1.5/lib/pkg-config.rb 2014-04-18 21:05:28.387172425 +0200
-@@ -103,9 +103,10 @@
+--- pkg-config-1.4.0/lib/pkg-config.rb.orig 2020-02-05 17:56:08.247644168 +0100
++++ pkg-config-1.4.0/lib/pkg-config.rb 2020-02-06 16:16:50.538517573 +0100
+@@ -249,13 +249,15 @@
+ @path_position
+ end
- attr_reader :paths
- attr_accessor :msvc_syntax
-- def initialize(name, options={})
-+ def initialize(name, options={}, seen=[])
- @name = name
- @options = options
-+ @seen = seen
- path = @options[:path] || ENV["PKG_CONFIG_PATH"]
- @paths = [path, guess_default_path].compact.join(SEPARATOR).split(SEPARATOR)
- @paths.unshift(*(@options[:paths] || []))
-@@ -193,7 +194,9 @@
- self.class.new(package, @options).cflags
- end
- cflags_set += private_required_packages.collect do |package|
-- self.class.new(package, @options).cflags
-+ if !@seen.include?(package)
-+ self.class.new(package, @options, @seen + [package]).cflags
-+ end
- end
- all_cflags = normalize_cflags(Shellwords.split(cflags_set.join(" ")))
- path_flags, other_flags = all_cflags.partition {|flag| /\A-I/ =~ flag}
-@@ -211,7 +214,9 @@
-
- def collect_libs
- all_libs = required_packages.collect do |package|
-- self.class.new(package, @options).libs
-+ if !@seen.include?(package)
-+ self.class.new(package, @options, @seen + [package]).libs
+- def collect_requires(&block)
++ def collect_requires(seen=[], &block)
+ packages = []
+ targets = yield(self)
+ targets.each do |name|
+- package = self.class.new(name, @options)
+- packages << package
+- packages.concat(package.collect_requires(&block))
++ if !seen.include?(name)
++ package = self.class.new(name, @options)
++ packages << package
++ packages.concat(package.collect_requires(seen + [name], &block))
+ end
end
- all_libs = [declaration("Libs")] + all_libs
- all_libs = all_libs.join(" ").gsub(/-([Ll]) /, '\1').split.uniq
+ packages_without_self = packages.reject do |package|
+ package.name == @name
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-pkg-config.git/commitdiff/479b375be2d5c78b108bd8275e4f0c85d5988cd0
More information about the pld-cvs-commit
mailing list