# ------------------------------------
# This file is generated from setup.in
# ------------------------------------


# The tree layout with WITH_SRC is:
#
#   ooo/ [ pointed to by WITH_SRC ]
#     binutils-2.13
#     gcc-3.0.4
#     j2sdk1.3.1
#     ooo-build-$BUILD_VERSION
#     etc.

BUILD_WIN32=''
DISTRO='Momonga'
VENDORNAME='Momonga'
WITH_SRC=''
VERSION='1.1.4'
BINSUFFIX=''
CVSTAG='OOO_1_1_4'
APPLY_DIR='/home/builduser/Momonga/STABLE_2/pkgs/openoffice.org/BUILD/ooo-build-1.3.9/patches/OOO_1_1_4'
BUILD_NCPUS='1'
BUILD_JOBS='1'
CCACHE_ALLOWED='yes'
OOO_ICONS_VERS='ooo-icons-OOO_1_1-10'
OOO_ICONS_NAMES='Ximian'
OOO_WIDGET_FLAGS=''
OOO_BUILDVERSION='1.3.9'
SYSTEM_DB_VERSION=''
TOOLSDIR='/home/builduser/Momonga/STABLE_2/pkgs/openoffice.org/BUILD/ooo-build-1.3.9'

# shrink this to ENUS,GERM for a faster build
LANGS="ENUS,FREN,GERM,SPAN,ITAL,DTCH,PORT,SWED,POL,RUSS";
LANGS="$LANGS,DAN,GREEK,TURK,CHINSIM,CHINTRAD,JAPN,KOREAN";
LANGS="$LANGS,CAT,CZECH,SLOVAK,FINN,ARAB";

if test "z$VERSION" != "z1.1.0"; then
	LANGS="$LANGS,HUNG,ESTONIAN,SLOVENIAN";
fi

# We pull config options in from distro-specific config
# files, if present
if test "z$DISTRO" != "z"; then
	if test -f "$TOOLSDIR/distro-configs/$DISTRO.conf"; then
		CONFIGURE_OPTIONS="`cat $TOOLSDIR/distro-configs/$DISTRO.conf | xargs`";
		CONFIGURE_OPTIONS=`eval echo $CONFIGURE_OPTIONS`;
	else
		echo "Could not find the distribution specific configure options";
		echo "   file in $TOOLSDIR/distro-configs/.  Please add one for this";
		echo "   distribution.";
		exit 1;
	fi
else
    if test "z$CONFIGURE_OPTIONS" = "z"; then
	if [ -s ./setup.configure ]; then
		. ./setup.configure
		echo "Using configure options from the ./setup.configure file";
	elif test "z$DISTRO" = "zMomonga"; then
		CONFIGURE_OPTIONS="--with-lang=$LANGS \
		        --enable-libart --enable-libsn --enable-crashdump=no \
		        --with-system-zlib --enable-fontconfig --with-system-freetype \
		        --with-system-db --disable-mozilla";
	else
		CONFIGURE_OPTIONS="--with-lang=$LANGS \
			       --enable-libart --enable-libsn --enable-crashdump=no \
			       --without-fonts --disable-rpath \
			       --with-system-zlib --enable-fontconfig \
			       --with-system-freetype --disable-mozilla \
			       --enable-kde --enable-gtk";
	fi
    else
	echo "CONFIGURE_OPTIONS=\"`echo \"$CONFIGURE_OPTIONS\" | xargs`\"" > ./setup.configure
	echo "Using configure options from the environment";
    fi
fi

# no myspell dictionaries for SUSE and NLD
if test "z$DISTRO" = "zSUSE" -o "z$DISTRO" = "zNLD" ; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --without-myspell-dicts"
fi

# build the right native widgets
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $OOO_WIDGET_FLAGS"

ENABLE_BONOBO=
ENABLE_JAVA=no
JDK_HOME=
ANT_HOME=
# Misc. internal
OOBUILDDIR='/home/builduser/Momonga/STABLE_2/pkgs/openoffice.org/BUILD/ooo-build-1.3.9/build/OOO_1_1_4'
SYSTEM_GCC='true'
FORCE_GCC33=''
# the variable DESTDIR will be unset to do not break build, etc.
# the test allows to source setup twice
test "z$DESTDIR" = "z" || OODESTDIR=$DESTDIR

# clobber bogus env vars. they badly screw things up
unset DESTDIR;
if test "z$CCACHE_ALLOWED" != "zyes" ; then
    unset CC;
    unset CXX;
fi
unset ERROR_FLAGS;
unset MAKE
unset WARN_CFLAGS

# Where to install to
PREFIXBASE=/usr
MANDIRBASE=/usr/share/man
DOCDIRBASE=/usr/share/doc/packages/OpenOffice.org
PREFIX=$OODESTDIR$PREFIXBASE
MANDIR=$OODESTDIR$MANDIRBASE
DOCDIR=$OODESTDIR$DOCDIRBASE
SYSCONFBASE=/etc
SYSCONFDIR=$OODESTDIR$SYSCONFBASE
OOINSTBASE=/usr/lib/ooo-1.1
OOINSTDIR=$OODESTDIR$OOINSTBASE
OOOINSTALLDIRNAME=ooo-1.1
OOO_BUILD_EXTENSION='(build 9)'
SRCDIR=/home/builduser/Momonga/STABLE_2/pkgs/openoffice.org/BUILD/ooo-build-1.3.9/src
BUILDDIR=/home/builduser/Momonga/STABLE_2/pkgs/openoffice.org/BUILD/ooo-build-1.3.9/build
TCSH=/bin/tcsh

# setup paths
PATH="$BUILDDIR/bin:$PATH:$TOOLSDIR/bin"
if test "z$ENABLE_JAVA" = "zyes"; then
    if test "z$ANT_HOME" != "z"; then
        CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-ant-home=$ANT_HOME"
        PATH="$ANT_HOME:$PATH"
    fi
    if test "z$JDK_HOME" != "z"; then
        CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-jdk-home=$JDK_HOME"
        PATH="$JDK_HOME:$PATH"
    else
        PATH="$BUILDDIR/jdk/bin:$PATH"
    fi
else
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --disable-java"
fi

CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CONFIGURE_EXTRA_OPTIONS"

LD_LIBRARY_PATH="$BUILDDIR/lib:$LD_LIBRARY_PATH"

if test "z$CCACHE_DIR" = "z" ; then
    CCACHE_DIR=$BUILDDIR/.ccache
fi

# how to mark config files in file lists
if test "z$DISTRO" = "zNLD" -o "z$DISTRO" = "zSUSE" -o "z$VENDORNAME" = "zRedHat"; then
    RPM_CONFIG_FILE_TAGS="%config"
elif test "z$DISTRO" = "zPLD" ; then
    RPM_CONFIG_FILE_TAGS="%config(noreplace) %verify(not md5 size mtime)"
fi

# Tag file lists with language (for RPM)
if test "z$VENDORNAME" = "zRedHat"; then
    RPM_TAG_LANGPACKS=TRUE
fi


# ---------------------------
#   Source / Version setup:
# ---------------------------
GCC_VER=gcc-3.2.2
GCC_TARBALL=gcc-3.2.2.tar.bz2
GCC_UNTAR_OPTIONS=jxf

BINUTILS_VER=binutils-2.13.2.1
BINUTILS_TARBALL=binutils-2.13.2.1.tar.bz2
BINUTILS_UNTAR_OPTIONS=jxf
BINUTILS_PATCH=$TOOLSDIR/patches/ld-2.13.2.1.diff

if test "z$ENABLE_JAVA" = "zyes"; then
    # If the user didn't specify the location of the JDK,
    # use builtin/downloaded one
    if test "z$JDK_HOME" = "z"; then
        JDK_VER=j2sdk1.4.1
        JDK_TARBALL=j2sdk-1.4.1-01-linux-i586-gcc3.2.tar.bz2
        JDK_UNTAR_OPTIONS=jxf
    fi
fi

if test "z$DISTRO" = "zArk"; then
    # The Ark Linux build system automatically recompresses
    # source files to bzip2
    OOO_ICONS_TARBALL_SUFFIX=tar.bz2
    OOO_ICONS_UNTAR_OPTIONS=xjf
else
    OOO_ICONS_TARBALL_SUFFIX=tar.gz
    OOO_ICONS_UNTAR_OPTIONS=xzf
fi

OOO_ICONS_TARBALLS=""
for ooo_icons_ver in $OOO_ICONS_VERS ; do
    if test "z$OOO_ICONS_TARBALLS" = "z" ; then
	OOO_ICONS_TARBALLS="$ooo_icons_ver.$OOO_ICONS_TARBALL_SUFFIX"
    else
	OOO_ICONS_TARBALLS="$OOO_ICONS_TARBALLS $ooo_icons_ver.$OOO_ICONS_TARBALL_SUFFIX"
    fi
done

OOO_SCALED_ICONS_VER=ooo-scaled-icons
OOO_SCALED_ICONS_TARBALL=$OOO_SCALED_ICONS_VER.tar.gz
OOO_SCALED_ICONS_UNTAR_OPTIONS=xzf

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

UNICOWS_SRC=$SRCDIR/unicows.exe;
DBGINST_SRC=$SRCDIR/dbghinst.EXE;
ODMA_SRC=$SRCDIR/5_11_98Odma20.zip;


export LD_LIBRARY_PATH PATH CVSTAG APPLY_DIR
export CCACHE_DIR SRCDIR BUILDDIR OOBUILDDIR
export BUILD_FLAGS VERSION TOOLSDIR VENDORNAME
export PREFIX PREFIXBASE SYSCONFDIR SYSCONFBASE
export MANDIR MANDIRBASE DOCDIR DOCDIRBASE
export OOINSTDIR OOINSTBASE OOOINSTALLDIRNAME
export OODESTDIR CONFIGURE_OPTIONS WITH_SRC DISTRO
export BINSUFFIX ARCHITECTURE BUILD_MAGIC
export ENABLE_BONODO BONOBODIR ENABLE_JAVA
export BUILD_WIN32 OOO_ICONS_VERS
export OOO_BUILD_EXTENSION
export FORCE_GCC33

if test "z$RPM_TAG_LANGPACKS" != "z"; then
export RPM_TAG_LANGPACKS
fi

echo "Setup:"
echo " Tag:        '$CVSTAG'"
echo " Apply:      '$APPLY_DIR/apply'"
echo " Flags:      '$BUILD_FLAGS'"
echo " Suffix:     '$BINSUFFIX'"
echo " Dir:        '$BUILDDIR'"
echo " DestDir:    '$DESTDIR'"
echo " Path:       '$PATH'"
echo " Prefix:     '$PREFIX'"
echo " Mandir:     '$MANDIR'"
echo " Docdir:     '$DOCDIR'"
echo " Sysconf:    '$SYSCONFDIR'"
echo " OOInBase:   '$OOINSTBASE'"
echo " OOInstall:  '$OOINSTDIR'"
echo " OODestDir:  '$OODESTDIR'"
echo " Config:     '$CONFIGURE_OPTIONS'"
echo " OOo-Bonobo: '$ENABLE_BONOBO'"
echo " Icons:      '$OOO_ICONS_NAMES'"
echo " Use gcc33:  '$FORCE_GCC33'"

if test "z$WITH_SRC" != "z"; then
	echo "Build environment:";
	set
fi
