From 43a480738093a9e98fc8b47f91db70412bf24dce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Thu, 9 Nov 2017 09:28:05 +0100 Subject: [PATCH] - updated cycle avoidaince patch - rel 2 --- ruby-pkg-config-avoid-cycle.patch | 10 +++++----- ruby-pkg-config.spec | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ruby-pkg-config-avoid-cycle.patch b/ruby-pkg-config-avoid-cycle.patch index 7c17857..00ad97a 100644 --- a/ruby-pkg-config-avoid-cycle.patch +++ b/ruby-pkg-config-avoid-cycle.patch @@ -13,16 +13,16 @@ @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 + 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 = [declaration("Cflags")] + all_cflags - all_cflags = all_cflags.join(" ").gsub(/-I /, '-I').split.uniq + 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 diff --git a/ruby-pkg-config.spec b/ruby-pkg-config.spec index f81f600..af009a3 100644 --- a/ruby-pkg-config.spec +++ b/ruby-pkg-config.spec @@ -7,7 +7,7 @@ Summary: pkg-config module for Ruby Summary(pl.UTF-8): Moduł pkg-config dla języka Ruby Name: ruby-%{pkgname} Version: 1.2.8 -Release: 1 +Release: 2 License: LGPL v2.1+ Group: Development/Languages Source0: https://rubygems.org/downloads/%{pkgname}-%{version}.gem @@ -34,7 +34,7 @@ Moduł pkg-config dla języka Ruby. %prep %setup -q -n %{pkgname}-%{version} -#%patch0 -p1 OUTDATED? UPSTREAMED? +%patch0 -p1 %build # write .gemspec -- 2.44.0