git: 1bb965829324 - main - archivers/rubygem-bzip2-ruby: Fix build

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 08 Sep 2024 18:55:27 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1bb96582932418cea2685af0d8f2dbba046f4dfa

commit 1bb96582932418cea2685af0d8f2dbba046f4dfa
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-08 18:33:06 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-08 18:40:17 +0000

    archivers/rubygem-bzip2-ruby: Fix build
    
    - Unmark DEPRECATED and remove EXPIRATION_DATE
    - Clean up Makefile
---
 archivers/rubygem-bzip2-ruby/Makefile              | 12 +------
 .../rubygem-bzip2-ruby/files/patch-ext_bzip2.c     | 40 ++++++++++++++++++++--
 2 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/archivers/rubygem-bzip2-ruby/Makefile b/archivers/rubygem-bzip2-ruby/Makefile
index 439ae6269c72..ebb3c2b2bb05 100644
--- a/archivers/rubygem-bzip2-ruby/Makefile
+++ b/archivers/rubygem-bzip2-ruby/Makefile
@@ -11,18 +11,8 @@ WWW=		https://github.com/brianmario/bzip2-ruby
 LICENSE=	BSD2CLAUSE RUBY
 LICENSE_COMB=	dual
 
-DEPRECATED=	Does not work with ruby32
-# Sync with the removal of ruby31
-EXPIRATION_DATE=	2025-03-31
-
 USES=		gem
 
-BROKEN_RUBY32=	yes
-
-.include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
-CONFIGURE_ARGS+=	--with-cflags="-Wno-error=incompatible-function-pointer-types"
-.endif
+CONFIGURE_ARGS=	--with-cflags=-Wno-incompatible-function-pointer-types
 
 .include <bsd.port.mk>
diff --git a/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c b/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c
index 05384a6fbdda..b6fcb5161ae9 100644
--- a/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c
+++ b/archivers/rubygem-bzip2-ruby/files/patch-ext_bzip2.c
@@ -1,6 +1,6 @@
---- ext/bzip2.c.orig	2016-07-26 12:25:25 UTC
+--- ext/bzip2.c.orig	2024-09-07 15:54:07 UTC
 +++ ext/bzip2.c
-@@ -247,9 +247,6 @@ static VALUE bz_writer_close(VALUE obj) 
+@@ -247,9 +247,6 @@ static VALUE bz_writer_close(VALUE obj) {
  
      Get_BZ2(obj, bzf);
      res = bz_writer_internal_close(bzf);
@@ -10,3 +10,39 @@
      return res;
  }
  
+@@ -495,7 +492,7 @@ static VALUE bz_writer_init(int argc, VALUE *argv, VAL
+             }
+             bziv->bz2 = obj;
+         } else {
+-            iv = Data_Make_Struct(rb_cData, struct bz_iv, 0, free, bziv);
++            iv = Data_Make_Struct(rb_cObject, struct bz_iv, 0, free, bziv);
+             bziv->io = a;
+             bziv->bz2 = obj;
+             rb_ary_push(bz_internal_ary, iv);
+@@ -1733,7 +1730,7 @@ void Init_bzip2_ext() {
+     /*
+       Writer
+     */
+-    bz_cWriter = rb_define_class_under(bz_mBzip2, "Writer", rb_cData);
++    bz_cWriter = rb_define_class_under(bz_mBzip2, "Writer", rb_cObject);
+ #if HAVE_RB_DEFINE_ALLOC_FUNC
+     rb_define_alloc_func(bz_cWriter, bz_writer_s_alloc);
+ #else
+@@ -1757,7 +1754,7 @@ void Init_bzip2_ext() {
+     /*
+       Reader
+     */
+-    bz_cReader = rb_define_class_under(bz_mBzip2, "Reader", rb_cData);
++    bz_cReader = rb_define_class_under(bz_mBzip2, "Reader", rb_cObject);
+     rb_include_module(bz_cReader, rb_mEnumerable);
+ #if HAVE_RB_DEFINE_ALLOC_FUNC
+     rb_define_alloc_func(bz_cReader, bz_reader_s_alloc);
+@@ -1798,7 +1795,7 @@ void Init_bzip2_ext() {
+     /*
+       Internal
+     */
+-    bz_cInternal = rb_define_class_under(bz_mBzip2, "InternalStr", rb_cData);
++    bz_cInternal = rb_define_class_under(bz_mBzip2, "InternalStr", rb_cObject);
+ #if HAVE_RB_DEFINE_ALLOC_FUNC
+     rb_undef_alloc_func(bz_cInternal);
+ #else