ooo-build r12988 - in trunk: . bin doc patches
- From: michael svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12988 - in trunk: . bin doc patches
- Date: Sat, 28 Jun 2008 19:18:55 +0000 (UTC)
Author: michael
Date: Sat Jun 28 19:18:55 2008
New Revision: 12988
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12988&view=rev
Log:
2008-06-27 Michael Meeks <michael meeks novell com>
* bin/sloppypatch.pl, patches/apply.pl.in: add 'sloppy patching'
support: only apply bits of patch for which we have top level
directories: add --pieces option.
* configure.in, bin/unpack: add PIECES flag - and unpack
~nothing but this one piece.
* Makefile.shared - nearly shot myself seeing the FLAGS
cut/paste there: we need a shared helper to spawn to set
these [!] Quote OOO_LANGS to stop it blowing the shell's
arg count (urgh).
Added:
trunk/bin/sloppypatch.pl (contents, props changed)
Modified:
trunk/ChangeLog
trunk/Makefile.shared
trunk/bin/setup.in
trunk/bin/unpack
trunk/configure.in
trunk/doc/split.txt
trunk/patches/apply.pl.in
Modified: trunk/Makefile.shared
==============================================================================
--- trunk/Makefile.shared (original)
+++ trunk/Makefile.shared Sat Jun 28 19:18:55 2008
@@ -31,6 +31,9 @@
if test -n "$(OOO_ADDITIONAL_SECTIONS)" ; then \
FLAGS="$$FLAGS --additional-sections=$(OOO_ADDITIONAL_SECTIONS)"; \
fi ; \
+ if test "z$(PIECE)" != "z"; then \
+ FLAGS="$$FLAGS --pieces"; \
+ fi ; \
chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS -f -R ; \
fi
cd $(top_srcdir)/bin ; ./unpack
@@ -88,7 +91,7 @@
if test -d $(OOBUILDDIR)/sdk_oo ; then \
FLAGS="$$FLAGS --distro=Sdk"; \
fi ; \
- if test $(OOO_LANGS) != en-US ; then \
+ if test '$(OOO_LANGS)' != 'en-US' ; then \
FLAGS="$$FLAGS --distro=Localize"; \
fi ; \
if test -d $(OOBUILDDIR)/swext ; then \
@@ -97,6 +100,9 @@
if test -n "$(OOO_ADDITIONAL_SECTIONS)" ; then \
FLAGS="$$FLAGS --additional-sections=$(OOO_ADDITIONAL_SECTIONS)"; \
fi ; \
+ if test "z$(PIECE)" != "z"; then \
+ FLAGS="$$FLAGS --pieces"; \
+ fi ; \
chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS --tag=$(CVSTAG) ;
$(TOOLSDIR)/bin/transform --apply $(TOOLSDIR) $(OOBUILDDIR)
$(TOOLSDIR)/bin/fix-deps $(OOBUILDDIR)
@@ -124,6 +130,9 @@
if test -n "$(OOO_ADDITIONAL_SECTIONS)" ; then \
FLAGS="$$FLAGS --additional-sections=$(OOO_ADDITIONAL_SECTIONS)"; \
fi ; \
+ if test "z$(PIECE)" != "z"; then \
+ FLAGS="$$FLAGS --pieces"; \
+ fi ; \
chmod +x $(TOOLSDIR)/patches/apply.pl && $(TOOLSDIR)/patches/apply.pl $(APPLY_DIR) $(OOBUILDDIR) $$FLAGS -R ;
rm -f $(STAMP_DIR)/patch.apply
Modified: trunk/bin/setup.in
==============================================================================
--- trunk/bin/setup.in (original)
+++ trunk/bin/setup.in Sat Jun 28 19:18:55 2008
@@ -6,6 +6,7 @@
BUILD_WIN32='@BUILD_WIN32@'
DISTRO='@DISTRO@'
SPLIT='@SPLIT@'
+PIECE='@PIECE@'
VENDORNAME='@VENDORNAME@'
SRCDIR= SRCDIR@
VERSION='@OOO_VERSION@'
Added: trunk/bin/sloppypatch.pl
==============================================================================
--- (empty file)
+++ trunk/bin/sloppypatch.pl Sat Jun 28 19:18:55 2008
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+use POSIX;
+
+# apply a patch, but only if the top-level directory exists
+# mentioned in the patch; eg.
+# --- sw/source/ui/foo.xml
+# will apply if sw/ exists.
+# Bugs:
+# doesn't cope with '-p' - assumes -p0
+
+my $eliding = 0;
+my $minusline = '';
+while (<STDIN>) {
+ my $line = $_;
+ if ( $line =~ m/^--- /) {
+ $minusline .= $line;
+ next;
+ }
+ if ( $line =~ m/^\+\+\+ [ \t]*([^\/]+)([^ \t]+)/ ) {
+ $eliding = ! -d $1;
+ print STDERR (($eliding ? "- skip" : "+ apply") . " fragment for $1$2\n");
+
+ $line = $minusline . $line;
+ $minusline = '';
+ }
+ if (!$eliding) {
+ print $line;
+ }
+}
Modified: trunk/bin/unpack
==============================================================================
--- trunk/bin/unpack (original)
+++ trunk/bin/unpack Sat Jun 28 19:18:55 2008
@@ -17,12 +17,16 @@
check_tarball()
{
- $echo_n "Looking for $1 ... $echo_c";
- if test -f $1; then
- echo "ok"
+ if test "z$PIECE" != "z"; then
+ echo "skipping looking for $1 ...";
else
- echo "missing the $1 archive; run './download'"
- exit 1;
+ $echo_n "Looking for $1 ... $echo_c";
+ if test -f $1; then
+ echo "ok"
+ else
+ echo "missing the $1 archive; run './download'"
+ exit 1;
+ fi
fi
}
@@ -47,12 +51,18 @@
check_tarball $BINUTILS_TARBALL
fi
fi
-
+
+# this will become the 'normal' way to do an all-through build name is misleading
if test "z$SPLIT" != "z"; then
- CORE_PKGS="sdk ure base calc l10n writer impress artwork filters testing bootstrap libs-gui libs-core libs-extern extensions postprocess"
+ if test "z$PIECE" != "z"; then
+ CORE_PKGS=$PIECE
+ else
+ CORE_PKGS="sdk ure base calc l10n writer impress artwork filters testing bootstrap libs-gui libs-core libs-extern extensions postprocess"
+ fi
for pkg in $CORE_PKGS; do
check_tarball "$OOO_SPLIT_PREFIX$pkg.tar.bz2"
done
+# this is the legacy source splitting
else
CORE_PKGS=
check_tarball $OOO_TARBALL
@@ -212,17 +222,21 @@
# copy in unowinreg.dll if we need to
# it is necessary in ODK
# it can be built even on linux by mingw32, though
+if test "z$PIECE" == "z"; then
if test "$USE_PREBUILD_UNOWINREG_DLL" = "YES" ; then
$GNUCP -f $SRCDIR/unowinreg.dll $OOBUILDDIR/external/unowinreg/ || exit 1;
fi
+fi
# copy in misc Mono related dlls if we need to
# we can't build them on Unix.
CLI_TYPES=cli_types.dll
+if test "z$PIECE" == "z"; then
if test -f "$SRCDIR/$CLI_TYPES"; then
mkdir -p $OOBUILDDIR/external/cli
$GNUCP -af $SRCDIR/$CLI_TYPES $SRCDIR/cli_types_bridgetest.dll $OOBUILDDIR/external/cli
fi
+fi
# Win32 prerequisites ...
if test "z$BUILD_WIN32" != "z"; then
@@ -447,6 +461,8 @@
$GNUCP $TOOLSDIR/src/tango_mainapp_16.png $OOBUILDDIR/ooo_custom_images/tango/res/mainapp_16.png || exit 1;
fi
+if test "z$PIECE" == "z"; then
+
if test "x$OOO_EXTRA_ARTWORK" != "x"; then
# Html export rulers etc.
cd $OOBUILDDIR
@@ -585,3 +601,4 @@
$GNUCP -f $TOOLSDIR/src/icons/*.png $OOBUILDDIR/default_images/res/commandimagelist/ || exit 1
$GNUCP -f $TOOLSDIR/src/icons/tango/*.png $OOBUILDDIR/ooo_custom_images/tango/res/commandimagelist/ || exit 1
+fi # PIECES hack
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Sat Jun 28 19:18:55 2008
@@ -28,8 +28,16 @@
AC_ARG_WITH(split,
[
- --with-split try to compile a smaller split off piece of OO.o
- rather than the whole project.],
+ --with-split adapt to the new package split for the source
+ code, rather than the older version.],
+,)
+
+AC_ARG_WITH(piece,
+[
+ --with-piece build only a piece of openoffice.
+ bootstrapping goodness.
+
+ Examples: --with-piece=bootstrap],
,)
AC_ARG_WITH(srcdir,
@@ -459,6 +467,8 @@
SPLIT=$with_split
AC_SUBST(SPLIT)
+PIECE=$with_piece
+AC_SUBST(PIECE)
# FIXME: We currently do not support starting build with already unpackaged
# sources, so the following warning is always printed
Modified: trunk/doc/split.txt
==============================================================================
--- trunk/doc/split.txt (original)
+++ trunk/doc/split.txt Sat Jun 28 19:18:55 2008
@@ -1,5 +1,6 @@
TODO:
+ split the source, as per kendy's instructions.
+ + perhaps go bottom-up first !? ...
+ split postprocess into it's own bit.
Build splitting notes:
@@ -187,3 +188,35 @@
+ prune down the things that are simply not used ...
+* OODESTDIR ... (?)
+ + use it to test ?
+
+* ooo-build: how much hassle do we need ?
+ + add a "--with-devel-path" and default to /usr/lib/ooo-2.0/solver
+
+ + we won't need to do -so- much work in an 'inferior' package (?)
+ + all the configure options will be set ahead of time.
+
+ + --with-devel-path=
+ - will set all the options (?)
+ - [ in the #1st analysis at least ;-]
+
+ + do we even need ooo-build ?
+ + yes for patching [sadly]
+ + so ...
+
+ + switch to /usr/lib/ooo-3 instead ...
+ +
+
+ + copy all our patches into the solver ?
+ + and apply.pl (?) ... ;-)
+
+
+** FIXME:
+ + we need our 'build logic' split up and used in lots of
+ different places.
+ + "unpack" needs splitting into lots of pieces.
+ + "ooinstall" likewise
+ + can we create a set of scripts: one per piece,
+ and just run them in sequence ?
+
Modified: trunk/patches/apply.pl.in
==============================================================================
--- trunk/patches/apply.pl.in (original)
+++ trunk/patches/apply.pl.in Sat Jun 28 19:18:55 2008
@@ -1005,6 +1005,7 @@
%options = ();
$quiet = 0;
+$pieces = 0;
$remove = 0;
$export = 0;
$opts = "";
@@ -1066,6 +1067,8 @@
$tag = $1;
} elsif ($a =~ m/--dry-run/g) {
$dry_run = 1;
+ } elsif ($a =~ m/--pieces/g) {
+ $pieces = 1;
} else {
push @arguments, $a;
}
@@ -1111,6 +1114,11 @@
$opts = join ' ', @arguments;
$base_cmd = "@GNUPATCH@ -l -p0 $opts -d $dest_dir";
+ if ($pieces) {
+ # nasty path mess
+ my $sloppy_cmd = "$patch_dir/../../bin/sloppypatch.pl";
+ $base_cmd = '$sloppy_cmd | ' . $base_cmd;
+ }
if (is_old_patch_version()) {
$base_cmd = 'sed \'s/^\(@.*\)\r$/\1/\' | ' . $base_cmd;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]