summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2008-09-08 14:31:14 +0000
committerPetr Mladek <pmladek@suse.cz>2008-09-08 14:31:14 +0000
commit4b9f2a136eb5d883d0bcfa8bfe1652ac3fbb2948 (patch)
tree560c09aedf42c9d8c4a5e20607fe0417d68fbef7
parentb29028c74f7870f2086f2f3d8df25c02c8c64a9d (diff)
Allow to preinstall some dictionaries even with OOo-3.
* bin/ooinstall, bin/install-dictionaries: allow to preinstall some dictionaries even with OOo-3.0; they are put into $OOINSTDIR/basis$VERSION/share/dictionaries; we use it on SLED10 for hyphen and thesaurus dictionaries * bin/install-dict.in, bin/package-ooo, bin/Makefile.am: bin the obsolete install-dict script; dictionary.lst is not longer needed * ooo-build/distro-configs/SUSE-10.1.conf.in: configure the dictionaries for SLED10; add --with-external-dict-dir=/usr/share/myspell --with-external-hyph-dir=@libdir@/@OOOINSTALLDIRNAME@/basis@OOO_VERSION@/share/dictionaries --with-external-thes-dir=@libdir@/@OOOINSTALLDIRNAME@/basis@OOO_VERSION@/share/dictionaries --with-system-dicts
-rw-r--r--NEWS20
-rw-r--r--bin/Makefile.am1
-rwxr-xr-xbin/install-dict.in265
-rwxr-xr-xbin/install-dictionaries23
-rwxr-xr-xbin/ooinstall6
-rwxr-xr-xbin/package-ooo5
-rw-r--r--distro-configs/SUSE-10.1.conf.in4
-rw-r--r--doc/split.txt15
8 files changed, 52 insertions, 287 deletions
diff --git a/NEWS b/NEWS
index 7e0b26771..13378a342 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,23 @@
+ooo-build-3.0.0.3.1:
+
+ +features:
+ + support ooo300-m5 (3.0rc1) [Rene, Petr]
+ + enabled again WW-like input-fields and checkboxes (Florian)
+ + disabled problematic stuff:
+ + move cell notes with anchored cells (i#59745, bnc#n#422677) [Kohei]
+ + skip data in hidden cells when rendering charts (bnc#404190,
+ i#81209) [Kohei]
+ + external range names [Kohei]
+ + layout stuff [Jan]
+ + bug fixes:
+ + annoying pdf permission checks [Thorsten]
+ + wrong read-out of fontconfig flags (bnc#407958) [Thorsten]
+ + Win32 bits:
+ + lots installer and patchability fixes [Tor]
+ + build bits:
+ + updated scsover to the snapshot 2008-09-08 [Kohei]
+ + temporary globally disabled report builder [Petr]
+
ooo-build-3.0.0.3:
+ features:
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 2421ad5c4..5e92b8757 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -14,7 +14,6 @@ script_files = \
fix-deps \
generate-bash-completion \
help-font-munge \
- install-dict.in \
install-dictionaries \
install-mono \
install-artwork \
diff --git a/bin/install-dict.in b/bin/install-dict.in
deleted file mode 100755
index 600c03d25..000000000
--- a/bin/install-dict.in
+++ /dev/null
@@ -1,265 +0,0 @@
-#!/usr/bin/perl -w
-
-#*****************************************************************************
-#
-# install-dict - Script to update dictionaries configuration for OpenOffice.org
-#
-# Initial version by: Federico Mena Quintero <federico@ximian.com>
-# Future improvements by: Michael Meeks <michael.meeks@novell.com>
-# Petr Mladek <pmladek@suse.cz>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#*****************************************************************************
-
-use strict;
-use File::Temp qw/ tempfile /;
-
-my $Debug = $ENV{'OOO_DEBUG'};
-my $DefaultDictDir = '@OOINSTBASE@/share/dict/ooo';
-
-if ($Debug && $DefaultDictDir =~ /^\@/) {
- $DefaultDictDir = '/usr/lib/ooo-2.1/share/dict/ooo';
-}
-
-my $DefaultSharedDictDir = "/usr/share/myspell";
-
-
-sub usage() {
- print "This tool symlinks OpenOffice.org dictionaries from the given shared location\n" .
- "to the OpenOffice.org home. It also updates the related config file.\n\n" .
-
- "Usage:\n" .
- "\tinstall-dict [-r] [-s shared_dict_dir] [ooo_dict_dir]\n\n" .
-
- "Options:\n" .
- "\t-r just remove unused symlinks and update config file\n" .
- "\t-s allow to redefine the default directory for shared dictionaries\n";
-}
-
-# simply remove all invalid symlinks from the given directory
-sub remove_unused_symlinks {
- my $dir = shift;
- my $dirhandle;
- my $fname;
-
- opendir ($dirhandle, $dir) || die "can't opendir $dir: $!";
- while ($fname = readdir ($dirhandle)) {
- unless (-r "$dir/$fname") {
- (unlink "$dir/$fname") || die "can't unlink $dir/$fname: $!";
- }
- }
- closedir ($dirhandle);
-}
-
-# create the symlink if it does already not exist
-sub update_symlink($$) {
- my ($target, $link_name) = @_;
- unless (-r "$link_name") {
- symlink ("$target", "$link_name") || die "can't crate symlink $link_name -> $target: $!";
- }
-}
-
-# create symlinks from the OOo tree to the shared dictionaries
-sub link_shared_dict_files {
- my ($shared_dict_dir, $dict_dir) = @_;
- return unless -d $shared_dict_dir;
-
- my $shared_dicts = get_dicts ("$shared_dict_dir");
- foreach my $dict (keys %$shared_dicts) {
- if ($dict =~ m/^[a-z]+(_[A-Z]+)?$/) {
- update_symlink("$shared_dict_dir/$dict.dic", "$dict_dir/$dict.dic");
- update_symlink("$shared_dict_dir/$dict.aff", "$dict_dir/$dict.aff");
- } elsif ($dict =~ m/^hyph_[a-z]+(_[A-Z]+)?$/) {
- update_symlink("$shared_dict_dir/$dict.dic", "$dict_dir/$dict.dic");
- } elsif ($dict =~ m/^th_[a-z]+(_[A-Z]+)?(_v2)?$/) {
- update_symlink("$shared_dict_dir/$dict.dat", "$dict_dir/$dict.dat");
- update_symlink("$shared_dict_dir/$dict.idx", "$dict_dir/$dict.idx");
- }
- }
-}
-
-# change extesion of a filename
-sub change_extension {
- my ($filename, $ext, $newext) = @_;
-
- $filename =~ s/^(.*)\.($ext)$/$1\.$newext/g;
- return $filename;
-}
-
-# get list of installed dictionaries
-sub get_dicts($)
-{
- my $dir = shift;
- my $dirhandle;
- my $fname;
- my %dicts = ();
-
- opendir ($dirhandle, $dir) || die "can't opendir $dir: $!";
- while ($fname = readdir ($dirhandle)) {
- if ($fname =~ m/^([a-z]+(_[A-Z]+)?)\.dic$/) {
- if (-f "$dir/" . change_extension ($fname, "dic", "aff")) {
- $dicts{$1}=0;
- }
- } elsif ($fname =~ m/^(hyph_[a-z]+(_[A-Z]+)?)\.dic$/) {
- $dicts{$1}=0;
- } elsif ($fname =~ m/^(th_[a-z]+(_[A-Z]+)?(_v2)?)\.dat$/) {
- if (-f "$dir/" . change_extension ($fname, "dat", "idx")) {
- $dicts{$1}=0;
- }
- }
- }
- closedir ($dirhandle);
- return \%dicts;
-}
-
-
-# just read the old config file in an array
-sub read_config_file($) {
- my $config_filename = shift;
- my @config =();
-
- -e $config_filename || return;
- open (CONFIG_FILE, $config_filename) || die "can't open $config_filename for reading: $!\n";
-
- while (my $line = <CONFIG_FILE>) {
- chomp $line;
- push @config, $line;
- }
- close CONFIG_FILE;
- return \@config;
-}
-
-sub write_heared_config($) {
- my $CONFIG_FILE = shift;
-
- print $CONFIG_FILE '# List of All Dictionaries to be Loaded by OpenOffice' . "\n" .
- '# ---------------------------------------------------' . "\n" .
- '# Each Entry in the list have the following space delimited fields' . "\n" .
- '#' . "\n" .
- '# Field 1: Entry Type "DICT" - spellchecking dictionary' . "\n" .
- '# "HYPH" - hyphenation dictionary' . "\n" .
- '# "THES" - thesaurus files' . "\n" .
- '#' . "\n" .
- '# Field 2: Language code from Locale "en" or "de" or "pt" ...' . "\n" .
- '#' . "\n" .
- '# Field 3: Country Code from Locale "US" or "GB" or "PT"' . "\n" .
- '#' . "\n" .
- '# Field 4: Root name of file(s) "en_US" or "hyph_de" or "th_en_US"' . "\n" .
- '# (do not add extensions to the name)' . "\n\n";
-}
-
-# write the old config file back but remove unused or invalid lines
-sub write_fixed_old_config($$$) {
- my ($dicts_ref, $old_config_ref, $CONFIG_FILE) = @_;
-
- foreach my $line (@$old_config_ref) {
- if ($line =~ m/^\s*DICT\s*([a-z]+)\s+([A-Z]+)\s+([a-z]+(_[A-Z]+)?)\s*$/) {
- if (defined $dicts_ref->{$3}) {
- # dictionary file exists, so the config line can be used
- print $CONFIG_FILE "$line\n";
- # mark this dictionary configured
- $dicts_ref->{$3}=1;
- }
- } elsif ($line =~ m/^\s*HYPH\s*([a-z]+)\s+([A-Z]+)\s+(hyph_[a-z]+(_[A-Z]+)?)\s*$/) {
- if (defined $dicts_ref->{$3}) {
- # dictionary file exists, so the config line can be used
- print $CONFIG_FILE "$line\n";
- # mark this dictionary configured
- $dicts_ref->{$3}=1;
- }
- } elsif ($line =~ m/^\s*THES\s*([a-z]+)\s+([A-Z]+)\s+(th_[a-z]+(_[A-Z]+)?(_v2)?)\s*$/) {
- if (defined $dicts_ref->{$3}) {
- # dictionary file exists, so the config line can be used
- print $CONFIG_FILE "$line\n";
- # mark this dictionary configured
- $dicts_ref->{$3}=1;
- }
- } elsif ($line =~ m/^\s*\#.*/ || $line =~ m/^\s*$/) {
- print $CONFIG_FILE "$line\n";
- }
- }
-}
-
-# add entry for the not yet configured dictionaries
-sub write_missing_config($$) {
-
- my ($dicts_ref, $CONFIG_FILE) = @_;
-
- foreach my $dict (sort(keys %$dicts_ref)) {
- next if ($dicts_ref->{$dict});
-
- if ($dict =~ m/^([a-z]+)_([A-Z]+)$/) {
- print $CONFIG_FILE "DICT $1 $2 $1_$2\n";
- } elsif ($dict =~ m/^hyph_([a-z]+)_([A-Z]+)$/) {
- print $CONFIG_FILE "HYPH $1 $2 hyph_$1_$2\n";
- } elsif ($dict =~ m/^th_([a-z]+)_([A-Z]+)(_v2)?$/) {
- if (defined $3) {
- print $CONFIG_FILE "THES $1 $2 th_$1_$2$3\n";
- } else {
- print $CONFIG_FILE "THES $1 $2 th_$1_$2\n";
- }
- }
- }
-}
-
-sub write_config_file($$$) {
- my ($config_filename, $dicts_ref, $old_config_ref) = @_;
- my $CONFIG_FILE;
-
- my $write_header=0;
- $write_header=1 unless (-f $config_filename);
- chmod 0644, $config_filename unless (! -f $config_filename);
- open ($CONFIG_FILE, ">$config_filename") || die "can't open $config_filename for writing: $!\n";
-
- write_heared_config($CONFIG_FILE) if ($write_header);
- write_fixed_old_config($dicts_ref, $old_config_ref, $CONFIG_FILE);
- write_missing_config($dicts_ref, $CONFIG_FILE);
-
- close CONFIG_FILE;
-}
-
-
-######################################################################
-########################### MAIN #############################
-######################################################################
-
-my $SharedDictDir = $DefaultSharedDictDir;
-my $DictDir = $DefaultDictDir;
-my $doLink=1;
-
-while (my $a = shift) {
- if ("$a" eq '--help') {
- usage;
- exit 0;
- } elsif ("$a" eq '-r') {
- $doLink=0;
- } elsif ("$a" eq '-s') {
- $a = shift;
- defined $a && -d "$a" || die "Error: Parameter for the -s option must be a directory.\n";
- $SharedDictDir="$a";
- } else {
- -d "$a" || die "Error: \"$a\" is not an existing directory\n";
- $DictDir="$a"
- }
-}
-
-my $ConfigFilename = $DictDir . "/dictionary.lst";
-
-remove_unused_symlinks ($DictDir);
-link_shared_dict_files ($SharedDictDir, $DictDir) if ($doLink);
-
-my $DictsRef = get_dicts ($DictDir);
-my $OldConfigRef = read_config_file($ConfigFilename);
-write_config_file($ConfigFilename, $DictsRef, $OldConfigRef);
diff --git a/bin/install-dictionaries b/bin/install-dictionaries
index 3c58afbb8..1e7ff4d1f 100755
--- a/bin/install-dictionaries
+++ b/bin/install-dictionaries
@@ -8,12 +8,7 @@
if test "z$1" != "z"; then
DICTDIR=$1;
else
- DICTDIR=$OOINSTDIR/share/dict/ooo
-fi
-
-if (! test -d $DICTDIR); then
- echo "Cannot find $DICTDIR; make sure you installed OOo first"
- exit 1;
+ DICTDIR=$OOINSTDIR/basis$VERSION/share/dictionaries
fi
DICTDIRBASE=`echo $DICTDIR | sed "s|^$OODESTDIR||"`
@@ -136,7 +131,7 @@ DICTS="hyph_bg_BG
install_dic()
{
- test -f $1/$2 && mv $1/$2 $DICTDIR/ && echo "$DICTDIRBASE/$2" >>$DICTFILELIST
+ test -f $1/$2 && mv $1/$2 $DICTDIR/ && echo "$DICTDIRBASE/$2" >>$DICTFILELIST && dic_installed=true
}
install_doc()
@@ -161,15 +156,17 @@ else
DICTFILELIST=/dev/null
fi
+dic_installed=false
doc_installed=false
for DICT in $DICTS ; do
if test -f $SRCDIR/$DICT.tar.bz2 ; then
echo "Unpacking $DICT dictionary..."
+ mkdir -m 755 -p $DICTDIR
mkdir -m 755 -p $DOCDIR/dictionaries
TMPDIR=`mktemp -d /tmp/ooo-build.dict.XXXXXX`
tar -xjf $SRCDIR/$DICT.tar.bz2 -C $TMPDIR || exit 1;
chmod 644 $TMPDIR/*.* || exit 1;
-
+
# dictionaries
DICTNAME=$(echo $DICT | sed s/thes/th/)
install_dic $TMPDIR $DICTNAME.dic
@@ -193,11 +190,15 @@ for DICT in $DICTS ; do
fi
done
+if $dic_installed ; then
+ echo "%dir $DICTDIRBASE" >>$DICTFILELIST
+fi
+
if $doc_installed ; then
echo "%dir $DOCDIRBASE" >>$DICTFILELIST
echo "%dir $DOCDIRBASE/dictionaries" >>$DICTFILELIST
fi
-echo "Creating dictionary.lst..."
-$TOOLSDIR/bin/install-dict.in $DICTDIR
-test -f $DICTDIR/dictionary.lst && echo "$DICTDIRBASE/dictionary.lst" >>$DICTFILELIST
+#echo "Creating dictionary.lst..."
+#$TOOLSDIR/bin/install-dict.in $DICTDIR
+#test -f $DICTDIR/dictionary.lst && echo "$DICTDIRBASE/dictionary.lst" >>$DICTFILELIST
diff --git a/bin/ooinstall b/bin/ooinstall
index dd89356fb..c1b8e5241 100755
--- a/bin/ooinstall
+++ b/bin/ooinstall
@@ -179,11 +179,9 @@ if ($do_link) {
`$configure_vars{SOLARENV}/bin/linkoo $path $configure_vars{SRC_ROOT}`;
}
-if ( -e "$path/share/dict/ooo" ) {
print "Installing extra dictionaries...\n";
- system ("cd $setup_vars{TOOLSDIR}/bin ; " .
- "sh ./install-dictionaries $path/share/dict/ooo") && die "Failed to install dictionaries: $!";
-}
+system ("cd $setup_vars{TOOLSDIR}/bin ; " .
+ "sh ./install-dictionaries $path/basis$setup_vars{VERSION}/share/dictionaries") && die "Failed to install dictionaries: $!";
print "Building galleries...\n";
system ("cd $setup_vars{TOOLSDIR}/bin ; " .
diff --git a/bin/package-ooo b/bin/package-ooo
index 9dd0670cb..59abe428d 100755
--- a/bin/package-ooo
+++ b/bin/package-ooo
@@ -136,10 +136,6 @@ fi
mkdir -p $OOINSTDIR/basis$VERSION/program
-echo "Building $OOINSTDIR/install-dict";
-sed -e "s|@OOINSTBASE@|$OOINSTBASE|g" $TOOLSDIR/bin/install-dict.in >| "$OOBUILDDIR/install-dict" || exit 1;
-install_script $OOBUILDDIR/install-dict $OOINSTDIR/install-dict
-
echo "Building $OOINSTDIR/basis$VERSION/program/java-set-classpath";
sed -e "s|@OOINSTBASE@|$OOINSTBASE|g" $TOOLSDIR/bin/java-set-classpath.in >| "$OOBUILDDIR/java-set-classpath" || exit 1;
install_script $OOBUILDDIR/java-set-classpath $OOINSTDIR/basis$VERSION/program/java-set-classpath
@@ -535,7 +531,6 @@ if test "z$VENDORNAME" != "zDebian" ; then
$OOINSTBASE/basis$VERSION/share/template/en-US/officorr/project-proposal.ott" >> gid_Module_Langpack_Basis_en_US
echo "%dir $OOINSTBASE
- $OOINSTBASE/install-dict
$OOINSTBASE/basis$VERSION/program/java-set-classpath" > gid_Module_Root_Hack
diff --git a/distro-configs/SUSE-10.1.conf.in b/distro-configs/SUSE-10.1.conf.in
index adf9b7a90..68114f908 100644
--- a/distro-configs/SUSE-10.1.conf.in
+++ b/distro-configs/SUSE-10.1.conf.in
@@ -9,11 +9,15 @@
--enable-opengl
--enable-ogltrans
--with-ant-home=/usr
+--with-external-dict-dir=/usr/share/myspell
+--with-external-hyph-dir=@libdir@/@OOOINSTALLDIRNAME@/basis@OOO_VERSION@/share/dictionaries
+--with-external-thes-dir=@libdir@/@OOOINSTALLDIRNAME@/basis@OOO_VERSION@/share/dictionaries
--with-jdk-home=$JAVA_HOME
--with-system-boost
--with-system-cairo
--with-system-curl
--with-system-db
+--with-system-dicts
--with-system-expat
--with-system-libxslt
--with-system-mozilla=xulrunner
diff --git a/doc/split.txt b/doc/split.txt
index 4b06b9f7d..f6001a2b7 100644
--- a/doc/split.txt
+++ b/doc/split.txt
@@ -84,7 +84,12 @@ TODO:
+ FIXME: sdk, sdk-doc
+ still needed?
-
+
+ + FIXME: split helpcontent sources into separate source tarball
+ + can and should be built separately
+ + move main_transform.xsl to l0n-extras
+ + move hid.lst to ??? (where the testtool is being built)
+
+ FIXME: check base package
+ are the database drivers needed for writer as well?
@@ -97,6 +102,14 @@ TODO:
basis3.0/share/registry/modules/org/openoffice/Office/Common/Common-base.xcu
adds the Database menu entry (IMHO)
+ + FIXME: the system of inst-$piece, post-inst-$piece, file-list-$piece
+ is a bit over-engineered (Petr's work); one piece-specific
+ script should be enough and more clear; it should be done close the end
+ (before fixing permissions)
+
+ + rework inst-artwork to install icons into the installed sovler
+ + merge file-list-* and post-inst-*
+
+ FIXME: the all_filelist.txt we use in copyexcept should
list both source & dest files, and handle links, by adding
symlinks to the system-installed library for lib symlinks