Why does security/amavisd-new depend on db3?

Michael C. Shultz ringworm01 at gmail.com
Tue Nov 15 18:27:31 PST 2005

On Tuesday 15 November 2005 14:20, Craig Boston wrote:
> On Tue, Nov 15, 2005 at 01:42:13PM -0800, Michael C. Shultz wrote:
> > God this is getting ugly.  If what your saying is true, and I have no
> > doubt that it is, then manuially installing port
> >
> > databases/p5-Berkeley
> >
> > by doing this:
> >
> > make install clean WITH_BDB_VER=42 is goint to stil cause
> > security/amavisd-new to get its +CONTENTS file wrong
> > if it is installed later.  This is not good behavior your describing.
> Yes, that is exactly what will happen.  Unless either amavisd-new is
> installed with the same options, or make.conf is used (either globally
> or with the CURDIR trick), it will get registered wrong.  Even when
> building manually.  The same problem applies to binary packages built
> with non-standard settings.
> Unfortunately it seems to be an artifact of the way that the ports
> Makefile magic works, and doesn't look easy to solve.
I found a relatively simple solution after studying bsd.port.mk carefully:
around line 2132 here is what the effect will be:

.if !defined(PKG_ARGS)
PORTMANAGER=	/usr/local/bin/portmanager /${CATEGORIES}/${PORTNAME} \ 
#PKG_ARGS=	-v -c -${COMMENT:Q} \
#		-d ${DESCR}	\
#		-f ${TMPPLIST}	\
#		-p ${PREFIX}	\
#		-P "`cd ${.CURDIR} && ${MAKE} package-depends | ${GREP} -v -E 
PKG_ARGS=	-v -c -${COMMENT:Q} \
		-d ${DESCR}	\
		-f ${TMPPLIST}	\
		-p ${PREFIX}	\
		-P "`cd ${.CURDIR} && ${PORTMANAGER} | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | 

I'm hoping I can just add something like:

make install	\ 
-DPORTMANAGER=/usr/local/bin/portmanager /${CATEGORIES}/${PORTNAME} \ 
		  package-depends	\
-DPKG_ARGS=-v -c -${COMMENT:Q} \
		-d ${DESCR}	\
		-f ${TMPPLIST}	\
		-p ${PREFIX}	\
		-P "`cd ${.CURDIR} && ${PORTMANAGER} | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} |

when portmanager runs make install.

It's easy enough to have portmanager generate a correct package-depends list, 
the trick will be getting it used in the +CONTENTS file. What do you think?


More information about the freebsd-ports mailing list