incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1306443 - in /incubator/ooo/trunk/main: configure.in extensions.lst set_soenv.in solenv/bin/modules/ExtensionsLst.pm
Date Wed, 28 Mar 2012 15:54:49 GMT
Author: af
Date: Wed Mar 28 15:54:49 2012
New Revision: 1306443

URL: http://svn.apache.org/viewvc?rev=1306443&view=rev
Log:
Added dictionary support for da,no,ro,ru,sl.  Added configure switch --enable-bundled-dictionaries.

Modified:
    incubator/ooo/trunk/main/configure.in
    incubator/ooo/trunk/main/extensions.lst
    incubator/ooo/trunk/main/set_soenv.in
    incubator/ooo/trunk/main/solenv/bin/modules/ExtensionsLst.pm

Modified: incubator/ooo/trunk/main/configure.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/configure.in?rev=1306443&r1=1306442&r2=1306443&view=diff
==============================================================================
--- incubator/ooo/trunk/main/configure.in (original)
+++ incubator/ooo/trunk/main/configure.in Wed Mar 28 15:54:49 2012
@@ -337,6 +337,12 @@ AC_ARG_WITH(bundled-extension-blobs,
 #                          are to be bundled as pre-registered extensions. Make sure to only
bundle
 #                          extensions which can be installed without requiring a license
dialog
 #],,)
+AC_ARG_ENABLE(bundled-dictionaries,
+[  --enable-bundled-dictionaries  Download dictionaries (spelling, hyphenation, thesaurus)
+                           according to main/extensions.lst and bundle them.
+],,)
+
+# Remove the following switches when not in release mode.
 AC_ARG_WITH(system-dicts,
 [  --with-system-dicts    Use dictionaries from system paths- Specify
                          them via --with-{dict,hyph,thes}-path=/path
@@ -351,6 +357,9 @@ AC_ARG_WITH(external-hyph-dir,
 AC_ARG_WITH(external-thes-dir,
 [  --with-external-thes-dir Specify external thesaurus dir
 ],,)
+# End of remove.
+
+
 AC_ARG_WITH(system-libs,
 [  --with-system-libs      Use libs already on system -- enables all
                           --with-system-* flags except mozilla and
@@ -5318,6 +5327,19 @@ else
 fi
 AC_SUBST(ENABLE_HYPHEN)
 
+
+#dnl ===================================================================
+#dnl Check whether we are allowed to bundle dictionaries and whether
+#dnl hunspell is available.
+#dnl ===================================================================
+ENABLE_BUNDLED_DICTIONARIES=
+if test "x$enable_bundled_dictionaries" != "xno" -a "x$ENABLE_HUNSPELL" = "xYES"; then
+   ENABLE_BUNDLED_DICTIONARIES=YES
+fi
+AC_SUBST(ENABLE_BUNDLED_DICTIONARIES)
+
+
+
 dnl ===================================================================
 dnl Checking for mythes
 dnl ===================================================================

Modified: incubator/ooo/trunk/main/extensions.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/extensions.lst?rev=1306443&r1=1306442&r2=1306443&view=diff
==============================================================================
--- incubator/ooo/trunk/main/extensions.lst (original)
+++ incubator/ooo/trunk/main/extensions.lst Wed Mar 28 15:54:49 2012
@@ -60,26 +60,45 @@
     87123666ecce441b075c0170fa58690c http://sourceforge.net/projects/aoo-extensions/files/1665/1/dict-en-nz-2008-12-03.oxt/download
"dict-en-nz-2008-12-03.oxt"
 
 # English (en_US) dictionary
-[ language=en.* || language==nl_NL ]
+[ language=en.* || language==nl || language==ru ]
     e2eab80772ab1aa09716954219351a80 http://sourceforge.net/projects/aoo-extensions/files/1470/1/en_US.oxt/download
"en_US.oxt"
 
-
 # German dictionary.
-[ language=de || language=de-DE || language=nl_NL ]
+[ language=de || language=de_DE || language=nl || language=ru ]
     eb3d3397b8034c7fce6e0d78daf914ca http://sourceforge.net/projects/aoo-extensions/files/1075/10/dict-de_DE-frami_2011-06-03.oxt/download
"dict-de_DE-frami_2011-06-03.oxt"
 
 # Dutch dictionary.
-[ language=nl_NL ]
+[ language=nl ]
     5c0de383ef649cffefc128cfb36b4d43 http://sourceforge.net/projects/aoo-extensions/files/1456/6/nl-dict-v2.00g.oxt/download
"nl-dict-v2.00g.oxt"
 
 # French dictionary.
-[ language=fr_FR || language=nl_NL ]
+[ language=fr || language=nl ]
     47ca39e385b02839c24a5d953495cb98 http://sourceforge.net/projects/aoo-extensions/files/3554/5/ooo-dictionnaire-fr-moderne-v4.2.oxt/download
"ooo-dictionnaire-fr-moderne-v4.2.oxt"
 
 # Italian dictionary.
-[ language=it_IT ]
+[ language=it ]
     c71fa1e7a047cf4efdb27027e3f75a16 http://sourceforge.net/projects/aoo-extensions/files/1204/10/dict-it.oxt/download
"dict-it.oxt"
 
 # Spanish dictionary.
-[ language=es_ES ]
+[ language=es ]
     5798f4a61b0f95db3d62eabcb80670eb http://sourceforge.net/projects/aoo-extensions/files/1657/1/es_ES.oxt/download
"es_ES.oxt"
+
+# Danish dictionary.
+[ language=da ]
+    b38cba04b6513dd42b031199d617cce6 http://sourceforge.net/projects/aoo-extensions/files/1388/12/DanskeSynonymer.oxt/download
"DanskeSynonymer.oxt"
+
+# Norwegian dictionary.
+[ language=no ]
+    b4971332a09292af069783b089b9014b http://svn.skolelinux.org/websvn/filedetails.php?repname=skolelinux&path=%2Ftrunk%2Fi18n%2Fopenoffice%2Futils%2Fdictionary-no-NO-1.0.oxt&rev=0&sc=0
"dictionary-no-NO-1.0.oxt"
+
+# Romanian dictionary.
+[ language=ro ]
+    b05941b975afc0321df0cd48a4d295c8 http://sourceforge.net/projects/aoo-extensions/files/1392/8/dict-ro.1.5.oxt/download
"dict-ro.1.5.oxt"
+
+# Russian dictionary.
+[ language=ru ]
+    a63512bc487d7378bbe2e44f59d5ef45 http://sourceforge.net/projects/aoo-extensions/files/3233/2/dict_ru_RU-0.3.6.oxt/download
"dict_ru_RU-0.3.6.oxt"
+
+# Slovenian dictionary.
+[ language=sl ]
+    33eb80b84d163e00298bc2c98ddd81cb http://sl.openoffice.org/test/pack-sl.oxt "pack-sl.oxt"

Modified: incubator/ooo/trunk/main/set_soenv.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/set_soenv.in?rev=1306443&r1=1306442&r2=1306443&view=diff
==============================================================================
--- incubator/ooo/trunk/main/set_soenv.in (original)
+++ incubator/ooo/trunk/main/set_soenv.in Wed Mar 28 15:54:49 2012
@@ -1864,6 +1864,7 @@ ToFile( "GRAPHITE_CFLAGS",   "@GRAPHITE_
 ToFile( "VC_STANDARD",       "@VC_STANDARD@",      "e" );
 ToFile( "BUNDLED_EXTENSION_BLOBS", "@BUNDLED_EXTENSION_BLOBS@", "e");
 ToFile( "BUNDLED_PREREG_EXTENSIONS", "@BUNDLED_PREREG_EXTENSIONS@", "e");
+ToFile( "ENABLE_BUNDLED_DICTIONARIES", "@ENABLE_BUNDLED_DICTIONARIES@", "e");
 ToFile( "SYSTEM_DICTS",      "@SYSTEM_DICTS@",     "e");
 ToFile( "DICT_SYSTEM_DIR",   "@DICT_SYSTEM_DIR@",  "e");
 ToFile( "HYPH_SYSTEM_DIR",   "@HYPH_SYSTEM_DIR@",  "e");

Modified: incubator/ooo/trunk/main/solenv/bin/modules/ExtensionsLst.pm
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/modules/ExtensionsLst.pm?rev=1306443&r1=1306442&r2=1306443&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/modules/ExtensionsLst.pm (original)
+++ incubator/ooo/trunk/main/solenv/bin/modules/ExtensionsLst.pm Wed Mar 28 15:54:49 2012
@@ -67,6 +67,9 @@ our @EXPORT = qw(DownloadExtensions GetE
 # Number of the line in extensions.lst that is currently being processed.
 my $LineNo = 0;
 
+# Set to 1 to get a more verbose output, the default is 0.
+my $Debug = 0;
+
 
 =head3 Prepare
     Check that some environment variables are properly set and then return the file name
@@ -493,7 +496,7 @@ sub Download (@)
                 }
                 else
                 {
-                    unlink($temporary_filename);
+                    unlink($temporary_filename) if ! $Debug;
                     die "downloaded file has the wrong md5 checksum: $file_md5 instead of
$md5sum";
                 }
             }
@@ -521,9 +524,17 @@ sub Download (@)
 =cut
 sub DownloadExtensions ()
 {
-    my $full_file_name = Prepare();
-    my @urls = ParseExtensionsLst($full_file_name, []);
-    Download(@urls);
+    if (defined $ENV{'ENABLE_BUNDLED_DICTIONARIES'}
+         && $ENV{'ENABLE_BUNDLED_DICTIONARIES'} eq "YES")
+    {
+        my $full_file_name = Prepare();
+        my @urls = ParseExtensionsLst($full_file_name, []);
+        Download(@urls);
+    }
+    else
+    {
+        print "bundling of dictionaries is disabled.\n";
+    }
 }
 
 
@@ -548,20 +559,28 @@ sub GetExtensionList ($@)
     my $protocol_selector = shift;
     my @language_list = @_;
 
-    my $full_file_name = Prepare();
-    my @urls = ParseExtensionsLst($full_file_name, \@language_list);
-
-    my @result = ();
-    for my $entry (@urls)
+    if (defined $ENV{'ENABLE_BUNDLED_DICTIONARIES'}
+         && $ENV{'ENABLE_BUNDLED_DICTIONARIES'} eq "YES")
     {
-        my ($protocol, $name, $URL, $md5sum) = @{$entry};
-        if ($protocol =~ /^$protocol_selector$/)
+        my $full_file_name = Prepare();
+        my @urls = ParseExtensionsLst($full_file_name, \@language_list);
+
+        my @result = ();
+        for my $entry (@urls)
         {
-            push @result, $name;
+            my ($protocol, $name, $URL, $md5sum) = @{$entry};
+            if ($protocol =~ /^$protocol_selector$/)
+            {
+                push @result, $name;
+            }
         }
-    }
 
-    return @result;
+        return @result;
+    }
+    else
+    {
+        # Bundling of dictionaires is disabled.
+    }
 }
 
 



Mime
View raw message