diff options
author | taca <taca@pkgsrc.org> | 2021-02-14 15:06:43 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2021-02-14 15:06:43 +0000 |
commit | 596fa41096a850d69740f3b2f224ed26c0f7a233 (patch) | |
tree | 5fe189e5e6d94cd393be5a947fbe4d9d5bf40dda /textproc | |
parent | d5d3bad9e7da96b8bf72dab5e8669620c39b17da (diff) | |
download | pkgsrc-596fa41096a850d69740f3b2f224ed26c0f7a233.tar.gz |
textproc/ruby-ferret: build fixes for Ruby 3.0 and more
* Fix build problem with Ruby 3.0.
* Really compare two objects in two cases.
Bump PKGREVISION.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/ruby-ferret/Makefile | 3 | ||||
-rw-r--r-- | textproc/ruby-ferret/distinfo | 7 | ||||
-rw-r--r-- | textproc/ruby-ferret/patches/patch-ext_config.h | 17 | ||||
-rw-r--r-- | textproc/ruby-ferret/patches/patch-ext_ferret.h | 15 | ||||
-rw-r--r-- | textproc/ruby-ferret/patches/patch-ext_index.h | 15 | ||||
-rw-r--r-- | textproc/ruby-ferret/patches/patch-ext_q__boolean.c | 15 | ||||
-rw-r--r-- | textproc/ruby-ferret/patches/patch-ext_q__span.c | 15 |
7 files changed, 85 insertions, 2 deletions
diff --git a/textproc/ruby-ferret/Makefile b/textproc/ruby-ferret/Makefile index 0d662ba8dca..9b3e83c3a7e 100644 --- a/textproc/ruby-ferret/Makefile +++ b/textproc/ruby-ferret/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.13 2018/10/23 12:39:25 jperkin Exp $ +# $NetBSD: Makefile,v 1.14 2021/02/14 15:06:43 taca Exp $ DISTNAME= ferret-0.11.8.7 +PKGREVISION= 1 CATEGORIES= textproc MAINTAINER= minskim@NetBSD.org diff --git a/textproc/ruby-ferret/distinfo b/textproc/ruby-ferret/distinfo index 2cf8990cefe..46258707a37 100644 --- a/textproc/ruby-ferret/distinfo +++ b/textproc/ruby-ferret/distinfo @@ -1,6 +1,11 @@ -$NetBSD: distinfo,v 1.9 2017/06/05 15:21:20 taca Exp $ +$NetBSD: distinfo,v 1.10 2021/02/14 15:06:43 taca Exp $ SHA1 (ferret-0.11.8.7.gem) = f4e1d8bb38f4d33460a14f640653ce2ae37b9522 RMD160 (ferret-0.11.8.7.gem) = cd7ed8539dd4ab06700816d90f0408db081575de SHA512 (ferret-0.11.8.7.gem) = ac7cafa25ade9741e0eb95d7372f6dd7ce4ea82368c69ace536b852fd5cc435d05764041ba1bddcc6098665c6e1aa7a12ac9739e45362007f726f3e7a8124df1 Size (ferret-0.11.8.7.gem) = 608768 bytes +SHA1 (patch-ext_config.h) = ec58ab6e60abccd10bc7d10b65b7b5c369873800 +SHA1 (patch-ext_ferret.h) = 856a11685bcf961ac43f2ff0b453c1a154e5b3f3 +SHA1 (patch-ext_index.h) = 14f8f62bb9af1c17922d4ed02922aaac8b3f94d3 +SHA1 (patch-ext_q__boolean.c) = 5d3c1fb89faf0d6e1fb4f9f2e29b785c45a3108b +SHA1 (patch-ext_q__span.c) = 0de4b4b689267ed540c002f26bb1ae6116e54b07 diff --git a/textproc/ruby-ferret/patches/patch-ext_config.h b/textproc/ruby-ferret/patches/patch-ext_config.h new file mode 100644 index 00000000000..e35730658fd --- /dev/null +++ b/textproc/ruby-ferret/patches/patch-ext_config.h @@ -0,0 +1,17 @@ +$NetBSD: patch-ext_config.h,v 1.1 2021/02/14 15:06:43 taca Exp $ + +* Do not typedef bool unconditionally. + +--- ext/config.h.orig 2021-01-11 06:26:19.797199031 +0000 ++++ ext/config.h +@@ -17,8 +17,10 @@ extern "C" { + #endif + + #ifndef __cplusplus ++#ifndef bool + typedef unsigned int bool; + #endif ++#endif + typedef unsigned char frt_uchar; + + typedef posh_u16_t frt_u16; diff --git a/textproc/ruby-ferret/patches/patch-ext_ferret.h b/textproc/ruby-ferret/patches/patch-ext_ferret.h new file mode 100644 index 00000000000..6bba79b50bf --- /dev/null +++ b/textproc/ruby-ferret/patches/patch-ext_ferret.h @@ -0,0 +1,15 @@ +$NetBSD: patch-ext_ferret.h,v 1.1 2021/02/14 15:06:43 taca Exp $ + +Use modern API. + +--- ext/ferret.h.orig 2021-01-11 06:15:38.540000961 +0000 ++++ ext/ferret.h +@@ -72,7 +72,7 @@ extern char *rs2s(VALUE rstr); + extern char *rstrdup(VALUE rstr); + extern Symbol rintern(VALUE rstr); + #define Frt_Make_Struct(klass)\ +- rb_data_object_alloc(klass,NULL,(RUBY_DATA_FUNC)NULL,(RUBY_DATA_FUNC)NULL) ++ rb_data_object_wrap(klass,NULL,(RUBY_DATA_FUNC)NULL,(RUBY_DATA_FUNC)NULL) + + #define Frt_Wrap_Struct(self,mmark,mfree,mdata)\ + do {\ diff --git a/textproc/ruby-ferret/patches/patch-ext_index.h b/textproc/ruby-ferret/patches/patch-ext_index.h new file mode 100644 index 00000000000..5c362dbca0a --- /dev/null +++ b/textproc/ruby-ferret/patches/patch-ext_index.h @@ -0,0 +1,15 @@ +$NetBSD: patch-ext_index.h,v 1.1 2021/02/14 15:06:43 taca Exp $ + +* Avoid to use bool. + +--- ext/index.h.orig 2021-01-11 06:20:40.416664005 +0000 ++++ ext/index.h +@@ -592,7 +592,7 @@ typedef struct FrtLazyDocField + FrtLazyDoc *doc; + int size; /* number of data elements */ + int len; /* length of data elements concatenated */ +- bool is_compressed : 2; /* set to 2 after all data is loaded */ ++ int is_compressed : 2; /* set to 2 after all data is loaded */ + } FrtLazyDocField; + + extern char *frt_lazy_df_get_data(FrtLazyDocField *self, int i); diff --git a/textproc/ruby-ferret/patches/patch-ext_q__boolean.c b/textproc/ruby-ferret/patches/patch-ext_q__boolean.c new file mode 100644 index 00000000000..a4d1a5ef276 --- /dev/null +++ b/textproc/ruby-ferret/patches/patch-ext_q__boolean.c @@ -0,0 +1,15 @@ +$NetBSD: patch-ext_q__boolean.c,v 1.1 2021/02/14 15:06:43 taca Exp $ + +Really compare two objects. + +--- ext/q_boolean.c.orig 2021-01-11 06:15:38.573963936 +0000 ++++ ext/q_boolean.c +@@ -1528,7 +1528,7 @@ static int bq_eq(Query *self, Query *o) + BooleanQuery *bq1 = BQ(self); + BooleanQuery *bq2 = BQ(o); + if ((bq1->coord_disabled != bq2->coord_disabled) +- || (bq1->max_clause_cnt != bq1->max_clause_cnt) ++ || (bq1->max_clause_cnt != bq2->max_clause_cnt) + || (bq1->clause_cnt != bq2->clause_cnt)) { + return false; + } diff --git a/textproc/ruby-ferret/patches/patch-ext_q__span.c b/textproc/ruby-ferret/patches/patch-ext_q__span.c new file mode 100644 index 00000000000..10cb2daddde --- /dev/null +++ b/textproc/ruby-ferret/patches/patch-ext_q__span.c @@ -0,0 +1,15 @@ +$NetBSD: patch-ext_q__span.c,v 1.1 2021/02/14 15:06:43 taca Exp $ + +Really compare two objects. + +--- ext/q_span.c.orig 2021-01-11 06:15:38.585794380 +0000 ++++ ext/q_span.c +@@ -2254,7 +2254,7 @@ static int spanxq_eq(Query *self, Query + Query *spanxq_new_nr(Query *inc, Query *exc) + { + Query *self; +- if (SpQ(inc)->field != SpQ(inc)->field) { ++ if (SpQ(inc)->field != SpQ(exc)->field) { + RAISE(ARG_ERROR, "All clauses in a SpanQuery must have the same field. " + "Attempted to add a SpanQuery with field \"%s\" along with a " + "SpanQuery with field \"%s\" to an SpanNotQuery", |