[packages/ruby-rcairo] - do not try to install native rpms on build time

baggins baggins at pld-linux.org
Thu Nov 9 09:30:58 CET 2017


commit 27a4fd39889cf0bdbaa813ff04cd5035599e8b35
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Nov 9 09:30:40 2017 +0100

    - do not try to install native rpms on build time

 no-native-packages.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
 ruby-rcairo.spec         | 10 ++++++----
 2 files changed, 48 insertions(+), 4 deletions(-)
---
diff --git a/ruby-rcairo.spec b/ruby-rcairo.spec
index 1f4a6c5..dc58d28 100644
--- a/ruby-rcairo.spec
+++ b/ruby-rcairo.spec
@@ -2,13 +2,14 @@
 Summary:	Cairo module for Ruby
 Summary(pl.UTF-8):	Moduł Cairo dla języka Ruby
 Name:		ruby-%{pkgname}
-Version:	1.14.1
-Release:	5
+Version:	1.15.10
+Release:	1
 License:	GPL or custom (see COPYING)
 Group:		Development/Languages
 Source0:	http://cairographics.org/releases/rcairo-%{version}.tar.gz
-# Source0-md5:	d9dd23cdf307dd8e33e799f8a70e9b40
+# Source0-md5:	2812e9e9d61759acff3fa35839f52606
 Patch0:		%{name}-hdr.patch
+Patch1:		no-native-packages.patch
 URL:		http://cairographics.org/rcairo/
 BuildRequires:	cairo-devel >= 1.14.0
 BuildRequires:	pkgconfig
@@ -22,7 +23,7 @@ Obsoletes:	ruby-rcairo-gtkcairo
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # TODO: move this to rpm macros.build
-%define 	ruby_hdrdir	%(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["rubyhdrdir"]')
+%define		ruby_hdrdir	%(%{__ruby} -r rbconfig -e 'print RbConfig::CONFIG["rubyhdrdir"]')
 
 %description
 Cairo module for Ruby.
@@ -47,6 +48,7 @@ Plik nagłówkowy rozszerzenia rcairo dla języka Ruby.
 %prep
 %setup -q -n rcairo-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 ruby extconf.rb
diff --git a/no-native-packages.patch b/no-native-packages.patch
new file mode 100644
index 0000000..1993d14
--- /dev/null
+++ b/no-native-packages.patch
@@ -0,0 +1,42 @@
+diff -ur rcairo-1.15.10/ext/cairo/extconf.rb rcairo-1.15.10-no-native-pkgs/ext/cairo/extconf.rb
+--- rcairo-1.15.10/ext/cairo/extconf.rb	2017-10-15 16:21:01.000000000 +0200
++++ rcairo-1.15.10-no-native-pkgs/ext/cairo/extconf.rb	2017-11-09 09:19:45.074637717 +0100
+@@ -7,7 +7,6 @@
+ require 'fileutils'
+ 
+ require "pkg-config"
+-require "native-package-installer"
+ 
+ checking_for(checking_message("GCC")) do
+   if macro_defined?("__GNUC__", "")
+@@ -43,29 +42,7 @@
+   end
+ end
+ 
+-def required_pkg_config_package(package_info, native_package_info=nil)
+-  if package_info.is_a?(Array)
+-    required_package_info = package_info
+-  else
+-    required_package_info = [package_info]
+-  end
+-  return true if PKGConfig.have_package(*required_package_info)
+-
+-  native_package_info ||= {}
+-  return false unless NativePackageInstaller.install(native_package_info)
+-
+-  PKGConfig.have_package(*required_package_info)
+-end
+-
+-unless required_pkg_config_package([package, major, minor, micro],
+-                                   :debian => "libcairo2-dev",
+-                                   :redhat => "cairo-devel",
+-                                   :homebrew => "cairo",
+-                                   :macports => "cairo",
+-                                   :msys2 => "cairo")
+-  exit(false)
+-end
+-
++PKGConfig.have_package(package, major, minor, micro)
+ PKGConfig.have_package("cairo-ft")
+ 
+ checking_for(checking_message("Mac OS X")) do
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-rcairo.git/commitdiff/27a4fd39889cf0bdbaa813ff04cd5035599e8b35



More information about the pld-cvs-commit mailing list