Instalando las Dependencias de Mac OS X

From The Document Foundation Wiki
Jump to: navigation, search

NOTA: reescritura en progreso - las instrucciones detalladas aún no están.

Mac es la platafroma mas sencilla en la que impezar a compilar LibreOffice, como no necesitas tener toneladas de cosas (incluso cuando esta pagina lo pedía anteriormente - solo contenía información incorrecta).

Realmente instalar cosas adicionales no listadas aqui puede hacer la compilación de LibreOffice mucho más dificil.

Paso 1: Instalar XCode con el SDK 10.4

XCode is provided by Apple, just make sure you install the 10.4u SDK that is not installed by default (and no longer included in the very latest version, so get XCode 2.x or 3.x) How to get

  • Included on your Mac OS X installation media

Alternatively

  • go to https://connect.apple.com (you need to register to be able to download XCode)
  • Choose "Developer Tools" on the right hand side
  • Download the matching version for your version of Mac OS X
    • XCode 3.2.6 when running Mac OS X 10.6
    • XCode 3.1.4 when running Mac OS X 10.5
    • XCode 2.5 when using Mac OS X 10.4

Nota que para XCode 3.2.x, el SDK 10.4u no esta instalado por defecto, it must be enabled in the optional modules section during installation (Customize... button)

Paso 2: No hay paso 2

Si, es correcto, XCode gcondigue todo lo que necesitas para construir, al menos cuando usas --disable-mozilla. Con una excepción: necesitas gnu make >= 3.81, así cuando estas en un 10.4/PPC y tienes que usar XCode 2.x: mira abajo

Pero yo quiero construir mozilla

While not needed for regular hacking (as there are also prebuilt zips available that can be hooked up into the build to save time compiling and not loosing functionality) and not loosing much functionality when it is disabled (certificate management for signing documents, ldap access, mozilla address book connectivity): When you want to build it you need

libIDL

Para satisfacer las dependencias de libIDL, necesitas:

gettext

y

glib2

y para hacer mas facil la compilación sin tener que especificar manualmente banderas de adicionales para ellas

pkg-cnofig

(gettext y glib2 son ahora parte de las fuentes, así TODO: make los usa cuando esta compilando mozilla)

Cosas que no se requieren, pero que se sugieren fuertemente

Git

Git version control - as otherwise checking out the sources/updating the sourcetree will involve quite a bit of manual work downloading the tarballs, etc.

It is suggested to build git from source - but as building the documentation (and that includes the man-pages) would require to install tons of dependencies, the recommendation is to not build the documentation files yourself, but to get the corresponding binary package from http://www.kernel.org/pub/software/scm/git/ (search for manpages and pick the one matching your version)

To compile and install to /usr/local, just use

./configure 
make 
make install

Si estas ejecutando 10.5 o superior, puedes usar el binario en su lugar

Ambos, binario y fuente puedesn obtenerse vía http://git-scm.com/

ccache

ccache is short for compiler cache - and it is exactly that. It saves tons of time by not running the actual compiler when nothing changed in the source. This can easily save you two thirds of the overall compile time.

Estoy en 10.4.x/PPC

En este caso, como la versión de xcode solo incluye una versión defectuosa de gnu make, que no puede manejar los complicados makefiles que usaremos, necesitas

GNU make

la version 3.81 ista OK, pero consigue la versión actual


what follows is the original page's content stripped from the wrongly listed deps


Construyendo las Dependencias para Mac OS X 10.6.4 (64bits)

First you need to install Xcode 3.2.4 with 10.4 SDK (an install option of Xcode that is not pre-selected), and Git

Next, you may want to decide if you need the mozilla-related stuff built. See Development/Native Build#Disable mozilla on disabling mozilla. In case of --disable-mozilla you can skip the following dependencies.

Note: the bash sections below are meant to be cut-and-pasted into a console.

We are going to build the dependencies in ~/lodep

cd
mkdir lodep
cd lodep
export PAR="-j8" # change 8 with the approriate number of cpus


Instalar pkg-config (pkg-config Wiki – FrontPage)

curl http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz -o pkg-config-0.25.tar.gz
tar -xf pkg-config-0.25.tar.gz
cd pkg-config-0.25
./configure CC="gcc -arch i386 -arch x86_64" CXX="g++ -arch i386 -arch x86_64" CPP="gcc -E" CXXCPP="g++ -E"
make $PAR
sudo make install
cd -

Instalar gettext (gettext - GNU Project - Free Software Foundation (FSF))

curl http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.1.1.tar.gz -o gettext-0.18.1.1.tar.gz
tar -xf gettext-0.18.1.1.tar.gz
cd gettext-0.18.1.1
./configure CC="gcc -arch i386 -arch x86_64" CXX="g++ -arch i386 -arch x86_64" CPP="gcc -E" CXXCPP="g++ -E"
make $PAR
sudo make install
cd -

Instalar glib2 (ftp.gnome.org)

curl ftp://ftp.gnome.org/pub/gnome/sources/glib/2.27/glib-2.27.0.tar.bz2 -o glib-2.27.0.tar.bz2
tar -xf glib-2.27.0.tar.bz2
cd glib-2.27.0
./configure --with-libiconv=native
echo '--- glib-2.27.0-orig/glib/gconvert.c2010-09-17 17:33:50.000000000 -0500' > glib.patch
echo '+++ glib-2.27.0/glib/gconvert.c 2010-10-27 00:01:39.000000000 -0500' >> glib.patch
echo '@@ -61,9 +61,6 @@' >> glib.patch
echo ' #if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)' >> glib.patch 
echo ' #error GNU libiconv in use but included iconv.h not from libiconv' >> glib.patch
echo ' #endif' >> glib.patch
echo '-#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)' >> glib.patch
echo '-#error GNU libiconv not in use but included iconv.h is from libiconv' >> glib.patch
echo '-#endif' >> glib.patch 
echo ' ' >> glib.patch
echo ' /**' >> glib.patch 
echo '  * SECTION:conversions' >> glib.patch 
patch -p1 < glib.patch 
make
sudo make install
make clean
./configure CC="gcc -arch i386" CXX="g++ -arch i386" CPP="gcc -E" CXXCPP="g++ -E" --with-libiconv=native
make $PAR
lipo -create gio/.libs/libgio-2.0.0.dylib /usr/local/lib/libgio-2.0.0.dylib -output libgio-2.0.0.dylib
lipo -create glib/.libs/libglib-2.0.0.dylib /usr/local/lib/libglib-2.0.0.dylib -output libglib-2.0.0.dylib
lipo -create gmodule/.libs/libgmodule-2.0.0.dylib /usr/local/lib/libgmodule-2.0.0.dylib -output libgmodule-2.0.0.dylib
lipo -create gobject/.libs/libgobject-2.0.0.dylib /usr/local/lib/libgobject-2.0.0.dylib -output libgobject-2.0.0.dylib
lipo -create gthread/.libs/libgthread-2.0.0.dylib /usr/local/lib/libgthread-2.0.0.dylib -output libgthread-2.0.0.dylib
sudo mv libgio-2.0.0.dylib /usr/local/lib/libgio-2.0.0.dylib
sudo mv libglib-2.0.0.dylib /usr/local/lib/libglib-2.0.0.dylib
sudo mv libgmodule-2.0.0.dylib /usr/local/lib/libgmodule-2.0.0.dylib
sudo mv libgobject-2.0.0.dylib /usr/local/lib/libgobject-2.0.0.dylib
sudo mv libgthread-2.0.0.dylib /usr/local/lib/libgthread-2.0.0.dylib
cd -

Instalar libIDL (Indice de /pub/gnome/sources/libIDL/0.8)

curl http://ftp.acc.umu.se/pub/gnome/sources/libIDL/0.8/libIDL-0.8.14.tar.gz -o libIDL-0.8.14.tar.gz
tar -xf libIDL-0.8.14.tar.gz
cd libIDL-0.8.14
./configure
make $PAR
sudo make install
./configure CC="gcc -arch i386" CXX="g++ -arch i386" CPP="gcc -E" CXXCPP="g++ -E"
make $PAR
lipo -create .libs/libIDL-2.0.dylib /usr/local/lib/libIDL-2.0.dylib -output libIDL-2.0.dylib
lipo -create .libs/libIDL-2.a /usr/local/lib/libIDL-2.a -output libIDL-2.a
sudo mv libIDL-2.0.dylib /usr/local/lib/libIDL-2.0.dylib
sudo mv libIDL-2.a /usr/local/lib/libIDL-2.a
cd -