diff options
author | salo <salo@pkgsrc.org> | 2004-07-24 19:05:37 +0000 |
---|---|---|
committer | salo <salo@pkgsrc.org> | 2004-07-24 19:05:37 +0000 |
commit | d2131ec3083bcb6b8b63fad81d933e1d7315514b (patch) | |
tree | 1c6d3917f0b8e3300227fba878c74d8a00360c6b /textproc/aspell | |
parent | c135417273d19b1a806ef9487bb8a4de20e70d2a (diff) | |
download | pkgsrc-d2131ec3083bcb6b8b63fad81d933e1d7315514b.tar.gz |
Make it compile with SunPro C++
Diffstat (limited to 'textproc/aspell')
-rw-r--r-- | textproc/aspell/Makefile | 9 | ||||
-rw-r--r-- | textproc/aspell/distinfo | 7 | ||||
-rw-r--r-- | textproc/aspell/patches/patch-aa | 32 | ||||
-rw-r--r-- | textproc/aspell/patches/patch-ad | 13 | ||||
-rw-r--r-- | textproc/aspell/patches/patch-ae | 47 | ||||
-rw-r--r-- | textproc/aspell/patches/patch-af | 18 | ||||
-rw-r--r-- | textproc/aspell/patches/patch-ag | 13 |
7 files changed, 137 insertions, 2 deletions
diff --git a/textproc/aspell/Makefile b/textproc/aspell/Makefile index a03e8f07d63..0f602f1ef62 100644 --- a/textproc/aspell/Makefile +++ b/textproc/aspell/Makefile @@ -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 @@ CONFIGURE_ARGS+= --enable-curses=ncurses 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 --git a/textproc/aspell/distinfo b/textproc/aspell/distinfo index 9df03d21ebd..2910b8f0398 100644 --- a/textproc/aspell/distinfo +++ b/textproc/aspell/distinfo @@ -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 --git a/textproc/aspell/patches/patch-aa b/textproc/aspell/patches/patch-aa new file mode 100644 index 00000000000..6294b172044 --- /dev/null +++ b/textproc/aspell/patches/patch-aa @@ -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 --git a/textproc/aspell/patches/patch-ad b/textproc/aspell/patches/patch-ad new file mode 100644 index 00000000000..196d43c3330 --- /dev/null +++ b/textproc/aspell/patches/patch-ad @@ -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 --git a/textproc/aspell/patches/patch-ae b/textproc/aspell/patches/patch-ae new file mode 100644 index 00000000000..abad5beacae --- /dev/null +++ b/textproc/aspell/patches/patch-ae @@ -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 --git a/textproc/aspell/patches/patch-af b/textproc/aspell/patches/patch-af new file mode 100644 index 00000000000..dda22520042 --- /dev/null +++ b/textproc/aspell/patches/patch-af @@ -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 --git a/textproc/aspell/patches/patch-ag b/textproc/aspell/patches/patch-ag new file mode 100644 index 00000000000..ad6961838e5 --- /dev/null +++ b/textproc/aspell/patches/patch-ag @@ -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@ |