ooo-build r14509 - in trunk: . bin bin/piece distro-configs patches/dev300



Author: pmladek
Date: Fri Nov 14 20:12:58 2008
New Revision: 14509
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14509&view=rev

Log:
2008-11-14  Petr Mladek  <pmladek suse cz>

	* bin/localize-ooo: clean up; process the files "any-name-<lang>.sdf"
	  in the same for-cycle to avoid the crazy cut&paste; add support for
	  the split build
	* bin/piece/install-bootstrap, bin/piece/build-generic:
	* patches/dev300/piece-transex3.diff, patches/dev300/apply:
	  allow to apply the extra localization in the split build
	* bin/ooo-sdf-split: helped script to split the extra localizations
	  (sdf files) for each piece

	* patches/dev300/piece-desktop-avoid-user-conf-symlinks.diff:
	* patches/dev300/apply: the noarch packages adds compat symlinks of
	  the preset user configuration; the real files should be copied to
	  the user configuration; the symlinked system files are read-only
	  otherwise

	* patches/dev300/piece-services.diff:
	* bin/piece/post-inst-postprocess:
	* bin/piece/file-list-ure:
	  enable and fix pyuno compoent registration
	
	* bin/piece/file-list-ure:
	* bin/install-mono:
	  mono

	* bin/piece/file-list-libs_core:
	  add Writer-javamail.xcu to mailmerge subpackage

	* distro-configs/SUSE.conf.in: add --with-system-lpsolve; available
	  since openSUSE-11.1/SLED11



Added:
   trunk/bin/ooo-sdf-split   (contents, props changed)
   trunk/patches/dev300/piece-desktop-avoid-user-conf-symlinks.diff
   trunk/patches/dev300/piece-transex3.diff
Modified:
   trunk/ChangeLog
   trunk/bin/install-mono
   trunk/bin/localize-ooo
   trunk/bin/piece/build-generic
   trunk/bin/piece/file-list-libs_core
   trunk/bin/piece/file-list-ure
   trunk/bin/piece/install-bootstrap
   trunk/bin/piece/post-inst-postprocess
   trunk/distro-configs/SUSE.conf.in
   trunk/patches/dev300/apply
   trunk/patches/dev300/piece-services.diff

Modified: trunk/bin/install-mono
==============================================================================
--- trunk/bin/install-mono	(original)
+++ trunk/bin/install-mono	Fri Nov 14 20:12:58 2008
@@ -5,7 +5,15 @@
 #
 # See setup for user tweakables.
 #
-. ./setup
+if test -n "$OO_TOOLSDIR" ; then
+    # split build
+    . $OO_TOOLSDIR/setup
+    SRCDIR=$OO_TOOLSDIR/../src
+    split_build=yes
+else
+    . ./setup
+    split_build=
+fi
 
 # check if install path redefined
 test -n "$1" && OOINSTDIR="$1"
@@ -23,7 +31,11 @@
 fi
 
 # filelist for the GAC stuff
-MONOGACFILELIST=$BUILDDIR/mono_gac
+if test "$split_build" = "yes" ; then
+    MONOGACFILELIST=files-mono.txt
+else
+    MONOGACFILELIST=$OODESTDIR/mono_gac
+fi
 rm -f $MONOGACFILELIST
 
 # install the pkgconfig file
@@ -33,6 +45,7 @@
 mkdir -p $OODESTDIR${LIBDIRBASE}/pkgconfig/
 sed -e "s|@OOOINSTALLDIRNAME@|$OOOINSTALLDIRNAME|g" \
     $SRCDIR/mono-ooo.pc.in >${OODESTDIR}${LIBDIRBASE}/pkgconfig/mono-$OOOINSTALLDIRNAME.pc
+test "$split_build" = "yes" && echo ${LIBDIRBASE}/pkgconfig/mono-$OOOINSTALLDIRNAME.pc >>$MONOGACFILELIST
 
 # extra dlls config files
 for dll in cli_uno_bridge.dll ; do

Modified: trunk/bin/localize-ooo
==============================================================================
--- trunk/bin/localize-ooo	(original)
+++ trunk/bin/localize-ooo	Fri Nov 14 20:12:58 2008
@@ -3,13 +3,59 @@
 #
 # See setup for user tweakables.
 #
-. ./setup
-. $OOBUILDDIR/*.[sS]et.sh
-. ./setup
+if test -n "$OO_TOOLSDIR" ; then
+    # split build
+    . $OO_TOOLSDIR/piece/sys-setup
+    . $OO_TOOLSDIR/setup
+    OOBUILDDIR=`pwd`
+    SRCDIR=$OO_TOOLSDIR/../src
+    SRCDIR_PIECE=$OOBUILDDIR/ooo-build/sdf
+    TOOLSDIR=$OO_TOOLSDIR/..
+    OOO_LANGS_LIST="$OO_LANGS"
+    ALL_LANGS=`sed -n -e "s|^[[:space:]]*completelangiso=\(.*\)\(en-US \)\(.*\)$|\2\1\3|p" $SOLARENV/inc/postset.mk`
+    split_build=yes
+else
+    . ./setup
+    . $OOBUILDDIR/*.[sS]et.sh
+    . ./setup
+    SRCDIR_PIECE=
+    split_build=no
+fi
 
 export LC_ALL='C';
 
-if ! which localize 2>/dev/null 2>&1 ; then
+merge_localization()
+{
+    sdf_file="$1"
+    langcode="$2"
+    split_build="$3"
+    sdf_file_filter="$4"
+
+    # filter the sdf file in the split build
+    if test "$split_build" = "yes" ; then
+	sdf_file_filtered=`mktemp /tmp/localize-ooo-sdf-filtered-XXXXXX`
+	grep -f "$sdf_file_filter" "$sdf_file" >$sdf_file_filtered
+    else
+	sdf_file_filtered="$sdf_file"
+    fi
+
+    # merge the localization
+    if test `wc -l $sdf_file_filtered | cut -d " " -f 1` -eq 0 ; then
+	echo "Warning: Ignoring empty extra localization $(basename $sdf_file)..."
+    else
+	echo "Merging extra localization $(basename $sdf_file)..."
+	localize -m -x -l $langcode -f $sdf_file_filtered || exit 1;
+	echo ""
+    fi
+
+    # remove temp file
+    if test "$split_build" = "yes" ; then
+	rm $sdf_file_filtered
+    fi
+}
+
+# build the localize tool if needed (only in the non-split build)
+if test "$split_build" != "yes" && ! which localize >/dev/null 2>&1 ; then
     echo 'Building localize stuff at first...'
     cd $OOBUILDDIR/transex3
     perl $SOLARENV/bin/build.pl --all $EXTRA_BUILD_FLAGS $EXTRA_DMAKE_FLAGS || exit 1;
@@ -20,78 +66,92 @@
     find $OOBUILDDIR -type f -name "localize.sdf" -exec chmod 644 {} \;
 fi
 
-# What extra localizations are avilable as $SRCDIR/GSI_*.sdf and are not
-# already merged?
-extra_trans_stamp=$TOOLSDIR/stamp/build.extra.translations
-extra_trans=`find $SRCDIR -name "GSI_*.sdf"`
-extra_trans_langs=
-for file in $extra_trans ; do
+# will filter the sdf files in the split-build
+if test "$split_build" = "yes" ; then
+    sdf_file_filter=`mktemp /tmp/localize-ooo-sdf-filter-XXXXXX`
+    find $OOBUILDDIR -mindepth 1 -maxdepth 1 -type d -printf "^%P\t\n" >$sdf_file_filter
+fi
+
+# stamp files
+if test "$split_build" = "yes" ; then
+    stamp_dir=$OOBUILDDIR/ooo-build/stamp
+    mkdir -p $stamp_dir
+else
+    stamp_dir=$TOOLSDIR/stamp
+fi
+# already applied sdf files
+extra_trans_stamp=$stamp_dir/build.extra.translations
+# lang-specific sdf files
+extra_trans_lang_list=$stamp_dir/build.extra.translations.lang.list
+
+# call grep only once to speed up the search from 22s to 2s
+all_langs_pattern=`mktemp /tmp/localize-ooo-XXXXXX`
+for lang in $ALL_LANGS ; do
+    echo "$lang.sdf\$" >>$all_langs_pattern
+done
+
+# lang-specific sdf files
+# it looks for files "any-name-<lang>.sdf", e.g. "gallery-hu.sdf"
+hungarian_updated=
+for sdf_file in `find $SRCDIR $DEB_GSIDIR $TOOLSDIR/po $SRCDIR_PIECE -name "*.sdf"` ; do
+
+    # check if it is lang-specific file
+    echo "$sdf_file" | grep -q -f "$all_langs_pattern" || continue;
+
+    # mention it in specific sdf file list
+    grep -q "^$sdf_file$" $extra_trans_lang_list 2>/dev/null || echo $sdf_file >>$extra_trans_lang_list
+
     # skip this localization if it is already merged
-    grep -q "^$file$" $extra_trans_stamp 2>/dev/null && continue;
+    grep -q "^$sdf_file$" $extra_trans_stamp 2>/dev/null && continue;
+
     # find if this localization is required
-    trans_lang=`echo $file | sed "s|^$SRCDIR/GSI_\(.*\).sdf\$|\1|"`
+    langcode=
     for lang in $OOO_LANGS_LIST ; do
-	if echo "$lang" | grep -q "$trans_lang" ; then
-	    extra_trans_langs="$trans_lang $extra_trans_langs"
-	    break;
-	fi
+	echo "$sdf_file" | grep -q "$lang.sdf$" && langcode=$lang
     done
-done	    
+    test -z "$langcode" && continue;
 
-for langcode in $extra_trans_langs ; do
-    # merge the available localization
-    echo "Merging extra \"$langcode\" localization..."
-    $SOLARVERSION/$INPATH/bin/localize -m -x -l $langcode -f $SRCDIR/GSI_$langcode.sdf || exit 1;
-    echo ""
-    DEB_GSIFILE=$DEB_GSIDIR/GSI_$langcode.sdf
-    if test "z$DEB_GSIDIR" != "z" && test -f $DEB_GSIFILE; then
-	echo "Merging imported \"$langcode\" localization..."
-	$SOLARVERSION/$INPATH/bin/localize -m -x -l $langcode -f $DEB_GSIFILE || exit 1;
-	echo ""
-    else
-	DEB_GSIFILE=
-    fi
+    merge_localization "$sdf_file" "$langcode" "$split_build" "$sdf_file_filter"
 
     # workaround for i#56622, n#210797
-    if echo "$langcode" | grep -q "hu" ; then
-        echo "Fixing Hungarian strings: OOo vs. SO"
-        for file in `find $OOBUILDDIR -type f -name "localize.sdf"` ; do
-    	    $TOOLSDIR/bin/a2az.pl $file >$file.a2az
-	    mv $file.a2az $file
-	done
-    fi
+    test "$langcode" = "hu" && hungarian_updated=yes
 
     # copy help auxiliary files if they are missing but the localized strings are available
-    if grep -q "^helpcontent2" $SRCDIR/GSI_$langcode.sdf $DEB_GSIFILE &&
-       test ! -d $OOBUILDDIR/helpcontent2/source/auxiliary/$langcode ; then
-        echo "Copying English help auxiliary files for \"$langcode\"..."
-	cd $OOBUILDDIR/helpcontent2/source/auxiliary
-	cp -r en-US $langcode
-	perl -pi -e "s|Language=en-US|Language=$langcode|" $langcode/*.cfg
+    if test -d "$OOBUILDDIR/helpcontent2" ; then
+	if grep -q "^helpcontent2" $sdf_file &&
+	    test ! -d $OOBUILDDIR/helpcontent2/source/auxiliary/$langcode ; then
+	    echo "Copying English help auxiliary files for \"$langcode\"..."
+	    cd $OOBUILDDIR/helpcontent2/source/auxiliary
+	    cp -r en-US $langcode
+	    perl -pi -e "s|Language=en-US|Language=$langcode|" $langcode/*.cfg
+	fi
     fi
-    # make stamp for this localization
-    echo $SRCDIR/GSI_$langcode.sdf >>$extra_trans_stamp
-done
 
-# apply translations for ooo-build-specific strings
-for langcode in $OOO_LANGS_LIST ; do
-    sdf_file=$TOOLSDIR/po/ooo-build-$langcode.sdf
-    test -f $sdf_file || continue
-    grep -q "^$sdf_file$" $extra_trans_stamp 2>/dev/null && continue;
-    echo "Merging ooo-build strings translation $(basename $sdf_file) ..."
-    $SOLARVERSION/$INPATH/bin/localize -m -x -l all -f $sdf_file || exit 1;
+    # make stamp for this localization
     echo "$sdf_file" >>$extra_trans_stamp
 done
 
-# apply all extra string fixes and updates
+# workaround for i#56622, n#210797
+if test "$hungarian_updated" = "yes" ; then
+    echo "Fixing Hungarian strings: OOo vs. SO"
+    for file in `find $OOBUILDDIR -type f -name "localize.sdf"` ; do
+        $TOOLSDIR/bin/a2az.pl $file >$file.a2az
+        mv $file.a2az $file
+    done
+fi
+
+# apply lang-non-specific sdf files
+# the files "any-name-<lang>.sdf" are ignored because they are already processed above
 for fn in $SRCDIR/sdf/*.sdf; do
     [ -f "$fn" ] || continue
+    # skip if already processed as lang-specific files
+    grep -q "^$fn$" $extra_trans_lang_list 2>/dev/null && continue;
+    # skip if already merged
     grep -q "^$fn$" $extra_trans_stamp 2>/dev/null && continue;
     if echo "$fn" | grep -q patches && ! echo $OOO_LANGS | grep -q "$(echo $(basename $fn) | cut -d'-' -f1)"; then continue; fi
     if echo "$fn" | grep -q gallery && ! echo $OOO_LANGS | grep -q "$(echo $(basename $fn) | cut -d'-' -f1)"; then continue; fi
     if echo "$fn" | grep -q hu-fix && ! echo $OOO_LANGS | grep -q hu; then continue; fi
-    echo "Merging extra localization $(basename $fn) ..."
-    $SOLARVERSION/$INPATH/bin/localize -m -x -l all -f $fn || exit 1;
+    merge_localization "$fn" "all" "$split_build" "$sdf_file_filter" || exit 1;
     echo "$fn" >>$extra_trans_stamp
 done
 
@@ -99,7 +159,7 @@
     for fn in $DEB_GSIDIR/*all*.sdf; do
 	[ -f "$fn" ] || continue
 	echo "Merging extra localization $(basename $fn) ..."
-	$SOLARVERSION/$INPATH/bin/localize -m -x -l all -f $fn || exit 1;
+	merge_localization "$fn" "all" "$split_build" "$sdf_file_filter" || exit 1;
     done
 fi
 
@@ -118,6 +178,10 @@
     done
 fi
 
+# remove temporary files
+test "$split_build" = "yes" && rm $sdf_file_filter
+rm $all_langs_pattern
+
 echo "Localizations updated ...!"
 
 exit 0;

Added: trunk/bin/ooo-sdf-split
==============================================================================
--- (empty file)
+++ trunk/bin/ooo-sdf-split	Fri Nov 14 20:12:58 2008
@@ -0,0 +1,154 @@
+#!/usr/bin/perl
+    eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+	if $running_under_some_shell;
+#!/usr/bin/perl
+
+use strict;
+use File::Copy;
+use File::Path;
+use File::Temp qw/ tempfile tempdir /;
+
+sub usage()
+{
+    print "This script split the given sdf files for each piece\n\n" .
+
+	  "Usage: ooo-sdf-split modules_list sdf_file...\n\n" .
+
+	  "Parameters:\n\n" .
+
+	  "	modules_list	file that defines what OOo source module belongs for\n" .
+	  "		what piece\n" .
+	  "	sdf_file	original sdf file";
+}
+
+sub load_modules_list($$$)
+{
+    my ($modules_list, $p_modules, $p_pieces) = @_;
+    print "Loading $modules_list";
+
+    open (MODULES_LIST, "$modules_list") || die "Can't open $modules_list";
+    while (my $line = <MODULES_LIST>) {
+        chomp $line;
+	if ( $line =~ m/^\s*(\w*)\s*=\s*(.*)$/ ) {
+	    my $piece = "$1";
+	    foreach my $module ( split( ',', $2 ) ) {
+		$p_modules->{"$module"} = "$piece";
+	    }
+	} else {
+	    die "Syntax error at $modules_list, line $.\n";
+	}
+	print ".";
+    }
+    close (MODULES_LIST);
+    print "\n";
+}
+
+sub guess_lang($)
+{
+    my ($sdf_file) = @_;
+
+    $sdf_file =~ /^GSI_([\w-]*).sdf/;
+    return "$1" if (defined $1);
+    die "Warning: Can't guess the target language for $sdf_file\n";
+}
+
+sub split_sdf_file($$$$)
+{
+    my ($sdf_file, $temp_dir, $p_modules, $p_pieces) = @_;
+
+    my $lang = guess_lang("$sdf_file");
+
+    # This hash includes the sdf lines split by piece
+    # The key is the piece name, the value is array with sdf lines for the given piece
+    my %lines = ();
+    my $piece;
+
+    print "Processing $sdf_file";
+
+    open (sdf_file, "$sdf_file") || die "Can't open $sdf_file";
+    while (my $line = <sdf_file>) {
+	chomp $line;
+	$line =~ /^\s*(\w*)\t/;
+	my $module = "$1";
+	if ( defined $p_modules->{"$module"} ) {
+	    $piece = "$p_modules->{$module}";
+        } else {
+	    $piece = "unknown";
+	}
+	push @{$lines{$piece}}, "$line";
+	$p_pieces->{"$piece"} = 1;
+	if ( ($. % 10000 ) == 0 ) {
+	    print ".";
+	    $|++; # flush
+	}
+    }
+    close (sdf_file);
+
+    my $out_dir="$temp_dir/ooo-build/sdf";
+    mkpath "$out_dir" || die "Can't create directory $out_dir\n";
+
+    foreach $piece (keys %lines) {
+	open (SDF_FILE_PIECE, '>', "$out_dir/$piece-$lang.sdf") || die "Can't open $out_dir/$piece-$lang.sdf for writing\n";
+	foreach my $line (@{$lines{$piece}}) {
+	    print SDF_FILE_PIECE "$line\n";
+	}
+	close (SDF_FILE_PIECE);
+	print ".";
+	$|++; # flush
+    }
+    print "\n";
+}
+
+sub compress_split_sdf_files($$)
+{
+    my ($temp_dir, $p_pieces) = @_;
+
+    
+    foreach my $piece (keys %{$p_pieces}) {
+	my $archive = "ooo-sdf-$piece.tar.bz2";
+	print "Creating $archive...";
+	system ("cd $temp_dir; tar -cjf $archive ooo-build/sdf/$piece*.sdf") == 0 || die "Can't create $temp_dir/$archive\n";
+	system ("cp $temp_dir/$archive ./$archive") == 0 || die "Can't move $temp_dir/$archive -> $archive\n";
+	print " done\n";
+    }
+}
+
+my $temp_dir;
+my $modules_list;
+my @sdf_files = ();
+# This hash includes information about how the modules are split into the pieces
+# The key is the module name, the value is the piece name
+my %modules = ();
+# list of supported pieces
+my %pieces;
+
+###################
+# Arguments parsing
+###################
+
+for my $arg (@ARGV) {
+    if ($arg eq '--help' || $arg eq '-h') {
+	usage;
+	exit 0;
+    } else {
+	(-f $arg) || die "Error: $arg is not a file";
+	if (! defined $modules_list) {
+	    $modules_list = $arg;
+	} else {
+	    push @sdf_files, "$arg";
+	}
+    }
+}
+
+(defined $modules_list) || die "Modules list is not defined\n";
+(@sdf_files > 0) || die "No SDF file defined\n";
+
+$temp_dir = tempdir( "/tmp/ooo-sdf-split-XXXXXX" );
+
+load_modules_list($modules_list, \%modules, \%pieces);
+foreach my $sdf_file (@sdf_files) {
+    split_sdf_file($sdf_file, $temp_dir, \%modules, \%pieces);
+}
+compress_split_sdf_files($temp_dir, \%pieces);
+
+system ("rm -rf $temp_dir");

Modified: trunk/bin/piece/build-generic
==============================================================================
--- trunk/bin/piece/build-generic	(original)
+++ trunk/bin/piece/build-generic	Fri Nov 14 20:12:58 2008
@@ -27,9 +27,24 @@
 	--distro=System --distro=Sdk --distro=Extensions \
 	 `pwd` || exit 1;
 
-dirs=`/bin/ls | grep -v -e 'applied_patches' -e 'solver'  | tr '\n' ':'`
+# available source dirs
+dirs=`/bin/ls | grep -v -e 'applied_patches' -e '^solver' -e 'ooo-build' | tr '\n' ':'`
+# clean build?
 if test ! -d solver; then
     echo "A very clean straight-through build - deferring dep generation"
     export nodep=1
 fi
+
+# might need to build localize tool first
+if test "$piece" = "libs_gui" ; then
+    perl $SOLARENV/bin/build.pl --subdirs:$dirs $EXTRA_BUILD_FLAGS $EXTRA_DMAKE_FLAGS || exit 1;
+    unset nodep
+fi
+
+# localize
+if which localize >/dev/null 2>&1 ; then
+    $OO_TOOLSDIR/localize-ooo || exit 1;
+fi
+
+# final build
 perl $SOLARENV/bin/build.pl --subdirs:$dirs $EXTRA_BUILD_FLAGS $EXTRA_DMAKE_FLAGS || exit 1;

Modified: trunk/bin/piece/file-list-libs_core
==============================================================================
--- trunk/bin/piece/file-list-libs_core	(original)
+++ trunk/bin/piece/file-list-libs_core	Fri Nov 14 20:12:58 2008
@@ -35,12 +35,10 @@
 add_used_directories files-gnome.txt files-$piece.txt
 
 # mailmerge subpackage
-mv $DESTDIR$OO_SOLVERDIR/lib/pyuno/mailmerge.py $DESTDIR$OO_INSTDIR/basis3.0/program/mailmerge.py || exit 1
+mv_file_between_flists files-mailmerge.txt files-$piece.txt $OO_INSTDIR/basis3.0/share/registry/modules/org/openoffice/Office/Writer/Writer-javamail.xcu
+mv_file_between_flists files-mailmerge.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/mailmerge.py
+add_used_directories files-mailmerge.txt files-$piece.txt
 chmod 755 $DESTDIR$OO_INSTDIR/basis3.0/program/mailmerge.py
-echo "%dir $OO_INSTDIR" >files-mailmerge.txt
-echo "%dir $OO_INSTDIR/basis3.0" >>files-mailmerge.txt
-echo "%dir $OO_INSTDIR/basis3.0/program" >>files-mailmerge.txt
-echo "$OO_INSTDIR/basis3.0/program/mailmerge.py" >>files-mailmerge.txt
 
 # mess
 remove_file "files-$piece.txt" "$OO_INSTDIR/basis-link"

Modified: trunk/bin/piece/file-list-ure
==============================================================================
--- trunk/bin/piece/file-list-ure	(original)
+++ trunk/bin/piece/file-list-ure	Fri Nov 14 20:12:58 2008
@@ -5,14 +5,17 @@
 
 source $OO_TOOLSDIR/piece/sys-setup
 
+# install mono GAC, pkgconfig file, ...
+rm -f files-mono.txt
+$OO_TOOLSDIR/install-mono
+
 # pyuno subpackages
 $OO_TOOLSDIR/piece/merge-file-lists "files-pyuno.txt" $DESTDIR/gid_Module_Optional_Pyuno
 
 # merge the rest already now, so we could extract the mono stuff
 $OO_TOOLSDIR/piece/merge-file-lists "files-$piece.txt" $DESTDIR/gid_*
 
-# mono subpackage
-rm -f files-mono.txt
+# finalize mono subpackage
 mv_file_between_flists files-mono.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/cli_.*.dll
 mv_file_between_flists files-mono.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/cli_.*.dll.config
 mv_file_between_flists files-mono.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/policy.*.cli_.*.dll
@@ -21,7 +24,15 @@
 mv_file_between_flists files-mono.txt files-$piece.txt $OO_INSTDIR/ure/lib/policy.*.cli_.*.dll
 mv_file_between_flists files-mono.txt files-$piece.txt $OO_INSTDIR/ure/lib/libcli_.*.so
 add_used_directories files-mono.txt files-$piece.txt
-# add the files from GAC if it was installed
-test -f mono_gac && cat mono_gac >>files-mono.txt
+
+# FIXME: generate pythonloader.unorc to be ready for python components registration
+#        it might be generated in postprocess togeter with other profiles but it is too late
+#        might be fixed by the planed scp2-split
+# IMPORTANT: the other variant generated in postprocess is explicitely removed in bin/piece/post-inst-postprocess
+cat <<EOT  >$DESTDIR$OO_INSTDIR/basis3.0/program/pythonloader.unorc
+[Bootstrap]
+PYUNO_LOADER_PYTHONPATH=\$ORIGIN
+EOT
+echo "%config $OO_INSTDIR/basis3.0/program/pythonloader.unorc" >>files-pyuno.txt
 
 exit 0

Modified: trunk/bin/piece/install-bootstrap
==============================================================================
--- trunk/bin/piece/install-bootstrap	(original)
+++ trunk/bin/piece/install-bootstrap	Fri Nov 14 20:12:58 2008
@@ -15,10 +15,12 @@
 # ooo-build
 mkdir -p $OOINSTDIR/ooo-build/bin
 mkdir -p $OOINSTDIR/ooo-build/patches
+mkdir -p $OOINSTDIR/ooo-build/po
 mkdir -p $OOINSTDIR/ooo-build/desktop
 mkdir -p $OOINSTDIR/ooo-build/man
 cp -a $TOOLSDIR/bin/* $OOINSTDIR/ooo-build/bin
 cp -a $TOOLSDIR/patches/* $OOINSTDIR/ooo-build/patches
+cp -a $TOOLSDIR/po/ooo-build-*.sdf $OOINSTDIR/ooo-build/po
 cp -a $TOOLSDIR/desktop/* $OOINSTDIR/ooo-build/desktop
 cp -a $TOOLSDIR/man/* $OOINSTDIR/ooo-build/man
 
@@ -36,6 +38,12 @@
    $TOOLSDIR/src/*.odb \
    $TOOLSDIR/src/main_transform.xsl \
    $OOINSTDIR/ooo-build/src
+# src/sdf
+mkdir -p $OOINSTDIR/ooo-build/src/sdf
+cp -a \
+    $TOOLSDIR/src/sdf/*.sdf \
+    $TOOLSDIR/src/sdf/README \
+    $OOINSTDIR/ooo-build/src/sdf
 
 find $OOINSTDIR/ooo-build -depth -name "CVS" -type d -exec rm -rf {} \;
 find $OOINSTDIR/ooo-build -name "*.orig" -exec rm -rf {} \;

Modified: trunk/bin/piece/post-inst-postprocess
==============================================================================
--- trunk/bin/piece/post-inst-postprocess	(original)
+++ trunk/bin/piece/post-inst-postprocess	Fri Nov 14 20:12:58 2008
@@ -36,5 +36,9 @@
     echo "$OO_INSTDIR/ure/share/misc/services.rdb" >>"files-$piece.txt"
 fi
 
+# FIXME: remove pythonloader.unorc
+#        it has been already generated by bin/piece/file-list-ure
+remove_file "files-$piece.txt" "$OO_INSTDIR/basis3.0/program/pythonloader.unorc"
+
 # no need for solver bits at this late stage
 rm -Rf "$DESTDIR/$OO_INSTDIR/solver"

Modified: trunk/distro-configs/SUSE.conf.in
==============================================================================
--- trunk/distro-configs/SUSE.conf.in	(original)
+++ trunk/distro-configs/SUSE.conf.in	Fri Nov 14 20:12:58 2008
@@ -28,6 +28,7 @@
 --with-system-libwpg
 --with-system-libwps
 --with-system-libxslt
+--with-system-lpsolve
 --with-system-mozilla=libxul
 --with-system-neon
 --with-system-odbc-headers

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Nov 14 20:12:58 2008
@@ -2733,6 +2733,12 @@
 piece-packimages.diff
 piece-automation.diff
 piece-cli_ure.diff
+piece-transex3.diff
+
+# the noarch packages adds compat symlinks of the preset user configuration
+# the real files should be copied to the user configuration
+# the symlinker system files are read-only otherwise
+piece-desktop-avoid-user-conf-symlinks.diff, pmladek
 
 [ BFFixes ]
 fit-list-to-size-binfilter.diff, i#94086, thorsten

Added: trunk/patches/dev300/piece-desktop-avoid-user-conf-symlinks.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/piece-desktop-avoid-user-conf-symlinks.diff	Fri Nov 14 20:12:58 2008
@@ -0,0 +1,26 @@
+--- desktop/source/app/userinstall.cxx.old	2008-11-06 21:17:38.000000000 +0100
++++ desktop/source/app/userinstall.cxx	2008-11-10 17:16:57.000000000 +0100
+@@ -178,7 +178,8 @@ namespace desktop {
+ 
+     static osl::FileBase::RC copy_recursive( const rtl::OUString& srcUnqPath, const rtl::OUString& dstUnqPath)
+     {
+-
++        // will be used for getAbsoluteFileURL just to resolve symbolic links
++        static rtl::OUString aBaseDirectoryURL=rtl::OUString::createFromAscii("file://");
+         FileBase::RC err;
+         DirectoryItem aDirItem;
+         DirectoryItem::get(srcUnqPath, aDirItem);
+@@ -223,8 +224,12 @@ namespace desktop {
+         }
+         else
+         {
++            // resolve symbolic links
++            ::rtl::OUString srcAbsUnqPath;
++            err = File::getAbsoluteFileURL( aBaseDirectoryURL, srcUnqPath, srcAbsUnqPath );
+             // copy single file - foldback
+-            err = File::copy( srcUnqPath,dstUnqPath );
++            if ( err == osl::FileBase::E_None )
++                err = File::copy( srcAbsUnqPath,dstUnqPath );
+         }
+         return err;
+     }

Modified: trunk/patches/dev300/piece-services.diff
==============================================================================
--- trunk/patches/dev300/piece-services.diff	(original)
+++ trunk/patches/dev300/piece-services.diff	Fri Nov 14 20:12:58 2008
@@ -1,10 +1,14 @@
 diff -u -r solenv.pristine/bin/make_installer.pl solenv/bin/make_installer.pl
 --- solenv.pristine/bin/make_installer.pl	2008-08-13 14:01:56.000000000 +0100
 +++ solenv/bin/make_installer.pl	2008-08-14 15:40:16.000000000 +0100
-@@ -302,6 +302,13 @@
+@@ -302,6 +302,17 @@
  }
  
  my $includepatharrayref = installer::converter::convert_stringlist_into_array($includepathref, ",");
++# search also the ugly pyuno subdir (needed to separate the complex insternal python?)
++push @{$includepatharrayref}, "$ENV{SOLARPIECE}/$ENV{INPATH}/bin/pyuno";
++push @{$includepatharrayref}, "$ENV{SOLARPIECE}/$ENV{INPATH}/lib/pyuno";
++# search also the system directories when registering services
 +if (defined $ENV{OO_BUILD_SERVICES}) {
 +    push @{$includepatharrayref}, "$ENV{SPLITUREDIR}/share/java";
 +    push @{$includepatharrayref}, "$ENV{SPLITINSTALLDIR}/classes";
@@ -135,17 +139,6 @@
  
          $filestring = $filestring . make_file_url($sourcepath);
  
-@@ -446,8 +447,9 @@
- 	$python_error_occured = 0;
- 
- 	if ( $#unocomponents > -1 ) { $uno_error_occured = register_unocomponents($allvariableshashref, \ unocomponents, $regcompfileref, $servicesfile, $nativeservicesurlprefix); }
- 	if ( $#javacomponents > -1 ) { $java_error_occured = register_javacomponents($allvariableshashref, \ javacomponents, $regcompfileref, $servicesfile, $regcomprdb, $javaservicesurlprefix); }
--	if ( $#pythoncomponents > -1 ) { $python_error_occured = register_pythoncomponents(\ pythoncomponents, $regcompfileref, $servicesfile, $includepatharrayref); }
-+#	if ( $#pythoncomponents > -1 ) { $python_error_occured = register_pythoncomponents(\ pythoncomponents, $regcompfileref, $servicesfile, $includepatharrayref); }
-+	print STDERR "Skip python component registration\n";
- 		
- 	if ( $uno_error_occured || $java_error_occured || $python_error_occured ) { $registererrorflag = 1; }
- 	
 @@ -506,7 +509,12 @@
  	{
  		my $filename = $installer::globals::regcompjars[$i];

Added: trunk/patches/dev300/piece-transex3.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/piece-transex3.diff	Fri Nov 14 20:12:58 2008
@@ -0,0 +1,20 @@
+--- transex3/scripts/localize.old	2004-08-30 19:29:46.000000000 +0200
++++ transex3/scripts/localize	2008-11-14 17:51:04.000000000 +0100
+@@ -3,9 +3,15 @@ if [ x${SOLARENV}x = xx ]; then
+     echo No environment found, please use 'setsolar'
+ exit 1
+ fi
++
+ if [ x${SOLARVER}x = xx -o x${UPDMINOR}x = xx  ]; then
+-    exec perl -w $SOLARVERSION/$INPATH/bin/localize.pl "$@"
++    bindir=bin
+ else
+-    exec perl -w $SOLARVERSION/$INPATH/bin.$UPDMINOR/localize.pl "$@"
++    bindir=bin.$UPDMINOR
+ fi
+ 
++if test -f $SOLARVERSION/$INPATH/$bindir/localize.pl ; then
++    exec perl -w $SOLARVERSION/$INPATH/$bindir/localize.pl "$@"
++else
++    exec perl -w $SOLARPIECE/$INPATH/$bindir/localize.pl "$@"
++fi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]