CVS: moonbase/zbeta/openoffice-src BUILD, NONE, 1.1 CONFIGURE, NONE, 1.1 DEPENDS, NONE, 1.1 DETAILS, NONE, 1.1 PRE_BUILD, NONE, 1.1 build-ooo, NONE, 1.1

Nick Hudson nhudson at lunar-linux.org
Fri Oct 31 13:07:34 GMT 2003


Update of /var/cvs/lunar/moonbase/zbeta/openoffice-src
In directory dbguin.lunar-linux.org:/tmp/cvs-serv20855/openoffice-src

Added Files:
	BUILD CONFIGURE DEPENDS DETAILS PRE_BUILD build-ooo 
Log Message:

Adding my openoffice-src module to zbeta.  Now this will build without
java support and it builds a bit quicker than it use to.  Also seems
that the startup time has improved now that java is taken out of the 
build process.  Beware this takes around 4GB of disk space to compile,
also its going to take a long time depending on your CPU speed.


--- NEW FILE: BUILD ---
(
  cd $SOURCE_DIRECTORY &&

  ./configure	--prefix=/usr \
		--sysconfdir=/etc \
                --with-system-gcc \
                --enable-bonobo   \
                --disable-dependency-tracking \
 		$OPTS &&

  default_make   &&

  cp /usr/share/gnome/ximian/applications/* /usr/share/applications/ &&
  rm -fr /usr/share/gnome/ximian/ 
  
) > $C_FIFO 2>&1

--- NEW FILE: CONFIGURE ---
message  "${MESSAGE_COLOR}**WARNING** This module will take alot of time and resources to"  
message  "compile, just to give you a idea you will need atleast" 
message  "4GB worth of free space, compile time will depend on" 
message  "your CPU and RAM on your system.  On a Athlon XP 1800+ it took a" 
message  "good 10-12 hours to compile"

--- NEW FILE: DEPENDS ---
depends automake   &&
depends gnome-vfs2 &&
depends gnome-cups-manager &&
depends Linux-PAM  &&
depends libart_lgpl &&
depends startup-notification &&
depends ImageMagick  &&
depends tcsh         &&
depends Python       

--- NEW FILE: DETAILS ---
          MODULE=openoffice-src
         VERSION=1.1.0
          SOURCE=ooo-build-1.1.45.tar.gz
          SOURCE2=OOO_1_1_0.tar.bz2
          SOURCE3=ooo-icons-OOO_1_1-4.tar.gz
      SOURCE_URL=http://ooo.ximian.com/packages/OOO_1_1_0/$SOURCE
      SOURCE_VFY=md5:b0739e30f8a5211758495e90cb787866
     SOURCE2_URL=http://ooo.ximian.com/packages/OOO_1_1_0/$SOURCE2
     SOURCE2_VFY=md5:4a21da1d8bb5d65360ddd82848ad4b55
     SOURCE3_URL=http://ooo.ximian.com/packages/$SOURCE3
     SOURCE3_VFY=md5:02548122dd8d435d3e5c2d6ecf2c95d3
SOURCE_DIRECTORY=$BUILD_DIRECTORY/ooo-build-1.1.45
      MAINTAINER=nhudson at lunar-linux.org
        WEB_SITE=http://ooo.ximian.com
         ENTERED=20030805
         UPDATED=20031031
           SHORT="OO.o Office Suite with Ximian Patches"
cat << EOF
OO.o Office Suite with Ximian Patches
EOF

--- NEW FILE: PRE_BUILD ---
( 
  

  
  default_pre_build &&
  cd $SOURCE_DIRECTORY &&
  mkdir -p src
  cp $SOURCE_CACHE/$SOURCE2 src/ &&
  cp $SOURCE_CACHE/$SOURCE3 src/ &&

  cp $SCRIPT_DIRECTORY/build-ooo bin/ 
)

--- NEW FILE: build-ooo ---
#!/bin/bash

#
# See setup for user tweakables.
#
. ./setup

if test "z$1" = 'z--help'; then
	echo "build-ooo <BRANCH> [--checkout[--clean]|--help]";
	echo " --checkout: updates CVS tree";
	echo " --clean:    cleans OO build tree";
	echo " --nopatch:  doesn't re-patch the tree";
	exit 0;
fi

# Ensure dirs
echo "Creating environment"
mkdir -p $BUILDDIR

# misc install brokenness
mkdir -p $BUILDDIR/bin
mkdir -p $BUILDDIR/share
mkdir -p $BUILDDIR/share/aclocal
mkdir -p $BUILDDIR/share/autoconf
mkdir -p $BUILDDIR/lib
mkdir -p $BUILDDIR/man
mkdir -p $BUILDDIR/man/man1
mkdir -p $OOBUILDDIR

# Versions
GCC_VER=gcc-3.2.2
GCC_TARBALL=gcc-3.2.2.tar.bz2
GCC_UNTAR_OPTIONS=jxf

if test "${CVSTAG:0:7}" = "OOO_1_1"; then
    OOO_ICONS_VER=ooo-icons-OOO_1_1-4
else
    OOO_ICONS_VER=ooo-icons-RC3-5
fi
OOO_ICONS_TARBALL=$OOO_ICONS_VER.tar.gz
OOO_ICONS_UNTAR_OPTIONS=xzf

OOO_TARBALL="$CVSTAG.tar.bz2"
OOO_UNTAR_OPTIONS=jxf

check-tarball ()
{
    echo -n "Looking for $1 ... ";
    if test ! -f $1; then
	echo "missing the $1 archive; run './download'"
	exit 1;
    else
	echo "ok"
    fi
}

cd $BUILDDIR

if test "z$SYSTEM_GCC" = "z"; then
	# build binutils
	PKG_VER=$BINUTILS_VER

	# -- evil cut --
	if test -f $BUILDDIR/$PKG_VER/$STAMP; then
		echo "Skipping $PKG_VER";
	else
		echo "Building $PKG_VER";
		cd $BUILDDIR
		if test "z$WITH_SRC" = "z"; then
			tar $BINUTILS_UNTAR_OPTIONS $SRCDIR/$BINUTILS_TARBALL || exit 1;
			patch -p0 < $BINUTILS_PATCH || exit 1;
		fi
		cd $PKG_VER
		./configure --prefix=$BUILDDIR || exit 1;
		make && make install || exit 1;
		touch $BUILDDIR/$PKG_VER/$STAMP || exit 1;
	fi
	# -- cut --

	# build gcc
	PKG_VER=$GCC_VER

	# -- evil cut --
	if test -f $BUILDDIR/$PKG_VER/$STAMP; then
		echo "Skipping $PKG_VER";
	else
		echo "Building $PKG_VER";
		cd $BUILDDIR
		if test "z$WITH_SRC" = "z"; then
			tar $GCC_UNTAR_OPTIONS $SRCDIR/$GCC_TARBALL || exit 1;
		fi
		cd $PKG_VER
		./configure --prefix=$BUILDDIR --enable-languages=c++ || exit 1;
		make && make install || exit 1;
		touch $BUILDDIR/$PKG_VER/$STAMP
	fi
	# -- cut --
fi

PKG_VER=$OOO_ICONS_VER

# -- evil cut --
if test -f $BUILDDIR/$PKG_VER/$STAMP; then
	echo "Skipping $PKG_VER";
else
	echo "Building $PKG_VER";
	cd $BUILDDIR
	if test "z$WITH_SRC" = "z"; then
	    tar $OOO_ICONS_UNTAR_OPTIONS $SRCDIR/$OOO_ICONS_TARBALL || exit 1;
	fi
	touch $BUILDDIR/$PKG_VER/$STAMP || exit 1;
fi
# -- cut --

# Checkout / Update source:
if (test "z$2" = "z--checkout") || !(test -f $OOBUILDDIR/$STAMP); then

        FONTMUNGE_FILE="$OOBUILDDIR/officecfg/registry/data/org/openoffice/VCL.xcu";

	if test "z$WITH_SRC" = "z"; then
		if test ! -d $OOBUILDDIR/solenv; then
			echo "OOo build tree not found; unpacking it... [go make some tea]"
			cd $OOBUILDDIR
			cd ..
			tar $OOO_UNTAR_OPTIONS $SRCDIR/$OOO_TARBALL || exit 1
		else
		        if test -f "$FONTMUNGE_FILE.bak"; then
			    echo "Revert font mapping munging ..."
			    mv -f "$FONTMUNGE_FILE.bak" $FONTMUNGE_FILE;
			fi

			echo "Reverting patches ..."
			$TOOLSDIR/patches/apply.pl $TOOLSDIR/patches/$CVSTAG $OOBUILDDIR --distro=$DISTRO -R || exit 1;
		fi

		echo "Removing custom icons";
		$TOOLSDIR/bin/scale-icons $OOBUILDDIR --remove || exit 1;

		echo "Poking resource builds";
		find $OOBUILDDIR -name '*.dpr' -exec rm {} \;
		find $OOBUILDDIR -name '*.don' -exec rm {} \;
		find $OOBUILDDIR -name '*.srs' -exec rm {} \;

		echo "Updating source ..."
		cd $OOBUILDDIR

		if test -f $SRCDIR/$CVSTAG.tar.bz2; then
			cd ..
			tar xjf $SRCDIR/$CVSTAG.tar.bz2;
		else
			echo "Unreliably broken CVS branch...";
			if test "z`hostname`" = "zchampignon.ximian.com"; then
				cvs -d /cvsroot update -dP
			else
				cvs -z3 -q -d ':pserver:anoncvs at ftp.stardiv.de:/cvs' checkout -r $CVSTAG OpenOffice || exit 1;
#				cvs -z3 -q -d ':pserver:mmeeks at localhost:/cvs' checkout -r $CVSTAG OpenOffice || echo "Some error updating [?]";
			fi
		fi
	else
		# We expect a pristine copy to be there already ...

		if test ! -d "$BUILDDIR/$CVSTAG"; then
			echo "Missing the main OO.o source tree";
		fi
	fi

	cd $OOBUILDDIR

	# (re)apply patches
	if test "z$2" = "z--nopatch"; then
		echo "Skipping patching";
	else
		echo "Re-applying patches"
		$TOOLSDIR/patches/apply.pl $TOOLSDIR/patches/$CVSTAG $OOBUILDDIR --distro=$DISTRO -f || exit 1;
	fi

	echo "Installing / scaling icons";
	$TOOLSDIR/bin/scale-icons $OOBUILDDIR || echo "Error: scaling failed";
	echo "done icon scaling";

	cp -Rvf $BUILDDIR/$OOO_ICONS_VER/* $OOBUILDDIR || echo "Icon copy failed";
	echo "Copied new artwork into the tree";
	
	find $OOBUILDDIR -name '*.src' -exec touch {} \;;

	echo "Munging font mappings ..."
	$TOOLSDIR/bin/font-munge $FONTMUNGE_FILE;
	echo "done munging fonts."

	touch $OOBUILDDIR/$STAMP;
else
	echo "Skipping checkout, use --checkout to update";
fi

if test "z$3" = "z--clean"; then
	cd $OOBUILDDIR
	echo "Cleaning ..."
	find -name 'unxlngi4.pro' -exec rm -Rf {} \;
	exit 0;
fi

# configure

#  dmake security patch
cd $OOBUILDDIR/dmake
autoconf || exit 1;

#  main configure
cd $OOBUILDDIR/config_office
rm -f config.cache
echo "configuring ...";
autoconf || exit 1;

./configure $CONFIGURE_OPTIONS || exit 1;

# Final build preparation

# tcsh sucks great rocks, and refuses to re-direct it's output otherwise
export TERM=
# Warning - do not edit, this is a temporary file, see build-ooo
# Many Java files have 8bit char-set comments, javac barfs on them in utf8 locales
export LANG="C";
# Many Java's can't cope with the NPTL on Linux.
export LD_ASSUME_KERNEL="2.2.5";
# Don't do a massive painful install
export BUILD_MINIMAL="01";
# Embedded python dies without Home set
export HOME="";
cd $OOBUILDDIR
# Import all of the OO.o environment
. $OOBUILDDIR/*.Set.sh || exit 1;
# Copy in missing libraries if we just built them
if test "z$SYSTEM_GCC" = "z"; then
    echo "Copying libraries to $SOLARVER/$UPD/$INPATH/lib";
    mkdir -p $SOLARVER/$UPD/$INPATH/lib || exit 1;
    cp -avf $BUILDDIR/lib/libgcc* $BUILDDIR/lib/libstdc* $SOLARVER/$UPD/$INPATH/lib || exit 1;
    cp -vf $BUILDDIR/lib/libstdc++* $SOLARVER/$UPD/$INPATH/lib/ || exit 1;
fi
echo 'Verifying environment'
echo "Path:  '\$PATH'";
echo "Shell: '\$SHELL'"
echo "Gcc: "
gcc -dumpversion
echo 'Bootstrapping'
./bootstrap || ./bootstrap || ./bootstrap || exit 1;
echo 'Commencing main build'
$SOLARENV/$OUTPATH/bin/dmake || $SOLARENV/$OUTPATH/bin/dmake || $SOLARENV/$OUTPATH/bin/dmake || exit 1;

touch $OOBUILDDIR/$STAMP || exit 1;

echo "Build succeeded ...!"
exit 0;




More information about the Lunar-commits mailing list