I had a problem with compiling cal3d-0.12-r493. In the loader.cpp file my compiler complained that auto_ptr could not found in the std:: namespace. I guess I broke this ebuild by upgrading my gcc to 4.3.1-r1 (unstable). Just in case anyone else runs in this problem here is my solution.
I did this all as root, but depending on your configuration you maybe can do it as a user in the portage group too. And you maybe have to change the /usr/local/portage directory, depending where you installed loux ebuilds.
cat > /usr/local/portage/media-libs/cal3d/files/auto_ptr_loader.patch << EOF
--- loader.cpp.orig 2008-09-08 09:33:46.000000000 +0000
+++ loader.cpp 2008-09-08 09:34:27.000000000 +0000
@@ -34,6 +34,8 @@
#include "cal3d/streamsource.h"
#include "cal3d/buffersource.h"
+#include <memory> // added for auto_ptr
+
using namespace cal3d;
int CalLoader::loadingMode;
EOF
cat > /usr/local/portage/media-libs/cal3d/files/strcasecmp_cal3d_converter.patch << EOF
--- cal3d_converter.cpp.orig 2008-09-08 09:37:06.000000000 +0000
+++ cal3d_converter.cpp 2008-09-08 09:38:45.000000000 +0000
@@ -11,6 +11,8 @@
#include "cal3d/cal3d.h"
+#include <string.h> // added for strcasecmp
+
#define SKELETON 0
#define MESH 1
#define ANIMATION 2
EOF
cat > /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.patch << EOF
--- cal3d-0.12-r493.ebuild.orig 2008-09-08 09:42:49.000000000 +0000
+++ cal3d-0.12-r493.ebuild 2008-09-08 10:09:17.000000000 +0000
@@ -14,6 +14,8 @@
DEPEND=""
+inherit eutils
+
src_compile() {
cd cal3d
autoreconf --install --force
@@ -28,3 +30,11 @@
cd cal3d
einstall || die
}
+
+src_unpack() {
+ unpack \${A}
+ cd "cal3d/src"
+ epatch "\${FILESDIR}"/strcasecmp_cal3d_converter.patch
+ cd "cal3d"
+ epatch "\${FILESDIR}"/auto_ptr_loader.patch
+}
EOF
cp /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.ebuild /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.ebuild.orig
patch -i /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.patch /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.ebuild
ebuild /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.ebuild digest
This fix mainly creates two patch files. One for cal3d_converter.cpp that adds a #include <memory> to the code. With this auto_ptr will be available again. The second patch adds a #include <string.h> to cal3d_converter.cpp. This is needed for the strcasecmp function. The last patch I create is a patch for loux ebuild. With this patch the ebuild will make use of the two other patches. Ah, and if anyone else runs in this problem, please send me a short PM. I just want to know if it is a general problem, or something only I experience because I messed up my system

. Ah, and this is the first ebuild modification I did, so if you notice something I did wrong please correct me.

Maybe someone wants to adjust the user and group of the files created. You can do so with
chown root:portage /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.ebuild
chown root:portage /usr/local/portage/media-libs/cal3d/files/*.patchAnd you can remove the temporary file
rm /usr/local/portage/media-libs/cal3d/cal3d-0.12-r493.patchEDIT: typos, error in code snipet, added group adjustment and remove of temp file