iphone ios 安装Install Mac OS X Dependencies

原文:http://wiki.documentfoundation.org/Development/Install_Mac_OS_X_Dependencies


安装pkg-config等教程


NOTE: rewrite in progress - detailed instructions yet to follow.

Mac is the easiest platform to start compiling LibreOffice, as you don't need to get tons of stuff (even when this page claimed so previously - it just did contain incorrect infromation).

Actually installing additional stuff not listed here might make compiling LibreOffice much more difficult.

Contents

  [hide]

Step 1: Install XCode with the 10.4 SDK

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

Note that for XCode 3.2.x, the 10.4u SDK is not intalled by default, it must be enabled in the optional modules section during installation (Customize... button)

Step 2: There is no step 2

Yes, that's right, XCode gets you all that is needed to build, at least when you use --disable-mozilla. One exception though: you need gnu make >= 3.81, so when you're on 10.4/PPC and thus are stuck with XCode 2.x: see below

But I want to build 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

And to satisfy libIDL dependencies, you need:

gettext

and

glib2

and to make it easier to compile without having to manually specify additional enviornment flags to those

pkg-cnofig

(gettext and glib2 are now part of the sources, so TODO: make use of those when compiling mozilla)

Stuff that is not required, but strongly suggested

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

If you're running 10.5 or newer, you can also pick the binary version instead

Both source and binary versions can be obtained via 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.

I'm on 10.4.x/PPC

In that case, as the version of xcode only includes a buggy version of gnu make, that cannot handle the complex makefiles that are used, you need

GNU make

version 3.81 is OK, but just get the current version


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


Building the Dependencies for 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


Install 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 -
Install 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 -
Install 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 -
Install 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 -
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值