port makefile question
Jeremy Chadwick
freebsd at jdc.parodius.com
Wed May 17 11:40:25 UTC 2006
On Wed, May 17, 2006 at 01:50:10AM -0800, Beech Rintoul wrote:
> On Wednesday 17 May 2006 01:40, Sam Lawrance wrote:
> > If I suspect correctly, you're looking for something like this:
> >
> > .include <bsd.port.pre.mk>
> >
> > .if exists(${LOCALBASE}/include/getopt.h)
> > BROKEN= Does not build when libgnugetopt is installed
> > .endif
> >
> >
> > ....
> >
> >
> > .include <bsd.port.post.mk>
>
> Thanks, that's exactly what I was looking for. I was stuck on the .if exists.
> Now I just need to add a version check to that. It's only a 4x problem.
> That I know how to do :)
Comment in passing:
Please make sure, if at all possible, that you use OSVERSION and not
OSREL for your 4.x system check. It depends on the problem, of course,
but sometimes it's possible to narrow down to which exact FreeBSD version
or commit/revision date broke (or fixed!) whatever relates to your port.
You'll find other ports doing OSVERSION magic (greater-than less-than
comparisons to basically state "it broke as of this date, but got
fixed as of this date"), so you can grep -r OSVERSION /usr/ports and
look at some of those.
Use this as a guide:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/freebsd-versions.html
Hope this helps!
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
More information about the freebsd-ports
mailing list