ruby: Fix to build with __USE_MINGW_ANSI_STDIO
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From 4c4da3fc650a3595ecc06f49072f1ffae07db706 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Dziedzic <gostrc@gmail.com>
|
||||
Date: Sat, 1 Mar 2014 21:41:28 -0800
|
||||
Subject: [PATCH] Fix undeclared identifier error by using the actual type of
|
||||
rl_pre_input_hook
|
||||
|
||||
---
|
||||
ext/readline/readline.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
|
||||
index 659adb9..7bc0eed 100644
|
||||
--- a/ext/readline/readline.c
|
||||
+++ b/ext/readline/readline.c
|
||||
@@ -1974,7 +1974,7 @@ Init_readline()
|
||||
|
||||
rl_attempted_completion_function = readline_attempted_completion_function;
|
||||
#if defined(HAVE_RL_PRE_INPUT_HOOK)
|
||||
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
|
||||
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
|
||||
#endif
|
||||
#ifdef HAVE_RL_CATCH_SIGNALS
|
||||
rl_catch_signals = 0;
|
||||
--
|
||||
1.9.0
|
||||
|
||||
11
mingw-w64-ruby/0002-use-gnu-printf.patch
Normal file
11
mingw-w64-ruby/0002-use-gnu-printf.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- ruby-2.1.1/configure.in.orig 2014-03-09 23:39:54.888800000 +0400
|
||||
+++ ruby-2.1.1/configure.in 2014-03-09 23:40:46.946000000 +0400
|
||||
@@ -1275,7 +1275,7 @@
|
||||
@%:@include <stddef.h>
|
||||
@%:@ifdef __GNUC__
|
||||
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) \
|
||||
- decl __attribute__((format(printf, string_index, first_to_check)))
|
||||
+ decl __attribute__((format(gnu_printf, string_index, first_to_check)))
|
||||
@%:@else
|
||||
@%:@define PRINTF_ARGS(decl, string_index, first_to_check) decl
|
||||
@%:@endif
|
||||
@@ -4,7 +4,7 @@ _realname=ruby
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
pkgname="${_mingw_suff}-${_realname}"
|
||||
pkgver=2.1.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="An object-oriented language for quick and easy programming (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://www.ruby-lang.org/en"
|
||||
@@ -18,11 +18,19 @@ depends=("${_mingw_suff}-gcc-libs"
|
||||
"${_mingw_suff}-ncurses"
|
||||
"${_mingw_suff}-libffi")
|
||||
options=('staticlibs' 'strip')
|
||||
source=("http://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/ruby-${pkgver}.tar.bz2")
|
||||
md5sums=('53edc33b2f590ecdd9f6a344b9d92d0d')
|
||||
source=("http://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/ruby-${pkgver}.tar.bz2"
|
||||
0001-Fix-undeclared-identifier-error-by-using-the-actual-.patch
|
||||
0002-use-gnu-printf.patch)
|
||||
md5sums=('53edc33b2f590ecdd9f6a344b9d92d0d'
|
||||
'0496e962e0ce11507b7577a8eb93af58'
|
||||
'6d54f98b9e3a0d0077e9348dc7f69482')
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/ruby-${pkgver}
|
||||
patch -p1 -i ${srcdir}/0001-Fix-undeclared-identifier-error-by-using-the-actual-.patch
|
||||
patch -p1 -i ${srcdir}/0002-use-gnu-printf.patch
|
||||
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -48,10 +56,7 @@ build() {
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--target=${MINGW_CHOST} \
|
||||
--disable-install-doc \
|
||||
--disable-install-rdoc \
|
||||
--disable-install-capi
|
||||
--target=${MINGW_CHOST}
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user