How to port something requiring different versions depending on OSVERSION?

Freddie Cash fjwcash at
Thu Apr 29 21:22:18 UTC 2010

On Sun, Apr 25, 2010 at 4:51 PM, Darren Pilgrim <freebsd at>wrote:

> I maintain the sysutils/3dm port.  The port installs a binary-only package
> provided by 3ware (now LSI).  The binary provided is a 5.4-R, static-linked
> binary which requires KSE.  Because it's static-linked, there is no legacy
> KSE support workaround.
> Yes, LSI is aware of the problem.
> No, they haven't fixed it yet (they don't officially support 8.0).
> No, I can't get source.
> Yes, the port is currently marked BROKEN for RELENG_8 and later.
> Here's my dilemna:
> If I install the latest version of 3dm2, the port won't run on RELENG_8 and
> later.  If I install v2.01.09.004 (the last version that doesn't require
> KSE), the port will run on all versions of FreeBSD but lack proper support
> for current-model cards--the 9690 and 9750 series.
> Option 1:
> Detect the OS version, install the latest version if running <8.x and
> install if >=8.x.  I can't find anything in the Porter's
> Handbook that explicitly says NOT to do this.  Wesley Shields (wxs) says
> this "seems like a bad idea" without further qualification.  The only thing
> I could think of is the automated ports QA and packaging; however, those are
> moot because LSI requires pre-download agreement to a license which
> prohibits redistribution.
> Option 2:
> A regular 3dm2 port marked BROKEN for >=8.0 that follows the latest version
> and a 3dm2-legacy port kept at v2.01.09.004.  When LSI manages to rework
> whatever it is 3ware decided requires KSE, I'll unBROKEN 3dm2 and retire
> 3dm2-legacy.  That seems like lot of work for what will (hopefully) be a
> short-lived workaround just to avoid the first option.  It also creates two
> ports for the same piece of software--a solution that seems inelegant.
> So, which approach should I take?  I'm fine with option 2 if someone
> explains why option 1 is a bad idea.  If I get no response, I'll do option
> 1.
> For those of you with excellent memories, yes, this was mentioned before
> (the prior thread's subject is "Installing a different PORTVERSION based on

Just a note that the version  of 3dm2 for 64-bit FreeBSD runs
just fine on 64-bit 8-STABLE.  Versions after that don't run, though.  If
needed, I can provide a package for this.

uname -a:
FreeBSD 8.0-STABLE FreeBSD 8.0-STABLE #3: Fri Jan 15
11:08:47 PST 2010     root at

ls -d /var/db/pkg/3dm*

As for your question about the port:  I'd suggest 1 port, that installed
different versions based on the OS version.  Creating a -legacy port that
will be deleted down the road sounds like a lot of extra work (and repo
churn) for little gain.  :)

Freddie Cash
fjwcash at

More information about the freebsd-ports mailing list