[packages/ruby-shadow] add ruby 2.0 support (patch from fedora)

glen glen at pld-linux.org
Sun Aug 3 16:21:37 CEST 2014


commit 4255305ecdeb5b6788ff4e3f39e81c5c72add5c3
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Aug 3 17:20:37 2014 +0300

    add ruby 2.0 support (patch from fedora)

 ruby-2.0.patch   | 29 +++++++++++++++++++++++++++++
 ruby-shadow.spec |  4 +++-
 2 files changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/ruby-shadow.spec b/ruby-shadow.spec
index 43fb2f6..c6279f7 100644
--- a/ruby-shadow.spec
+++ b/ruby-shadow.spec
@@ -2,13 +2,14 @@
 Summary:	Ruby bindings for shadow password access
 Name:		ruby-%{pkgname}
 Version:	1.4.1
-Release:	2
+Release:	3
 License:	Public Domain
 Group:		Development/Languages
 Source0:	http://ttsky.net/src/%{name}-%{version}.tar.gz
 # Source0-md5:	425b742ac43bff359c1717360f761790
 Patch0:		ruby-1.9-support.patch
 Patch1:		cflags.patch
+Patch2:		ruby-2.0.patch
 URL:		http://ttsky.net/
 BuildRequires:	rpm-rubyprov
 BuildRequires:	rpmbuild(macros) >= 1.665
@@ -25,6 +26,7 @@ Ruby bindings for shadow password access.
 %setup -q -n shadow-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 iconv -f EUCJP -t utf8 -o README.ja README.euc
 
 %build
diff --git a/ruby-2.0.patch b/ruby-2.0.patch
new file mode 100644
index 0000000..8a46015
--- /dev/null
+++ b/ruby-2.0.patch
@@ -0,0 +1,29 @@
+From fa317a925f6880d62ce5157792d9901be33ea57f Mon Sep 17 00:00:00 2001
+From: Adam Palmblad <adam.palmblad at teampages.com>
+Date: Mon, 25 Feb 2013 12:49:39 -0800
+Subject: [PATCH] Add support for ruby 2.0.
+
+---
+ extconf.rb          | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/extconf.rb b/extconf.rb
+index 9453b27..7dcbba7 100644
+--- a/extconf.rb
++++ b/extconf.rb
+@@ -7,7 +7,11 @@
+ require 'mkmf'
+ 
+ $CFLAGS = "#{$CFLAGS}"
+-$CFLAGS += RUBY_VERSION =~ /1\.9/ ? ' -DRUBY19' : ''
++$CFLAGS += case RUBY_VERSION
++          when /^1\.9/; ' -DRUBY19'
++          when /^2\./; ' -DRUBY19'
++          else; ''
++          end
+ 
+ #$LDFLAGS = "-lshadow"
+ 
+-- 
+1.8.1.5
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-shadow.git/commitdiff/4255305ecdeb5b6788ff4e3f39e81c5c72add5c3



More information about the pld-cvs-commit mailing list