Merge lp:~heikki-mantysaari/firefox-extensions/mozvoikko.ubuntu-0.9.5-1ubuntu2_to_1.0-1ubuntu2 into lp:~ubuntu-dev/firefox-extensions/mozvoikko.ubuntu

Proposed by Heikki Mäntysaari
Status: Merged
Approved by: Alexander Sack
Approved revision: 14
Merged at revision: not available
Proposed branch: lp:~heikki-mantysaari/firefox-extensions/mozvoikko.ubuntu-0.9.5-1ubuntu2_to_1.0-1ubuntu2
Merge into: lp:~ubuntu-dev/firefox-extensions/mozvoikko.ubuntu
Diff against target: None lines
To merge this branch: bzr merge lp:~heikki-mantysaari/firefox-extensions/mozvoikko.ubuntu-0.9.5-1ubuntu2_to_1.0-1ubuntu2
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2008-12-16 16:26:09 +0000
3+++ ChangeLog 2009-05-15 19:01:12 +0000
4@@ -1,3 +1,35 @@
5+2009-04-18 Harri Pitkänen <hatapitk@iki.fi>
6+
7+ * Increase version to 1.0.
8+
9+2009-02-20 Harri Pitkänen <hatapitk@iki.fi>
10+
11+ * Increase version to 0.9.7.
12+
13+2009-02-19 Andris Pavenis <andris.pavenis@iki.fi>
14+
15+ * Add support of Darwin_x86-gcc3 from
16+ http://verteksi.net/soks/2009/01/12/firefoxin-mozvoikko-lisaosa-ja-mac-os-x/
17+ * Do not use non-frozen interface nsIXULRuntime for getting target name.
18+ Generate source with needed constants instead while build.
19+ * Exclude some unneeded code when building with Xulrunner SDK.
20+
21+2009-02-19 Harri Pitkänen <hatapitk@iki.fi>
22+
23+ * Tag version 0.9.6.
24+
25+2009-01-28 Harri Pitkänen <hatapitk@iki.fi>
26+
27+ * Link with --as-needed.
28+
29+2009-01-28 Ville-Pekka Vainio <vpivaini@cs.helsinki.fi>
30+
31+ * Makefile cleanup.
32+
33+2009-01-27 Heikki Mäntysaari <heikki.mantysaari@linux.fi>
34+
35+ * Build fix from Ubuntu.
36+
37 2008-06-16 Harri Pitkänen <hatapitk@iki.fi>
38
39 * Remove maximum application version restrictions
40
41=== modified file 'Makefile.in'
42--- Makefile.in 2008-12-16 16:26:09 +0000
43+++ Makefile.in 2009-05-15 19:01:12 +0000
44@@ -28,7 +28,7 @@
45 MODULE = mozvoikko
46 XPI_NAME = mozvoikko
47 INSTALL_EXTENSION_ID = mozvoikko@mozilla.fi
48-XPI_PKGNAME = mozvoikko-$(MOZVOIKKO_VERSION)-$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI)
49+XPI_PKGNAME = mozvoikko-$(MOZVOIKKO_VERSION)-$(OS_ARCH)_$(TARGET_XPCOM_ABI)
50
51 DIST_FILES = README COPYING
52
53
54=== modified file 'README'
55--- README 2008-12-16 16:26:09 +0000
56+++ README 2009-05-15 19:01:12 +0000
57@@ -11,6 +11,7 @@
58 - 32-bit Windows (WINNT_x86-msvc)
59 - 32-bit Linux (Linux_ix86-gcc3)
60 - 64-bit Linux (Linux_x86_64-gcc3)
61+- 32-bit OS X 10.5 (Darwin_x86-gcc3)
62
63 Binary extension package may contain support one or more of these targets.
64 When building against xulrunner on Linux, more platforms may be supported.
65@@ -19,6 +20,6 @@
66 separate installation of Voikko: all needed files are included. Builds
67 against xulrunner will only work with system libvoikko.
68
69-FIXME: add homepage and similar related info.
70+For more information, see http://voikko.sourceforge.net
71
72 Andris Pavenis <andris.pavenis@iki.fi>
73
74=== modified file 'README.BUILD'
75--- README.BUILD 2008-12-16 16:26:09 +0000
76+++ README.BUILD 2009-05-15 19:01:12 +0000
77@@ -8,15 +8,15 @@
78 Supported versions:
79 ==================
80
81-Firefox: 3.0b1 or newer (one can really use firefox-a9pre newer than
82- 20.09.2007, but why to use version earlier than 3.0b1 any more)
83+Firefox: 3.0b1 or newer. Released versions of Firefox-3.0.X are OK. So
84+ should also alpha versions of next Firefox-3.1 (I have tested
85+ that extension works with them, but not that it builds in
86+ that case).
87
88-Thunderbird: 3.0a1pre newer than 20.09.2007
89+Thunderbird: 3.0 versions beginning with 3.0a1pre of than 20.09.2007.
90
91 SeaMonkey: 2.0a1pre newer than 20.09.2007 (for these versions install.js
92- script is no more needed, install.rdf is enough). I only verified
93- that Voikko spell-check works with SeaMonkey nightly builds
94- under Windows XP.
95+ script is no more needed, install.rdf is enough).
96
97 I wanted also to try Sunbird nightly builds, but there seems to be no way
98 using of using spell-check. So Sunbird is not supported.
99@@ -87,14 +87,8 @@
100 What I used for building mozvoikko
101 ==================================
102
103-I built Linux 32 bit version of mozvoikko under Slackware-11 Linux distribution (running in
104-KVM (http://kvm.qumranet.com/kvmwiki) virtual machine under Fedora Core x86_64 version and
105-tested built extension in following Linux distributions: Slackware-11, Debian 4r1, Fedora 8.
106-
107-64 bit Linux version were built under Debian 4r1 Etch amd64 version running in KVM virtual
108-machine under Fedora 8 and tested built extension in Debian 4r1 and Fedora 8.
109-
110-
111+I built both Linux 32 and 64-bit versions of mozvoikko in CentOS-5.1 Linux distribution
112+running in chroot on Fedora 9 x86_64 version.
113
114 Andris Pavenis <andris.pavenis@iki.fi>
115
116
117=== modified file 'README.xulrunner'
118--- README.xulrunner 2008-12-16 16:26:09 +0000
119+++ README.xulrunner 2009-05-15 19:01:12 +0000
120@@ -4,7 +4,8 @@
121 There are two build systems and two source packages
122 for mozvoikko. The original system is designed to be used
123 within Mozilla source tree and the second build system
124-uses Xulrunner SDK.
125+uses Xulrunner SDK on Linux distributions. Using binary packages
126+of Xulrunner from Mozilla may not work.
127
128 To build using Xulrunner SDK, install it and libvoikko
129 (preferably version 1.7 or later). Check the
130
131=== modified file 'debian/changelog'
132--- debian/changelog 2009-01-26 13:07:13 +0000
133+++ debian/changelog 2009-08-10 17:22:42 +0000
134@@ -1,3 +1,44 @@
135+mozvoikko (1.0-1ubuntu2) karmic; urgency=low
136+
137+ * drop firefox-3.0 and firefox-3.1 from Depends; add 3.0 to Breaks instead.
138+
139+ -- Alexander Sack <asac@ubuntu.com> Fri, 07 Aug 2009 10:43:15 +0200
140+
141+mozvoikko (1.0-1ubuntu1.xul191) karmic; urgency=low
142+
143+ * xulrunner-1.9.1 by default transition
144+ + see: https://blueprints.launchpad.net/ubuntu/+spec/desktop-karmic-firefox-3.5
145+ - bump minimal xulrunner-dev version
146+
147+ -- Alexander Sack <asac@ubuntu.com> Fri, 07 Aug 2009 10:42:03 +0200
148+
149+mozvoikko (1.0-1ubuntu1) karmic; urgency=low
150+
151+ * Merge new upstream release from Debian. Closes LP: #377049
152+ * Keep Ubuntu changes in debian/control
153+ * Add optional dependency to firefox-3.5.
154+ * Change conflict to abrowser (>= 3.6)
155+
156+ -- Heikki Mäntysaari <heikki.mantysaari@linux.fi> Fri, 15 May 2009 21:59:04 +0300
157+
158+mozvoikko (1.0-1) unstable; urgency=low
159+
160+ * New upstream release.
161+ * Change conflict to iceweasel (>= 3.6).
162+ * Change Standards-Version to 3.8.1
163+
164+ -- Heikki Mäntysaari <heikki.mantysaari@linux.fi> Mon, 11 May 2009 18:45:48 +0300
165+
166+mozvoikko (0.9.6-1) unstable; urgency=low
167+
168+ * New upstream release. Closes: #515505
169+ * debian/control:
170+ - Improve description (thanks to Teemu Likonen)
171+ - Add conflict to iceweasel (>= 3.2)
172+ * debian/rules: Remove useless LDFLAGS setting (thanks to Harri Pitkänen)
173+
174+ -- Heikki Mäntysaari <heikki.mantysaari@linux.fi> Wed, 18 Feb 2009 21:12:20 +0200
175+
176 mozvoikko (0.9.5-1ubuntu2) jaunty; urgency=low
177
178 * debian/patches/90_modify-makefile-to-use-pkg-config.patch:
179
180=== modified file 'debian/control'
181--- debian/control 2009-01-13 10:39:15 +0000
182+++ debian/control 2009-08-10 17:22:42 +0000
183@@ -3,14 +3,15 @@
184 Priority: optional
185 Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
186 XSBC-Original-Maintainer: Heikki Mäntysaari <heikki.mantysaari@linux.fi>
187-Build-Depends: debhelper (>= 5), xulrunner-dev (>= 1.9~rc2), libvoikko-dev
188+Build-Depends: debhelper (>= 5), xulrunner-dev (>= 1.9.1~), libvoikko-dev
189 Vcs-Bzr: https://code.launchpad.net/~ubuntu-dev/firefox-extensions/mozvoikko.ubuntu
190-Standards-Version: 3.8.0
191+Standards-Version: 3.8.1
192
193 Package: mozvoikko
194 Architecture: any
195-Depends: ${shlibs:Depends}, libvoikko1, voikko-fi, firefox-3.0 | firefox-3.1 | abrowser (>= 3) | iceweasel (>= 3)
196-Conflicts: iceweasel (>= 3.2), abrowser (>= 3.2)
197+Depends: ${shlibs:Depends}, libvoikko1, voikko-fi, firefox-3.5 | abrowser (>= 3) | iceweasel (>= 3)
198+Breaks: firefox-3.0
199+Conflicts: iceweasel (>= 3.6), abrowser (>= 3.6)
200 Description: Finnish spell-checker extension for Firefox
201 Finnish spell-checker extension for Firefox 3. Spell-checking
202 functionality is provided by Voikko - a free spellchecker
203
204=== removed directory 'debian/patches'
205=== removed file 'debian/patches/90_modify-makefile-to-use-pkg-config.patch'
206--- debian/patches/90_modify-makefile-to-use-pkg-config.patch 2009-01-13 19:30:44 +0000
207+++ debian/patches/90_modify-makefile-to-use-pkg-config.patch 1970-01-01 00:00:00 +0000
208@@ -1,28 +0,0 @@
209---- mozvoikko-0.9.5/src/Makefile.xulrunner 2009-01-13 20:18:49.000000000 +0200
210-+++ mozvoikko-0.9.5/src/Makefile.xulrunner 2009-01-13 20:20:19.000000000 +0200
211-@@ -14,23 +14,14 @@
212- # along with this program; if not, write to the Free Software
213- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
214-
215--XULRUNNER_SDK=$(shell pkg-config --variable=sdkdir libxul)
216--XULRUNNER_INCDIR=$(shell pkg-config --variable=includedir libxul)
217- NSPR_INCLUDES=$(shell pkg-config --cflags-only-I nspr)
218- DESTDIR=/usr/lib/firefox
219- CC=g++ -c
220- CC_LINK=g++ -shared -Wl,--no-undefined
221- include ../mozvoikko.config
222-
223--XULRUNNER_INCLUDES=-I$(XULRUNNER_SDK)/sdk/include -I$(XULRUNNER_SDK)/include \
224---I$(XULRUNNER_INCDIR)/xpcom \
225---I$(XULRUNNER_INCDIR)/spellchecker \
226---I$(XULRUNNER_INCDIR)/uconv \
227---I$(XULRUNNER_INCDIR)/unicharutil \
228---I$(XULRUNNER_INCDIR)/xulapp \
229---I$(XULRUNNER_INCDIR)/unstable
230--XULRUNNER_LIBS=-L$(XULRUNNER_SDK)/sdk/lib -L$(XULRUNNER_SDK)/sdk/bin \
231---Wl,-rpath-link,$(XULRUNNER_SDK)/sdk/bin -lxpcomglue_s -lxpcom -lnspr4
232-+XULRUNNER_INCLUDES=$(shell pkg-config --cflags libxul-unstable)
233-+XULRUNNER_LIBS=$(shell pkg-config --libs libxul-unstable)
234-
235- HEADERS=mozVoikko.hxx mozVoikkoSpell.hxx mozVoikkoUtils.hxx
236- OBJECTS=mozVoikko mozVoikkoSpell mozVoikkoUtils mozVoikkoSpellFactory
237
238=== modified file 'debian/rules'
239--- debian/rules 2009-01-13 19:30:44 +0000
240+++ debian/rules 2009-05-15 19:01:12 +0000
241@@ -22,17 +22,17 @@
242 touch configure-stamp
243
244
245-build: patch build-stamp
246+build: build-stamp
247
248 build-stamp: configure-stamp
249 dh_testdir
250
251 # Add here commands to compile the package.
252- LDFLAGS="-Wl, --as-needed" $(MAKE) -f Makefile.xulrunner extension-files
253+ $(MAKE) -f Makefile.xulrunner extension-files
254
255 touch $@
256
257-clean: unpatch
258+clean:
259 dh_testdir
260 dh_testroot
261 rm -f build-stamp configure-stamp
262@@ -81,32 +81,4 @@
263 dh_builddeb
264
265 binary: binary-indep binary-arch
266-
267-# Apply patches to the package
268-patch: patch-stamp
269-patch-stamp:
270- dh_testdir
271- @patches=debian/patches/*.patch; for patch in $$patches; do \
272- test -f $$patch || continue; \
273- echo "Applying $$patch"; \
274- patch -stuN -p1 < $$patch || exit 1; \
275- done
276- touch $@
277-
278-# Remove patches from the package
279-unpatch:
280- dh_testdir
281- @if test -f patch-stamp; then \
282- patches=debian/patches/*.patch; \
283- for patch in $$patches; do \
284- reversepatches="$$patch $$reversepatches"; \
285- done; \
286- for patch in $$reversepatches; do \
287- test -f $$patch || continue; \
288- echo "Reversing $$patch"; \
289- patch -suRf -p1 < $$patch || exit 1; \
290- done; \
291- rm -f patch-stamp; \
292- fi
293-
294 .PHONY: build clean binary-indep binary-arch binary install configure
295
296=== modified file 'mozvoikko.config'
297--- mozvoikko.config 2008-12-16 16:26:09 +0000
298+++ mozvoikko.config 2009-05-15 19:01:12 +0000
299@@ -17,16 +17,20 @@
300 #
301 # ***** END LICENSE BLOCK *****
302
303-MOZVOIKKO_VERSION = 0.9.5
304-
305-# Supported Firefox versions
306+MOZVOIKKO_VERSION = 1.0
307+
308+# Supported application versions.
309+# For official list see:
310+# https://addons.mozilla.org/en-US/firefox/pages/appversions
311+
312+# Supported Firefox versions.
313 MOZVOIKKO_FF_MIN = 3.0a9pre
314-MOZVOIKKO_FF_MAX = 3.0
315+MOZVOIKKO_FF_MAX = 3.6a1pre
316
317 # Supported Thunderbird versions
318 MOZVOIKKO_TB_MIN = 3.0a1pre
319-MOZVOIKKO_TB_MAX = 3.0a1
320+MOZVOIKKO_TB_MAX = 3.1a1pre
321
322 # Supported SeaMonkey versions
323 MOZVOIKKO_SM_MIN = 2.0a1pre
324-MOZVOIKKO_SM_MAX = 2.0a1
325+MOZVOIKKO_SM_MAX = 2.0b1pre
326
327=== modified file 'src/Makefile.in'
328--- src/Makefile.in 2008-12-16 16:26:09 +0000
329+++ src/Makefile.in 2009-05-15 19:01:12 +0000
330@@ -50,6 +50,7 @@
331 mozVoikkoSpellFactory.cpp \
332 mozVoikko.cpp \
333 mozVoikkoUtils.cpp \
334+ mozvoikko-target.cpp \
335 $(NULL)
336
337 include $(topsrcdir)/config/rules.mk
338@@ -58,10 +59,12 @@
339
340 WINNT_EXTRA_LIBS = intl.dll iconv.dll libglib-2.0-0.dll malaga.dll libvoikko-1.dll
341 LINUX_EXTRA_LIBS = libmalaga.so.7 libvoikko.so.1
342+DARWIN_EXTRA_LIBS = libmalaga.7.0.0.dylib libvoikko.1.7.0.dylib
343
344 MOZVOIKKO_WINNT_X86_MSVC_EXTRA_LIBS = $(patsubst %.dll, $(srcdir)/voikko-libs/WINNT_x86-msvc/%.dll, $(WINNT_EXTRA_LIBS))
345 MOZVOIKKO_LINUX_X86_GCC3_EXTRA_LIBS = $(patsubst lib%, $(srcdir)/voikko-libs/Linux_x86-gcc3/lib%, $(LINUX_EXTRA_LIBS))
346 MOZVOIKKO_LINUX_X86_64_GCC3_EXTRA_LIBS = $(patsubst lib%, $(srcdir)/voikko-libs/Linux_x86_64-gcc3/lib%, $(LINUX_EXTRA_LIBS))
347+MOZVOIKKO_DARWIN_X86_GCC3_EXTRA_LIBS = $(patsubst lib%, $(srcdir)/voikko-libs/Darwin_x86-gcc3/lib%, $(DARWIN_EXTRA_LIBS))
348 SUOMI_MALAGA_FILES = $(srcdir)/voikko-data/voikko-fi_FI.pro $(wildcard $(srcdir)/voikko-data/voikko-fi_FI.*_l)
349
350 ifeq ($(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI),WINNT_x86-msvc)
351@@ -76,6 +79,10 @@
352 MOZVOIKKO_EXTRA_LIBS = $(MOZVOIKKO_LINUX_X86_64_GCC3_EXTRA_LIBS)
353 endif
354
355+ifeq ($(OS_ARCH)_$(TARGET_XPCOM_ABI),Darwin_x86-gcc3)
356+MOZVOIKKO_EXTRA_LIBS = $(MOZVOIKKO_DARWIN_X86_GCC3_EXTRA_LIBS)
357+endif
358+
359 install.rdf: $(srcdir)/install.rdf.in
360 sed -e "s:@VERSION@:$(MOZVOIKKO_VERSION):g" \
361 -e "s:@FF_MIN@:$(MOZVOIKKO_FF_MIN):g" \
362@@ -84,9 +91,16 @@
363 -e "s:@TB_MAX@:$(MOZVOIKKO_TB_MAX):g" \
364 -e "s:@SM_MIN@:$(MOZVOIKKO_SM_MIN):g" \
365 -e "s:@SM_MAX@:$(MOZVOIKKO_SM_MAX):g" \
366- -e "s:@TARGET_PLATFORM@:$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI):g" \
367+ -e "s:@TARGET_PLATFORM@:$(OS_ARCH)_$(TARGET_XPCOM_ABI):g" \
368 $(srcdir)/install.rdf.in >install.rdf
369
370+mozvoikko-target.cpp: Makefile
371+ echo "#include \"mozVoikkoUtils.hxx\"" >$@
372+ echo "" >>$@
373+ echo "const char *mozvoikko_target_short = \"$(OS_ARCH)\";" >>$@
374+ echo "const char *mozvoikko_target_long = \"$(OS_ARCH)_$(TARGET_XPCOM_ABI)\";" >>$@
375+ echo "" >>$@
376+
377 libs::
378 echo "EXTRA_LIBS=$(MOZVOIKKO_EXTRA_LIBS)"
379
380@@ -97,9 +111,9 @@
381 $(NSINSTALL) install.rdf $(FINAL_TARGET)/
382
383 install-ext-libs:
384- mkdir -p $(FINAL_TARGET)/voikko/$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI)
385+ mkdir -p $(FINAL_TARGET)/voikko/$(OS_ARCH)_$(TARGET_XPCOM_ABI)
386 for file in $(MOZVOIKKO_EXTRA_LIBS); do \
387- $(NSINSTALL) $$file $(FINAL_TARGET)/voikko/$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI); \
388+ $(NSINSTALL) $$file $(FINAL_TARGET)/voikko/$(OS_ARCH)_$(TARGET_XPCOM_ABI); \
389 done
390
391 install-voikko-data:
392@@ -109,15 +123,15 @@
393 done
394
395 install-move:
396- rm -rf $(FINAL_TARGET)/platform/$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI)
397- mkdir -p $(FINAL_TARGET)/platform/$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI)
398- cp -rvL $(FINAL_TARGET)/components $(FINAL_TARGET)/platform/$(HOST_OS_ARCH)_$(TARGET_XPCOM_ABI)/
399+ rm -rf $(FINAL_TARGET)/platform/$(OS_ARCH)_$(TARGET_XPCOM_ABI)
400+ mkdir -p $(FINAL_TARGET)/platform/$(OS_ARCH)_$(TARGET_XPCOM_ABI)
401+ cp -RvL $(FINAL_TARGET)/components $(FINAL_TARGET)/platform/$(OS_ARCH)_$(TARGET_XPCOM_ABI)/
402 rm -rf $(FINAL_TARGET)/components
403
404 check-extra-files: $(MOZVOIKKO_EXTRA_LIBS) $(SUOMI_MALAGA_FILES)
405
406 check-all-extra-files: $(MOZVOIKKO_WINNT_X86_MSVC_EXTRA_LIBS) $(MOZVOIKKO_LINUX_X86_GCC3_EXTRA_LIBS) \
407- $(MOZVOIKKO_LINUX_X86_64_GCC3_EXTRA_LIBS) $(SUOMI_MALAGA_FILES)
408+ $(MOZVOIKKO_LINUX_X86_64_GCC3_EXTRA_LIBS) $(MOZVOIKKO_DARWIN_X86_GCC3_EXTRA_LIBS) $(SUOMI_MALAGA_FILES)
409
410 clean::
411 rm -f install.rdf s-extra-libs
412
413=== modified file 'src/Makefile.xulrunner'
414--- src/Makefile.xulrunner 2008-12-16 16:26:09 +0000
415+++ src/Makefile.xulrunner 2009-05-15 19:01:12 +0000
416@@ -1,4 +1,4 @@
417-# Copyright (C) 2008 Harri Pitkänen <hatapitk@iki.fi>
418+# Copyright (C) 2008 - 2009 Harri Pitkänen <hatapitk@iki.fi>
419 #
420 # This program is free software; you can redistribute it and/or
421 # modify it under the terms of the GNU General Public License
422@@ -14,23 +14,13 @@
423 # along with this program; if not, write to the Free Software
424 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
425
426-XULRUNNER_SDK=$(shell pkg-config --variable=sdkdir libxul)
427-XULRUNNER_INCDIR=$(shell pkg-config --variable=includedir libxul)
428-NSPR_INCLUDES=$(shell pkg-config --cflags-only-I nspr)
429 DESTDIR=/usr/lib/firefox
430 CC=g++ -c
431 CC_LINK=g++ -shared -Wl,--no-undefined
432 include ../mozvoikko.config
433
434-XULRUNNER_INCLUDES=-I$(XULRUNNER_SDK)/sdk/include -I$(XULRUNNER_SDK)/include \
435--I$(XULRUNNER_INCDIR)/xpcom \
436--I$(XULRUNNER_INCDIR)/spellchecker \
437--I$(XULRUNNER_INCDIR)/uconv \
438--I$(XULRUNNER_INCDIR)/unicharutil \
439--I$(XULRUNNER_INCDIR)/xulapp \
440--I$(XULRUNNER_INCDIR)/unstable
441-XULRUNNER_LIBS=-L$(XULRUNNER_SDK)/sdk/lib -L$(XULRUNNER_SDK)/sdk/bin \
442--Wl,-rpath-link,$(XULRUNNER_SDK)/sdk/bin -lxpcomglue_s -lxpcom -lnspr4
443+XULRUNNER_INCLUDES=$(shell pkg-config --cflags libxul-unstable)
444+XULRUNNER_LIBS=$(shell pkg-config --libs libxul-unstable)
445
446 HEADERS=mozVoikko.hxx mozVoikkoSpell.hxx mozVoikkoUtils.hxx
447 OBJECTS=mozVoikko mozVoikkoSpell mozVoikkoUtils mozVoikkoSpellFactory
448@@ -41,11 +31,10 @@
449 ifndef CFLAGS
450 CFLAGS=-O2
451 endif
452-CC_FLAGS=$(CFLAGS) -Wall -Werror -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fshort-wchar -fPIC
453-CC_INCLUDES=$(NSPR_INCLUDES) $(XULRUNNER_INCLUDES) \
454--include mozilla-config.h -include xpcom-config.h
455+CC_FLAGS=$(CFLAGS) -Wall -Werror -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fPIC
456+CC_INCLUDES=$(XULRUNNER_INCLUDES) -include mozilla-config.h -include xpcom-config.h
457 CC_DEFINES=-DSYSTEM_LIBVOIKKO
458-CC_LIBS=$(XULRUNNER_LIBS)
459+CC_LIBS=-Wl,--as-needed $(XULRUNNER_LIBS)
460
461 .PHONY: all clean xpi extension-files install-unpacked
462
463
464=== modified file 'src/mozVoikkoUtils.cpp'
465--- src/mozVoikkoUtils.cpp 2008-12-16 16:26:09 +0000
466+++ src/mozVoikkoUtils.cpp 2009-05-15 19:01:12 +0000
467@@ -40,10 +40,18 @@
468 "libvoikko.so.1"
469 };
470
471-const unsigned numPreloadedLibs = sizeof(preloadLibNames)/sizeof(*preloadLibNames);
472-
473 const char * libvoikkoName = "libvoikko.so.1";
474
475+#elif defined(XP_MACOSX)
476+
477+const char *preloadLibNames[] =
478+{
479+ "libmalaga.7.0.0.dylib",
480+ "libvoikko.1.7.0.dylib"
481+};
482+
483+const char * libvoikkoName = "libvoikko.1.7.0.dylib";
484+
485 #elif defined(_WIN32)
486
487
488@@ -56,8 +64,6 @@
489 "libvoikko-1.dll"
490 };
491
492-const unsigned numPreloadedLibs = sizeof(preloadLibNames)/sizeof(*preloadLibNames);
493-
494 const char * libvoikkoName = "libvoikko-1.dll";
495
496 #else
497@@ -66,6 +72,8 @@
498
499 #endif
500
501+const unsigned numPreloadedLibs = sizeof(preloadLibNames)/sizeof(*preloadLibNames);
502+
503 #define CH(statement, errRetVal) do \
504 { \
505 nsresult rv = statement; \
506@@ -243,42 +251,30 @@
507 return NS_OK;
508 }
509
510+#ifndef SYSTEM_LIBVOIKKO
511+
512 nsresult getMozVoikkoBaseDirs(nsIFile **libDir, nsIFile **dataDir)
513 {
514 nsresult rv;
515 nsCOMPtr<nsIFile> mozVoikkoLibName;
516 nsCOMPtr<nsIFile> currDir, parentDir;
517 nsCOMPtr<nsIFile> tmpDir, tmpFile;
518- nsCString leafName, tmp;
519+ nsCString leafName;
520 nsCString shortTargetName;
521 nsCString fullTargetName;
522
523- // Get platform name (eg. WINNT_x86-msvc or Linux_x86_64-gcc3).
524- // WARNING: not frozen interface nsIXULRuntime is being used.
525- // String shortTargetName will contain only target OS name (like WINNT)
526- // String fullTargetName will contain additionally XPCOMAPI_NAME
527-
528- nsCOMPtr<nsIXULRuntime> runtime = do_GetService("@mozilla.org/xre/app-info;1", &rv);
529-
530- NS_ENSURE_SUCCESS(rv, rv);
531-
532- rv = runtime->GetOS(shortTargetName);
533- NS_ENSURE_SUCCESS(rv, rv);
534-
535- fullTargetName = shortTargetName;
536-
537- rv = runtime->GetXPCOMABI(tmp);
538- if (NS_SUCCEEDED(rv))
539- {
540- fullTargetName.Append("_");
541- fullTargetName.Append(tmp);
542- }
543-
544+ shortTargetName = mozvoikko_target_short;
545+ fullTargetName = mozvoikko_target_long;
546+
547 // Get path of mozvoikko shared library.
548 // mozVoikkoSpell::registerExtension() has saved it using nsICategory manager
549 // when registrating the extension
550 rv = getMozVoikkoLibrary(getter_AddRefs(mozVoikkoLibName));
551- NS_ENSURE_SUCCESS(rv, rv);
552+ if (NS_FAILED(rv))
553+ {
554+ logMessage("mozvoikko: Failed to get nsICategoryManager entry");
555+ return rv;
556+ }
557
558 // Extract directory part
559 rv = mozVoikkoLibName->GetParent(getter_AddRefs(currDir));
560@@ -374,6 +370,8 @@
561 return NS_OK;
562 }
563
564+#endif
565+
566 PreloadedLibraries::PreloadedLibraries(nsIFile *libDir, const char **names, unsigned numLibs) :
567 ok(false), numLibs(numLibs), libraries(NULL)
568 {
569
570=== modified file 'src/mozVoikkoUtils.hxx'
571--- src/mozVoikkoUtils.hxx 2008-12-16 16:26:09 +0000
572+++ src/mozVoikkoUtils.hxx 2009-05-15 19:01:12 +0000
573@@ -74,10 +74,6 @@
574 const nsACString &subDirName,
575 const nsACString &fileName);
576
577-nsresult loadExtraLibraries(int numLibs, const char **names);
578-
579-nsresult getMozVoikkoBaseDirs(nsIFile **libDir, nsIFile **dataDir);
580-
581 class PreloadedLibraries
582 {
583 bool ok;
584@@ -91,4 +87,20 @@
585 operator bool() const { return ok; }
586 };
587
588+#ifndef SYSTEM_LIBVOIKKO
589+
590+nsresult loadExtraLibraries(int numLibs, const char **names);
591+
592+nsresult getMozVoikkoBaseDirs(nsIFile **libDir, nsIFile **dataDir);
593+
594+// 2 string constants provided by autogenerated file mozvoikko-target.cpp
595+//
596+// They contains extension target string for example
597+// "Linux" and "Linux_x86_64-gcc3" for Linux on x86_64.
598+//
599+extern const char *mozvoikko_target_short;
600+extern const char *mozvoikko_target_long;
601+
602+#endif /* SYSTEM_LIBVOIKKO */
603+
604 #endif

Subscribers

People subscribed via source and target branches