binary port: how to deal with 4.x vs 5.x?

Oliver Eikemeier eikemeier at
Mon Jun 14 21:35:21 GMT 2004

Am Montag den, 14. Juni 2004, um 23:19, schrieb Fernan Aguero:

> Hi!
> I have an almost complete port of WU BLAST
> (, which is only distributed as
> pre-compiled binaries.
> Warren Gish has produced binaries for both freebsd-4.x and
> 5.x. Currently my port only installs the one for 4.x
> Is it possible to use the same port Makefile and set two
> different DISTNAMEs based on the OS version?
> The contents of the two files are similar, they're just
> linked against different libraries (libc_r is one if I
> remember correctly).
> I have already tried something along the lines of:
> .if __FreeBSD_version < 500000
> DISTNAME= xxxx
> .else
> DISTNAME= yyyy
> .endif
> but it didn't work as expected.
> Any idea?


You have to test the value of ${OSVERSION}, which is only available
*after* including


More information about the freebsd-ports mailing list