Tips on Building Graphite OOo

From LSDevLinux
Jump to: navigation, search

Using the OOo Graphite patches using SVN+Quilt

The instructions here will assume that you are using a tar ball from

Change to a suitable base directory and checkout the scripts from subversion: e.g.

svn co

Create a directory structure similar to the following:


In this example OOH680_m5 is your unmodified source as extracted from the OOo tar-balls and build is a copy of OOH680_m5, where you will run dmake and compile the code. Patches is what you just checked out.

Create a symbolic link to the real patches directory and the series file. If a suitable series file doesn't already exist, make a copy of the one closest to the version that you are using.

cd OOGraphite
ln -s ../patches/patches patches
cd patches
ln -s ../../patches/series_files/series_OOH680_m5_gr2.3 series
cd ../../

Now start to apply the patches:

cd OOGraphite
quilt setup patches/series
quilt push

Continue using quilt push until you get a message like "File series fully applied, ends at patch patches/xyz.diff". If one of the patches fails to apply, you may want to use "quilt fork" to make a copy of the patch and then edit it until it applies. You can revert a patch using:

quilt pop

When you have made changes to source files use

quilt refresh patchToUpdate.diff

When you are happy with your changes commit them to subversion with a suitable comment.

Remember that if you need to modify a file that is not currently included in a patch, you must use quilt add before you start to change it.

quilt add -P patchToAddFileTo.diff FileThatNowNeedsModifying.cxx

Accessing Graphite CWS

The CWS has now been migrated to SVN It can be checked out from

The new CWS SVN instructions are at:

The old CWS/CVS instructions can be found at:

The current milestone is m35 and the MWS (Master WorkSpace) has switched from SRC680 to DEV300 (so DEV300_m35), the CWS is called graphite01. Please note that the CVS tag for a CWS keeps the name it was created with regardless of the current MWS, so the tag for graphite01 is still cws_src680_graphite01 and not cws_dev300_graphite01 as might reasonably be assumed. The CWS details can be checked at

The affected modules are listed in EIS.

The CVS instructions below are obsolete For current work, please just use the cws in Subversion.

First you need to get hold of a copy of the source that matches the milestone the CWS is based on. This has to come from the CVS repository

mkdir dev300.m31
cd dev300.m31
cvs co -r DEV300_m31 OpenOffice3

This will take some time depending on the speed of your internet connection. Once that is complete you can then checkout the CWS

cvs co -r cws_src680_graphite01 vcl scp2 sw config_office sc svx

This will update you working copy to the CWS version. AFter that future updates checked into CWS can be gotten by simply doing:

cvs update vcl scp2 sw config_office sc svx

Or running cvs update from within those modules.

Building OOo Graphite against Ubuntu/Debian source package

  • Create a directory to work in
  • Download openoffice source using: apt-get source which will unpack to create a directory of the form with a debian/ and ooo-build/ subdirs
  • Apply the patches (yet to be explained)
  • Build the package. There are different approaches to this.
    • One can set DEB_BUILD_OPTIONS to set how things build. export DEB_BUILD_OPTIONS=ccache is a good one. Using num-cpus=4 tells the build system to try to build up to 4 modules simultanousely but the targets within a module are built serially. It is faster but the sax module often fails to build.
    • Another way to speed up builds is export MAXPROCESS=N where N is the number of cores*hardware threads (usually 2). This sets makefile target parallelisation where dmake will build more that one target within a module simulatenously but does not affect how many modules are built in parrallel. Therefore you can use MAXPROCESS to gain some parallelisation whithout hitting the sax bug above.

Building using pbuilder

One can always build a package using pdebuild but if you have problems then you have to do a complete rebuild from scratch and that can take a while. Another approach is to use pbuilder but with a permanent chroot environment. This allows you to login and continue a stopped build, etc. For this you need to:

  • pbuilder --create
  • cd chroot_parent && tar xvzf /var/cache/pbuilder/base.tgz
  • pbuilder --login --no-targz --buildplace /var/cache/pbuilder/build/gutsy
    • now get the dependencies: apt-get build-dep
    • and logout
  • pdebuild --logfile ../buildn.log --buildresult .. --use-pdebuild-internal --debbuildopts -b -- --no-targz --buildplace /var/cache/pbuilder/build/gutsy
    • set DEB_BUILD_OPTIONS before running this. This will take a while one hopes

Since pdebuild creates an account in the chroot but doesn't tidy it up, if you want to rerun pdebuild in that chroot one needs to login and type the commands:

userdel pbuser groupdel pbgroup

or you can put those into a script and run:

  • pbuilder --execute --no-targz --buildplace /var/cache/pbuilder/build/gutsy ../tidyup

Example Configure scripts

These scripts are just examples and will need to be adapted to your setup.

Windows configure script

./configure --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio NET 2003/Vc7" \
 --with-jdk-home="/cygdrive/c/Program Files/Java/jdk1.6.0" \
 --with-csc-path="/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322" \
 --with-midl-path="/cygdrive/c/Program Files/Microsoft Platform SDK/Bin" \
 --with-frame-home="/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/SDK/v1.1" \
 --with-psdk-home="/cygdrive/c/Program Files/Microsoft Platform SDK" \
 --with-mspdb-path="C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\IDE" \
 --with-directx-home="/cygdrive/c/usr/directx" \
 --with-ant-home="/cygdrive/c/usr/apache-ant-1.7.0" \
 --with-nsis-path="/cygdrive/c/Program Files/NSIS" \
 --with-dict=ENGB,ENUS \
 --disable-gtk \
 --disable-build-mozilla \
 --disable-strip-solver \
 --with-vendor="" \
 --with-build-version="Built to test Graphite fonts in OOo" \

Linux configure script

export CC="ccache gcc"
export CXX="ccache g++"

./configure \
 --enable-libart \
 --enable-ldap \
 --disable-lockdown \
 --enable-libsn \
 --disable-mozilla \
 --enable-epm \
 --disable-odk \
 --enable-qadevooo \
 --disable-fontooo \
 --enable-mathmldtd \
 --enable-evolution2 \
 --enable-cups \
 --enable-fontconfig \
 --disable-symbols \
 --disable-debug \
 --disable-dbgutil \
 --enable-crashdump=no \
 --enable-gtk \
 --enable-gnome-vfs \
 --disable-static-gtk \
 --disable-build-mozilla \
 --disable-kde \
 --disable-kdeab \
 --enable-binfilter \
 --enable-rpath \
 --enable-pasf \
 --enable-pam-link \
 --enable-crypt-link \
 --enable-xrender-link \
 --enable-neon \
 --without-gpc \
 --with-openldap \
 --with-firefox \
 --without-fonts \
 --without-ppds \
 --without-afms \
 --with-package-format=deb \
 --with-system-stdlibs \
 --without-myspell-dicts \
 --without-nas \
 --with-system-libs \
 --with-system-freetype \
 --without-system-agg \
 --with-system-db \
 --with-db-jar=/usr/share/java/libdb4.4-java.jar \
 --without-system-sablot \
 --with-system-python \
 --with-system-odbc-headers \
 --with-system-sane-header \
 --with-system-xrender-headers \
 --with-system-mozilla \
 --with-stlport4=/usr \
 --with-jdk-home=/usr/lib/jvm/java-1.5.0-sun \
 --with-dict=ENGB,ENUS \
 --with-alloc=system \
 --with-x \
 --disable-strip-solver \
 --with-build-version="Built to test Graphite OOo"