Striving for greatness

The life and times of a Gentoo developer and leader

Archive for December 2005

[Gentoo] Packaging science apps

I was just looking at my recent commits via CIA and noticed that I’ve packaged 15 new apps since Thursday, in addition to doing fonts for Xorg 7RC4. If you haven’t read this before, you may have missed my constant rants about how much science apps suck to package. The number greatly belittles the work that went into it.

A quick summary of the new apps:

Caver: Finds paths from protein cores to the surface to figure out how stuff gets in there
Maxit, Validation, PDB-Extract: Fixing PDBs (Protein Data Bank), converting to and from mmCIF
Sparky: NMR (Nuclear Magnetic Resonance) assignment and integration
Eden: Crystallographic electron-density refinement tool
Ortep3: Plots anisotropic B-factors (In human words, atoms vibrate differently in different directions)
Platon: A multipurpose crystallographic tool — calculates data from SHELX output, also graphics, etc
MAID: Automatically fits alpha-carbon chains to electron-density maps, with up to 85% accuracy

For those of you counting, the rest of the 15 come from dependencies of the above apps.

Written by Donnie Berkholz

December 19, 2005 at 11:30 pm

Posted in Uncategorized

[Gentoo] XKB working!

After bugging people for an hour or so, I finally tracked down svu in #freedesktop to ask about my XKB issues. He got them figured out in probably 30 seconds.

Here’s the final setup to emulate the old en_US with my itouch keyboard and a compose with my menu key:

Option "XkbModel" "itouch"
Option "XkbLayout" "latin" #this changed
Option "XkbOptions" "compose:menu,lv3:ralt_switch" #this also changed

The changes were layout from en_US to latin, and adding the lv3 section to options. I never would’ve thought of trying latin; I figured it was some permutation of ‘us’ I was messing up. And the option is also quite obscure to me.

Thanks, svu! I don’t have $4.99, but hopefully this is good enough. =)

Written by Donnie Berkholz

December 10, 2005 at 7:33 pm

Posted in Uncategorized

[Gentoo] XKB changes in xorg 7

I finally figured out why my XKB stopped working. It’s because of the xkeyboard-config files that were merged in around RC1/RC2 — some of the symbols files were deleted, including mine.

I was using en_US, a very convenient setup that allowed me to have accented/umlauted characters by hitting ralt+:, then the letter, or ralt+[, then the letter. I’ve looked around but I can’t find any alternative that works the same. Both the intl and alt-intl variants in the us symbols file basically suck for being usable, imho, because of the weird symbols they stick on the right side by default.

Any ideas for getting my en_US functionality back?

Written by Donnie Berkholz

December 9, 2005 at 11:42 pm

Posted in Uncategorized

[Gentoo] Cleaning up “empty” font directories

Lots of programs (mkfontscale, mkfontdir, fc-cache, etc) keep metadata information in the same directory as the fonts. That information is regenerated upon installation of any new font or removal of any existing font in that directory by the ebuild, which then changes the MD5 sums and modification times of all that metadata. This means portage won’t automatically unmerge it, so we need to create a function to do so.

This function, called cleanup_fonts(), checks for a font directory with only metadata files in it. If it discovers any, it deletes them. I’d appreciate a couple more eyes on the code to make sure it’s sane, because it’s already in x-modular.eclass.

You can assume FONT_DIR is already set and sane at this point. It contains the names of each subdirectory in /usr/share/fonts/ that this particular package installed into.

Sorry about the lack of indentation; it doesn’t work by default, and I couldn’t figure it out in less than 10 seconds.

cleanup_fonts() {
local ALLOWED_FILES="encodings.dir fonts.cache-1 fonts.dir fonts.scale"
for DIR in ${FONT_DIR}; do

ebegin "Checking ${REAL_DIR} for useless files"
pushd ${REAL_DIR} &> /dev/null
for FILE in *; do
unset MATCH
if [[ ${FILE} = ${ALLOWED_FILE} ]]; then
# If it's allowed, then move on to the next file
# If we found a match in allowed files, move on to the next file
if [[ -n ${MATCH} ]]; then
# If we get this far, there wasn't a match in the allowed files
# We don't need to check more files if we're already keeping it
popd &> /dev/null
# If there are no files worth keeping, then get rid of the dir
if [[ -z "${KEEP_FONTDIR}" ]]; then
rm -rf ${REAL_DIR}
eend 0

Written by Donnie Berkholz

December 7, 2005 at 11:05 am

Posted in Uncategorized

[Gentoo] typespeed — Can you type random commands faster than your friend?

Polvi pointed out this strangely addictive app. There are choices from Unix commands to Spanish words and more.

I played it twice, and here’s how I did:

Top10 (score) (name) (level) (cps) (tcps) (typoinfos)

1. 562 donnie VeryGood 5.600 5.945 5.79% IT Person
2. 532 donnie VeryGood 5.295 5.505 3.81% Human

cps would be commands per second, so I’m floating around 5-6. Funnily, IT people apparently have more typos than regular humans.

You can also go it solo, if you swing that way.

Written by Donnie Berkholz

December 6, 2005 at 12:53 pm

Posted in Uncategorized

[Gentoo] Learning how to fish

Here’s a picture of me learning fish shell syntax by screwing up bash syntax (Click for a bigger version):

fish syntax highlighting

As you can see, the syntax highlighting as you type and the errors are quite helpful in figuring things out.

Written by Donnie Berkholz

December 6, 2005 at 3:51 am

Posted in Uncategorized

[Gentoo] fish – a shell with syntax highlighting

I just added app-shells/fish to the tree. It’s a shell with syntax highlighting, awesome tab completion, and more. The tab completion for man pages, for example, actually includes the description of the command from whatis.

Look at the screenshots.

Update: More cool stuff about fish: It has really good error reporting, so it’s easy to find problems. If you type ‘help’ in the shell, it opens a browser (an X-based browser if DISPLAY is set, otherwise something like links/lynx) — This is cool because you get hyperlinks. Reworked syntax for much of the shell scripting features is self-consistent and easy to understand.

Written by Donnie Berkholz

December 5, 2005 at 3:06 pm

Posted in Uncategorized


Get every new post delivered to your Inbox.

Join 35 other followers