Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 09:01:44 +0000
From:      Matthew Seaman <>
Subject:   Re: How to create 2 versions of a port
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 10/02/2012 05:20, Fbsd8 wrote:
> I maintain a port that accesses the release distribution files. Now wit=
> 9.0 having a different path /i386/i386 and the files being compressed
> first with tar and then again with xz I need to change the port to
> access the new layout and file format.
> I would like to leave the current version in the ports as is which work=
> fine with the 8.x world and add a second version that only works with
> 9.0 and newer.
> Question is how do i change the port description of the current port to=

> say it supports 8.x with out re-adding the complete port again?
> I know I have to add the new port version that supports ge 9.0.

Not a precise analogy, but take a look at:

This is an add-on module for RT which had (at the time) to adapt to the
radically different layouts between rt-3.6.x and rt-3.8.x

In your case, look at ${OSVERSION} to switch between different behaviours=

=2Eif ${OSVERSION} >=3D 900000
# FreeBSD 9.x and above


# FreeBSD 8.x and below



Or you can have two different ports, and just use a test on ${OSVERSION}
to say if the port is appropriate on that version:

=2Eif ${OSVERSION} >=3D 900000
BROKEN=3D	only supported for FreeBSD 8.x or below

and in the other port:

=2Eif ${OSVERSION} < 900000
BROKEN=3D only supported for FreeBSD 9.x or above



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
JID:               Kent, CT11 9PW

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla -



Want to link to this message? Use this URL: <>