generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
25
package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch
Normal file
25
package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Evans <code@jeremyevans.net>
|
||||
Date: Fri, 25 Mar 2022 13:11:31 -0700
|
||||
Subject: [PATCH] Fix build with LibreSSL 3.5
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/ruby/openssl/commit/e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
ext/openssl/ossl_pkey.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
|
||||
index 2a4835a2..24d0da46 100644
|
||||
--- a/ext/openssl/ossl_pkey.c
|
||||
+++ b/ext/openssl/ossl_pkey.c
|
||||
@@ -670,7 +670,7 @@ ossl_pkey_export_traditional(int argc, VALUE *argv, VALUE self, int to_der)
|
||||
}
|
||||
}
|
||||
else {
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
+#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 5, 0)
|
||||
if (!PEM_write_bio_PrivateKey_traditional(bio, pkey, enc, NULL, 0,
|
||||
ossl_pem_passwd_cb,
|
||||
(void *)pass)) {
|
||||
16
package/ruby/Config.in
Normal file
16
package/ruby/Config.in
Normal file
@ -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
|
||||
7
package/ruby/ruby.hash
Normal file
7
package/ruby/ruby.hash
Normal file
@ -0,0 +1,7 @@
|
||||
# https://www.ruby-lang.org/en/news/2022/04/12/ruby-3-1-2-released/
|
||||
sha512 4a74e9efc6ea4b3eff4fec7534eb1fff4794d021531defc2e9937e53c6668db8ecdc0fff2bc23d5e6602d0df344a2caa85b31c5414309541e3d5313ec82b6e21 ruby-3.1.2.tar.xz
|
||||
|
||||
# License files, Locally calculated
|
||||
sha256 794c384f94396ab07e3e6f53a9f8be093facb7eb4193266024302b93b29e12dc LEGAL
|
||||
sha256 967586d538a28955ec2541910cf63c5ac345fcdea94bfb1f1705a1f6eb36bcbb COPYING
|
||||
sha256 36a9a6e7347214bbba599a412617204e65bff065dcbe5c46f5cb454c80de9eb0 BSDL
|
||||
105
package/ruby/ruby.mk
Normal file
105
package/ruby/ruby.mk
Normal file
@ -0,0 +1,105 @@
|
||||
################################################################################
|
||||
#
|
||||
# ruby
|
||||
#
|
||||
################################################################################
|
||||
|
||||
RUBY_VERSION_MAJOR = 3.1
|
||||
RUBY_VERSION = $(RUBY_VERSION_MAJOR).2
|
||||
RUBY_VERSION_EXT = 3.1.0
|
||||
RUBY_SITE = http://cache.ruby-lang.org/pub/ruby/$(RUBY_VERSION_MAJOR)
|
||||
RUBY_SOURCE = ruby-$(RUBY_VERSION).tar.xz
|
||||
|
||||
RUBY_LICENSE = \
|
||||
Ruby or BSD-2-Clause, \
|
||||
BSD-3-Clause, \
|
||||
MIT, \
|
||||
others
|
||||
RUBY_LICENSE_FILES = LEGAL COPYING BSDL
|
||||
|
||||
RUBY_CPE_ID_VENDOR = ruby-lang
|
||||
|
||||
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
|
||||
|
||||
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