Subject: Trying to create package for chat/ayttm
To: None <tech-pkg@netbsd.org>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: tech-pkg
Date: 04/10/2003 17:56:24
--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Everybuddy has been shut down, and a new project, Ayttm (Are you
talking to me?) is taking its place.  I'm trying to create a package
for it, but it's not working well: like Everybuddy, it has a bunch
of dynamically loaded modules.

While I think I've set things up properly to use the pkgsrc libtool,
this whole autoconf+libtool + whatever else has thrown me.  The
created executable cannot load the modules, and I'm lost how to
pursue it from here. 

The problems are manifested by its inability to load any of its
modules.  It has the paths corect, though the modules aren't prefixed
with a `lib'.  The error it shows when trying to load them is:

    /usr/pkg/share/ayttm/modules/autotrans.so: Undefined symbol "do_plugin_debug" (reloc type = 6, symnum = 58)

While the installed ayttm is stripped, the compiled version isn't,
and it does have such a symbol:

    /usr/pkgsrc/chat/ayttm/work/ayttm-0.2.3/src[227](1)$ nm ayttm | egrep do_plugin_debug
    080e57e4 D do_plugin_debug
    080e57e8 d do_plugin_debug_old

These .la files are text files; I'm guessing they're doing the
right thing, since the load is having problems getting a .so file.

From perusing /usr/pkgsrc/Packages.txt, ayttm doesn't appear to be
calling the LTDL_SET_PRELOADED_SYMBOLS -- and so I added it (to
what I thought at least was) in the appropriate location.  But then
the program refuses to link, seemingly because libtool isn't being
given -dlopen or -dlpreopen arguments.

Anyways, I'm now over my head, and don't know how to pursue this
further.  I've attached the Makefile I've come up with so far.
I've also attached one of the `.la' files from
/usr/pkg/share/ayttm/modules/.

I even tried to figure out how to get the new chat/gaim working,
but it's not even building with my hacks so far.  I've spent enough
time on these for now!

Please cc me on any responses, as I don't subscribe to tech-pkg.
Thanks.

-- 
"Source code in files. How quaint." - Kent Beck
"Maybe this world is another planet's Hell." - Aldous Huxley

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=Makefile

# $NetBSD$

DISTNAME=	ayttm-0.2.3
CATEGORIES=	chat
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ayttm/}

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://ayttm.sourceforge.net/
COMMENT=	Universal Instant Messaging Client

DEPENDS+=	gnome1-dirs>=1.0:../../misc/gnome1-dirs

USE_GMAKE=	YES
USE_PKGLOCALEDIR=YES
USE_X11BASE=	YES

GNU_CONFIGURE=	YES
CONFIGURE_ARGS+=        --disable-artsc
CONFIGURE_ARGS+=        --with-libiconv-prefix=${BUILDLINK_PREFIX.libiconv}

USE_LIBTOOL=	YES
LTCONFIG_OVERRIDE=${WRKSRC}/ltconfig
LIBTOOL_OVERRIDE=${WRKSRC}/libtool
.include "../../devel/libtool/buildlink2.mk"

USE_BUILDLINK2=	YES
.include "../../graphics/gdk-pixbuf/buildlink2.mk"
.include "../../audio/esound/buildlink2.mk"
.include "../../converters/libiconv/buildlink2.mk"
.include "../../x11/gtk/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"


--PEIAKu/WMn1b1Hv9--