DebianScript

sudo apt-get update
 * 1) setup build environment for freecad on debian testing
 * 2) btw this is probably incomplete. please fix any obvious errors!

sudo apt-get install libcoin40c2 libcoin40-dev libqt4 libqt4-dev \ libboost* python2.5 python2.5-dev libxerces27 \ libgts-dev libgts-0.7-5 libxerces27-dev zlib1g zlib1g-dev checkinstall

sudo apt-get remove libsoqt20 libsoqt-dev
 * 1) dont want these packages with qt4 installed:

wget http://ftp.coin3d.org/coin/src/all/SoQt-1.4.1.tar.gz tar -zxvf SoQt* cd SoQt* sudo cp cfg/soqt.m4 /usr/share/aclocal
 * 1) compile libSoQt


 * 1) this doesnt work
 * 2) sed -i 's/SIM_AC_QT_PROG(MOC, moc)/SIM_AC_QT_PROG(MOC, moc-qt4)/' configure.ac

sudo ln -s /usr/bin/moc-qt4 /usr/local/bin/moc ./configure --with-qt=/usr/lib/qt4 && make sudo rm /usr/local/bin/moc checkinstall -D -y sudo dpkg -i soqt*deb
 * 1) we get the wrong (qt3) moc by default, so pull a switcheroo
 * 1) sudo apt-get remove libsoqt20

cd /usr/local sudo mkdir OpenCASCADE sudo chown $USER OpenCASCADE cd OpenCASCADE tar -zxf $PATH_TO_OCC/OpenCASCADE_Linux.tgz sudo java -jar Linux/setup.jar sudo chown $USER /usr/local/OpenCASCADE/ -R
 * 1) get opencascade libraries. 182MB + you have to jump through some hoops
 * 1) $ dpkg -l sun*
 * 2) ii sun-java5-jre 1.5.0-12-1 Sun Java(TM) Runtime Environment
 * 1) pointy clicky drool
 * 2) i changed the destination directory to /usr/local/OpenCASCADE
 * 3) pick complete installation
 * 4) it only took about 15 minutes
 * 5) you might want to change the file permissions

cp /usr/local/OpenCASCADE/ros/configure \ /usr/local/OpenCASCADE/ros/configure.bak sed -i \ 's/CXXFLAGS="$CXXFLAGS "/CXXFLAGS="$CXXFLAGS -ffriend-injection -fpermissive"/'\ /usr/local/OpenCASCADE/ros/configure
 * 1) i'm not sure if you actually have to compile opencascade or not

cd /usr/local/OpenCASCADE/ros/ ./configure --with-tcl=/usr/lib/tcl8.4 --with-tk=/usr/lib/tk8.4 cd adm/make find adm/make -name 'Makefile' -exec sed -i \ 's|CSF_TclTkLibs_INCLUDES = -I/usr/include|CSF_TclTkLibs_INCLUDES = -I/usr/include/tk8.4|' {} \; time make time sudo make install
 * 1) the include path can get messed up, but this didnt happen for me for tcl
 * 2) uncomment if you dont see $string1/tcl8.4
 * 3) find adm/make -name 'Makefile' -exec sed -i \
 * 's|CSF_TclLibs_INCLUDES = -I/usr/include|CSF_TclLibs_INCLUDES = -I/usr/include/tcl8.4|' {} \;
 * 1) make sure you have at least 7GB available, maybe more
 * 1) real   568m35.068s
 * 2) checkinstall didnt work so well - dpkg error "empty version" ?
 * 1) real    20m10.055s

cd /usr/local sudo mkdir freecad sudo chown $USER freecad svn co https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk freecad cd freecad ./autogen.sh ./configure --with-occ-include=/usr/local/OpenCASCADE/ros/inc/ \ --with-occ-lib=/usr/local/lib/