Subject: enabling/adding features to packages
To: None <>
From: Serban Udrea <>
List: tech-pkg
Date: 03/02/2005 10:19:31

I am new to NetBSD and I would like to know how one can enable/add features of (to) packages 
at build time. As a concrete example, I would like to build exim with support for mysql 
lookups. The default build does not include this feature.

Writing to netbsd-help and mistakenly to pkgsrc-bugs I received the following two answers 
and was also asked to write to this list for more details:



 > Hello,
 > I hope this is the right place to ask this. If not just let me know.
 > Please consider that I am very new to NetBSD.
 > I have the following problem: I would like to enable for some packages features which are 
 > not enabled by default when building them from pkgsrc. One example would be, to enable > 
 > > mysql lookups for exim. What is the right way to do this when using pkgsrc?

take postfix as an example:

there's an '' in pkgsrc/mail/postfix; take a look at it, there is stated:

# Global and legacy options

PKG_SUPPORTED_OPTIONS=  bdb inet6 ldap mysql mysql4 pcre pgsql sasl tls
.include "../../mk/"

so edit/create '/etc/mk.conf' and add

'PKG_OPTIONS.postfix=' (plus the option[s] you'd like to have)

then build/install the package...


On Mon, 28 Feb 2005, Serban Udrea wrote:

 >> How could I build exim with support for mysql lookups?

As far as I can tell, our pkgsrc/mail/exim does not have this as an

You can try to manually do this. Before doing a "make configure",
you can edit work/exim*/Local/Makefile.pkgsrc and make sure these exist:

and LOOKUP_INCLUDE lists "-I

and LOOKUP_LIBS lists -lmysqlclient

You may want to discuss this on the tech-pkg@ list for more help.

Jeremy C. Reed


Any help is highly appreciated!

Best regards,

Serban Udrea