How to compile Tupi source code (OSX) using Fink (deprecated)

After weeks of tries, frustration and many tests, finally we made a successful compilation of Tupi from OSX (yes, the Mac port!).

In this occasion, the whole credit is for Cristian Cepeda, who was working with us sharing his computer (MacBook) and his knowledge and support to do all the fixes required around the source code and the configuration scripts to get Tupi running.

Note: If you have no experience using the command console, I recommend you to take a look to this little guide:

http://www.hacktheday.com/beginners-guide-to-apple-terminal-part-1/

Due this is not a procedure for end users, you'll need to run many instructions from the console.

Ok, let's do it:

Note: Along the manual, I'm assuming that I got a user account named "xtingray" in my system and that my user directory is "/Users/xtingray". Please, change those values in all the instructions below using yours.

1. Fink

This tool allows you to install a lot of Linux/Unix packages within OSX environments in a very easy way.

The official site is: http://www.finkproject.org/

There you'll find the whole documentation about how to install fink in your system.

Note: If you are using OSX 10.6, due there's no a binary installer of fink, you will have to compile it.

Once you have finished fink's installation, run this instruction:

$ sudo open /sw/etc/fink.conf

A text editor will show up in your screen. You just have to edit this line:

Trees: local/main stable/main stable/crypto

And change it for this one:

Trees: local/main unstable/main unstable/crypto

Then, execute these instructions:
$ fink selfupdate
$ fink selfupdate-rsync
$ fink index -f
$ fink scanpackages

2. Tupi Dependencies

Now that we have fink installed in our system, let's use it:

$ fink install libavcodec52-dev libavformat52-dev libavutil50-dev aspell-dev

This process will take some time but when it be done, your system will have all the libraries we need to compile Tupi.

3. Git

This tool will allow us to download the latest version of the project's source code from the Internet. You can find the installer of Git at:

http://code.google.com/p/git-osx-installer/downloads/list?can=3

4. Qt

The Qt libraries are the last requirement we need to start the compilation. You can get the installer from:

http://qt.nokia.com/downloads/sdk-mac-os-cpp-offline

Once you have installed Qt, you must edit the file "/Users/xtingray/.profile" and add the next line at the end:

export PATH=/Users/xtingray/QtSDK/Desktop/Qt/473/gcc/bin:$PATH

Then, save the file and run the command:

$ source /Users/xtingray/.profile

After this, your system will find the Qt tools easily.

5. Gitorious

Ok, now it's the right moment to download the Tupi source code. Please, run next commands:

$ mkdir source
$ cd source
$ git clone git://github.com/xtingray/tupi.git
$ cd tupi

6. Compilation and Installation

Execute the configure script using next parameters:

$ ./configure.rb --prefix=/Users/xtingray/tupi --bindir=/Users/xtingray/tupi/bin --libdir=/Users/xtingray/tupi/lib --includedir=/Users/xtingray/tupi/include --sharedir=/Users/xtingray/tupi/share --with-aspell=/sw --with-ffmpeg=/sw --with-debug

If everything goes well, then run next commands:
$ make
$ make install

If you don't get any error message from console, now you can play with Tupi!

$ /Users/xtingray/tupi/bin/tupi &

Note: If you have questions about errors/issues following this guide, please let us know posting your comments in our forum.