mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Ruby 2.7.2 (#5378)
This commit is contained in:
106
dev-lang/ruby/patches/ruby-2.7.2.patchset
Normal file
106
dev-lang/ruby/patches/ruby-2.7.2.patchset
Normal file
@@ -0,0 +1,106 @@
|
||||
From 279155468a862f4d358d01c5b8a084b40a700d4b 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 7903f58..0a17782 100644
|
||||
--- a/ruby.c
|
||||
+++ b/ruby.c
|
||||
@@ -2090,10 +2090,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.26.0
|
||||
|
||||
|
||||
From 6351154529c5e1da2ad33f6ab43544ce3953075c 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 57ded49..8a33200 100644
|
||||
--- a/test/fiddle/helper.rb
|
||||
+++ b/test/fiddle/helper.rb
|
||||
@@ -100,6 +100,18 @@ when /aix/
|
||||
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.26.0
|
||||
|
||||
|
||||
From b584031112ad887a1cb4a38e4a6d0b4c0e28e306 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Wed, 25 Dec 2019 19:53:24 +0100
|
||||
Subject: Add Haiku to the context support list
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f1ed36b..fc28564 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2343,6 +2343,9 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [
|
||||
[*-openbsd*], [
|
||||
rb_cv_coroutine=copy
|
||||
],
|
||||
+ [*-haiku*], [
|
||||
+ rb_cv_coroutine=copy
|
||||
+ ],
|
||||
[*], [
|
||||
rb_cv_coroutine=ucontext
|
||||
]
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From d85ec87013b5e80ded7ae235b6c2b23b95406989 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 8 Jun 2020 19:42:51 +1000
|
||||
Subject: Disable stack-protector
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fc28564..624f99d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -587,7 +587,7 @@ AS_IF([test "$GCC" = yes], [
|
||||
|
||||
# -fstack-protector
|
||||
AS_CASE(["$target_os"],
|
||||
- [mingw*], [
|
||||
+ [mingw*|haiku*], [
|
||||
stack_protector=no
|
||||
])
|
||||
AS_IF([test -z "${stack_protector+set}"], [
|
||||
--
|
||||
2.26.0
|
||||
|
||||
125
dev-lang/ruby/ruby-2.7.2.recipe
Normal file
125
dev-lang/ruby/ruby-2.7.2.recipe
Normal file
@@ -0,0 +1,125 @@
|
||||
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-2020 Yukihiro Matsumoto"
|
||||
LICENSE="Ruby
|
||||
BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2"
|
||||
CHECKSUM_SHA256="65a590313d244d48dc2ef9a9ad015dd8bc6faf821621bbb269aa7462829c75ed"
|
||||
SOURCE_DIR="ruby-$portVersion"
|
||||
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:racc = $libVersionCompat
|
||||
cmd:racc2y = $libVersionCompat
|
||||
cmd:rake = $libVersionCompat
|
||||
cmd:rdoc = $libVersionCompat
|
||||
cmd:ri = $libVersionCompat
|
||||
cmd:ruby = $libVersionCompat
|
||||
cmd:testrb = $libVersionCompat
|
||||
cmd:y2racc = $libVersionCompat
|
||||
lib:libruby$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libedit$secondaryArchSuffix
|
||||
lib:libffi$secondaryArchSuffix
|
||||
lib:libgmp$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:libgmp$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"
|
||||
|
||||
autoconf
|
||||
|
||||
touch parse.c # Otherwise BASERUBY will be required, which results in circular dependency.
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user