]> git.pld-linux.org Git - packages/firefox.git/blob - mozilla-firefox-myspell.patch
- extracted from firefox_2.0+0dfsg-0ubuntu3.diff.gz
[packages/firefox.git] / mozilla-firefox-myspell.patch
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
176 @@ -3840,6 +3870,19 @@
177  
178  fi # SKIP_LIBRARY_CHECKS
179  
180 +dnl system MySpell Support
181 +dnl ========================================================
182 +MOZ_ARG_ENABLE_BOOL(system-myspell,
183 +[  --enable-system-myspell   Use system myspell (located with pkgconfig)],
184 +    SYSTEM_MYSPELL=1 )
185 +
186 +if test -n "$SYSTEM_MYSPELL"; then
187 +    PKG_CHECK_MODULES(MOZ_MYSPELL, myspell)
188 +fi
189 +
190 +AC_SUBST(SYSTEM_MYSPELL)
191 +AC_SUBST(MOZ_MYSPELL_LIBS)
192 +
193  dnl ========================================================
194  dnl Java SDK support
195  dnl ========================================================
196 --- firefox-2.0+0dfsg.orig/config/autoconf.mk.in
197 +++ firefox-2.0+0dfsg/config/autoconf.mk.in
198 @@ -190,6 +190,9 @@
199  NECKO_SMALL_BUFFERS = @NECKO_SMALL_BUFFERS@
200  NECKO_COOKIES = @NECKO_COOKIES@
201  
202 +MOZ_NATIVE_MYSPELL = @SYSTEM_MYSPELL@
203 +MOZ_MYSPELL_LIBS = @MOZ_MYSPELL_LIBS@
204 +
205  MOZ_NATIVE_ZLIB        = @SYSTEM_ZLIB@
206  MOZ_NATIVE_JPEG        = @SYSTEM_JPEG@
207  MOZ_NATIVE_PNG = @SYSTEM_PNG@
208 #--- firefox-2.0+0dfsg.orig/debian/firefox.links
209 #+++ firefox-2.0+0dfsg/debian/firefox.links
210 #@@ -0,0 +1,16 @@
211 #+/usr/lib/firefox/firefox /usr/bin/mozilla-firefox
212 #+/usr/lib/firefox/firefox /usr/bin/firefox
213 #+/usr/lib/firefox /usr/lib/mozilla-firefox
214 #+/usr/share/man/man1/firefox.1.gz /usr/share/man/man1/mozilla-firefox.1.gz
215 #+/usr/share/pixmaps/firefox.png /usr/share/pixmaps/mozilla-firefox.png 
216 #+/etc/firefox/pref /usr/share/firefox/defaults/syspref
217 #+/etc/firefox/profile /usr/share/firefox/defaults/profile
218 #+
219 #+/usr/share/firefox/searchplugins /usr/lib/firefox/searchplugins
220 #+/usr/share/firefox/icons /usr/lib/firefox/icons
221 #+/usr/share/firefox/res /usr/lib/firefox/res
222 #+/usr/share/firefox/chrome /usr/lib/firefox/chrome
223 #+/usr/share/firefox/defaults /usr/lib/firefox/defaults
224 #+/usr/share/firefox/greprefs /usr/lib/firefox/greprefs
225 #+
226 #+/usr/share/myspell/dicts /usr/lib/firefox/dictionaries
This page took 0.052679 seconds and 4 git commands to generate.