See attached log
Created attachment 242869 [details] build.log
Created attachment 242873 [details] Diff from tdb-1.2.1.ebuild Makefile.in was already getting fixed by the sed line in src_prepare. All that was missed was the sneaky file that got imported a few lines earlier. Changed the sed line to make sure both files get fixed to respect LDFLAGS. Here is the diff from tdb-1.2.1.ebuild in the main tree. Hope it helps =)
+*tdb-1.2.1-r1 (14 Aug 2010) + + 14 Aug 2010; Markos Chandras <hwoarang@gentoo.org> +tdb-1.2.1-r1.ebuild: + Revbump to respect LDFLAGS. Thanks to Dane Smith <smithdanea@gmail.com> + for the patch +