pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/sary



Module Name:    pkgsrc
Committed By:   taca
Date:           Fri Jun 29 17:01:16 UTC 2018

Modified Files:
        pkgsrc/textproc/sary: distinfo
Added Files:
        pkgsrc/textproc/sary/patches: patch-sary_builder.c patch-src_getopt.c
            patch-src_mksary.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/textproc/sary/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/sary/patches/patch-sary_builder.c \
    pkgsrc/textproc/sary/patches/patch-src_getopt.c \
    pkgsrc/textproc/sary/patches/patch-src_mksary.c

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

Modified files:

Index: pkgsrc/textproc/sary/distinfo
diff -u pkgsrc/textproc/sary/distinfo:1.2 pkgsrc/textproc/sary/distinfo:1.3
--- pkgsrc/textproc/sary/distinfo:1.2   Wed Nov  4 02:00:11 2015
+++ pkgsrc/textproc/sary/distinfo       Fri Jun 29 17:01:16 2018
@@ -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

Added files:

Index: pkgsrc/textproc/sary/patches/patch-sary_builder.c
diff -u /dev/null pkgsrc/textproc/sary/patches/patch-sary_builder.c:1.1
--- /dev/null   Fri Jun 29 17:01:16 2018
+++ pkgsrc/textproc/sary/patches/patch-sary_builder.c   Fri Jun 29 17:01:16 2018
@@ -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;
Index: pkgsrc/textproc/sary/patches/patch-src_getopt.c
diff -u /dev/null pkgsrc/textproc/sary/patches/patch-src_getopt.c:1.1
--- /dev/null   Fri Jun 29 17:01:16 2018
+++ pkgsrc/textproc/sary/patches/patch-src_getopt.c     Fri Jun 29 17:01:16 2018
@@ -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)'.  */
Index: pkgsrc/textproc/sary/patches/patch-src_mksary.c
diff -u /dev/null pkgsrc/textproc/sary/patches/patch-src_mksary.c:1.1
--- /dev/null   Fri Jun 29 17:01:16 2018
+++ pkgsrc/textproc/sary/patches/patch-src_mksary.c     Fri Jun 29 17:01:16 2018
@@ -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) {



Home | Main Index | Thread Index | Old Index