Some fixes to the Ruby 1.9.3 recipe.

* Disables GCC2 building
 * Creates new patch without the GCC2 fixes
 * Use the RC1 build instead of a pre-release
 * Does not work: claims it needs a working Ruby to build a working Ruby. Go figure.
This commit is contained in:
Augustin Cavalier
2014-07-01 13:48:02 -04:00
parent 817f36fb2d
commit d2e29f5188
2 changed files with 136 additions and 42 deletions

View File

@@ -0,0 +1,76 @@
From 42b96a16ba5869966a39c4e338e7391dc5fa4dde Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Tue, 1 Jul 2014 13:12:33 -0400
Subject: [PATCH] Merge Chris's fixes with the new Ruby.
---
configure.in | 13 ++++++++++---
ext/nkf/nkf-utf8/nkf.h | 5 +++++
signal.c | 2 +-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/configure.in b/configure.in
index 73c87b7..f4f6a23 100644
--- a/configure.in
+++ b/configure.in
@@ -2121,11 +2121,14 @@ if test "$with_dln_a_out" != yes; then
[haiku*], [ AS_CASE(["$target_cpu"],
[powerpc*], [
: ${LDSHARED="ld -xms"}
- DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
+ DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
],
[i586*], [
- : ${LDSHARED="ld -shared"}
- DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
+ : ${LDSHARED="${CC} -shared"}
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+ fi
+ DLDFLAGS="$DLDFLAGS -L/boot/system/develop/lib -lroot -L/boot/home/config/develop/lib"
])
: ${LIBPATHENV=LIBRARY_PATH}
rb_cv_dlopen=yes ],
@@ -2401,6 +2404,10 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
])
],
+ [haiku*], [
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
+ ],
[darwin*], [
RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
diff --git a/ext/nkf/nkf-utf8/nkf.h b/ext/nkf/nkf-utf8/nkf.h
index a23ec5c..8351578 100644
--- a/ext/nkf/nkf-utf8/nkf.h
+++ b/ext/nkf/nkf-utf8/nkf.h
@@ -164,6 +164,11 @@ void setbinmode(FILE *fp)
# ifndef HAVE_LOCALE_H
# define HAVE_LOCALE_H
# endif
+#elif defined(__HAIKU__)
+# undef HAVE_LANGINFO_H
+# ifndef HAVE_LOCALE_H
+# define HAVE_LOCALE_H
+# endif
#else
# ifndef HAVE_LANGINFO_H
# define HAVE_LANGINFO_H
diff --git a/signal.c b/signal.c
index d4e56dc..b6b2a20 100644
--- a/signal.c
+++ b/signal.c
@@ -590,7 +590,7 @@ static int segv_received = 0;
static RETSIGTYPE
sigsegv(int sig SIGINFO_ARG)
{
-#ifdef USE_SIGALTSTACK
+#if defined USE_SIGALTSTACK && defined SA_SIGINFO
int ruby_stack_overflowed_p(const rb_thread_t *, const void *);
NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th));
rb_thread_t *th = GET_THREAD();
--
1.8.3.4

View File

@@ -1,31 +1,48 @@
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
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,
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="http://www.ruby-lang.org"
SRC_URI="http://cache.ruby-lang.org/pub/ruby/ruby-1.9.3-p545.tar.bz2"
CHECKSUM_SHA256="2533de9f56d62f11c06a02dd32b5ab6d22a8f268c94b8e1e1ade6536adfd1aab"
SRC_URI="http://cache.ruby-lang.org/pub/ruby/ruby-1.9.3-rc1.tar.bz2"
SOURCE_DIR="ruby-1.9.3-rc1"
CHECKSUM_SHA256="951a8810086abca0e200f81767a518ee2730d6dc9b0cc2c7e3587dcfc3bf5fc8"
LICENSE="Ruby
GNU GPL v2
GNU LGPL v2.1
Artistic (Perl)
BSD (3-clause)"
COPYRIGHT="1993-2009 Yukihiro Matsumoto"
REVISION="3"
ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
REVISION="2"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
PATCHES="ruby-1.9.3-rc1.patch"
PROVIDES="
ruby = $portVersion compat >= 1.9
ruby$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:ruby$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:erb$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:gem$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:irb$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:rake$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:rdoc$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:ri$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:testrb$secondaryArchSuffix = $portVersion compat >= 1.9
lib:libruby$secondaryArchSuffix = $portVersion compat >= 1.9
cmd:ruby = $portVersion compat >= 1.9
cmd:erb = $portVersion compat >= 1.9
cmd:gem = $portVersion compat >= 1.9
@@ -34,57 +51,53 @@ PROVIDES="
cmd:rdoc = $portVersion compat >= 1.9
cmd:ri = $portVersion compat >= 1.9
cmd:testrb = $portVersion compat >= 1.9
lib:libruby = $portVersion compat >= 1.9
"
REQUIRES="
haiku >= $haikuVersion
lib:libedit
lib:libz
lib:libcrypto
lib:libssl
lib:libiconv
lib:libncursesw
haiku$secondaryArchSuffix >= $haikuVersion
lib:libedit$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libncursesw$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libedit
devel:libz
devel:libcrypto
devel:libssl
devel:libiconv
devel:libncursesw
devel:libedit$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:g++
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:g++$secondaryArchSuffix
cmd:autoconf
cmd:make
cmd:bison
"
PROVIDES_devel="
ruby_devel = $portVersion
devel:libruby_static = $portVersion compat >= 1.9
lib:libruby_static = $portVersion compat >= 1.9
devel:libruby = $portVersion compat >= 1.9
ruby${secondaryArchSuffix}_devel = $portVersion
devel:libruby_static$secondaryArchSuffix = $portVersion compat >= 1.9
lib:libruby_static$secondaryArchSuffix = $portVersion compat >= 1.9
devel:libruby$secondaryArchSuffix = $portVersion compat >= 1.9
"
REQUIRES_devel="
ruby == $portVersion
ruby$secondaryArchSuffix == $portVersion base
"
SOURCE_DIR="ruby-1.9.3-p545"
PATCHES="ruby-1.9.3.patchset"
BUILD()
{
autoconf
runConfigure ./configure \
--enable-shared
--enable-shared
make $jobArgs
}
@@ -94,3 +107,8 @@ INSTALL()
prepareInstalledDevelLibs libruby-static libruby
packageEntries devel $developDir
}
TEST()
{
make check
}