diff options
author | taca <taca@pkgsrc.org> | 2018-06-29 17:01:16 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2018-06-29 17:01:16 +0000 |
commit | 8ae494a112a7a3909be38aa2687540065769c5bc (patch) | |
tree | 4e496b7658a46368b58480a44e1d9fdea76c9145 /textproc | |
parent | 1b4aef55fe1c8f23b49b152f014ddeb81765109f (diff) | |
download | pkgsrc-8ae494a112a7a3909be38aa2687540065769c5bc.tar.gz |
textproc/sary: Fix build problem on NetBSD 8.0_RC2
* Avoid name confliction: index() and sort().
* Add including <string.h> for string functions.
* Avoid using deprecated glib function: g_strcasecmp().
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/sary/distinfo | 5 | ||||
-rw-r--r-- | textproc/sary/patches/patch-sary_builder.c | 33 | ||||
-rw-r--r-- | textproc/sary/patches/patch-src_getopt.c | 17 | ||||
-rw-r--r-- | textproc/sary/patches/patch-src_mksary.c | 76 |
4 files changed, 130 insertions, 1 deletions
diff --git a/textproc/sary/distinfo b/textproc/sary/distinfo index 35d48362d25..80f136522d8 100644 --- a/textproc/sary/distinfo +++ b/textproc/sary/distinfo @@ -1,6 +1,9 @@ -$NetBSD: distinfo,v 1.2 2015/11/04 02:00:11 agc Exp $ +$NetBSD: distinfo,v 1.3 2018/06/29 17:01:16 taca Exp $ SHA1 (sary-1.2.0.tar.gz) = cfc671ca99d58df4ed8985408499f96579af18f3 RMD160 (sary-1.2.0.tar.gz) = 0c38bf02edb08dabc3577bfde1357ec8821a27f7 SHA512 (sary-1.2.0.tar.gz) = 0eeae82a384970b4d96f7a0ca3929e74d17b8b3ebc61459ec9fc7172e61c3835ffe2de8aaab7ebd64f54be24d39f6734949ebc98758c28cec299b3bd25020632 Size (sary-1.2.0.tar.gz) = 393787 bytes +SHA1 (patch-sary_builder.c) = 9af27aeb24865de4b9059aa3118698da1c8f384f +SHA1 (patch-src_getopt.c) = 2bfda0125d1acd4c37ac3c152e81802c86e5cf9e +SHA1 (patch-src_mksary.c) = 8bc4a5d18611e53028fc44489f431d994195dd0d diff --git a/textproc/sary/patches/patch-sary_builder.c b/textproc/sary/patches/patch-sary_builder.c new file mode 100644 index 00000000000..a5ec55f9b81 --- /dev/null +++ b/textproc/sary/patches/patch-sary_builder.c @@ -0,0 +1,33 @@ +$NetBSD: patch-sary_builder.c,v 1.1 2018/06/29 17:01:16 taca Exp $ + +* Avoid name confliction. + +--- sary/builder.c.orig 2005-01-28 08:50:24.000000000 +0000 ++++ sary/builder.c +@@ -45,7 +45,7 @@ struct _SaryBuilder{ + gpointer progress_func_data; + }; + +-static SaryInt index (SaryBuilder *builder, ++static SaryInt sary_index (SaryBuilder *builder, + SaryProgress *progress, + SaryWriter *writer); + static void progress_quiet (SaryProgress *progress); +@@ -124,7 +124,7 @@ sary_builder_index (SaryBuilder *builder + builder->progress_func, + builder->progress_func_data); + +- count = index(builder, progress, writer); ++ count = sary_index(builder, progress, writer); + + sary_progress_destroy(progress); + sary_writer_destroy(writer); +@@ -219,7 +219,7 @@ sary_builder_connect_progress (SaryBuild + } + + static SaryInt +-index (SaryBuilder *builder, SaryProgress *progress, SaryWriter *writer) ++sary_index (SaryBuilder *builder, SaryProgress *progress, SaryWriter *writer) + { + gchar *bof, *cursor; + SaryInt count; diff --git a/textproc/sary/patches/patch-src_getopt.c b/textproc/sary/patches/patch-src_getopt.c new file mode 100644 index 00000000000..2b5d9e35745 --- /dev/null +++ b/textproc/sary/patches/patch-src_getopt.c @@ -0,0 +1,17 @@ +$NetBSD: patch-src_getopt.c,v 1.1 2018/06/29 17:01:16 taca Exp $ + +* include <string.h>. + +--- src/getopt.c.orig 2004-06-11 18:57:27.000000000 +0000 ++++ src/getopt.c +@@ -31,6 +31,10 @@ + #include <config.h> + #endif + ++#ifdef HAVE_STRING_H ++#include <string.h> ++#endif ++ + #if !defined (__STDC__) || !__STDC__ + /* This is a separate conditional since some stdc systems + reject `defined (const)'. */ diff --git a/textproc/sary/patches/patch-src_mksary.c b/textproc/sary/patches/patch-src_mksary.c new file mode 100644 index 00000000000..38bc920cfc1 --- /dev/null +++ b/textproc/sary/patches/patch-src_mksary.c @@ -0,0 +1,76 @@ +$NetBSD: patch-src_mksary.c,v 1.1 2018/06/29 17:01:16 taca Exp $ + +* Avoid name confliction. +* Avoid using deprecated function. + +--- src/mksary.c.orig 2004-06-11 18:57:28.000000000 +0000 ++++ src/mksary.c +@@ -59,10 +59,10 @@ CodesetFunc codeset_func_tab[] = { + static SaryIpointFunc dispatch_codeset_func (const gchar *codeset); + static SaryBuilder* new_builder (const gchar *file_name, + const gchar *array_name); +-static void index (SaryBuilder *builder, ++static void sary_index (SaryBuilder *builder, + const gchar *file_name, + const gchar *array_name); +-static void sort (SaryBuilder *builder, ++static void sary_sort (SaryBuilder *builder, + const gchar *file_name, + const gchar *array_name); + static void index_and_sort (SaryBuilder *builder, +@@ -121,7 +121,7 @@ dispatch_codeset_func (const gchar *code + CodesetFunc *cursor; + + for (cursor = codeset_func_tab; cursor->codeset != NULL; cursor++) { +- if (g_strcasecmp(cursor->codeset, codeset) == 0) { ++ if (g_ascii_strcasecmp(cursor->codeset, codeset) == 0) { + return cursor->ipoint_func; + } + } +@@ -149,7 +149,7 @@ new_builder (const gchar *file_name, con + } + + static void +-index (SaryBuilder *builder, ++sary_index (SaryBuilder *builder, + const gchar *file_name, + const gchar *array_name) + { +@@ -165,7 +165,7 @@ index (SaryBuilder *builder, + + + static void +-sort (SaryBuilder *builder, ++sary_sort (SaryBuilder *builder, + const gchar *file_name, + const gchar *array_name) + { +@@ -186,8 +186,8 @@ index_and_sort (SaryBuilder *builder, + const gchar *file_name, + const gchar *array_name) + { +- index(builder, file_name, array_name); +- sort(builder, file_name, array_name); ++ sary_index(builder, file_name, array_name); ++ sary_sort(builder, file_name, array_name); + } + + static void +@@ -358,7 +358,7 @@ parse_options (int argc, char **argv) + show_help(); + break; + case 'i': +- process = index; ++ process = sary_index; + break; + case 'l': + ipoint_func = sary_ipoint_line; +@@ -373,7 +373,7 @@ parse_options (int argc, char **argv) + progress_func = progress_quiet; + break; + case 's': +- process = sort; ++ process = sary_sort; + break; + case 't': + if (optarg) { |