diff --git a/mingw-w64-ruby/0001-mingw-w64-time-functions.patch b/mingw-w64-ruby/0001-mingw-w64-time-functions.patch new file mode 100644 index 0000000000..d96e219ae8 --- /dev/null +++ b/mingw-w64-ruby/0001-mingw-w64-time-functions.patch @@ -0,0 +1,31 @@ +--- ruby-2.1.4/include/ruby/win32.h.orig 2014-10-28 08:58:50.765200000 +0300 ++++ ruby-2.1.4/include/ruby/win32.h 2014-10-28 08:59:10.639600000 +0300 +@@ -753,8 +753,10 @@ + + int rb_w32_times(struct tms *); + ++#ifndef __MINGW64_VERSION_MAJOR + struct tm *gmtime_r(const time_t *, struct tm *); + struct tm *localtime_r(const time_t *, struct tm *); ++#endif + + /* thread stuff */ + int rb_w32_sleep(unsigned long msec); +--- ruby-2.1.4/win32/win32.c.orig 2014-10-28 09:10:00.401400000 +0300 ++++ ruby-2.1.4/win32/win32.c 2014-10-28 09:10:15.486600000 +0300 +@@ -7057,6 +7057,7 @@ + # define localtime_s _localtime64_s + #endif + ++#ifndef __MINGW64_VERSION_MAJOR + /* License: Ruby's */ + struct tm * + gmtime_r(const time_t *tp, struct tm *rp) +@@ -7104,6 +7105,7 @@ + #endif + return rp; + } ++#endif + + /* License: Ruby's */ + int diff --git a/mingw-w64-ruby/0003-fix-check-types.patch b/mingw-w64-ruby/0003-fix-check-types.patch new file mode 100644 index 0000000000..6369a03d7b --- /dev/null +++ b/mingw-w64-ruby/0003-fix-check-types.patch @@ -0,0 +1,14 @@ +--- ruby-2.1.4/configure.in.orig 2014-10-28 09:33:36.930600000 +0300 ++++ ruby-2.1.4/configure.in 2014-10-28 09:34:26.585400000 +0300 +@@ -1049,8 +1049,9 @@ + ac_cv_func_malloc_usable_size=no + { test "$target_cpu" = x64 && ac_cv_func___builtin_setjmp=no; } + AC_CHECK_TYPE([NET_LUID], [], [], +- [@%:@include +- @%:@include ]) ++ [@%:@include ++ @%:@include ++ @%:@include ]) + if test x"$ac_cv_type_NET_LUID" = xyes; then + AC_DEFINE(HAVE_TYPE_NET_LUID, 1) + fi diff --git a/mingw-w64-ruby/PKGBUILD b/mingw-w64-ruby/PKGBUILD index 9e45d83930..8b0f443626 100644 --- a/mingw-w64-ruby/PKGBUILD +++ b/mingw-w64-ruby/PKGBUILD @@ -2,7 +2,7 @@ _realname=ruby pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.1.3 +pkgver=2.1.4 pkgrel=1 pkgdesc="An object-oriented language for quick and easy programming (mingw-w64)" arch=('any') @@ -18,13 +18,19 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-libffi") options=('staticlibs' 'strip') source=("http://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/ruby-${pkgver}.tar.bz2" - 0002-use-gnu-printf.patch) -md5sums=('02b7da3bb06037c777ca52e1194efccb' - '6d54f98b9e3a0d0077e9348dc7f69482') + 0001-mingw-w64-time-functions.patch + 0002-use-gnu-printf.patch + 0003-fix-check-types.patch) +md5sums=('f4136e781d261e3cc20748005e1740b7' + '4256c35613e6dc15c164015ae8977d4a' + '6d54f98b9e3a0d0077e9348dc7f69482' + '09bde4c15842b6a8aa372ad8ad1a8af7') prepare() { cd ${srcdir}/ruby-${pkgver} + patch -p1 -i ${srcdir}/0001-mingw-w64-time-functions.patch patch -p1 -i ${srcdir}/0002-use-gnu-printf.patch + patch -p1 -i ${srcdir}/0003-fix-check-types.patch autoreconf -fi }