dimecres, 2 de febrer del 2011

Compilar OpenOffice.org en Snow Leopard

Un cop enllestits els requisits... incloent:
  • 10GB d'espai lliure al disc
  • Java for Mac OS X 10.6 Update 3 Developer Package (http://connect.apple.com/)
  • XCode 3.2.3 (http://developer.apple.com/technologies/tools/xcode.html)

Seguim els següents passos:
  1. Obtenir els fonts d'openoffice.org des del dipòsit mercurial:
    hg clone http://hg.services.openoffice.org/DEV300/ ooo_source
  2. nano $HOME/Sources/OpenOffice/build.sh
    #!/bin/sh
    export BASE=`pwd`
    export OOVERSION=`echo $BASE|sed 's/^\/.*\///'`
    echo Building from     : $BASE
    echo OpenOffice Version: $OOVERSION
    ./configure \
    --with-lang="ca" \
    --disable-odk \
    --disable-pasf \
    --disable-gtk \
    --disable-build-mozilla \
    --disable-headless \
    --with-build-version=$OOVERSION-`date +%d-%m-%y` \
    --disable-fontconfig \
    --without-nas \
    --with-jdk-home=/System/Library/Frameworks/JavaVM.framework/Home \
    --with-stlport=no \
    --disable-mediawiki \
    --enable-werror \
    --disable-vba
  3. chmod +x $HOME/Sources/OpenOffice/build.sh
  4. cd ooo_source
  5. hg tags
  6. hg update -rOOO330_m20
  7. ln -s /Users/robert/Sources/OpenOffice/build.sh ./build.sh
  8. export DYLD_INSERT_LIBRARIES=/usr/lib/libsqlite3.dylib
    export TMP=/tmp
    export SYSTEM_OPENSSL=YES
  9. cp ${HOME}/Sources/OpenOffice/MACOSXGCC*.zip ./moz/zipped/
  10. ./build.sh
  11. chmod +x bootstrap
  12. ./bootstrap
  13. source MacOSXX86Env.Set.sh
  14. cd instsetoo_native
  15. build --all -P4 --dlv_switch -link
El resultat es desa en la carpeta instsetoo_native/unxmacxi.pro/OpenOffice/dmg/install/
El podeu baixar de: OOo_3.3.0_MacOS_x86_install_ca.dmg

    NOTA: ha estat compilat a Snow Leopard 10.6.6 a 64 bits (Intel), per a què utilitzi el gestor de finestres Aqua natiu i no X-Window, pel que s'ha tingut que modificar el fitxer set_soenv.in:
    MOTIU: no entrava al if ($platform =~ m/^i[3456]86/)

    elsif ( $platform =~ m/darwin/ )
    {     print "Setting Mac OS X/Darwin specific values... ";
          $BIG_SVX        = "TRUE";
          $COM            = "GCC";
          $COMPATH        = '@COMPATH@';
    #      if ($platform =~ m/^i[3456]86/)
    #      {
              print "Setting values for Mac OS X/Darwin on x86... ";
              $outfile        = "MacOSXX86Env.Set";
              $CPU            = "I";
              $CPUNAME        = "INTEL";
              $OUTPATH        = "unxmacxi";
    #      }
          if ($platform =~ m/^powerpc/)
          {
              print "Setting values for Mac OS X/Darwin on PowerPC... ";
              $outfile        = "MacOSXPPCEnv.Set";
              $CPU            = "P";
              $CPUNAME        = "POWERPC";
              $OUTPATH        = "unxmacxp";
          }

    NOTA: Modificar fitxer jurt/prj/d.lst
    canviar la línia:

    ..\%__SRC%\lib\libjpipe*.dylib %_DEST%\lib%_EXT%\libjpipe*.dylib
    per
    ..\%__SRC%\lib\libjpipe.jnilib %_DEST%\lib%_EXT%\libjpipe.jnilib


    Sign by Danasoft - Myspace Layouts and Signs