initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
fixed default coroutine selection for musl/uclibc
|
||||
|
||||
https://github.com/ruby/ruby/pull/3567/commits/b570e7de87aaad8c903176d835e8124127f627b3
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
|
||||
diff -Nur ruby-3.0.0.orig/configure.ac ruby-3.0.0/configure.ac
|
||||
--- ruby-3.0.0.orig/configure.ac 2020-12-25 04:33:01.000000000 +0100
|
||||
+++ ruby-3.0.0/configure.ac 2021-02-22 13:00:53.990314464 +0100
|
||||
@@ -2441,7 +2441,10 @@
|
||||
rb_cv_coroutine=copy
|
||||
],
|
||||
[
|
||||
- rb_cv_coroutine=ucontext
|
||||
+ AC_CHECK_FUNCS([getcontext swapcontext makecontext],
|
||||
+ [rb_cv_coroutine=ucontext],
|
||||
+ [rb_cv_coroutine=copy; break]
|
||||
+ )
|
||||
]
|
||||
)
|
||||
AC_MSG_RESULT(${rb_cv_coroutine})
|
||||
@@ -0,0 +1,28 @@
|
||||
From 912a8dcfc5369d840dcd6bf0f88ee0bac7d902d6 Mon Sep 17 00:00:00 2001
|
||||
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Date: Thu, 30 Sep 2021 18:24:37 +0900
|
||||
Subject: [PATCH] Needs `AC_PROG_CC`
|
||||
|
||||
Although `AC_PROG_CC_C99` has been obsolete, `AC_PROG_CC` is not
|
||||
and the latter is necessary not to make C++ compiler mandatory.
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/ruby/ruby/commit/912a8dcfc5369d840dcd6bf0f88ee0bac7d902d6]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b24a8f59b0d2..c7059ee1ecf4 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -218,7 +218,7 @@ rb_test_CXXFLAGS=${CXXFLAGS+yes}
|
||||
# BSD's ports and MacPorts prefix GNU binutils with 'g'
|
||||
|
||||
dnl Seems necessarily in order to add -std=gnu99 option for gcc 4.9.
|
||||
-m4_version_prereq([2.70], [], [AC_PROG_CC_C99])
|
||||
+m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
@@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_RUBY
|
||||
bool "ruby"
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_9
|
||||
help
|
||||
Object Oriented Scripting Language.
|
||||
|
||||
http://www.ruby-lang.org/
|
||||
|
||||
comment "ruby needs a toolchain w/ wchar, threads, dynamic library, gcc >= 4.9, host gcc >= 4.9"
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
|
||||
!BR2_HOST_GCC_AT_LEAST_4_9
|
||||
@@ -0,0 +1,6 @@
|
||||
# https://www.ruby-lang.org/en/news/2021/07/07/ruby-3-0-2-released/
|
||||
sha512 0f702e2d8ca1342a9d4284dbdd234a3588e057b92566353aa7c21835cf09a3932864b2acf459a976960a1704e9befa562155d36b98b7cda8bd99526e10a374c4 ruby-3.0.2.tar.xz
|
||||
# License files, Locally calculated
|
||||
sha256 274f8d7983052448e7fd691c81043465c92ee6fb7bd8ab3f20a7997862f2778e LEGAL
|
||||
sha256 967586d538a28955ec2541910cf63c5ac345fcdea94bfb1f1705a1f6eb36bcbb COPYING
|
||||
sha256 36a9a6e7347214bbba599a412617204e65bff065dcbe5c46f5cb454c80de9eb0 BSDL
|
||||
@@ -0,0 +1,100 @@
|
||||
################################################################################
|
||||
#
|
||||
# ruby
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RUBY_VERSION_MAJOR = 3.0
|
||||
RUBY_VERSION = $(RUBY_VERSION_MAJOR).2
|
||||
RUBY_VERSION_EXT = 3.0.0
|
||||
RUBY_SITE = http://cache.ruby-lang.org/pub/ruby/$(RUBY_VERSION_MAJOR)
|
||||
RUBY_SOURCE = ruby-$(RUBY_VERSION).tar.xz
|
||||
RUBY_DEPENDENCIES = host-pkgconf host-ruby
|
||||
HOST_RUBY_DEPENDENCIES = host-pkgconf host-openssl
|
||||
RUBY_MAKE_ENV = $(TARGET_MAKE_ENV)
|
||||
RUBY_CONF_OPTS = --disable-install-doc --disable-rpath --disable-rubygems
|
||||
HOST_RUBY_CONF_OPTS = \
|
||||
--disable-install-doc \
|
||||
--with-out-ext=curses,readline \
|
||||
--without-gmp
|
||||
RUBY_LICENSE = Ruby or BSD-2-Clause, BSD-3-Clause, others
|
||||
RUBY_LICENSE_FILES = LEGAL COPYING BSDL
|
||||
RUBY_CPE_ID_VENDOR = ruby-lang
|
||||
# 0001-fix-default-coroutine-selection.patch
|
||||
RUBY_AUTORECONF = YES
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
RUBY_CONF_ENV += LIBS=-latomic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
||||
# On uClibc, finite, isinf and isnan are not directly implemented as
|
||||
# functions. Instead math.h #define's these to __finite, __isinf and
|
||||
# __isnan, confusing the Ruby configure script. Tell it that they
|
||||
# really are available.
|
||||
RUBY_CONF_ENV += \
|
||||
ac_cv_func_finite=yes \
|
||||
ac_cv_func_isinf=yes \
|
||||
ac_cv_func_isnan=yes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
|
||||
RUBY_CONF_ENV += stack_protector=no
|
||||
endif
|
||||
|
||||
# Force optionals to build before we do
|
||||
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
|
||||
RUBY_DEPENDENCIES += berkeleydb
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LIBFFI),y)
|
||||
RUBY_DEPENDENCIES += libffi
|
||||
else
|
||||
# Disable fiddle to avoid a build failure with bundled-libffi on MIPS
|
||||
RUBY_CONF_OPTS += --with-out-ext=fiddle
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_GDBM),y)
|
||||
RUBY_DEPENDENCIES += gdbm
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LIBYAML),y)
|
||||
RUBY_DEPENDENCIES += libyaml
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_NCURSES),y)
|
||||
RUBY_DEPENDENCIES += ncurses
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
RUBY_DEPENDENCIES += openssl
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_READLINE),y)
|
||||
RUBY_DEPENDENCIES += readline
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
RUBY_DEPENDENCIES += zlib
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_GMP),y)
|
||||
RUBY_DEPENDENCIES += gmp
|
||||
RUBY_CONF_OPTS += --with-gmp
|
||||
else
|
||||
RUBY_CONF_OPTS += --without-gmp
|
||||
endif
|
||||
|
||||
RUBY_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_83143),y)
|
||||
RUBY_CFLAGS += -freorder-blocks-algorithm=simple
|
||||
endif
|
||||
|
||||
RUBY_CONF_OPTS += CFLAGS="$(RUBY_CFLAGS)"
|
||||
|
||||
# Remove rubygems and friends, as they need extensions that aren't
|
||||
# built and a target compiler.
|
||||
RUBY_EXTENSIONS_REMOVE = rake* rdoc* rubygems*
|
||||
define RUBY_REMOVE_RUBYGEMS
|
||||
rm -f $(addprefix $(TARGET_DIR)/usr/bin/, gem rdoc ri rake)
|
||||
rm -rf $(TARGET_DIR)/usr/lib/ruby/gems
|
||||
rm -rf $(addprefix $(TARGET_DIR)/usr/lib/ruby/$(RUBY_VERSION_EXT)/, \
|
||||
$(RUBY_EXTENSIONS_REMOVE))
|
||||
endef
|
||||
RUBY_POST_INSTALL_TARGET_HOOKS += RUBY_REMOVE_RUBYGEMS
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user