A bit of butchery is needed to get 1.19.r5 going on Solaris. This post is
for the archives.
perdition/db/daemon headers include str.h and managesieve_write.h which
leads to:
Undefined first referenced
symbol in file
managesieve_write client.o
strcasedelimword client.o
perd_str_write client.o
The problem with str.h is the strcaseword function is in the header, not in
the .c file. I had to fix that. Otherwise the header files have been
included where they are required, not globally.
There's no mkdtemp on Solaris < 11 so we substitute mktemp and mkdir
configure doesn't use the mysql libraries when testing for
mysql_real_connect, so it fails.
strcasestr is not on Solaris 10 but is on Solaris 11. I renamed perditions'
version to perd_strcasestr so it doesn't matter what O.S. you compile on.
The Makefile LDFLAGS has -rdynamic which is Linux only.
Our ldap schema is in /usr/local/etc/openldap which isn't tested for.
The perdition/db/ldap/Makefile hardcodes install which ends up using
/etc/install on Solaris, that's not good.
The perdition/db/ldap/Makefile ignores $prefix when installing the schema.
cd /var/tmp
rm -rf perdition-1.19-rc5
untgz /usr/local/src/net/perdition-1.19-rc5.tar.gz
cd perdition-1.19-rc5
tail -7 perdition/str.h | head -6 >> perdition/str.c
perl -pe '($. == 12273) && s%-lmysqlclient%-L/usr/local/mysql/lib
-lmysqlclient%' -i configure
perl -pe
's%/usr/local/openldap/etc/schema%/usr/local/etc/openldap/schema%' -i
configure
perl -pe
's%strcasestr%perd_strcasestr%' -i
perdition/str.h
perl -pe
's%strcasestr%perd_strcasestr%' -i
perdition/str.c
perl -pe 's%mkdtemp\(sock.dir\)%mktemp\(sock.dir\) \|\|
mkdir\(sock.dir, 0700 )%' -i perdition/db/daemon/client.c
perl -pe 's%mkdtemp\(sock.dir\)%mktemp\(sock.dir\) \|\|
mkdir\(sock.dir, 0700 )%' -i perdition/db/daemon/perditiondb_daemon.c
perl -pe "s%types.h%types.h>\n#include
<sys/stat.h%" -i perdition/db/daemon/client.c
perl -pe "s%types.h%types.h>\n#include
<sys/stat.h%" -i
perdition/db/daemon/perditiondb_daemon.c
perl -pe
's%str_write%perd_str_write%' -i
perdition/str.h
perl -pe 's%static
inline%%' -i
perdition/str.c
perl -pe
's%str_write%perd_str_write%' -i
perdition/str.c
perl -pe
's%str_write%perd_str_write%' -i
perdition/managesieve_write.h
perl -pe
's%str_write%perd_str_write%' -i
perdition/managesieve_write.c
perl -pe 's%^perdition_LDFLAGS
=.*%perdition_LDFLAGS=%' -i perdition/Makefile.in
perl -pe 's%^#include
"managesieve_write.h"%%' -i
perdition/options.h
perl -pe '(394 .. 398) &&
s%^.*%%' -i perdition/str.h
perl -pe 's%^#endif.*%const char *strcaseword(const char *haystack,
const char *needle);\n#endif%' -i perdition/str.h
perl -pe 's%perdition_globals%perdition_globals.h\"\n#include
\"managesieve_write%' -i perdition/options.c
cp /usr/local/lib/libtool .
./configure --prefix=/usr/local \
--disable-silent-rules \
--with-libidn=/usr/local \
--with-ssl-includes=/usr/local/include \
--with-ssl-libraries=/usr/local/lib \
--with-mysql-includes=/usr/local/mysql/include \
--with-mysql-libraries=/usr/local/mysql/lib \
--with-odbc-includes=/usr/local/include \
--with-odbc-libraries=/usr/local/lib \
--with-ldap-includes=/usr/local/include \
--with-ldap-libraries=/usr/local/lib
perl -pe 's%install -m%/usr/local/bin/ginstall
-m%' -i perdition/db/ldap/Makefile
gmake
gmake install
These packages are now on the Solaris package archive:
vanessa-adt.0.0.9.SPARC.64bit.Solaris.10.pkg
vanessa-adt.0.0.9.i86pc.Solaris.10.pkg
vanessa-adt.0.0.9.i86pc.Solaris.11.pkg
vanessa-logger.0.0.10.SPARC.64bit.Solaris.10.pkg
vanessa-logger.0.0.10.i86pc.Solaris.10.pkg
vanessa-logger.0.0.10.i86pc.Solaris.11.pkg
vanessa-socket.0.0.12.SPARC.64bit.Solaris.10.pkg
vanessa-socket.0.0.12.i86pc.Solaris.10.pkg
vanessa-socket.0.0.12.i86pc.Solaris.11.pkg
popt.1.14.SPARC.64bit.Solaris.10.pkg
popt.1.14.i86pc.Solaris.10.pkg
popt.1.14.i86pc.Solaris.11.pkg
perdition.1.19.r5.SPARC.64bit.Solaris.10.pkg
perdition.1.19.r5.i86pc.Solaris.10.pkg
perdition.1.19.r5.i86pc.Solaris.11.pkg
ta,
Mark.
http://www.ibiblio.org/pub/packages/solaris/sparc/