]> git.pld-linux.org Git - packages/firefox.git/blame - mozilla-firefox-myspell.patch
- rel 5
[packages/firefox.git] / mozilla-firefox-myspell.patch
CommitLineData
ce83d322
ER
1--- firefox-2.0+0dfsg.orig/extensions/spellcheck/myspell/src/Makefile.in
2+++ firefox-2.0+0dfsg/extensions/spellcheck/myspell/src/Makefile.in
3@@ -60,15 +60,18 @@
4 xulapp \
5 $(NULL)
6
7-CPPSRCS = affentry.cpp \
8+CPPSRCS = mozMySpell.cpp \
9+ mozMySpellFactory.cpp \
10+ $(NULL)
11+ifndef MOZ_NATIVE_MYSPELL
12+CPPSRCS += affentry.cpp \
13 affixmgr.cpp \
14 hashmgr.cpp \
15 suggestmgr.cpp \
16 csutil.cpp \
17 myspell.cpp \
18- mozMySpell.cpp \
19- mozMySpellFactory.cpp \
20 $(NULL)
21+endif
22
23 ifdef MOZ_XUL_APP
24 CPPSRCS += mozMySpellDirProvider.cpp
25@@ -79,6 +82,7 @@
26 $(XPCOM_LIBS) \
27 $(NSPR_LIBS) \
28 $(MOZ_UNICHARUTIL_LIBS) \
29+ $(MOZ_MYSPELL_LIBS) \
30 $(NULL)
31
32 include $(topsrcdir)/config/rules.mk
33--- firefox-2.0+0dfsg.orig/configure
34+++ firefox-2.0+0dfsg/configure
35@@ -60,6 +60,8 @@
36 --with-system-png[=PFX]
37 Use system libpng [installed at prefix PFX]"
38 ac_help="$ac_help
39+ --enable-system-myspell Use system myspell (located with pkgconfig)"
40+ac_help="$ac_help
41 --with-java-include-path=dir Location of Java SDK headers"
42 ac_help="$ac_help
43 --with-java-bin-path=dir Location of Java binaries (java, javac, jar)"
44@@ -12011,6 +11953,116 @@
45
46 fi # SKIP_LIBRARY_CHECKS
47
48+# Check whether --enable-system-myspell or --disable-system-myspell was given.
49+if test "${enable_system_myspell+set}" = set; then
50+ enableval="$enable_system_myspell"
51+ if test "$enableval" = "yes"; then
52+ SYSTEM_MYSPELL=1
53+ elif test "$enableval" = "no"; then
54+ :
55+ else
56+ { echo "configure: error: Option, system-myspell, does not take an argument ($enableval)." 1>&2; exit 1; }
57+ fi
58+fi
59+
60+
61+if test -n "$SYSTEM_MYSPELL"; then
62+
63+ succeeded=no
64+
65+ if test -z "$PKG_CONFIG"; then
66+ # Extract the first word of "pkg-config", so it can be a program name with args.
67+set dummy pkg-config; ac_word=$2
68+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
69+echo "configure:11978: checking for $ac_word" >&5
70+if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
71+ echo $ac_n "(cached) $ac_c" 1>&6
72+else
73+ case "$PKG_CONFIG" in
74+ /*)
75+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
76+ ;;
77+ ?:/*)
78+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
79+ ;;
80+ *)
81+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
82+ ac_dummy="$PATH"
83+ for ac_dir in $ac_dummy; do
84+ test -z "$ac_dir" && ac_dir=.
85+ if test -f $ac_dir/$ac_word; then
86+ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
87+ break
88+ fi
89+ done
90+ IFS="$ac_save_ifs"
91+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
92+ ;;
93+esac
94+fi
95+PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
96+if test -n "$PKG_CONFIG"; then
97+ echo "$ac_t""$PKG_CONFIG" 1>&6
98+else
99+ echo "$ac_t""no" 1>&6
100+fi
101+
102+ fi
103+
104+ if test "$PKG_CONFIG" = "no" ; then
105+ echo "*** The pkg-config script could not be found. Make sure it is"
106+ echo "*** in your path, or set the PKG_CONFIG environment variable"
107+ echo "*** to the full path to pkg-config."
108+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
109+ else
110+ PKG_CONFIG_MIN_VERSION=0.9.0
111+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
112+ echo $ac_n "checking for myspell""... $ac_c" 1>&6
113+echo "configure:12022: checking for myspell" >&5
114+
115+ if $PKG_CONFIG --exists "myspell" ; then
116+ echo "$ac_t""yes" 1>&6
117+ succeeded=yes
118+
119+ echo $ac_n "checking MOZ_MYSPELL_CFLAGS""... $ac_c" 1>&6
120+echo "configure:12029: checking MOZ_MYSPELL_CFLAGS" >&5
121+ MOZ_MYSPELL_CFLAGS=`$PKG_CONFIG --cflags "myspell"`
122+ echo "$ac_t""$MOZ_MYSPELL_CFLAGS" 1>&6
123+
124+ echo $ac_n "checking MOZ_MYSPELL_LIBS""... $ac_c" 1>&6
125+echo "configure:12034: checking MOZ_MYSPELL_LIBS" >&5
126+ ## don't use --libs since that can do evil things like add
127+ ## -Wl,--export-dynamic
128+ MOZ_MYSPELL_LIBS="`$PKG_CONFIG --libs-only-L \"myspell\"` `$PKG_CONFIG --libs-only-l \"myspell\"`"
129+ echo "$ac_t""$MOZ_MYSPELL_LIBS" 1>&6
130+ else
131+ MOZ_MYSPELL_CFLAGS=""
132+ MOZ_MYSPELL_LIBS=""
133+ ## If we have a custom action on failure, don't print errors, but
134+ ## do set a variable so people can do so.
135+ MOZ_MYSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "myspell"`
136+ echo $MOZ_MYSPELL_PKG_ERRORS
137+ fi
138+
139+
140+
141+ else
142+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
143+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
144+ fi
145+ fi
146+
147+ if test $succeeded = yes; then
148+ :
149+ else
150+ { echo "configure: error: Library requirements (myspell) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; }
151+ fi
152+
153+fi
154+
155+
156+
157+
158 JAVA_INCLUDE_PATH=
159 # Check whether --with-java-include-path or --without-java-include-path was given.
160 if test "${with_java_include_path+set}" = set; then
161@@ -20291,10 +20347,13 @@
162 s%@NSS_CONFIG@%$NSS_CONFIG%g
163 s%@NSS_CFLAGS@%$NSS_CFLAGS%g
164 s%@NSS_LIBS@%$NSS_LIBS%g
165+s%@PKG_CONFIG@%$PKG_CONFIG%g
166+s%@MOZ_MYSPELL_CFLAGS@%$MOZ_MYSPELL_CFLAGS%g
167+s%@MOZ_MYSPELL_LIBS@%$MOZ_MYSPELL_LIBS%g
168+s%@SYSTEM_MYSPELL@%$SYSTEM_MYSPELL%g
169 s%@GTK_CONFIG@%$GTK_CONFIG%g
170 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
171 s%@GTK_LIBS@%$GTK_LIBS%g
172-s%@PKG_CONFIG@%$PKG_CONFIG%g
173 s%@MOZ_GTK2_CFLAGS@%$MOZ_GTK2_CFLAGS%g
174 s%@MOZ_GTK2_LIBS@%$MOZ_GTK2_LIBS%g
175 s%@HOST_MOC@%$HOST_MOC%g
71549f76
ER
176--- firefox-2.0+0dfsg.orig/configure.in
177+++ firefox-2.0+0dfsg/configure.in
ce83d322
ER
178@@ -3840,6 +3870,19 @@
179
180 fi # SKIP_LIBRARY_CHECKS
181
182+dnl system MySpell Support
183+dnl ========================================================
184+MOZ_ARG_ENABLE_BOOL(system-myspell,
185+[ --enable-system-myspell Use system myspell (located with pkgconfig)],
186+ SYSTEM_MYSPELL=1 )
187+
188+if test -n "$SYSTEM_MYSPELL"; then
189+ PKG_CHECK_MODULES(MOZ_MYSPELL, myspell)
190+fi
191+
192+AC_SUBST(SYSTEM_MYSPELL)
193+AC_SUBST(MOZ_MYSPELL_LIBS)
194+
195 dnl ========================================================
196 dnl Java SDK support
197 dnl ========================================================
198--- firefox-2.0+0dfsg.orig/config/autoconf.mk.in
199+++ firefox-2.0+0dfsg/config/autoconf.mk.in
200@@ -190,6 +190,9 @@
201 NECKO_SMALL_BUFFERS = @NECKO_SMALL_BUFFERS@
202 NECKO_COOKIES = @NECKO_COOKIES@
203
204+MOZ_NATIVE_MYSPELL = @SYSTEM_MYSPELL@
205+MOZ_MYSPELL_LIBS = @MOZ_MYSPELL_LIBS@
206+
207 MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
208 MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
209 MOZ_NATIVE_PNG = @SYSTEM_PNG@
0d76b72b
ER
210--- mozilla/toolkit/content/inlineSpellCheckUI.js~ 2006-11-27 23:43:52.000000000 +0200
211+++ mozilla/toolkit/content/inlineSpellCheckUI.js 2007-03-05 00:41:13.030876638 +0200
212@@ -202,6 +166,10 @@
213 for (var i = 0; i < list.length; i ++) {
214 // get the display name for this dictionary
215 isoStrArray = list[i].split("-");
216+ // if we can't split by Mozilla locale names (en-US), try system separator (en_US)
217+ if (isoStrArray.length < 2) {
218+ isoStrArray = list[i].split("_");
219+ }
220 var displayName = "";
221 if (this.mLanguageBundle && isoStrArray[0]) {
222 try {
This page took 0.081408 seconds and 4 git commands to generate.