1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

archivers/rubygem-bzip2-ruby: Fix build

- Unmark DEPRECATED and remove EXPIRATION_DATE
- Clean up Makefile
This commit is contained in:
Po-Chuan Hsieh 2024-09-09 02:33:06 +08:00
parent 032e309e74
commit 1bb9658293
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
2 changed files with 39 additions and 13 deletions

View File

@ -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>

View File

@ -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