[Libreoffice-commits] .: 3 commits - .gitignore Makefile.in solenv/bin

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Sat Oct 23 10:09:51 PDT 2010


 .gitignore                             |    3 
 Makefile.in                            |    6 -
 solenv/bin/modules/RepositoryHelper.pm |    2 
 solenv/bin/ooinstall                   |  114 +++++++++++++++++++++++++++++++++
 4 files changed, 120 insertions(+), 5 deletions(-)

New commits:
commit 4c7e30f77926a296ab872cd3cb432b15ac12ce02
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Sat Oct 23 19:05:21 2010 +0200

    Added some more things to gitignore

diff --git a/.gitignore b/.gitignore
index 4c33097..c917ab6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,6 @@
 /aclocal.m4
 
 /*/*.exe
+
+instsetoo_native/util/LibreOffice*
+instsetoo_native/util/tmon.out
commit d7577c0490614f3f2b7ea7849ee7252ca05885ed
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Sat Oct 23 19:03:58 2010 +0200

    Moved parts of ooinstall to boostrap to shorten the install path

diff --git a/Makefile.in b/Makefile.in
index 15a619d..07dd538 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -18,9 +18,7 @@ clean:
 
 dev-install:
 	. ./*[Ee]nv.[Ss]et.sh && \
-		cd $$SRC_ROOT/instsetoo_native/util && \
-		LOCALINSTALLDIR=$$SRC_ROOT/install dmake openoffice_en-US PKGFORMAT=installed && \
-		$$SOLARENV/bin/linkoo $$SRC_ROOT/install/LibreOffice/installed/install/en-US $$SRC_ROOT && \
+		ooinstall -l $$SRC_ROOT/install
 		echo && \
 		echo "Developer installation finished, you can find it here:" && \
-		echo "$$SRC_ROOT/install/LibreOffice/installed/install/en-US"
+		echo "$$SRC_ROOT/install"
diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
new file mode 100755
index 0000000..151cc76
--- /dev/null
+++ b/solenv/bin/ooinstall
@@ -0,0 +1,114 @@
+#!/usr/bin/env perl
+
+# This script has three uses:
+# 1. From the command line to install straight into a given directory:
+#    bin/ooinstall /opt/Foo
+# 2. From the command line to link into a given directory:
+#    bin/ooinstall -l /opt/FooLinked
+# 3. When packaging (called from package-ooo), to install to DESTDIR
+
+use File::Find;
+use Cwd;
+
+$path = '';
+$do_link = 0;
+
+sub wanted {
+    my $path_to_unopkg="$path/program";
+    if ( $^O =~ /darwin/i )
+    {
+        $path_to_unopkg="$path/OpenOffice.org.app/Contents/MacOS";
+    }
+    -f $_
+	&& /.*\.oxt$/
+	&& system ( "LD_LIBRARY_PATH='' $path_to_unopkg/unopkg add -v --shared $File::Find::name" )
+	&& die "Cannot install $_ extension!";
+}
+
+( $^O =~ /darwin/i ) || ( -f "/proc/meminfo" ) || die "The installer cannot work without javaldx running, which requires /proc to be mounted";
+
+# Workaround for system Mozilla
+if ( $ENV{'SYSTEM_MOZILLA'} eq 'YES' ) {
+    $ENV{'LD_LIBRARY_PATH'} = "$ENV{'MOZ_LIB'}:$ENV{'LD_LIBRARY_PATH'}";
+}
+
+# Workaround for the Python
+$ENV{'PYTHONPATH'} = "$ENV{'SRC_ROOT'}/instsetoo_native/$ENV{'INPATH'}/bin:$ENV{'SOLARVERSION'}/$ENV{'INPATH'}/lib:$ENV{'SOLARVERSION'}/$ENV{'INPATH'}/lib/python/lib-dynload";
+
+for $arg (@ARGV) {
+    if ($arg eq '-l') {
+	$do_link = 1;
+
+    } elsif ($arg eq '-h' || $arg eq '--help') {
+	$help = 1;
+    } else {
+	$path = Cwd::realpath( $arg );
+    }
+}
+
+$help = 1 if $path eq '';
+
+if ($help) {
+    print "ooinstall [-l] <prefix to install to>\n";
+    print "  -l - performs a linkoo on the installed source\n";
+    exit 1;
+}
+
+my $BUILD=undef;
+my $LAST_MINOR=undef;
+open MINORMK, "$ENV{'SOLARENV'}/inc/minor.mk";
+while (<MINORMK>) {
+	my $t = "\$" . $_;
+	if(/^BUILD/ || /^LAST_MINOR/) {
+		eval $t;
+	}
+}
+close MINORMK;
+$ENV{LAST_MINOR} = $LAST_MINOR;
+$ENV{OUT} = "../$ENV{'INPATH'}";
+$ENV{LOCAL_OUT} = $ENV{OUT};
+$ENV{LOCAL_COMMON_OUT} = $ENV{OUT};
+# FIXME: the following variable helps to install localizations even if some
+# files are not localized (like Japanese, Chinese wordbook), it makes
+# the installer to use the English localization of the file instead.
+$ENV{DEFAULT_TO_ENGLISH_FOR_PACKING} = 1;
+
+$langs=$setup_vars{OOO_LANGS_LIST};
+$langs='en-US' if $langs eq '';
+$langs =~ s/\s+/,/g;
+# FIXME: hack... we get a useless , at the end which makes it being e.g. zu#
+# which breaks the build...
+$langs =~ s/,'/'/;
+
+$destdir='';
+if ( defined $setup_vars{OODESTDIR} &&
+     $setup_vars{OODESTDIR} ne "" ) {
+    $destdir = "-destdir \"$setup_vars{OODESTDIR}\"";
+}
+
+$strip='';
+if ( defined $setup_vars{OOO_STRIP} &&
+     $setup_vars{OOO_STRIP} eq "no" ) {
+    $strip = "-dontstrip";
+}
+
+print "Running OOo installer\n";
+system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " .
+	"perl -d:DProf -w $ENV{SOLARENV}/bin/make_installer.pl " .
+	"-f openoffice.lst -l $langs -p LibreOffice " .
+	"-buildid $BUILD $destdir $strip " .
+	"-simple $path") && die "Failed to install: $!";
+
+if ($ENV{BUILD_TYPE} =~ m/ODK/) {
+    print "Running SDK installer\n";
+    system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " .
+	"perl -w $ENV{SOLARENV}/bin/make_installer.pl " .
+	"-f openoffice.lst -l en-US -p LibreOffice_SDK " .
+	"-buildid $BUILD $destdir $strip " .
+	"-simple $path") && die "Failed to install: $!";
+}
+print "Installer finished\n";
+
+if ($do_link) {
+    `$ENV{SOLARENV}/bin/linkoo $path $ENV{SRC_ROOT}`;
+}
commit 076d8967dfff7dfaf434f971a0cd39810e476d00
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Oct 22 14:00:44 2010 +0200

    Don't resolve the symlinks in the build.pl script

diff --git a/solenv/bin/modules/RepositoryHelper.pm b/solenv/bin/modules/RepositoryHelper.pm
index 82f7625..ac0ba59 100644
--- a/solenv/bin/modules/RepositoryHelper.pm
+++ b/solenv/bin/modules/RepositoryHelper.pm
@@ -131,7 +131,7 @@ sub search_via_build_lst {
             };
         };
         $previous_dir = $rep_root_candidate;
-        $rep_root_candidate = File::Basename::dirname(Cwd::realpath($rep_root_candidate));
+        $rep_root_candidate = File::Basename::dirname($rep_root_candidate);
         return 0 if (!$rep_root_candidate);
     }
     while (chdir "$rep_root_candidate");


More information about the Libreoffice-commits mailing list