#!/bin/bash # # OpenOffice.org Build script for GNU/Linux on x86 and PPC, Solaris, # FreeBSD, MacOS X and Microsoft Windows 2003 Server # # Supported versions: 1.1.4+ (SRX645_m58), OOO680_m1 # # Czech Native-Lang team (http://cs.openoffice.org/) # # # (c) Pavel Janík , 2002 - 2005 # (c) Dan Ohnesorg , 2002 # (c) Josef Cacek , 2002 - 2004 # (c) Rudolf Cejka , 2004 # (c) Petr Vaníček , 2004 (Linux/PPC support) # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Echo commands to be executed set -x date # Additional functions are stored in separate file . build.functions # Set EXTRACT_GSI to yes to get all GSI extracted EXTRACT_GSI="no" # Set EXTRACT_PO to yes to convert all extracted GSI to PO files EXTRACT_PO="no" # Set EXTRACT_README to yes to get all README.html files generated EXTRACT_README="no" # Set BUILD_DEBUG_PACKAGES to yes to get debugging packages BUILD_DEBUG_PACKAGES="no" # Set DEVEL to yes to build developers' version DEVEL="yes" # Set OOO_DEBUG to yes to build OOo with debugging OOO_DEBUG="no" # # Describe the build system # [ `uname -s` = "Linux" ] && export OOO_BUILD_SYSTEM=Linux [ `uname -s` = "Linux" -a "`uname -m`" = "x86_64" ] && export OOO_BUILD_SYSTEM=Linux64 [ `uname -s` = "Linux" -a "`uname -m`" = "ppc" ] && export OOO_BUILD_SYSTEM=LinuxPPC [ `uname -s` = "FreeBSD" ] && export OOO_BUILD_SYSTEM=FreeBSD [ `uname -s` = "SunOS" ] && export OOO_BUILD_SYSTEM=Solaris [ `uname -s` = "Darwin" ] && export OOO_BUILD_SYSTEM=MacOSX [ `uname -s | grep CYGWIN` ] && export OOO_BUILD_SYSTEM=Windows # On AMD64, always build development branch [ ${OOO_BUILD_SYSTEM} = "Linux64" ] && DEVEL="yes" if [ $DEVEL = "yes" ] then VERSION=OOO680_m1 BUILD_IDENTIFICATION="Build-1" BUILD_NUMBER=680 SUPPORTEDLANGUAGES="af bg bn br cs cy da de en-GB en-US et fi fr ga hr hu it km lt lv mk nb ne nl nn ns sk sl sr-CS sh-YU sv tn xh zu" # Build-0 is for experimental purposes only... [ "x${BUILD_IDENTIFICATION}" = "xBuild-0" ] && SUPPORTEDLANGUAGES="en-US cs" # Only selected languages for MacOS X [ ${OOO_BUILD_SYSTEM} = "MacOSX" ] && SUPPORTEDLANGUAGES="en-US cs et" else VERSION=SRX645_m58 BUILD_IDENTIFICATION="Build-1" BUILD_NUMBER=645 # KANNADA disabled! (#i33228#) SUPPORTEDLANGUAGES="ENUS,CZECH,SLOVAK,DAN,HUNG,SLOVENIAN,FINN,WELSH,AFRIK,NSOTHO,ZULU,ARAB,ESTONIAN,LITHUANIAN,BASQUE,NORBOK,NORNYN,TSWANA,GAL" fi if [ ${OOO_BUILD_SYSTEM} = "Linux64" ] then # TEMP: build development milestones instead # VERSION=ooo64bit02 BUILD_IDENTIFICATION="Build-4" SUPPORTEDLANGUAGES="en-US" fi BUILD_ID="${BUILD_IDENTIFICATION} (`LANG=C date`)" CCACHEVERSION=2.4 DPKGVERSION=1.10.27 TRANSLATEVERSION=0.8rc2test2 ANTVERSION=1.6.2 export BASE_DIRECTORY=${PWD} export PATCHES=${BASE_DIRECTORY}/Patches export FILES=${BASE_DIRECTORY}/Files export SOURCES=${BASE_DIRECTORY}/Sources export BUILD=${BASE_DIRECTORY}/BuildDir export BUILD_OUTPUT_DIRECTORY=${BUILD}/${VERSION}/${BUILD_IDENTIFICATION} export PATH=${BUILD}/bin:${PATH} # # Add correct paths for GCC # # GCC in the standard path/location if [ ${OOO_BUILD_SYSTEM} = "LinuxPPC" -o ${OOO_BUILD_SYSTEM} = "MacOSX" ] then export OOO_GCC_PATH="/usr" export PATH=${OOO_GCC_PATH}/bin/:${PATH} export LD_LIBRARY_PATH=${OOO_GCC_PATH}/lib:${LD_LIBRARY_PATH} fi if [ ${OOO_BUILD_SYSTEM} = "Linux64" ] then export OOO_GCC_PATH="/tmp/GCC341/" export PATH=${OOO_GCC_PATH}/bin/:${PATH} export LD_LIBRARY_PATH=${OOO_GCC_PATH}/lib64:${LD_LIBRARY_PATH} fi if [ ${OOO_BUILD_SYSTEM} = "Linux" ] then if [ $DEVEL = "yes" ] then # Use GCC 3.4.1 on development builds export OOO_GCC_PATH="/disk2/OpenOffice.org/GCC341" # ... or default system gcc [ ! -d ${OOO_GCC_PATH} ] && OOO_GCC_PATH=/usr export PATH=${OOO_GCC_PATH}/bin/:${PATH} export LD_LIBRARY_PATH=${OOO_GCC_PATH}/lib:${LD_LIBRARY_PATH} GTKPREFIX=/disk2/OpenOffice.org/GTK # Add new pkg_config and library path export PKG_CONFIG_PATH=${GTKPREFIX}/lib/pkgconfig export LD_LIBRARY_PATH=${GTKPREFIX}/lib/:${LD_LIBRARY_PATH} else export OOO_GCC_PATH="/usr" export PATH=${OOO_GCC_PATH}/bin/:${PATH} export LD_LIBRARY_PATH=${OOO_GCC_PATH}/lib:${LD_LIBRARY_PATH} fi fi if [ ${OOO_BUILD_SYSTEM} = "FreeBSD" ] then export OOO_GCC_PATH=~/GCC341 export PATH=${OOO_GCC_PATH}/bin/:${PATH} export LD_LIBRARY_PATH=${OOO_GCC_PATH}/lib:${LD_LIBRARY_PATH} fi # # Add necessary paths for configure on Microsoft Windows and set other # configurations. # if [ ${OOO_BUILD_SYSTEM} = "Windows" ] then if [ $DEVEL = "yes" ] then # Use .NET 2003 compiler and to the right version of ConvertDSW and .NET Tools, NSIS export PATH="/cygdrive/c/PROGRA~1/CONVER~2:/cygdrive/c/PROGRA~1/MICROS~1.NET/Common7/Tools/Bin:/cygdrive/c/PROGRA~1/MICROS~1.NET/Common7/IDE:/cygdrive/c/PROGRA~1/MICROS~1.NET/Vc7/bin:/cygdrive/c/PROGRA~1/NSIS/:${PATH}" export DOTNET_PATH="/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/SDK/v1.1" else # Use .NET 2002 compiler export PATH="${PATH}:/cygdrive/e/MICROS~1.NET/COMMON7/IDE:/cygdrive/e/MICROS~1.NET/VC7/BIN" fi fi # # GNU tar, GNU patch and GNU cp # export TAR=`which tar` export PATCH=`which patch` export CP=`which cp` # Location of GNU utilities on Solaris if [ ${OOO_BUILD_SYSTEM} = "Solaris" ] then export TAR=/usr/local/bin/tar export PATCH=/usr/local/bin/patch # GNU patch can be installed as gpatch [ ! -x ${PATCH} ] && export PATCH=/usr/bin/gpatch export CP=/usr/local/bin/cp fi if [ ${OOO_BUILD_SYSTEM} = "FreeBSD" ] then export PATCH=/usr/local/bin/gpatch export CP=/usr/local/bin/gcp fi if [ ${OOO_BUILD_SYSTEM} = "MacOSX" ] then export CP=/sw/bin/cp fi # # Architecture specific settings # case ${OOO_BUILD_SYSTEM} in Linux) if [ $DEVEL = "yes" ] then OOOUTPATH=unxlngi6 else OOOUTPATH=unxlngi4 fi OOARCHENVIRONMENT=LinuxIntel JDKPATH=/usr/lib/SunJava2 ;; Linux64) OOOUTPATH=unxlngx6 OOARCHENVIRONMENT=LinuxAMD JDKPATH=/opt/java ;; LinuxPPC) OOOUTPATH=unxlngppc OOARCHENVIRONMENT=LinuxPPC JDKPATH=/opt/j2sdk1.3.1 ;; FreeBSD) OOOUTPATH=unxfbsd OOARCHENVIRONMENT=FreeBSD JDKPATH=/usr/local/jdk1.4.2 ;; Solaris) OOOUTPATH=unxsols4 OOARCHENVIRONMENT=SolarisSparc JDKPATH=/usr/java ;; Windows) if [ $DEVEL = "yes" ] then OOOUTPATH=wntmsci10 else OOOUTPATH=wntmsci8 fi OOARCHENVIRONMENT=Win32Intel JDKPATH=/cygdrive/c/j2sdk1.4.2_04 ;; MacOSX) OOOUTPATH=unxmacxp OOARCHENVIRONMENT=Macosx JDKPATH=/usr ;; *) echo "Operating system/CPU not supported yet. Please report this to Pavel Janík." exit ;; esac # # Prepare the build tree # rm -rf ${BUILD} mkdir -p ${BUILD} mkdir -p ${BUILD_OUTPUT_DIRECTORY} cd ${BUILD} # Prepare ccache [ ${OOO_BUILD_SYSTEM} != "Windows" ] && PrepareCCache # Prepare dpkg for Debian packages if [ $DEVEL = "yes" ] then [ ${OOO_BUILD_SYSTEM} = "Linux" -o ${OOO_BUILD_SYSTEM} = "Linux64" ] && PrepareDpkg fi # Prepare translate tools [ $DEVEL = "yes" ] && PrepareTranslate # Prepare Ant PrepareAnt ${TAR} xfz ${SOURCES}/OOo_${VERSION}_source.tar.gz cd ooo_${VERSION}_src # Additional files for different operating systems # FIXME: Issue #i27627#: Windows directory not needed now for devel tree? [ -d ${SOURCES}/${OOO_BUILD_SYSTEM} ] && cp -v -f -R ${SOURCES}/${OOO_BUILD_SYSTEM}/* . # Unpack external source files - GPC UnpackGPC # Copy Mozilla source to the final destination [ $DEVEL = "yes" ] && cp ${SOURCES}/mozilla-source-1.7.5.tar.gz moz/download ########################################################################### # # # Patches and fixes # # # ########################################################################### # # Linux/AMD64 specific fixes for development version # if [ ${OOO_BUILD_SYSTEM} = "Linux64" ] then # FIXME: workaround for qadevOOo build failure export ANT_OPTS="-Xmx512m" # Commented region # # Issue #i50482#: 64bit: crash while initializing fontconfig # # Fixed in gslpatches2 # ApplyCWSPatch psprint CWS-gslpatches2-psprint.diff # # Issue #i50483#: 64bit: Wrong getting of work area rectangle # # Fixed in gslpatches2 # ApplyCWSPatch vcl CWS-gslpatches2-vcl.diff # # Issue #i50485#: 64bit: Suspicious NULL pointer check in basegfx # # Fixed in canvas02 # ApplyCWSPatch basegfx i50485-basegfx-canvas02.diff # # Issue #i50696#: berkeleydb: build failed on AMD64 # # Fixed in pj30/SRC680_m116 # ApplyPatch i50696-berkeleydb.diff # # FIXME: report, http://www.go-oo.org/patches/64bit/buildfix-64bit-fpicker.diff # ApplyPatch iFIXME-fpicker.diff # # FIXME: report, http://www.go-oo.org/patches/64bit/buildfix-64bit-cppcanvas.diff # ApplyPatch iFIXME-cppcanvas.diff # # FIXME: report, http://www.go-oo.org/patches/64bit/buildfix-64bit-basic.diff # ApplyPatch iFIXME-basic.diff # # FIXME: http://www.go-oo.org/patches/64bit/buildfix-64bit-setup_native.diff # ApplyPatch iFIXME-setup_native.diff # # FIXME: http://www.go-oo.org/patches/64bit/buildfix-64bit-dbaccess.diff # ApplyPatch iFIXME-dbaccess.diff # # FIXME: http://www.go-oo.org/patches/64bit/buildfix-64bit-svx.diff # ApplyPatch iFIXME-svx.diff # # FIXME: http://www.go-oo.org/patches/64bit/buildfix-64bit-forms.diff # ApplyPatch iFIXME-forms.diff # # Issue #i31057#: 64bit: solenv - optimization off # ApplyPatch 64bit-i31057-solenv.diff # # Fix bridges: http://cvs.gnome.org/viewcvs/*checkout*/ooo-build/patches/64bit/fix-64bit-bridges.diff # ApplyPatch kendy-bridges.diff # # Issue #i50733#: Python registration failed (AMD64) # # TEMP: not proper solution # ApplyPatch i50733-scp2-no-python.diff # # Issue #i50781#: 64bit: pointer vs. ULONG (Focus) # ApplyPatch iFIXME-vcl-Focus.diff # # Issue #i50781#: 64bit: pointer vs. ULONG (Focus) # ApplyPatch iFIXME-svtools-Focus.diff # # FIXME: report # ApplyPatch iFIXME-Blackdown-Java-server.diff # # FIXME: http://www.go-oo.org/patches/64bit/fix-64bit-tools-svbt.diff # ApplyPatch fix-64bit-tools-svbt.diff -p0 # # Issue #i43598#: Make helpcontent2 work with images (still Read-Error though) # ApplyPatch i43598-svx-make-help-images-working.diff fi # # MacOS X specific fixes # if [ ${OOO_BUILD_SYSTEM} = "MacOSX" ] then if [ $DEVEL = "no" ] then # Issue #i32066#: Xinerama is linked staticly even when dynamic is preferred ApplyPatch MacOSX-vcl-util-makefile.diff # Issue #i37733#: xmlhelp Dbt prototype for berkeleydb ApplyPatch MacOSX-xmlhelp-proto.diff ApplyPatch MacOSX-sw_vers-i38439.diff fi # Devel issues #i42998#, #i50016#, #i50150#, #i51282#, #i50317#, #i51126# fi # # FreeBSD specific fixes # if [ ${OOO_BUILD_SYSTEM} = "FreeBSD" -a $DEVEL = "no" ] then # Issue #i23917#: temporary fix to workaround configuration service problem ApplyPatch FreeBSD-temp-add_end.diff # #i22253#: FreeBSD startup problem: GetStorage and non-existent # soffice.cfg (workaround only) ApplyPatch FreeBSD-temp-soffice_cfg-error.diff # Issue #i24142#: FreeBSD support in ODK ApplyPatch FreeBSD-SDK.diff ApplyPatch FreeBSD-SDK-settings.diff fi # # Solaris/SPARC specific fixes # if [ ${OOO_BUILD_SYSTEM} = "Solaris" -a $DEVEL = "no" ] then # Issue #i#: FIXME! ApplyPatch Solaris-CC-5.5.diff fi # Issue #i42516#: Use my name as OOO_VENDOR. [ $DEVEL = "yes" ] && ApplyPatch OOO_VENDOR.diff # # Generic fixes # if [ $DEVEL = "yes" ] then # TEMP: OOOSRC for localize... ApplyPatch iTEMP-OOO680.diff # AMD64's unxlngx6.mk cp -rav ${FILES}/2.0/pj34/* . # pj34 self-QA ApplyCWS pj34 # macosx11 patch for nas ApplyCWS macosx11 # Issue #i54240#: Add ga (Irish) to setup_native's source/win32/msi-encodinglist.txt ApplyPatch i54240-add-Irish.diff # Issue #i48948#: Add Breton to postset.mk and setup_native.... # Issue #i54872#: Latvian, Macedonian # Target 2.0.1 ApplyPatch i48948-add-Breton-postset.diff ApplyPatch i48948-add-Breton-MSI.diff # Issue #i50957#: Add Slovak to Letter Wizard ApplyPatch i50957-Slovak-LetterWizard.diff # Issue #i47647#: Khmer font fallback # target 2.0.1, cws vcl39 ApplyPatch i47647-Khmer-font-fallback.diff # Issue #i52786#: Diacritics corrupted in Word95 .DOC # Fixed in cws javapatch (not visible on EIS, Fri, August 12) ApplyPatch i52786-word95-fixes.diff # Issue #i35873#: Turn kerning on by default for 2.0 ApplyPatch i35873-kerning-on.diff # Issue #i49433#: Base's Form wizard has a non localizable strings # Target 2.0.1, extracted from dbwizardpp1 ApplyCWSPatch officecfg i49433-missing-translation.diff # Issue #iFIXME#: Default fonts for sl and sk ApplyPatch officecfg-sl_sk_default_fonts.diff # Issue #i42014#: Add Czech calendar to awt (for agenda wizard) # Eike is working on correct fix in cws internatiodel ApplyPatch i42014-Czech-awt-calendar.diff # Add Danish dictionary ApplyPatch add-danish-dictionary.diff # QA builds for intptr and dxarray child workspaces if [ ${OOO_BUILD_SYSTEM} = "Linux64" ] then ApplyCWS intptr ApplyCWS dxarray # Remaining bits from ooo64bit02 ApplyCWS ooo64bit02 fi else # Issue #i27931#: Fix scpzip output format # This is fixed in 680+ ApplyPatch scpzip-timestamp.diff # Do not require JDK 1.4.1, allow 1.3.1 too # FIXME: report! ApplyPatch SDK-JDK-1.3.1.diff # Issue #18588: officecfg and extracting schema? ApplyPatch temp-remove-officecfg-schema-from-localize-output.diff ApplyPatch temp-remove-gtk-from-crashrep.diff # Issue #15909: The caption should contain ': ' ApplyPatch caption-15909.diff # Issue #15640: Tools/Options/External applications ApplyPatch remove-word-Option.diff ApplyPatch add-third-party-licenses.diff fi # # Changes for supported languages # if [ $DEVEL = "no" ] then # Fix dictionary project and corresponding files for all supported languages ApplyPatch add-dictionaries.diff ApplyPatch add-danish-dictionary.diff ApplyPatch add-german-dictionary.diff # Import and export changes for Word 6 and Word 95 for Czech and Slovak ApplyPatch fixes_for_word_6_and_95.diff # Fix export to Word 6 and 95 for the Czech and Slovak versions # FIXME: fix this properly # ApplyPatch properties_fixes_for_word_6_and_95.diff # Export changes for Excel 5 and Excel 95 for Czech and Slovak versions # FIXME: report with sample documents ApplyPatch fixes_for_excel_5_and_95.diff # Save characters not entities in HTML for ISO8859-2 ApplyPatch do-not-export-chars-as-html-entities.diff # Issue #i35653#: RTFimport: Zcaron -> no other text ApplyPatch rtf-hex-i35653.diff fi # Do not substitute fonts while printing # FIXME: report! ApplyPatch psprint-do-not-substitute.diff # # Preparing the compilation process # # We will use ccache on GNU/Linux (both x86 and x86_64), FreeBSD and MacOS X if [ ${OOO_BUILD_SYSTEM} = "Linux" -o ${OOO_BUILD_SYSTEM} = "Linux64" -o ${OOO_BUILD_SYSTEM} = "LinuxPPC" -o ${OOO_BUILD_SYSTEM} = "MacOSX" -o ${OOO_BUILD_SYSTEM} = "FreeBSD" ] then export CC="${BUILD}/bin/ccache ${OOO_GCC_PATH}/bin/gcc" export CXX="${BUILD}/bin/ccache ${OOO_GCC_PATH}/bin/g++" fi if [ ${OOO_BUILD_SYSTEM} = "Solaris" ] then # Default is to use gcc! Why? FIXME! export CC=cc export CXX=CC # FIXME: temporary! # Use GNU gcc # export OOO_GCC_PATH=/usr/local # export CC="ccache ${OOO_GCC_PATH}/bin/gcc" # export CXX="ccache ${OOO_GCC_PATH}/bin/g++" # OOARCHENVIRONMENT=SolarisSparcGcc fi # Configure OpenOffice.org ( cd config_office COMMON_CONFIG_FLAGS="--with-jdk-home=${JDKPATH} --with-dict=ALL --with-lang=\"${SUPPORTEDLANGUAGES}\" --with-gnu-patch=${PATCH} --with-gnu-cp=${CP} --enable-crashdump --with-ant-home=${BUILD}/apache-ant-${ANTVERSION}" [ $DEVEL = "yes" ] && COMMON_CONFIG_FLAGS="${COMMON_CONFIG_FLAGS} --with-mozilla-version=1.7.5 --enable-build-mozab --with-build-version=\"${BUILD_ID}\"" case ${OOO_BUILD_SYSTEM} in Linux) if [ $DEVEL = "yes" ] then eval ./configure ${COMMON_CONFIG_FLAGS} --enable-gtk --enable-kde --with-package-format=\"rpm deb\" else eval ./configure ${COMMON_CONFIG_FLAGS} --enable-mozilla fi ;; Linux64) eval ./configure ${COMMON_CONFIG_FLAGS} --disable-binfilter --disable-cups --disable-gnome-vfs --without-java ;; LinuxPPC) eval ./configure ${COMMON_CONFIG_FLAGS} --enable-mozilla ;; FreeBSD) if [ $DEVEL = "yes" ] then # Issue #i46979#: FreeBSD: portaudio eval ./configure ${COMMON_CONFIG_FLAGS} --disable-gnome-vfs --disable-pasf else eval ./configure ${COMMON_CONFIG_FLAGS} --disable-mozilla fi ;; Solaris) if [ $DEVEL = "yes" ] then eval ./configure ${COMMON_CONFIG_FLAGS} else eval ./configure ${COMMON_CONFIG_FLAGS} --enable-mozilla fi ;; MacOSX) if [ $DEVEL = "yes" ] then # FIXME: #i27584#: MacOS X and X includes detection eval ./configure ${COMMON_CONFIG_FLAGS} --enable-gtk --disable-crashdump --with-x --x-includes=/usr/X11R6/include/ --with-gnu-cp=/sw/bin/cp --disable-gnome-vfs else eval ./configure ${COMMON_CONFIG_FLAGS} --disable-mozilla --disable-crashdump --with-x --x-includes=/usr/X11R6/include/ fi ;; Windows) if [ $DEVEL = "yes" ] then eval ./configure ${COMMON_CONFIG_FLAGS} --with-mozilla-version=1.7.5 --enable-build-mozab \ --with-frame-home=\"${DOTNET_PATH}\" --disable-directx else eval ./configure ${COMMON_CONFIG_FLAGS} --enable-mozilla --with-use-shell=tcsh fi ;; esac ) || { echo "Configure failed. Fix it!" exit } # # Additional files (dictionaries etc.) # if [ $DEVEL = "no" ] then for locale in af_ZA cs_CZ sk_SK hu_HU da_DK de_DE lt_LT sl_SI fi_FI zu_ZA et_EE do mkdir -p dictionaries/${locale} if [ -f ${SOURCES}/Dictionaries/${locale}.zip ] then unzip ${SOURCES}/Dictionaries/${locale}.zip cp ${locale}.dic ${locale}.aff dictionaries/${locale} [ -f README_${locale}.txt ] && cp README_${locale}.txt dictionaries/${locale} [ -f ${SOURCES}/Dictionaries/th_${locale}_thes.zip ] && cp ${SOURCES}/Dictionaries/th_${locale}_thes.zip dictionaries/${locale} [ -f ${SOURCES}/Dictionaries/th_${locale}_words.zip ] && cp ${SOURCES}/Dictionaries/th_${locale}_words.zip dictionaries/${locale} fi language=`echo ${locale}|sed 's#_.*##'` [ -f ${FILES}/hyph_${language}.dic ] && cp ${FILES}/hyph_${language}.dic dictionaries/${locale} done # Makefiles for new dictionaries ${TAR} xvfz ${FILES}/dictionaries-files.tar.gz fi # # Localized extras # # Issue #i26601#: German icons used for localized build when own icons not added [ $DEVEL = "no" ] && cp -r res/enus/* res/ # FIXME: extras for other languages! if [ $DEVEL = "no" ] then # Extract all additional extras automatically for i in ${FILES}/*_extras.tar.gz do [ -f $i ] && ${TAR} xvfz $i done else for ISOCODE in $SUPPORTEDLANGUAGES do [ -f ${FILES}/2.0/extras_${ISOCODE}.tar.gz ] && ${TAR} xvfz ${FILES}/2.0/extras_${ISOCODE}.tar.gz done fi if [ $DEVEL = "yes" ] then for ISOCODE in $SUPPORTEDLANGUAGES do # Unpack all auxiliary files [ -f ${FILES}/2.0/auxiliary_${ISOCODE}.tar.gz ] && ${TAR} xvfz ${FILES}/2.0/auxiliary_${ISOCODE}.tar.gz # Unpack localized help images [ -f ${FILES}/2.0/help_images_${ISOCODE}.tar.gz ] && ${TAR} xvfz ${FILES}/2.0/help_images_${ISOCODE}.tar.gz # Unpack images for toolbars (B, U, I etc.) [ -f ${FILES}/2.0/toolbar_images_${ISOCODE}.tar.gz ] && ${TAR} xvfz ${FILES}/2.0/toolbar_images_${ISOCODE}.tar.gz done fi # The number of processes running in parallel [ ${OOO_BUILD_SYSTEM} = "Linux" -a $DEVEL = "yes" ] && { export MAXPROCESS=1 if [ ${MAXPROCESS} -gt 1 ] then # MAXPROCESS=1 fixes # for i in moz/makefile.mk # do # awk '{ if ($0 ~ "^PRJNAME=") print "MAXPROCESS=1"; print ; }' <$i >$i.MAXPROCESS # mv -f $i.MAXPROCESS $i # done echo "No patches needed" fi } [ -f bootstrap ] || { echo "bootstrap not found - fix this" exit } [ "x${OOO_DEBUG}" = "xyes" ] && export DBG_LEVEL=10 ./bootstrap || { echo "Bootstrap failed" exit } if [ ${OOO_BUILD_SYSTEM} = "Windows" ] then . winenv.set.sh else . ${OOARCHENVIRONMENT}Env.Set.sh fi if [ $DEVEL = "yes" ] then # Issue #i51139#: workaround export TMP=/tmp # Build RPM and DEB packages in one go # FIXME: configure12 should fix this # [ ${OOO_BUILD_SYSTEM} = "Linux" -o ${OOO_BUILD_SYSTEM} = "Linux64" ] && export PKGFORMAT="rpm deb" fi # Build transex3 project first PrepareLocalizeTool # Extract all README.html files [ ${EXTRACT_README} = "yes" ] && ExtractREADME # Extract all GSI files [ ${EXTRACT_GSI} = "yes" -o ${EXTRACT_PO} = "yes" ] && ExtractGSI # Convert GSI files to PO files [ ${EXTRACT_PO} = "yes" ] && ExtractPO # Convert GSI files to PO files [ $DEVEL = "yes" -a ${OOO_BUILD_SYSTEM} = "Linux" ] && ExtractPOT # # Add/update translations # # Merging GSI/SDF files if [ $DEVEL = "yes" ] then for ISOCODE in $SUPPORTEDLANGUAGES do cp ${FILES}/2.0/GSI_${ISOCODE}.sdf.{bz2,gz} ${BUILD} [ -f ${BUILD}/GSI_${ISOCODE}.sdf.bz2 ] && bunzip2 -f ${BUILD}/GSI_${ISOCODE}.sdf.bz2 [ -f ${BUILD}/GSI_${ISOCODE}.sdf.gz ] && gunzip ${BUILD}/GSI_${ISOCODE}.sdf.gz [ -f ${BUILD}/GSI_${ISOCODE}.sdf ] && { # Remove all existing translations from localize.sdf files for localize in `find . -name localize.sdf` do grep -v " $ISOCODE " $localize >$localize.tmp mv -f $localize.tmp $localize done MergeDevelGSI ${ISOCODE} rm ${BUILD}/GSI_${ISOCODE}.sdf } done else MergeGSI 36 hu hungarian MergeGSI 42 cs czech MergeGSI 43 sk slovak MergeGSI 45 da danish MergeGSI 50 sl slovenian MergeGSI 35 fi finnish MergeGSI 53 cy welsh MergeGSI 26 ns northernsotho MergeGSI 27 af afrikaans MergeGSI 28 zu zulu MergeGSI 29 tn tswana MergeGSI 77 et estonian MergeGSI 10 eu basque MergeGSI 58 lt lithuanian MergeGSI 79 nn norwegian_nynorsk MergeGSI 47 nb norwegian_bokmal MergeGSI 93 kn-IN kannada MergeGSI 96 ar arabic MergeGSI 38 gl galician # Fix missing backslashes and errors when merging find . -name "*.hrc" -exec ${SOURCES}/FixLocalizeErrors.sh '{}' \; find . -name "*.src" -exec ${SOURCES}/FixLocalizeErrors.sh '{}' \; # Fix merge errors (misplaced translations) ApplyPatch fix-localize-bugs.diff ApplyPatch fix-localize-bugs-galician.diff ApplyPatch fix-localize-bugs-1.diff fi # FIXME/TEMP: add missing auxiliary/isocode directories for now if [ $DEVEL = "yes" ] then for i in ${SUPPORTEDLANGUAGES} do [ ! -d helpcontent2/source/auxiliary/$i ] && cp -r helpcontent2/source/auxiliary/en-US helpcontent2/source/auxiliary/$i done fi # Disable dependencies, makes the build much faster. # VERIFY: parallel builds with dependencies [ ! ${MAXPROCESS} -gt 1 ] && export nodep=true dmake || { date echo "Dmake failed, fix the bug above." read } # # Czech and Slovak license files, helpcontent are localised # if [ $DEVEL = "no" ] then # Add localised helpcontent UnpackHelpContent cp ${FILES}/cs-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/42/osl/LICENSE cp ${FILES}/cs-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/42/osl/LICENSE42 cp ${FILES}/cs-license.html solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/42/osl/LICENSE42.html cp ${FILES}/cs-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/42/osl/license.txt cp ${FILES}/cs-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/42/osl/license42.txt cp ${FILES}/cs-license.html solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/42/osl/license.html cp ${FILES}/sk-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/43/osl/LICENSE cp ${FILES}/sk-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/43/osl/LICENSE43 cp ${FILES}/sk-license.html solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/43/osl/LICENSE43.html cp ${FILES}/sk-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/43/osl/license.txt cp ${FILES}/sk-LICENSE solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/43/osl/license43.txt cp ${FILES}/sk-license.html solver/${BUILD_NUMBER}/${OOOUTPATH}.pro/bin/43/osl/license.html fi # # Openoffice.org SDK # [ ${OOO_BUILD_SYSTEM} != "Linux64" ] && CreateSDK # # Installation sets # if [ ${DEVEL} = "no" ] then ( StripEverything cd instsetoo/${OOOUTPATH}* CreateInstallationSet 01 english CreateInstallationSet 35 finnish fi CreateInstallationSet 36 hungarian hu CreateInstallationSet 42 czech cs CreateInstallationSet 43 slovak sk CreateInstallationSet 45 danish da CreateInstallationSet 50 slovenian sl CreateInstallationSet 53 welsh cy CreateInstallationSet 26 northernsotho ns CreateInstallationSet 27 afrikaans af CreateInstallationSet 28 zulu zu CreateInstallationSet 29 tswana tn CreateInstallationSet 77 estonian et CreateInstallationSet 10 basque eu CreateInstallationSet 58 lithuanian lt CreateInstallationSet 79 norwegian_nynorsk nn CreateInstallationSet 47 norwegian nb CreateInstallationSet 93 kannada kn-IN CreateInstallationSet 96 arabic ar CreateInstallationSet 38 galician gl ) fi [ ${DEVEL} = "yes" ] && CreateNativeInstallers [ ${DEVEL} = "yes" ] && CreateNativeLangPacks [ ${DEVEL} = "yes" ] && CreateURE [ ${BUILD_DEBUG_PACKAGES} != "yes" ] && exit # Prepare debug GSI files [ ${OOO_BUILD_SYSTEM} = "Linux" ] && PrepareDebugGSI # # Debugging installation sets # if [ $DEVEL == "yes" ] then for ISOCODE in $SUPPORTEDLANGUAGES do [ -f ${FILES}/2.0/GSI_${ISOCODE}.sdf ] && MergeDevelGSI ${ISOCODE} debug done fi if [ $DEVEL != "yes" ] then MergeGSI 36 hu hungarian debug MergeGSI 42 cs czech debug MergeGSI 43 sk slovak debug MergeGSI 45 da danish debug MergeGSI 50 sl slovenian debug MergeGSI 35 fi finnish debug MergeGSI 53 cy welsh debug MergeGSI 26 ns northernsotho debug MergeGSI 27 af afrikaans debug MergeGSI 28 zu zulu debug fi dmake if [ ${DEVEL} = "no" ] then ( cd instsetoo/${OOOUTPATH}* CreateInstallationSet 35 finnish fi debug CreateInstallationSet 36 hungarian hu debug CreateInstallationSet 42 czech cs debug CreateInstallationSet 43 slovak sk debug CreateInstallationSet 45 danish da debug CreateInstallationSet 50 slovenian sl debug CreateInstallationSet 53 welsh cy debug CreateInstallationSet 26 northernsotho ns debug CreateInstallationSet 27 afrikaans af debug CreateInstallationSet 28 zulu zu debug ) fi # Create debugging language packs [ ${DEVEL} = "yes" ] && CreateNativeLangPacks debug