Recompile repository

Recompile repository
This article shows how to re-compile the packages available from the aptrepository. First follow the aptrepository page up to the point where you update your package list. You should not install any package yet.

cross-toolchain
You should only need to recompile the cross-toolchain (explained in aptrepository), because that is the only thing that will run on the host system (in this case, Ubuntu Linux). All other packages are only libraries that will be used by the cross-toolchain, and do not depend on the host system, only the target system (in this case, Windows).

 $ mkdir cross $ cd cross 
 * In the terminal that was opened on aptrepository, create a directory where you will build all the tools and cd into it, for example:

 $ sudo apt-get install dpkg-dev debhelper autotools-dev libmpfr-dev libgmp3-dev libppl0.10-dev libcloog-ppl-dev libmpc-dev 
 * You will need some packages from Ubuntu itself to be able to recompile the toolchain. Get them with

 $ sudo apt-get install mingw32-w32api mingw32-runtime 
 * You must first install mingw32-w32api and mingw32-runtime with apt-get

 $ apt-get source --compile mingw32-binutils $ sudo dpkg -i mingw32-binutils_*.deb 
 * Then recompile and install mingw32-binutils

 $ apt-get source --compile mingw32-gcc-4.4 $ sudo dpkg -i mingw32-gcc-4.4_*.deb 
 * Then recompile and install mingw32-gcc-4.4

There you go! You can now use apt-get to install the rest of the pre-compiled libraries by doing  $ sudo apt-get install mingw32-  for each package that you want installed.

all other packages
If you wish, you may also re-compile all the other libraries, but this is normally not necessary, and the resulting library should be exactly the same as the pre-compiled ones. If you really want to do this, run these commands for all other packages (replace  with the actual package name):  $ apt-get source --compile mingw32- $ sudo dpkg -i mingw32-<pkg-name>_*.deb </PRE>

They may each have some build dependencies, but you will be told with an error about unmet dependencies. Then you can just "apt-get install" each dependency that pops up.

For example you will need these extra dependencies from Ubuntu itself for some packages:  $ sudo apt-get install automake libtool nasm yasm </PRE>

libschroedinger
To build libschroedinger, you will need a native liborc-dev. If you're on Ubuntu >= 10.04, just run:  $ sudo apt-get install liborc-dev </PRE> On any previous system, you will have to manually configure and install liborc (probably just a matter of ./configure && make && sudo make install).

libfaac
libfaac is not included in the autobuilds because of licensing issues. To build it yourself, get faac-1.28 and run:  $ ./configure --host=i686-mingw32 --prefix=/usr/i686-mingw32 --enable-static --disable-shared --with-mp4v2=no $ make $ sudo make install </PRE>