[mozvoikko] - Add a patch to fix compilation of mozVoikkoUtils.cpp when SYSTEM_LIBVOIKKO is defined - Remove t

Ville-Pekka Vainio vpv at fedoraproject.org
Thu Dec 9 10:12:15 UTC 2010


commit 6644d51d3e29a0d249bf94ff4a4d1bae2e625b63
Author: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>
Date:   Thu Dec 9 12:12:01 2010 +0200

    - Add a patch to fix compilation of mozVoikkoUtils.cpp when SYSTEM_LIBVOIKKO is
      defined
    - Remove the xpidl call, nsIMozvoikkoHelper.h is not needed after applying the
      patch

 ...kko-1.9.0-fix-utils-with-system-libvoikko.patch |   31 ++++++++++++++++++++
 mozvoikko.spec                                     |   13 +++++++-
 2 files changed, 42 insertions(+), 2 deletions(-)
---
diff --git a/mozvoikko-1.9.0-fix-utils-with-system-libvoikko.patch b/mozvoikko-1.9.0-fix-utils-with-system-libvoikko.patch
new file mode 100644
index 0000000..f261de2
--- /dev/null
+++ b/mozvoikko-1.9.0-fix-utils-with-system-libvoikko.patch
@@ -0,0 +1,31 @@
+diff -Naur mozvoikko-1.9.0.orig/src/mozVoikkoUtils.cpp mozvoikko-1.9.0/src/mozVoikkoUtils.cpp
+--- mozvoikko-1.9.0.orig/src/mozVoikkoUtils.cpp	2010-12-09 10:54:09.068458565 +0200
++++ mozvoikko-1.9.0/src/mozVoikkoUtils.cpp	2010-12-09 12:00:36.424449154 +0200
+@@ -31,9 +31,11 @@
+ #include <nsISupports.h>
+ #include <prerror.h>
+ 
++#ifndef SYSTEM_LIBVOIKKO
+ #include "nsIMozvoikkoHelper.h"
+ 
+ #define MOZVOIKKO_HELPER_CONTRACTID "@mozilla.org/mozvoikkohelper;1"
++#endif
+ 
+ #if defined(__linux__) || defined(__GLIBC__)
+ 
+@@ -197,6 +199,7 @@
+     return rv;
+ }
+ 
++#ifndef SYSTEM_LIBVOIKKO
+ /*
+  Doesn't return the mozvoikko library but a helper component's nsIFile
+  which is located at the same directory
+@@ -241,7 +244,6 @@
+     return NS_OK;
+ }
+ 
+-#ifndef SYSTEM_LIBVOIKKO
+ 
+ nsresult getMozVoikkoBaseDirs(nsIFile **libDir, nsIFile **dataDir)
+ {
diff --git a/mozvoikko.spec b/mozvoikko.spec
index 1ba153c..4ce37fa 100644
--- a/mozvoikko.spec
+++ b/mozvoikko.spec
@@ -11,7 +11,7 @@
 
 Name:           mozvoikko
 Version:        1.9.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Finnish Voikko spell-checker extension for Mozilla programs
 Group:          Applications/Internet
 License:        GPLv2+
@@ -24,7 +24,10 @@ URL:            http://voikko.sourceforge.net
 # svn export -r3591 https://voikko.svn.sourceforge.net/svnroot/voikko/trunk/mozvoikko mozvoikko-1.9.0
 # tar czvf mozvoikko-1.9.0.tar.gz mozvoikko-1.9.0
 Source0:        %{name}-%{version}.tar.gz
+# From upstream mailing list, will probably be applied to SVN at some point
 Patch0:         %{name}-%{version}-xulrunner-includes-linking.patch
+# Will send upstream
+Patch1:         %{name}-%{version}-fix-utils-with-system-libvoikko.patch
 
 # For xulrunner unstable
 BuildRequires:  gecko-devel-unstable >= %{gecko_ver}
@@ -45,10 +48,10 @@ spell-checker Voikko.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 
 %build
-%{_libdir}/xulrunner-2/xpidl -m header -I %{_datadir}/idl/xulrunner-sdk-2 -e src/nsIMozvoikkoHelper.h src/nsIMozvoikkoHelper.idl
 make -f Makefile.xulrunner extension-files CFLAGS="$RPM_OPT_FLAGS" \
   CC_LINK="g++ -shared -Wl,--no-undefined $RPM_OPT_FLAGS" %{?_smp_mflags}
 
@@ -69,6 +72,12 @@ chmod +x \
 
 
 %changelog
+* Thu Dec 09 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.9.0-2
+- Add a patch to fix compilation of mozVoikkoUtils.cpp when SYSTEM_LIBVOIKKO is
+  defined
+- Remove the xpidl call, nsIMozvoikkoHelper.h is not needed after applying the
+  patch
+
 * Wed Dec 08 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 1.9.0-1
 - Update to 1.9.0 to fix FTBFS bug #660944
 - Add a patch from the upstream mailing list to fix xulrunner includes and


More information about the scm-commits mailing list