[nycbug-talk] FreeBSD Porting

Johnny Lam jlam at pkgsrc.org
Fri Oct 20 17:07:59 EDT 2006


Steven Kreuzer wrote:
> 
> .if defined(WITH_GEODNS)
> LIB_DEPENDS=   GeoIP.5:${PORTSDIR}/net/GeoIP
> BUILD_DEPENDS= ${LOCALBASE}/include/GeoIP.h:${PORTSDIR}/net/GeoIP
> RUN_DEPENDS=   ${LIB_DEPENDS}
> CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib -lGeoIP"
> CFLAGS="-I${LOCALBASE}/include"
> .endif
> 
> However, I also need to apply 3 patches the the bind source to enable
> this feature. I created diff's and put them in the files directory.
> However, those patches get applied regardless of the options selected.
> 
> Do you know of any way to apply those patches only if WITH_GEODNS is
> true? According to the porter handbook, it looks like all or nothing?
> 
> Anyone have any hacks or tricks?

Make your patches look like:

#ifdef GEODNS
/* Your changes here. */
#endif

And change the above CFLAGS definition to:

CFLAGS=	-DGEODNS -I${LOCALBASE}/include

	Cheers,

	-- Johnny Lam <jlam at pkgsrc.org>



More information about the talk mailing list