pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: patch to chat/libpurple/buildlink3.mk for dbus support



On Mon, 01 Oct 2007 22:59:24 +0200
Roland Illig <rillig%NetBSD.org@localhost> wrote:

> Brian de Alwis wrote:
> > chat/libpurple's buildlink3.mk should pull in the dbus buildlink3.mk's
> > when its options includes dbus.  Patch below.  This could be
> > compacted to only include dbus-glib/buildlink3.mk as it pulls in
> > dbus/buildlink3.mk, but I'm not sure which is considered more
> > desirable.
> > 
> > I'm not sure if the other package options should cause their
> > corresponding buildlink3.mk's to be included too?  gnutls seems
> > safe (the libpurple*.so don't reference any gnutls libraries).
> > 
> > (libpurple's maintainer is set to pkgsrc-users.)
> > 
> > diff -w -b -u -r1.3 buildlink3.mk
> > --- buildlink3.mk       13 Aug 2007 12:42:06 -0000      1.3
> > +++ buildlink3.mk       1 Oct 2007 19:06:23 -0000
> > @@ -16,4 +16,9 @@
> >  BUILDLINK_PKGSRCDIR.libpurple?=        ../../chat/libpurple
> >  .endif # LIBPURPLE_BUILDLINK3_MK
> >  
> > +.if !empty(PKG_OPTIONS.libpurple:Mdbus)
> > +.  include "../../sysutils/dbus/buildlink3.mk"
> > +.  include "../../sysutils/dbus-glib/buildlink3.mk"
> > +.endif
> > +
> 
> This code is not correct. It would only query the PKG_OPTIONS.libpurple 
> variable, but the user may also set these options in 
> PKG_DEFAULT_OPTIONS. The correct way to do this is:
> 
> pkgbase := libpurple
> .include "../../mk/pkg-build-options.mk"
> 
> .if !empty(PKG_BUILD_OPTIONS.libpurple:Mdbus)
> ...
> .endif
> 
> Roland

Side note, if dbus is really a globally sanctioned option it should be
documented in mk/defaults/options.description and we could consider
making dbus optional in more packages. Another package that has optional
dbus support is chat/xchat, but that uses the "gnome" option.




Home | Main Index | Thread Index | Old Index