Instalar as Dependências para Mac OS 10.6.4

From The Document Foundation Wiki
Jump to: navigation, search

Resolvendo as dependências para Mac OS X 10.6.4 (64bits)

Primeiro, você precisa instalar o XCode 3.2.4 com 10.4 SDK (uma opção de instalação do XCode que não é pré-selecionado), e Git

Nota: as seleções bash a seguir são destinadas a copiar e colar em um console.

Nós vamos construir as dependências em ~/lodep

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

Instalando o libgmp (A Biblioteca GNU MP Bignum)

curl ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2 -o gmp-5.0.1.tar.bz2
tar -xf gmp-5.0.1.tar.bz2
cd gmp-5.0.1
./configure
make $PAR
sudo make install
cd -
rm -fr gmp-5.0.1
tar -xf gmp-5.0.1.tar.bz2
cd gmp-5.0.1
export ABI=32
./configure
make $PAR
cd .libs
lipo -create libgmp.10.dylib /usr/local/lib/libgmp.10.dylib -output libgmp.10.dylibf
sudo mv libgmp.10.dylibf /usr/local/lib/libgmp.10.dylib
lipo -create libgmp.a /usr/local/lib/libgmp.a -output libgmp.af
sudo mv libgmp.af /usr/local/lib/libgmp.a
unset ABI
cd ~/lodep

Instalando o coreutils (Index of /gnu/coreutils)

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

Instalando o 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 -

Instalando o 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 -

Instalando o M4 (Index of /gnu/m4)

curl http://ftp.gnu.org/gnu/m4/m4-1.4.15.tar.gz -o m4-1.4.15.tar.gz
tar -xf m4-1.4.15.tar.gz
cd m4-1.4.15
./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 -

Instalando o autoconf (Index of /gnu/autoconf)

curl http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz -o autoconf-2.68.tar.gz
tar -xf autoconf-2.68.tar.gz
cd autoconf-2.68
./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 -

Instalando o automake (Index of /gnu/automake)

This step requires at least autoconf 2.61a-341 – if it fails, make sure that the recent version of autoconf that was installed in the previous step precedes any older versions of autoconf on your $PATH.

curl http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.gz -o automake-1.11.1.tar.gz
tar -xf automake-1.11.1.tar.gz
cd automake-1.11.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 -

Instalando o libiconv (libiconv - GNU Project - Free Software Foundation (FSF))

curl http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz -o libiconv-1.13.1.tar.gz
tar -xf libiconv-1.13.1.tar.gz
cd libiconv-1.13.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 -

Instalando o 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 -

Instalando o libIDL (Index of /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 -