Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Apr 2012 21:57:58 +0100
From:      Chris Rees <utisoft@gmail.com>
To:        RW <rwmaillists@googlemail.com>
Cc:        ports@freebsd.org
Subject:   Re: Preferred way of applying OSVERSION-dependend patches
Message-ID:  <CADLo839MxsKR23=K0Wq6L4T3PVe3qj6SsxFd7qnbKRLZpTCDvQ@mail.gmail.com>
In-Reply-To: <20120401213340.5cea6a29@gumby.homeunix.com>
References:  <4F7827A7.3030804@yandex.ru> <20120401213340.5cea6a29@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1 Apr 2012 21:34, "RW" <rwmaillists@googlemail.com> wrote:
>
> On Sun, 01 Apr 2012 14:02:15 +0400
> Ruslan Mahmatkhanov wrote:
>
> >
> > Good day!
> >
> > What is a preferred way of doing subj?
> >
> > 1. Add an extra-patch-* to files/ subdirectory and apply it depending
> >     of checks in Makefile (.if ${OSVERSION}).
> > 2. Add an patch-* to files subdirectory that applies unconditionally
> >     and that checking for __FreeBSD_version in app code itself.
> >
> > The second one will guarantee that the patch still applies cleanly on
> > port versions update,
>
> It also works correctly for package files.
>

Not really-- #if directives are evaluated at compile time.

FWIW, I'm not too bothered about it, but #1 strikes me as better practice,
though perhaps GNU-ish;.akin to using if instead of #if.

Chris

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo839MxsKR23=K0Wq6L4T3PVe3qj6SsxFd7qnbKRLZpTCDvQ>