[packages/ruby-pkg-config] - added avoid-cycle patch (avoid stack overflow on Requires[.private] cycle - release 2
qboosh
qboosh at pld-linux.org
Fri Apr 18 21:26:26 CEST 2014
commit 1e06c8ecb4217410edbd48db777ee8091fa21b95
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Apr 18 21:28:20 2014 +0200
- added avoid-cycle patch (avoid stack overflow on Requires[.private] cycle
- release 2
ruby-pkg-config-avoid-cycle.patch | 36 ++++++++++++++++++++++++++++++++++++
ruby-pkg-config.spec | 4 +++-
2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/ruby-pkg-config.spec b/ruby-pkg-config.spec
index 1dbf4a6..f5a4c59 100644
--- a/ruby-pkg-config.spec
+++ b/ruby-pkg-config.spec
@@ -7,11 +7,12 @@ Summary: pkg-config module for Ruby
Summary(pl.UTF-8): Moduł pkg-config dla języka Ruby
Name: ruby-%{pkgname}
Version: 1.1.5
-Release: 1
+Release: 2
License: LGPL v2.1+
Group: Development/Languages
Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
# Source0-md5: c32204c8d6f0d1cae84f6c67b3e0fd92
+Patch0: %{name}-avoid-cycle.patch
URL: https://github.com/ruby-gnome2/pkg-config
BuildRequires: pkgconfig
BuildRequires: rpm-rubyprov
@@ -33,6 +34,7 @@ Moduł pkg-config dla języka Ruby.
%prep
%setup -q -n %{pkgname}-%{version}
+%patch0 -p1
%build
# write .gemspec
diff --git a/ruby-pkg-config-avoid-cycle.patch b/ruby-pkg-config-avoid-cycle.patch
new file mode 100644
index 0000000..7c17857
--- /dev/null
+++ b/ruby-pkg-config-avoid-cycle.patch
@@ -0,0 +1,36 @@
+--- 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 @@
+
+ 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 @@
+ private
+ def collect_cflags
+ all_cflags = all_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 = [declaration("Cflags")] + all_cflags
+ all_cflags = all_cflags.join(" ").gsub(/-I /, '-I').split.uniq
+@@ -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
++ end
+ end
+ all_libs = [declaration("Libs")] + all_libs
+ all_libs = all_libs.join(" ").gsub(/-([Ll]) /, '\1').split.uniq
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-pkg-config.git/commitdiff/1e06c8ecb4217410edbd48db777ee8091fa21b95
More information about the pld-cvs-commit
mailing list