This commit is contained in:
Vít Ondruch 2014-05-02 15:34:22 +02:00
parent 346e9668ea
commit a4f4f7cd46
2 changed files with 43 additions and 3 deletions

View File

@ -0,0 +1,34 @@
From d3e59724601b2aabb231f2e12e16ebf00ba79ab1 Mon Sep 17 00:00:00 2001
From: Caleb Marble <cm@marblenix.com>
Date: Sun, 2 Mar 2014 13:53:05 -0600
Subject: [PATCH] modified: ext/ncurses/ncurses_wrap.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes the following compiler error:
ext/ncurses/ncurses_wrap.c: In function rbncurshelper_nonblocking_wgetch:
ext/ncurses/ncurses_wrap.c:807:12: error: variable tz has initializer but incomplete type
struct timezone tz = {0,0};
Also closes #6
---
ncurses_wrap.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/ncurses_wrap.h b/ncurses_wrap.h
index 85da4f8..92583c0 100644
--- a/ncurses_wrap.h
+++ b/ncurses_wrap.h
@@ -84,6 +84,7 @@ int close(int);
#endif
#include <ruby.h>
+#include <sys/time.h>
extern VALUE mNcurses; /* module Ncurses */
extern VALUE cWINDOW; /* class Ncurses::WINDOW */
--
1.9.1

View File

@ -1,10 +1,9 @@
%define rubyabi 1.9.1
%define realname ncurses-ruby
%define distname ruby-ncurses
Name: %distname
Version: 1.3.1
Release: 10%{?dist}
Release: 11%{?dist}
Summary: A module for ruby applications for using ncurses interfaces
Group: System Environment/Libraries
License: LGPLv2+
@ -12,8 +11,11 @@ URL: http://ncurses-ruby.berlios.de/
Source0: http://download.berlios.de/ncurses-ruby/%{realname}-%{version}.tar.bz2
Patch0: 0001-STR2CSTR-deprecated.patch
Patch1: 0002-Werror-format-security.patch
# Fixes "ncurses_wrap.c:827:12: error: variable 'tz' has initializer but incomplete type"
# https://github.com/eclubb/ncurses-ruby/commit/0f7decd5e5a205444c9d31f19b0599a7e42b0fd8
Patch2: ruby-ncurses-fix-missing-tz-prototypes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ruby(release) >= %{rubyabi}
BuildRequires: ruby(release)
BuildRequires: ruby
BuildRequires: ruby-devel
BuildRequires: ncurses-devel
@ -29,6 +31,7 @@ of the C library ncurses accessible from the Ruby programming language.
%setup -q -n %{realname}-%{version}
%patch0 -p1 -b .p
%patch1 -p1 -b .format
%patch2 -p1 -b .systime
%{__chmod} 0644 ncurses_wrap.c
find examples/ -type f | xargs %{__chmod} 0644
@ -54,6 +57,9 @@ ruby extconf.rb --vendor
%{ruby_vendorlibdir}/ncurses_sugar.rb
%changelog
* Fri May 02 2014 Vít Ondruch <vondruch@redhat.com> - 1.3.1-11
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1
* Mon Feb 03 2014 Šimon Lukašík <slukasik@redhat.com> - 1.3.1-10
- FTBFS if "-Werror=format-security" flag is used (#1037313)