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

BUILDDIR=/usr/src/packages/BUILD/libreoffice-build-3.3.1.2/build
BUILD_WIN32=''
DISTRO='SUSE-11.2'
SPLIT='yes'
PIECE='bootstrap'
VENDORNAME='Novell'
SRCDIR=/usr/src/packages/BUILD/libreoffice-build-3.3.1.2/src
VERSION='3.3'
BINSUFFIX=''
OOO_LANGS='en-US af ar be-BY bg br ca cs cy da de el en-GB en-ZA es et fi fr ga gl gu he hi-IN hu hr it ja ka km ko lt mk nb nl nn nr pa-IN pl pt pt-BR ru rw sh sk sl sr ss st sv tg th tr ts uk ve vi xh zh-TW zh-CN zu'
if test "$OOO_LANGS" = ""; then OOO_LANGS="en-US"; fi
OOO_POOR_HELP_LOCALIZATIONS='af bg be-BY br ca cy el fi ga he hr ka lt mk nb nn nr rw sh sr sk ss st tg th tr th ts uk ve vi xh zu'
OOO_GIT=''
OOO_SOURCEDIRNAME='libreoffice-3.3.1.2'
CLONEDIR='/usr/src/packages/BUILD/libreoffice-build-3.3.1.2/clone'
RAWBUILDDIR='/usr/src/packages/BUILD/libreoffice-build-3.3.1.2/rawbuild'
GITTAG='libreoffice-3.3.1.2'
APPLY_DIR='/usr/src/packages/BUILD/libreoffice-build-3.3.1.2/patches/dev300'
BUILD_NCPUS='4'
ENABLE_CCACHE=''
ENABLE_ICECREAM=''
ENABLE_DISTCC=''
ICECREAM_BINDIR='/opt/icecream/bin'
MAX_JOBS='1'
export OOO_BUILD_NOARCH='YES'
# do not lost ARCH_FLAGS from the environmnet; potential duplicates should not harm
ARCH_FLAGS="$ARCH_FLAGS -fmessage-length=0  -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fno-strict-aliasing"
OOO_WIDGET_FLAGS='--enable-gtk --enable-kde --enable-kde4'
OOO_CUSTOM_IMAGES=''
OOO_CRYSTAL_IMAGES='@OOO_CRYSTAL_IMAGES@'
OOOP_FONTS_PACK=''
OOOP_GALLERY_PACK=''
OOOP_SAMPLES_PACK=''
OOOP_TEMPLATES_PACK=''
LIGHTPROOF_LANG=''
LIGHTPROOF_FILENAMES=''
NUMBERTEXT_EXTENSION='numbertext-0.9.3.oxt'
HUNART_EXTENSION=''
TYPO_EXTENSION=''
CT2N_EXTENSION='ConvertTextToNumber-1.3.2.oxt'
WATCH_WINDOW_EXTENSION=''
DIAGRAM_EXTENSION=''
VALIDATOR_EXTENSION=''
BARCODE_EXTENSION=''
GOOGLE_DOCS_EXTENSION=''
NLPSOLVER_EXTENSION=''
LANGUAGETOOL_EXTENSION=''
OOOBLOGGER_EXTENSION=''
SUNTEMPLATES_LANG=''
COMPAT_OOWRAPPERS='YES'
OOO_BUILDVERSION='3.3.1.2'
OOO_SOURCEVERSION='3.3.1.2'
OOO_STRIP='no'
OOO_ADDITIONAL_SECTIONS=''
SPLIT_APP_MODULES='YES'
SPLIT_OPT_FEATURES='YES'
RUN_POST_INSTALL_SCRIPTS='no'
DEFUZZ_PATCHES='NO'
TESTS='NO'
TOOLSDIR='/usr/src/packages/BUILD/libreoffice-build-3.3.1.2'
ENABLE_ODK='TRUE'
USE_PREBUILD_UNOWINREG_DLL='@USE_PREBUILD_UNOWINREG_DLL@'
ENABLE_MONO='SUPPORTED'
ENABLE_EXTENSIONS='YES'
ENABLE_SCSOLVER='@ENABLE_SCSOLVER@'
ENABLE_GRAPHITE='FALSE'
PROPAGATED_ARGS=" '--with-num-cpus=4' '--with-arch-flags=-fmessage-length=0  -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fno-strict-aliasing' '--with-split' '--with-piece=bootstrap' '--libdir=/usr/lib64' '--prefix=/usr' '--mandir=/usr/share/man' '--sysconfdir=/etc' '--with-docdir=/usr/share/doc/packages/libreoffice-bootstrap' '--with-binsuffix=no' '--with-installed-ooo-dirname=libreoffice' '--with-distro=SUSE-11.2' '--with-source-version=3.3.1.2' '--without-git' '--without-download' '--with-lang=en-US af ar be-BY bg br ca cs cy da de el en-GB en-ZA es et fi fr ga gl gu he hi-IN hu hr it ja ka km ko lt mk nb nl nn nr pa-IN pl pt pt-BR ru rw sh sk sl sr ss st sv tg th tr ts uk ve vi xh zh-TW zh-CN zu' '--with-poor-help-localizations=af bg be-BY br ca cy el fi ga he hr ka lt mk nb nn nr rw sh sr sk ss st tg th tr th ts uk ve vi xh zu' '--with-mono-gac-root=/usr/lib' '--with-compat-oowrappers' '--enable-binfilter' '--with-java=java' '--with-jdk-home=/usr/lib64/jvm/java' '--with-java-target-version=1.5' '--enable-odk' '--disable-access' '--disable-post-install-scripts' '--disable-strip' '--disable-strip-solver' '--enable-openxml' '--disable-report-builder' '--disable-pdfimport' '--disable-presenter-console' '--enable-build-noarch' '--with-ct2n' '--with-numbertext' '--with-system-mysql' '--enable-mysql-connector' '--enable-pdfimport' '--enable-minimizer' '--enable-presenter-console' '--enable-wiki-publisher' '--enable-ogltrans' '--enable-report-builder' '--enable-split-app-modules' '--enable-split-opt-features'"
CAIRO_VER=1.4.10
CAIRO_ENABLED=TRUE
SYSTEM_CAIRO=
PREBUILT_WRITINGAIDS_TIMESTAMP=20091204
SYSTEM_MDDS=NO
UNSTABLE_WP=@UNSTABLE_WP@
SYSTEM_LIBWPD=NO
SYSTEM_LIBWPG=NO
SYSTEM_LIBWPS=NO
LIBWPD_TARBALL=@LIBWPD_TARBALL@
LIBWPG_TARBALL=@LIBWPG_TARBALL@
LIBWPS_TARBALL=@LIBWPS_TARBALL@
GLITZ_VER=@GLITZ_VER@
DEJAVU_FONTS_VER=
DEJAVU_FONTS_PACK_NAME=
LIBERATION_FONTS_VER=
AGFA_MONOTYPE_FONTS_SOURCE=agfa-monotype-fonts.tar.gz
GNUPATCH=patch
GNUTAR=tar
DRINK="tea"
APACHE_ANT_TARBALL=apache-ant-1.8.1-bin.tar.gz
APACHE_ANT=`echo $APACHE_ANT_TARBALL | sed 's/\(apache-ant-.*\)-bin\..*/\1/g'`

if [ -z "$TARFILE_LOCATION" ]; then TARFILE_LOCATION=$SRCDIR; fi

if test -f "$TOOLSDIR/distro-configs/Common.conf" ; then
    COMMON_OPTIONS="`cat $TOOLSDIR/distro-configs/Common.conf | xargs`";
else
    echo "Warning: $TOOLSDIR/distro-configs/Common.conf not found."
fi

if test "z$BUILD_WIN32" != "z"; then
    if test -f "$TOOLSDIR/distro-configs/CommonWin32.conf" ; then
        PLATFORM_OPTIONS="`cat $TOOLSDIR/distro-configs/CommonWin32.conf | xargs`";
    else
        echo "Warning: $TOOLSDIR/distro-configs/CommonWin32.conf not found."
    fi
else if test "z`uname -s`" = "zDarwin"; then
    if test -f "$TOOLSDIR/distro-configs/CommonMac.conf" ; then
        PLATFORM_OPTIONS="`cat $TOOLSDIR/distro-configs/CommonMac.conf | xargs`";
    else
        echo "Warning: $TOOLSDIR/distro-configs/CommonMac.conf not found."
    fi
else
    if test -f "$TOOLSDIR/distro-configs/CommonLinux.conf" ; then
        PLATFORM_OPTIONS="`cat $TOOLSDIR/distro-configs/CommonLinux.conf | xargs`";
    else
        echo "Warning: $TOOLSDIR/distro-configs/CommonLinux.conf not found."
    fi
fi
fi

if test "z$DISTRO" != "z" -a -f "$TOOLSDIR/distro-configs/$DISTRO.conf"; then
    CONFIGURE_OPTIONS="$COMMON_OPTIONS $PLATFORM_OPTIONS $OOO_WIDGET_FLAGS `cat $TOOLSDIR/distro-configs/$DISTRO.conf | xargs`";
else
    echo "ERROR: Could not find the distribution specific configure options"
    echo "    file in $TOOLSDIR/distro-configs/."
    echo "    $TOOLSDIR/distro-configs/$DISTRO.conf is probably missing."
fi

# Misc. internal
TOOLSDIR='/usr/src/packages/BUILD/libreoffice-build-3.3.1.2'
OOBUILDDIR='/usr/src/packages/BUILD/libreoffice-build-3.3.1.2/build/libreoffice-3.3.1.2'
SYSTEM_GCC='true'
FORCE_GCC33='@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;
unset ERROR_FLAGS;
unset MAKE
unset WARN_CFLAGS

# Where to install to
prefix=/usr
exec_prefix=${prefix}
datarootdir=${prefix}/share
PREFIXBASE=/usr
LIBDIRBASE=/usr/lib64
MANDIRBASE=/usr/share/man
DOCDIRBASE=/usr/share/doc/packages/libreoffice-bootstrap
PREFIX=$OODESTDIR$PREFIXBASE
MANDIR=$OODESTDIR$MANDIRBASE
DOCDIR=$OODESTDIR$DOCDIRBASE
DATADIRBASE=${datarootdir}
DATADIR=$OODESTDIR$DATADIRBASE
SYSCONFBASE=/etc
SYSCONFDIR=$OODESTDIR$SYSCONFBASE
OOINSTBASE=/usr/lib64/libreoffice
OOINSTDIR=$OODESTDIR$OOINSTBASE
OOOINSTALLDIRNAME=libreoffice
UPSTREAM_NAME=
SOURCE_TYPE=DOWNLOAD
MONO_GAC_ROOT=/usr/lib

TCSH=/bin/tcsh

# it can be lib or lib64
LIB=`echo $LIBDIRBASE|sed 's|.*/||'`

# substitute ALL to the list of languages if possible
test -n "$OO_TOOLSDIR" && solenv_dir=$SOLARENV || solenv_dir=$OOBUILDDIR/solenv
if test -f $solenv_dir/inc/postset.mk ; then
    # generate shell variable from completelangiso= from solenv/inc/postset.mk
    # the sed command does the following:
    #	+ if a line ends with a backslash, append the next line to it
    #	+ adds " on the beginning of the value (after =)
    #	+ adds " at the end of the value
    #	+ removes en-US; we want to put it on the beginning
    #	+ prints just the section starting with 'completelangiso=' and ending with the " at the end of line
    eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' $solenv_dir/inc/postset.mk)
    ALL_LANGS="en-US $completelangiso"
    OOO_LANGS_LIST=`echo $OOO_LANGS | sed -e "s|ALL|$ALL_LANGS|g"`
fi
# force langs
if test -n "$FORCE_OOO_LANGS" ; then
    OOO_LANGS_LIST="$FORCE_OOO_LANGS"
    OOO_LANGS="$FORCE_OOO_LANGS"
fi

# setup paths
PATH="$BUILDDIR/bin:$PATH:$TOOLSDIR/bin"

CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CONFIGURE_EXTRA_OPTIONS"

LD_LIBRARY_PATH="$BUILDDIR/$LIB:/opt/mozilla/$LIB:$LD_LIBRARY_PATH"

# gcc speedup
# check for >= 4G/8G cache size if using ccache?
case "$ENABLE_CCACHE/$ENABLE_ICECREAM" in
    "yes/")
        CCACHE_NOLINK=1; export CCACHE_NOLINK
        CCACHE_UNIFY=1; export CCACHE_UNIFY
        CC="ccache gcc"; export CC
        CXX="ccache g++"; export CXX
        ;;

    "/yes")
        CC="$ICECREAM_BINDIR/gcc"; export CC
        CXX="$ICECREAM_BINDIR/g++"; export CXX
        ;;

    "yes/yes")
        CCACHE_NOLINK=1; export CCACHE_NOLINK
        CCACHE_UNIFY=1; export CCACHE_UNIFY
        CC="ccache $ICECREAM_BINDIR/gcc"; export CC
        CXX="ccache $ICECREAM_BINDIR/g++"; export CXX
        ;;
esac

# Icecream should use the internal gcc, if we want it
if test "z$ENABLE_ICECREAM" != "z" -a "z$SYSTEM_GCC" = "z" ; then
    if test -x "$BUILDDIR/bin/gcc"; then
        CURRENTDIR="`pwd`"; cd "$BUILDDIR"
        ICE_TAR_NAME=`create-env --respect-path | grep '^creating ' | sed 's/^creating //'`
        cd "$CURRENTDIR"
        ICECC_VERSION="$BUILDDIR/$ICE_TAR_NAME"; export ICECC_VERSION
    fi
fi

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

if test "z$ENABLE_DISTCC" != "z" ; then
	CC="distcc gcc"; export CC
	CXX="distcc g++"; export CXX
	if test "z$ENABLE_CCACHE" != "z" ; then
		CC="ccache $CC"; export CC
		CXX="ccache $CXX"; export CXX
	fi
fi

# how to mark config files in file lists
if test "z$VENDORNAME" = "zNovell" -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-4.2.3
GCC_TARBALL=gcc-4.2.3.tar.bz2
GCC_UNTAR_OPTIONS=jxf
GCC_DECOMPRESS_CMD="bzip2 -dc"
GCC_PATCHES=""

BINUTILS_VER=binutils-2.18
BINUTILS_TARBALL=binutils-2.18.tar.bz2
BINUTILS_UNTAR_OPTIONS=jxf
BINUTILS_DECOMPRESS_CMD="bzip2 -dc"
BINUTILS_PATCHES=""

# FIXME: -Wl,--as-needed is enabled by default for openSUSE-11.2
# there are missing symbols when linking kde libraries now
# See http://fourier.suse.de/mlarch/SuSE/development-gcc/2009/development-gcc.2009.07/msg00024.html
export SUSE_ASNEEDED=0

OOO_SCALED_ICONS_VER=ooo-scaled-icons
OOO_SCALED_ICONS_TARBALL=$OOO_SCALED_ICONS_VER.tar.gz
OOO_SCALED_ICONS_UNTAR_OPTIONS=xzf
OOO_SCALED_ICONS_DECOMPRESS_CMD="gunzip -c"

#
# up-stream changed the split and names at random
# don't you just love them ? - with split pkgs we
# can bin this though.
#
if test -n "$UPSTREAM_NAME" ; then
    OOO_TARBALL="${UPSTREAM_NAME}_core.tar.bz2"
    OOO_SYSTEM_TARBALL="${UPSTREAM_NAME}_system.tar.bz2"
    OOO_BINFILTER_TARBALL="${UPSTREAM_NAME}_binfilter.tar.bz2"
    OOO_LANG_TARBALL="${UPSTREAM_NAME}_l10n.tar.bz2"
    OOO_EXTENSIONS_TARBALL="${UPSTREAM_NAME}_extensions.tar.bz2"
else
    OOO_TARBALL="$OOO_SOURCEDIRNAME-core.tar.bz2"
    OOO_SYSTEM_TARBALL="$OOO_SOURCEDIRNAME-system.tar.bz2"
    OOO_BINFILTER_TARBALL="$OOO_SOURCEDIRNAME-binfilter.tar.bz2"
    OOO_LANG_TARBALL="$OOO_SOURCEDIRNAME-lang.tar.bz2"
    OOO_EXTENSIONS_TARBALL="$OOO_SOURCEDIRNAME-extensions.tar.bz2"
fi
OOO_SPLIT_PREFIX=""
if test "zyes" = "zyes"; then
    OOO_SPLIT_PREFIX="libreoffice-"
    OOO_SDK_OO_TARBALL="libreoffice-sdk-$OOO_SOURCEVERSION.tar.bz2"
    OOO_SYSTEM_TARBALL="libreoffice-libs-extern-sys-$OOO_SOURCEVERSION.tar.bz2"
    OOO_TARBALL=not-there-at-all
    OOO_LANG_TARBALL=not-there-at-all
    OOO_BINFILTER_TARBALL=not-there-at-all
fi

OOO_EXTRA_ARTWORK="extras-3.1.tar.bz2"
OOO_UNTAR_OPTIONS=jxf
OOO_DECOMPRESS_CMD="bzip2 -dc"

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

BUILD_MOZILLA_SOURCE='seamonkey-1.1.14.source.tar.gz'

OPENCLIPART_VER=
OPENCLIPART_DIR=

MDBTOOLS_SRC=
SYSTEM_MDBTOOLS=

export LD_LIBRARY_PATH PATH OOO_SOURCEDIRNAME APPLY_DIR
export CCACHE_DIR CCACHE_NOLINK CCACHE_UNIFY
export SRCDIR BUILDDIR OOBUILDDIR GITTAG
export BUILD_FLAGS VERSION TOOLSDIR VENDORNAME
export PREFIX PREFIXBASE SYSCONFDIR SYSCONFBASE
export MANDIR MANDIRBASE DOCDIR DOCDIRBASE
export OOINSTDIR OOINSTBASE OOOINSTALLDIRNAME
export OODESTDIR OOO_LANGS OOO_LANGS_LIST
export OOO_POOR_HELP_LOCALIZATIONS
export CONFIGURE_OPTIONS
export DISTRO BINSUFFIX ARCHITECTURE BUILD_MAGIC
export BUILD_WIN32 
export FORCE_GCC33 ARCH_FLAGS
export OPENCLIPART_VER OPENCLIPART_DIR
export OOO_SPLIT_PREFIX

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

echo "Setup:"
echo " Source:     '$OOO_SOURCEDIRNAME'"
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 $PROPAGATED_ARGS"
if test "$ENABLE_CCACHE" = "yes"; then
    echo " ccache:     yes, ccache directory is '$CCACHE_DIR'"
else
    echo " ccache:     no"
fi
if test "$ENABLE_ICECREAM" = "yes"; then
    echo " icecream:   yes, in '$ICECREAM_BINDIR'"
    if test "z$ICECC_VERSION" != "z"; then
        echo " icecream:   using '$ICECC_VERSION' compiler tarball."
    fi
else
    echo " icecream:   no"
fi
if test "$ENABLE_DISTCC" = "yes"; then
    echo " distcc:     yes"
else
    echo " distcc:     no"
fi
if test "$MAX_JOBS" -gt 1; then
   echo " Max number of jobs to run in parallel is '$MAX_JOBS'"
fi
if test "$BUILD_NCPUS" -gt 1; then
   echo " Max number of projects to build in parallel is '$BUILD_NCPUS'"
fi
