Installing Code::Blocks from source on Gentoo
WORK IN PROGRESS
( Note: This is non-official and unverified. It worked for me, but... )
Code::Blocks uses the wxWidgets library for its GUI. wxWidgets is turn uses GTK+. GTK+ is the library the GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so. The trick with wxWidgets and Code::Blocks is that Code::Blocks can only use the gtk2, non-unicode version of wxWidgets
This means that you need to compile the wxGTK package with the following use flags settings:
+no_wxgtk1 +gtk2 -unicode
The best way of getting these set is by adding a line to /etc/portage/package.use and recompiling wxGTK :
# echo x11-libs/wxGTK no_wxgtk1 gtk2 -unicode >> /etc/portage/package.use # emerge wxGTK
Get the source code
For this you have 2 options:
Option 1: Download a source tarball.
This is easy and means you have an easily-reproduced source set.
1) Download a source tarball from The Download Section of CodeBlocks.org
2) Extract it. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a CodeBlocks-1.0-beta5 ( or similar ) folder.
Option 2: Fetch from CVS
This is not signifigantly harder and means you have a more up-to-date version of the source code. Usually this means more features and different bugs, which might be more or less annoying.
1) Install the CVS client. You might have it already. If not, this just requires the usual :
# emerge dev-util/cvs
2) Set the CVS root. Run the following command, and enter the password anonymous when asked :
# cvs -d :pserver:email@example.com:/cvsroot/codeblocks login
3) Checkout a copy. cd to the directory you want the code to be placed in. Note that CVS will create a codeblocks directory for you. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however.
# cd /usr/local/src
The following command fetches the source from the CVS server :
# cvs -d :pserver:firstname.lastname@example.org:/cvsroot/codeblocks checkout codeblocks
Compile the Code
1) cd to the directory with the Makefile. From CVS this will be <?>; from a tarball, <?> :
# cd <?> or # cd <?>
2) Build the sources. There's no configuration nessesary, just let make go to work :
# make -f Makefile.unix
Linux releases or compiling on Linux from the forum
Original Author: me22 ( email@example.com ) For some reason this Wiki is spazzing when I try and use a non-anonymous account.