pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang



Module Name:    pkgsrc
Committed By:   taca
Date:           Wed May  4 16:44:53 UTC 2022

Modified Files:
        pkgsrc/lang/ruby: platform.mk
        pkgsrc/lang/ruby30-base: distinfo
        pkgsrc/lang/ruby31-base: distinfo
Added Files:
        pkgsrc/lang/ruby30-base/patches:
            patch-include_ruby_internal_static__assert.h
        pkgsrc/lang/ruby31-base/patches:
            patch-include_ruby_internal_static__assert.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/lang/ruby/platform.mk
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/ruby30-base/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ruby31-base/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ruby/platform.mk
diff -u pkgsrc/lang/ruby/platform.mk:1.10 pkgsrc/lang/ruby/platform.mk:1.11
--- pkgsrc/lang/ruby/platform.mk:1.10   Wed May  4 16:16:49 2022
+++ pkgsrc/lang/ruby/platform.mk        Wed May  4 16:44:53 2022
@@ -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 @@ CONFIGURE_ARGS+=   --disable-dtrace
 .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.

Index: pkgsrc/lang/ruby30-base/distinfo
diff -u pkgsrc/lang/ruby30-base/distinfo:1.9 pkgsrc/lang/ruby30-base/distinfo:1.10
--- pkgsrc/lang/ruby30-base/distinfo:1.9        Wed May  4 15:49:16 2022
+++ pkgsrc/lang/ruby30-base/distinfo    Wed May  4 16:44:53 2022
@@ -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-configure) = 8499cad3c1fb1a1
 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

Index: pkgsrc/lang/ruby31-base/distinfo
diff -u pkgsrc/lang/ruby31-base/distinfo:1.4 pkgsrc/lang/ruby31-base/distinfo:1.5
--- pkgsrc/lang/ruby31-base/distinfo:1.4        Wed May  4 15:49:51 2022
+++ pkgsrc/lang/ruby31-base/distinfo    Wed May  4 16:44:53 2022
@@ -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 @@ Size (ruby-3.1.2.tar.xz) = 15101588 byte
 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

Added files:

Index: pkgsrc/lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h
diff -u /dev/null pkgsrc/lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h:1.1
--- /dev/null   Wed May  4 16:44:53 2022
+++ pkgsrc/lang/ruby30-base/patches/patch-include_ruby_internal_static__assert.h        Wed May  4 16:44:53 2022
@@ -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

Index: pkgsrc/lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h
diff -u /dev/null pkgsrc/lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h:1.1
--- /dev/null   Wed May  4 16:44:53 2022
+++ pkgsrc/lang/ruby31-base/patches/patch-include_ruby_internal_static__assert.h        Wed May  4 16:44:53 2022
@@ -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