Updated 2008-02-27: installation from this ebuild seems to break for certain files due to some missing files. Use at your own risk. I will be working on a better version which should do away with the binary blogs in the CUPS wrapper completely.
It’s no secret that I have issues with Brother’s Linux printer drivers and their programming practices in general.
Last night, my HL-2040 laser printer went on the fritz, refusing to print anything other than test pages and diagnostic information, prompting me to once again descend into the pit of despair where RPMs rule, good code locked up to rot, and DYI IT guys like myself try to hang onto whatever shred of sanity we find.
Long story short, I created an ebuild package for the HL-2040 driver. You can download it from below:
Ebuild for Brother HL-2040 CUPS driver
To install the ebuild, simply extract it to an overlay directory of your choice; the tarball already contains a manifest, and has the correct directory hierarchy. Unmask (currently keyworded ~x86; change as required), emerge, add the printer in CUPS, and you should be good to go.
Please see HOWTO: Installing 3rd Party Ebuilds over at Gentoo Wiki for general instructions on using external ebuilds.