[arch-commits] Commit in xulrunner/trunk (2 files)

Jan de Groot jgc at archlinux.org
Sun Feb 7 10:49:07 UTC 2010


    Date: Sunday, February 7, 2010 @ 05:49:06
  Author: jgc
Revision: 67478

Fix dictionary lookup by just symlinking /usr/share/myspell (FS#18134)

Modified:
  xulrunner/trunk/PKGBUILD
Deleted:
  xulrunner/trunk/100-system-hunspell-corrections.patch

---------------------------------------+
 100-system-hunspell-corrections.patch |  116 --------------------------------
 PKGBUILD                              |    7 +
 2 files changed, 6 insertions(+), 117 deletions(-)

Deleted: 100-system-hunspell-corrections.patch
===================================================================
--- 100-system-hunspell-corrections.patch	2010-02-07 10:47:57 UTC (rev 67477)
+++ 100-system-hunspell-corrections.patch	2010-02-07 10:49:06 UTC (rev 67478)
@@ -1,116 +0,0 @@
---- ./extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig	2008-02-15 19:21:21.000000000 +0000
-+++ ./extensions/spellcheck/hunspell/src/mozHunspell.cpp	2008-02-15 19:23:20.000000000 +0000
-@@ -63,6 +63,9 @@
- #include "nsISimpleEnumerator.h"
- #include "nsIDirectoryEnumerator.h"
- #include "nsIFile.h"
-+#ifdef MOZ_NATIVE_HUNSPELL
-+#include "nsILocalFile.h"
-+#endif
- #include "nsDirectoryServiceUtils.h"
- #include "nsDirectoryServiceDefs.h"
- #include "mozISpellI18NManager.h"
-@@ -307,7 +310,16 @@
-     return;
- 
-   nsCOMPtr<nsIFile> dictDir;
--  rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY,
-+  #ifdef MOZ_NATIVE_HUNSPELL
-+    nsCOMPtr<nsILocalFile>  localFile;
-+    rv = NS_NewNativeLocalFile(nsDependentCString("/usr/share/myspell"),PR_TRUE, getter_AddRefs(localFile));
-+    if (localFile && NS_SUCCEEDED(rv)) {
-+      localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(dictDir));
-+      LoadDictionariesFromDir(dictDir);
-+    }
-+    else {
-+  #endif
-+    rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY,
-                    NS_GET_IID(nsIFile), getter_AddRefs(dictDir));
-   if (NS_SUCCEEDED(rv)) {
-     LoadDictionariesFromDir(dictDir);
-@@ -332,6 +344,9 @@
-       LoadDictionariesFromDir(appDir);
-     }
-   }
-+#ifdef MOZ_NATIVE_HUNSPELL
-+  }
-+#endif
- 
-   nsCOMPtr<nsISimpleEnumerator> dictDirs;
-   rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
---- ./extensions/spellcheck/src/Makefile.in.orig	2008-02-15 19:25:58.000000000 +0000
-+++ ./extensions/spellcheck/src/Makefile.in	2008-02-15 19:28:36.000000000 +0000
-@@ -63,9 +63,16 @@
- 		  txtsvc \
- 		  uconv \
- 		  unicharutil \
-+		  xulapp \
- 		  $(NULL)
- 
--CPPSRCS		= \
-+ifdef MOZ_NATIVE_HUNSPELL
-+CPPSRCS         += mozHunspell.cpp
-+ifdef MOZ_XUL_APP
-+CPPSRCS         += mozHunspellDirProvider.cpp
-+endif
-+endif
-+CPPSRCS		+= \
- 		mozSpellCheckerFactory.cpp	\
- 		mozSpellChecker.cpp		\
- 		mozPersonalDictionary.cpp	\
-@@ -80,8 +87,14 @@
- SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX)
- LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src
- else
-+ifndef MOZ_NATIVE_HUNSPELL
- SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX)
- LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src
-+else
-+LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS) \
-+		-DMOZ_NATIVE_HUNSPELL \
-+		$(NULL)
-+endif
- endif
- 
- EXTRA_DSO_LDOPTS = \
-@@ -96,3 +112,18 @@
- LOCAL_INCLUDES += \
- 	-I$(topsrcdir)/xpcom/io \
- 	$(NULL)
-+
-+ifdef MOZ_NATIVE_HUNSPELL
-+export:: $(srcdir)/../hunspell/src/mozHunspell.cpp
-+	$(INSTALL) $(srcdir)/../hunspell/src/mozHunspell.* .
-+GARBAGE += mozHunspell.$(OBJ_SUFFIX) mozHunspell.cpp
-+clean::
-+	rm -f mozHunspell.*
-+ifdef MOZ_XUL_APP
-+export:: $(srcdir)/../hunspell/src/mozHunspellDirProvider.cpp
-+	$(INSTALL) $(srcdir)/../hunspell/src/mozHunspellDirProvider.* .
-+GARBAGE += mozHunspellDirProvider.$(OBJ_SUFFIX) mozHunspellDirProvider.cpp
-+clean::
-+	rm -f mozHunspellDirProvider.*
-+endif
-+endif
---- ./extensions/spellcheck/Makefile.in.orig	2008-02-15 19:23:39.000000000 +0000
-+++ ./extensions/spellcheck/Makefile.in	2008-02-15 19:24:34.000000000 +0000
-@@ -42,13 +42,19 @@
- include $(DEPTH)/config/autoconf.mk
- 
- MODULE		= spellchecker
--DIRS		= idl locales
-+ifndef MOZ_NATIVE_HUNSPELL
-+DIRS		= idl locales
-+else
-+DIRS		= idl
-+endif
- 
- ifeq (camino,$(MOZ_BUILD_APP))
- DIRS		+= osxspell
- else
-+ifndef MOZ_NATIVE_HUNSPELL
- DIRS		+= hunspell
- endif
-+endif
- 
- DIRS += src

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-02-07 10:47:57 UTC (rev 67477)
+++ PKGBUILD	2010-02-07 10:49:06 UTC (rev 67478)
@@ -47,15 +47,20 @@
   #Force installation to the same path for every version
   patch -Np1 -i "${srcdir}/xulrunner-version.patch" || return 1
 
+  #Fix compile with libpng 1.4
   patch -Np0 -i "${srcdir}/xulrunner-png14.patch" || return 1
 
   unset CFLAGS
   unset CXXFLAGS
-  export LDFLAGS="${LDFLAGS} -Wl,-rpath,/usr/lib/xulrunner-1.9.2"
 
   make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS" || return 1
   make -j1 DESTDIR="${pkgdir}" install || return 1
 
+  #Remove included dictionaries, add symlink to system myspell path.
+  #Note: this will cause file conflicts when users have installed dictionaries in the old location
+  rm -rf "${pkgdir}/usr/lib/xulrunner-1.9.2/dictionaries
+  ln -sf /usr/share/myspell "${pkgdir}/usr/lib/xulrunner-1.9.2/dictionaries"
+
   # add xulrunner library path to ld.so.conf
   install -d ${pkgdir}/etc/ld.so.conf.d
   echo "/usr/lib/xulrunner-$pkgver" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf




More information about the arch-commits mailing list