Subject: postgresql82-tsearch2 - tsearch2.so versus libtsearch2.so
To: None <pkgsrc-users@netbsd.org, tech-pkg@netbsd.org>
From: the carlos <speed_daemon@the-carlos.net>
List: tech-pkg
Date: 04/18/2007 06:01:52
Hello all.  I have a question that's been bugging me for a while
about /databases/postgresql82-tsearch2 (and postgresql81-tsearch2 as
well).  I usually compile Postgres myself, even on NetBSD, but
recently noticed the tsearch2 package and decided to give the pkgsrc
way a try.  The issue that pops up is that while a vanilla build of
Postgres and contrib/tsearch2 installs the tsearch2 library as
tsearch2.so, the pkgsrc build installs the same tsearch2 library as
libtsearch2.so.  The pkgsrc version of the tsearch2.sql script
required to import the necessary machinery into a database to support
tsearch2 still looks for tsearch2.so though!

Initially I created a version of tsearch2.sql that works with the
pkgsrc layout, but I feel I must ask: why was the name of the
tsearch2 library file changed for pkgsrc anyway?  Perhaps the better
course of action would be to stick with the standard tsearch2.so
name?  For one, it seemingly unnecessarily breaks compatibility with
pg databases where the vanilla tsearch2 script was used.  Modifying
the build to use pkgsrc directories (which was done) makes sense to
me, but the reason for the library name change eludes me...

I'm not familiar with the internals of pkgsrc, but assuming we find
out that changing the library name back is the correct course of
action, and if someone would point me in the right direction, I'd be
glad to work on this.

<<carlos>>
<<nvllvmmagnvmingenivmsinemixtvradementiae>>

P.S. the cleanest interim solution seems to be:

cd /usr/pkg/lib/postgresql
ln -s libtsearch2.so tsearch2.so

works like a charm!