pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang lang/ruby: fix Ruby 3.0 build problem on NetBSD 8.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/d4242de1addd
branches: trunk
changeset: 378562:d4242de1addd
user: taca <taca%pkgsrc.org@localhost>
date: Wed May 04 16:44:53 2022 +0000
description:
lang/ruby: fix Ruby 3.0 build problem on NetBSD 8.0
Something wrong with expantion of static_assert macro in <assert.h>
on NetBSD 8.0. So, avoid use of static_assert on NetBSD 8.0.
NetBSD 8.1 and later dose not have this problem.
diffstat:
lang/ruby/platform.mk | 12 +++++++-
lang/ruby30-base/distinfo | 3 +-
lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h | 15 ++++++++++
lang/ruby31-base/distinfo | 3 +-
lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h | 15 ++++++++++
5 files changed, 45 insertions(+), 3 deletions(-)
diffs (98 lines):
diff -r 2a0175b9b438 -r d4242de1addd lang/ruby/platform.mk
--- a/lang/ruby/platform.mk Wed May 04 16:43:36 2022 +0000
+++ b/lang/ruby/platform.mk Wed May 04 16:44:53 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: platform.mk,v 1.10 2022/05/04 16:16:49 taca Exp $
+# $NetBSD: platform.mk,v 1.11 2022/05/04 16:44:53 taca Exp $
#
#
@@ -124,6 +124,16 @@
.endif
#
+# NetBSD
+#
+# NetBSD 8.0 has problem with using static_assert macro.
+# This is very ad hoc fix to prevent it.
+#
+.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M8.0*)
+CFLAGS+= -DRB_AVOID_STATIC_ASSERT
+.endif
+
+#
# Solaris
#
# fix build with sunpro.
diff -r 2a0175b9b438 -r d4242de1addd lang/ruby30-base/distinfo
--- a/lang/ruby30-base/distinfo Wed May 04 16:43:36 2022 +0000
+++ b/lang/ruby30-base/distinfo Wed May 04 16:44:53 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2022/05/04 15:49:16 jperkin Exp $
+$NetBSD: distinfo,v 1.10 2022/05/04 16:44:53 taca Exp $
BLAKE2s (ruby-3.0.4.tar.xz) = 2487d6f4bd37ef20715935a50d2cc50f9d50589c9223836bfaa6c3ac7de57b4d
SHA512 (ruby-3.0.4.tar.xz) = 53bf7dd403b0c68af9691882ad8ed7422c8d1f496627428fb4c3caf0b0313715524b744c5f453aced2d49e16e55f3f45b46b9a77aa3097dbfcae7caa0208194b
@@ -8,6 +8,7 @@
SHA1 (patch-ext_dbm_extconf.rb) = c998f8735db54b1ae2bc8b6caa359ce88bc7a45b
SHA1 (patch-ext_openssl_openssl__missing.h) = 3f8d79736fd14806dfaf76e333eec63ff3ff5890
SHA1 (patch-ext_openssl_ossl__pkey__rsa.c) = 32054bad7bf31040e6d8828f8786de26dc860518
+SHA1 (patch-include_ruby_internal_static__assert.h) = 2e509d18d294b03b468e4e7bcb99fb6a71089601
SHA1 (patch-lib_mkmf.rb) = 4a3cd18548dbdf43a13695d4e76f817c0347e335
SHA1 (patch-lib_rdoc_encoding.rb) = 0e82d2942d9bfcb67dc7c994889d7bc5ec2ae85a
SHA1 (patch-lib_rdoc_ri_driver.rb) = f4d3e59e35b608acd4edc17916142c7f033e6198
diff -r 2a0175b9b438 -r d4242de1addd lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h Wed May 04 16:44:53 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_ruby_internal_static__assert.h,v 1.1 2022/05/04 16:44:53 taca Exp $
+
+Add the way to stop using static_assert.
+
+--- include/ruby/internal/static_assert.h.orig 2022-04-12 11:48:55.000000000 +0000
++++ include/ruby/internal/static_assert.h
+@@ -50,7 +50,7 @@
+ #elif defined(__STDC_VERSION__) && RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+ # define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
+
+-#elif defined(static_assert)
++#elif defined(static_assert) && !defined(RB_AVOID_STATIC_ASSERT)
+ # /* Take <assert.h> definition */
+ # define RBIMPL_STATIC_ASSERT0 static_assert
+ #endif
diff -r 2a0175b9b438 -r d4242de1addd lang/ruby31-base/distinfo
--- a/lang/ruby31-base/distinfo Wed May 04 16:43:36 2022 +0000
+++ b/lang/ruby31-base/distinfo Wed May 04 16:44:53 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2022/05/04 15:49:51 jperkin Exp $
+$NetBSD: distinfo,v 1.5 2022/05/04 16:44:53 taca Exp $
BLAKE2s (ruby-3.1.2.tar.xz) = 5384cfebbd466de36f68f554be2c045363e6c074d90a94a4c035ecaadf3c878b
SHA512 (ruby-3.1.2.tar.xz) = 4a74e9efc6ea4b3eff4fec7534eb1fff4794d021531defc2e9937e53c6668db8ecdc0fff2bc23d5e6602d0df344a2caa85b31c5414309541e3d5313ec82b6e21
@@ -6,6 +6,7 @@
SHA1 (patch-common.mk) = c23eed58427b2fd4ba8fdb3692f609701a666c6d
SHA1 (patch-configure) = 3da2fffeaf717e241e9e3b12ad627d09375790da
SHA1 (patch-ext_openssl_openssl__missing.h) = 3f8d79736fd14806dfaf76e333eec63ff3ff5890
+SHA1 (patch-include_ruby_internal_static__assert.h) = 7d5c3ae7ff674b9b34639924fcf08237164de9f8
SHA1 (patch-lib_mkmf.rb) = 4a3cd18548dbdf43a13695d4e76f817c0347e335
SHA1 (patch-lib_rdoc_encoding.rb) = 0e82d2942d9bfcb67dc7c994889d7bc5ec2ae85a
SHA1 (patch-lib_rdoc_ri_driver.rb) = f4d3e59e35b608acd4edc17916142c7f033e6198
diff -r 2a0175b9b438 -r d4242de1addd lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h Wed May 04 16:44:53 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_ruby_internal_static__assert.h,v 1.1 2022/05/04 16:44:53 taca Exp $
+
+Add the way to stop using static_assert.
+
+--- include/ruby/internal/static_assert.h.orig 2022-04-12 11:11:15.000000000 +0000
++++ include/ruby/internal/static_assert.h
+@@ -50,7 +50,7 @@
+ #elif defined(__STDC_VERSION__) && RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+ # define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
+
+-#elif defined(static_assert)
++#elif defined(static_assert) && !defined(RB_AVOID_STATIC_ASSERT)
+ # /* Take <assert.h> definition */
+ # define RBIMPL_STATIC_ASSERT0 static_assert
+ #endif
Home |
Main Index |
Thread Index |
Old Index