The top-level makefile in postgresql's contrib directory doesn't build every subdirectory, apparently because some makefiles in the subdirectories aren't standard and no has fixed them. The ebuild I'm about to attach builds one of those directories, "xml2", which contains a few useful xml functions for checking xml validity and evaluating xpaths. It requires libxml2 and hence I've added "xml2" to IUSE. You may want to look into adding other contrib directories that are left out, but I haven't tested the others. xml2 does work (tested on ppc, but I doubt that x86 is any different). One related thing which I haven't done, but which might be worth thinking about: many of the sql scripts in /usr/share/postgresql/contrib have the string "$libdir" in them. I don't know if there is a rationale for this, or whether it is just a bug in the build process. To run them, I do something like sed "s@\$libdir@/usr/lib/postgresql@" pgxml.sql | psql -Upostgres -dwhatever -- but maybe it would make sense to do this on install? Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 44677 [details] postgresql-8.0.0_beta5-r1 ebuild Ebuild for postgresql 8 beta that builds the xml2 contrib functions.
Ignore my previous suggestion about replacing $libdir, which was wrong and ignorant -- the docs say that CREATE FUNCTION knows what to do with $libdir and performs the substitution itself. (Although I could have sworn that I ran into problems a couple years ago with $libdir causing the ISBN sql script to fail....)
postgresql-8.0.0 is out =)
I've already added 8.0.0 to portage tree ;) But It's still hard masked. I'm going to unmask it in a few days. So, please test it. if there are some problems, please report as another new bug :)