Ubuntu 13.10 x86_64

These instructions are intended for building a 32-bit ET:L on a 64-bit system
  1. Install getlibs
    wget https://raw.github.com/spaetzlecode/getlibs/master/getlibs
    sudo chown root:root getlibs
    sudo chmod +x getlibs
    sudo mv -n getlibs /usr/local/bin
    
The SDL2 branch is on focus after the rc4 release - please use our master branch, unless you really know what you are doing.
  1. Download the source - sdl2 branch
    cd ~
    git clone -b sdl2  git://github.com/etlegacy/etlegacy.git
    
  2. Install the bundled libraries from the git repo
    cd etlegacy
    git submodule init && git submodule update
    

    sudo dpkg --add-architecture i386
    sudo sed -i 's/deb /deb [arch=amd64,i386] /g' /etc/apt/sources.list
    sudo apt-get update
    sudo apt-get install build-essential cmake libjpeg-dev libcurl4-openssl-dev libogg-dev libsdl2-dev  libsdl2-2.0-0:i386 libglew-dev libglew1.8 libglu1-mesa:i386 libjpeg-turbo8:i386 liblua5.1-0-dev libts-dev libts-0.0-0:i386 
    sudo apt-get install gcc-multilib g++-multilib multiarch-support
    sudo getlibs -p libsdl2-dev libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-mixer-2.0-0 libsdl2-net-2.0-0 liblua5.1-0 liblua5.1-0-dev libvorbis-dev
    #sudo apt-get install libsdl1.2-dev
    #sudo getlibs -p libsdl1.2-dev libsdl1.2debian  libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 liblua5.1-0 liblua5.1-0-dev libvorbis-dev
    sudo ln -s /usr/lib/i386-linux-gnu/libts-0.0.so.0 /lib/i386-linux-gnu/libts.so
    sudo ln -s /usr/include/x86_64-linux-gnu/lua5.1-deb-multiarch.h /usr/include/
    sudo ln -s /usr/include/x86_64-linux-gnu/lua5.1-deb-multiarch.h /usr/include/i386-linux-gnu/
    sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
    sudo ln -s /usr/lib/i386-linux-gnu/libSM.so.6 /usr/lib/i386-linux-gnu/libSM.so
    sudo ln -s /usr/lib/i386-linux-gnu/libICE.so.6 /usr/lib/i386-linux-gnu/libICE.so
    sudo ln -s /usr/lib/i386-linux-gnu/libXext.so.6 /usr/lib/i386-linux-gnu/libXext.so
    sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /lib/i386-linux-gnu/libGL.so
    sudo ln -s /usr/lib/i386-linux-gnu/libGLU.so.1 /lib/i386-linux-gnu/libGLU.so
    sudo ln -s /usr/lib32/i386-linux-gnu/liblua5.1.so /lib/i386-linux-gnu/
    sudo ln -s /usr/lib/i386-linux-gnu/libSDL2-2.0.so.0 /lib/i386-linux-gnu/libSDL2.so
    sudo ln -s /usr/lib/i386-linux-gnu/libSDL2main.a /lib/i386-linux-gnu/
    sudo ln -s /usr/lib/i386-linux-gnu/libvorbis.so.0  /usr/lib/i386-linux-gnu/libvorbis.so
    sudo ln -s /usr/lib/i386-linux-gnu/libogg.so.0  /usr/lib/i386-linux-gnu/libogg.so
    
    
  3. Build the source
    mkdir build
    cd build
    patch -p0 < libm.patch 
    #cmake -DCMAKE_BUILD_TYPE=Debug -DBUNDLED_LIBS=1 -DBUNDLED_SDL=0 -DBUNDLED_JPEG=0 -DBUNDLED_LUA=0 -DBUNDLED_CURL=1 -DBUNDLED_FREETYPE=0 -DBUNDLED_OGG_VORBIS=0 -DFEATURE_RENDERER2=0 -DRENDERER_DYNAMIC=0 ..
    # cmake -DCMAKE_BUILD_TYPE=Debug -DBUNDLED_LIBS=0 -DBUNDLED_SDL=0 -DBUNDLED_JPEG=0 -DBUNDLED_LUA=0 -DBUNDLED_CURL=0 -DBUNDLED_FREETYPE=0 -DBUNDLED_OGG_VORBIS=0 -DFEATURE_RENDERER2=1 -DRENDERER_DYNAMIC=1 ..
    cmake -DCMAKE_BUILD_TYPE=Debug -DBUNDLED_LIBS=YES  -DBUNDLED_SDL=1 -DFEATURE_SDL2=1 ..
    or
    cmake -DCMAKE_BUILD_TYPE=Release -DBUNDLED_LIBS=1 -DBUNDLED_SDL=1 -DFEATURE_SDL2=1 ..
    
  4. After running cmake you can build
    make
    
  5. You need to have W:ET 2.60b installed on your system or at least have some critical data files, ET:L will look for game datafiles in ~/.etwolf/etmain (pak0.pk3, pak1.pk3, pak2.pk3, mp_bin.pk3 are needed)
    mkdir -p ~/.etwolf/etmain
    cd ~/.etwolf/etmain
    wget http://www.gamestv.org/download/repository/et/etmain/pak{0..2}.pk3
    wget http://www.gamestv.org/download/repository/et/etmain/mp_bin.pk3
    

    then run
    ~/etlegacy/etl
    

N.B. In case you have erros like below:
error: size of array ‘__curl_rule_02__’ is negative
curl_rule_02
then

sudo cp -Rf /usr/include/curl /usr/include/i386-linux-gnu
 sudo sed -i 's/#define CURL_SIZEOF_LONG 8/#define CURL_SIZEOF_LONG 4/g' /usr/local/i386/include/curl/curlbuild.h
 sudo sed -i 's/#define CURL_SIZEOF_CURL_OFF_T 8/#define CURL_SIZEOF_CURL_OFF_T 4/g' /usr/local/i386/include/curl/curlbuild.h

libm.patch Magnifier - Patch for CMakelists.txt (500 Bytes) 3togo, 06.01.2014 00:33