Subject: Re: spamd pkgsrc issues
To: None <peter@pointless.nl>
From: Johnny Lam <jlam@pkgsrc.org>
List: pkgsrc-users
Date: 03/30/2006 11:47:03
Peter Postma wrote:
> (i'm not subscribed to this list so please keep me on cc)
>
>>> +
>>> +# Necessary so USE_BUILTIN.pflkm will be defined
>>> +.include "../../security/pflkm/builtin.mk"
>>> +
>>> +# Using LOCALBASE instead of PREFIX, since not defined yet
>>> +.if !empty(USE_BUILTIN.pflkm:M[Nn][Oo]) && exists(${LOCALBASE}/sbin/pfctl)
>>> +CPPFLAGS+= -DPATH_PFCTL=\"${LOCALBASE}/sbin/pfctl\"
>>> +.endif
>> This dance is not necessary. You should remove everything after you
>> include pflkm/buildlink3.mk and just say:
>>
>> CPPFLAGS+= -DPATH_PFCTL=\"${BUILDLINK_PREFIX.pflkm}/sbin/pfctl\"
>>
>
> This doesn't work when pfctl is /sbin/pfctl. Is there another solution?
I think the best way to solve this one is to make pflkm/builtin.mk
export a publicly readable variable PFCTL that is the path to the pfctl
binary, and encapsulate the search for it entirely within
pflkm/builtin.mk. Then the above change would just be:
CPPFLAGS+= -DPATH_PFCTL=\"${PFCTL}\"
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>