pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/aspell Make it compile with SunPro C++



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d76926dd9863
branches:  trunk
changeset: 478485:d76926dd9863
user:      salo <salo%pkgsrc.org@localhost>
date:      Sat Jul 24 19:05:37 2004 +0000

description:
Make it compile with SunPro C++

diffstat:

 textproc/aspell/Makefile         |   9 ++++++-
 textproc/aspell/distinfo         |   7 +++++-
 textproc/aspell/patches/patch-aa |  32 +++++++++++++++++++++++++++
 textproc/aspell/patches/patch-ad |  13 +++++++++++
 textproc/aspell/patches/patch-ae |  47 ++++++++++++++++++++++++++++++++++++++++
 textproc/aspell/patches/patch-af |  18 +++++++++++++++
 textproc/aspell/patches/patch-ag |  13 +++++++++++
 7 files changed, 137 insertions(+), 2 deletions(-)

diffs (182 lines):

diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/Makefile
--- a/textproc/aspell/Makefile  Sat Jul 24 18:37:10 2004 +0000
+++ b/textproc/aspell/Makefile  Sat Jul 24 19:05:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2004/02/23 21:58:56 snj Exp $
+# $NetBSD: Makefile,v 1.22 2004/07/24 19:05:37 salo Exp $
 #
 
 DISTNAME=              aspell-0.50.5
@@ -23,6 +23,13 @@
 
 REPLACE_PERL=          scripts/aspell-import
 
+.include "../../mk/compiler.mk"
+
+pre-patch:
+.if !empty(PKGSRC_COMPILER:Msunpro)
+       @cd ${WRKSRC} && ${PATCH} -p1 -s < suncc/aspell-0.50.4.1-suncc.diff
+.endif
+
 # Create directory for dictionaries.
 #
 post-install:
diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/distinfo
--- a/textproc/aspell/distinfo  Sat Jul 24 18:37:10 2004 +0000
+++ b/textproc/aspell/distinfo  Sat Jul 24 19:05:37 2004 +0000
@@ -1,6 +1,11 @@
-$NetBSD: distinfo,v 1.9 2004/02/23 21:58:56 snj Exp $
+$NetBSD: distinfo,v 1.10 2004/07/24 19:05:37 salo Exp $
 
 SHA1 (aspell-0.50.5.tar.gz) = 0b17272e1773ef133775d5e6be9fbccc8689ff58
 Size (aspell-0.50.5.tar.gz) = 1016586 bytes
+SHA1 (patch-aa) = d13759da18b0c2f166839c31a2ff0b7b54d8de5f
 SHA1 (patch-ab) = 9b3e6dfbdf27b9bc0a10384be057685fba734aa7
 SHA1 (patch-ac) = 2a83265b7738bc9ed24de163cfee32ee13bbd231
+SHA1 (patch-ad) = 61af6b5b4c0294e018097afd9cae54bfe3253eb7
+SHA1 (patch-ae) = 77b1574a3e3bad6fdbf987fc5a315f0319174e17
+SHA1 (patch-af) = bc220d18c599a61a0f4a7dd95ccad6bad9b03b56
+SHA1 (patch-ag) = e2ddbe1449e55136bd8347a5faef441549a497eb
diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/aspell/patches/patch-aa  Sat Jul 24 19:05:37 2004 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-aa,v 1.5 2004/07/24 19:05:37 salo Exp $
+
+--- modules/speller/default/speller_impl.cpp.orig      Sat Jan 31 02:06:07 2004
++++ modules/speller/default/speller_impl.cpp   Sat Jul 24 20:07:19 2004
+@@ -239,12 +239,27 @@
+       }
+       words[0].set(s.word, *i == m ? m : '\0');
+       words[1].clear();
++#ifndef __SUNPRO_CC
+       if ((!check_if_valid || !c.mid_required()) // if check then !s.mid_required() 
+           && check(i, word_end, run_together_limit - 1, end_pos, words + 1))
+         return true;
++#else
++      if (!check_if_valid || !c.mid_required()) {
++        bool bool_op;
++        bool_op = check(i, word_end, run_together_limit - 1, end_pos, words + 1);
++        if (bool_op)
++          return true;
++      }
++#endif
+       if ((check_if_valid ? *i == m : strchr(run_together_middle_, *i) != 0) 
+           && word_end - (i + 1) >= static_cast<int>(run_together_min_)) {
++#ifndef __SUNPRO_CC
+         if (check(i+1, word_end, run_together_limit - 1, end_pos, words + 1))
++#else
++        bool bool_op;
++        bool_op = check(i+1, word_end, run_together_limit - 1, end_pos, words + 1);
++        if (bool_op)
++#endif
+           return true;
+         else // already checked word (i+1) so no need to check it again
+           ++i;
diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/aspell/patches/patch-ad  Sat Jul 24 19:05:37 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.3 2004/07/24 19:05:37 salo Exp $
+
+--- modules/speller/default/readonly_ws.cpp.orig       Sat Jan 31 02:06:06 2004
++++ modules/speller/default/readonly_ws.cpp    Sat Jul 24 17:15:14 2004
+@@ -194,7 +194,7 @@
+       typedef const char *              Key;
+       static const bool is_multi = false;
+       Key key(Value v) const {return block_begin + v;}
+-      hash<const char *> hash;
++      acommon::hash<const char *> hash;
+       bool equal(Key rhs, Key lhs) const {return strcmp(rhs,lhs) == 0;}
+       bool is_nonexistent(Value v) const {return v == u32int_max;}
+       void make_nonexistent(const Value & v) const {abort();}
diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/aspell/patches/patch-ae  Sat Jul 24 19:05:37 2004 +0000
@@ -0,0 +1,47 @@
+$NetBSD: patch-ae,v 1.3 2004/07/24 19:05:37 salo Exp $
+
+--- modules/speller/default/suggest.cpp.orig   Sat Jul 27 03:27:10 2002
++++ modules/speller/default/suggest.cpp        Sat Jul 24 20:20:51 2004
+@@ -311,7 +311,15 @@
+       new_word[i+1] = new_word[i];
+       new_word[i] = '\0';
+       
++#ifndef __SUNPRO_CC
+       if (speller->check(new_word) && speller->check(new_word + i + 1)) {
++#else
++      bool bool_op1;
++      bool bool_op2;
++      bool_op1 = speller->check(new_word);
++      bool_op2 = speller->check(new_word + i + 1);
++      if (bool_op1 && bool_op2) {
++#endif
+         new_word[i] = ' ';
+         add_nearmiss(new_word, parms.edit_distance_weights.del2,
+                      dont_count, do_need_alloc);
+@@ -634,11 +642,26 @@
+       string::size_type pos;
+       while((word = i->repl_list->next()) != 0) {
+         dup_pair = duplicates_check.insert(fix_case(word));
++#ifndef __SUNPRO_CC
+         if (dup_pair.second && 
+             ((pos = dup_pair.first->find(' '), pos == String::npos)
+              ? (bool)speller->check(*dup_pair.first)
+              : (speller->check((String)dup_pair.first->substr(0,pos)) 
+                 && speller->check((String)dup_pair.first->substr(pos+1))) ))
++#else
++        bool bool_op1 = false;
++        bool bool_op2;
++        bool bool_op3;
++        if (pos = dup_pair.first->find(' '), pos == String::npos)
++          bool_op1 = (bool)speller->check(*dup_pair.first);
++        else {
++          bool_op2 = speller->check((String)dup_pair.first->substr(0,pos));
++          bool_op3 = speller->check((String)dup_pair.first->substr(pos+1));
++          if (bool_op2 && bool_op3)
++            bool_op1 = true;
++        }
++        if (dup_pair.second && bool_op1)
++#endif
+           near_misses_final->push_back(*dup_pair.first);
+       }
+       } else {
diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/aspell/patches/patch-af  Sat Jul 24 19:05:37 2004 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-af,v 1.1 2004/07/24 19:05:37 salo Exp $
+
+--- prog/aspell.cpp.orig       Sat Jul 24 19:56:05 2004
++++ prog/aspell.cpp    Sat Jul 24 20:24:15 2004
+@@ -619,7 +619,13 @@
+              << ":";
+         AspellStringEnumeration * els 
+           = aspell_word_list_elements(suggestions);
++#ifndef __SUNPRO_CC
+         if (options->retrieve_bool("reverse")) {
++#else
++        bool bool_op;
++        bool_op = options->retrieve_bool("reverse");
++        if (bool_op) {
++#endif
+           Vector<String> sugs;
+           sugs.reserve(aspell_word_list_size(suggestions));
+           while ( ( w = aspell_string_enumeration_next(els)) != 0)
diff -r 98fcd1065565 -r d76926dd9863 textproc/aspell/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/aspell/patches/patch-ag  Sat Jul 24 19:05:37 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2004/07/24 19:05:37 salo Exp $
+
+--- examples/Makefile.in.orig  Wed Feb 11 02:05:53 2004
++++ examples/Makefile.in       Sat Jul 24 17:39:23 2004
+@@ -81,7 +81,7 @@
+ AUTOHEADER = @AUTOHEADER@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+-CC = @CC@
++CC = @CXX@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+ CPP = @CPP@



Home | Main Index | Thread Index | Old Index