Ruby: bump (#3790)

This commit is contained in:
miqlas
2019-05-14 19:44:13 +02:00
committed by waddlesplash
parent f3feab49c6
commit c5236231b2
2 changed files with 173 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
From d7a959f117b0d7ce3dbf03de28a5e04a33684624 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 5 May 2019 11:57:46 +0200
Subject: We don't allow unsetting O_NONBLOCK or O_NDELAY on packaged FS
diff --git a/ruby.c b/ruby.c
index 2c8b29a..9449a17 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2045,10 +2045,10 @@ open_load_file(VALUE fname_v, int *xflag)
int fd;
/* open(2) may block if fname is point to FIFO and it's empty. Let's
use O_NONBLOCK. */
-#if defined O_NONBLOCK && HAVE_FCNTL && !(O_NONBLOCK & O_ACCMODE)
+#if defined O_NONBLOCK && HAVE_FCNTL && !(O_NONBLOCK & O_ACCMODE) && !defined(__HAIKU__)
/* TODO: fix conflicting O_NONBLOCK in ruby/win32.h */
# define MODE_TO_LOAD (O_RDONLY | O_NONBLOCK)
-#elif defined O_NDELAY && HAVE_FCNTL && !(O_NDELAY & O_ACCMODE)
+#elif defined O_NDELAY && HAVE_FCNTL && !(O_NDELAY & O_ACCMODE) && !defined(__HAIKU__)
# define MODE_TO_LOAD (O_RDONLY | O_NDELAY)
#else
# define MODE_TO_LOAD (O_RDONLY)
--
2.21.0
From e5cc7b856931e82fa5c95578e97464084bff6dd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 5 May 2019 15:35:20 +0200
Subject: Test fix for Haiku
diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
index 4aaa55e..61662cb 100644
--- a/test/fiddle/helper.rb
+++ b/test/fiddle/helper.rb
@@ -84,6 +84,18 @@
end
end
end
+when /haiku/
+ libdir = '/system/lib'
+ case [0].pack('L!').size
+ when 4
+ # 32-bit ruby
+ libdir = '/system/lib/x86' if File.directory? '/system/lib/x86'
+ when 8
+ # 64-bit ruby
+ libdir = '/system/lib/' if File.directory? '/system/lib/'
+ end
+ libc_so = File.join(libdir, "libroot.so")
+ libm_so = File.join(libdir, "libroot.so")
else
libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/
libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/
--
2.21.0

View File

@@ -0,0 +1,114 @@
SUMMARY="A programming language focused on simplicity and productivity"
DESCRIPTION="Ruby is a dynamic, reflective, object-oriented, general-purpose \
programming language. It was designed and developed in the mid-1990s \
by Yukihiro 'Matz' Matsumoto in Japan.
Ruby embodies syntax inspired by Perl with Smalltalk-like features and \
was also influenced by Eiffel and Lisp. It supports multiple \
programming paradigms, including functional, object oriented, and \
imperative. It also has a dynamic type system and automatic memory \
management. Therefore, it is similar in varying degrees to, Smalltalk, \
Python, Perl, Lisp, Dylan, and CLU."
HOMEPAGE="https://www.ruby-lang.org/"
COPYRIGHT="1993-2019 Yukihiro Matsumoto"
LICENSE="Ruby
BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://cache.ruby-lang.org/pub/ruby/2.6/ruby-$portVersion.tar.xz"
CHECKSUM_SHA256="11a83f85c03d3f0fc9b8a9b6cad1b2674f26c5aaa43ba858d4b0fcc2b54171e1"
PATCHES="ruby-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
PROVIDES="
ruby$secondaryArchSuffix = $libVersionCompat
cmd:bundle = $libVersionCompat
cmd:bundler = $libVersionCompat
cmd:erb = $libVersionCompat
cmd:gem = $libVersionCompat
cmd:irb = $libVersionCompat
cmd:rake = $libVersionCompat
cmd:rdoc = $libVersionCompat
cmd:ri = $libVersionCompat
cmd:ruby = $libVersionCompat
cmd:testrb = $libVersionCompat
lib:libruby$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libedit$secondaryArchSuffix
lib:libffi$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libncursesw$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libssp$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
ruby${secondaryArchSuffix}_devel = $portVersion
devel:libruby$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
ruby$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix
devel:libedit$secondaryArchSuffix
devel:libffi$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:bison
cmd:g++$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:git
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage ruby$secondaryArchSuffix \
"$libDir"/libruby.so.$libVersion
BUILD()
{
export CFLAGS="-D_BSD_SOURCE"
export LDFLAGS="-lssp"
runConfigure --omit-dirs binDir ./configure \
--enable-shared \
--disable-silent-rules \
--enable-debug-env \
--bindir=$prefix/bin
# The build process needs to run ruby, and without this it fails to find
# libruby.so.
export LIBRARY_PATH=$LIBRARY_PATH:%A
make $jobArgs
}
INSTALL()
{
export LIBRARY_PATH=$LIBRARY_PATH:%A
make install
prepareInstalledDevelLib libruby
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
export LIBRARY_PATH=$LIBRARY_PATH:%A
make check
}