From owner-freebsd-ports@FreeBSD.ORG Sun Apr 1 20:58:00 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44E58106566C for ; Sun, 1 Apr 2012 20:58:00 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id BB1D68FC16 for ; Sun, 1 Apr 2012 20:57:59 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so2211608bkc.13 for ; Sun, 01 Apr 2012 13:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CHu4dH84fwZoZ7aix5K2Vqujiv7jmzsdLtj5I6Z+ghM=; b=GfjjM7WZToB85vXqrGv6uOM/xKLIe1RhE17QxIn74l91T35zXL8GJ90khs51QJfdSL aUet/ZkHLP5V9gRkgQVGQaQgDrNCX/TG7BSe67x3OC6Uyey+PZuBeiQp+JB1eP5HgIkE hAj55JPz6qAGOcRVl5N8P0epgGdfajGjZnarPPZAZunhmV69vif1Jd/C9tIgnKRyhnuv +UFt9Uc0zsg5kkyA9dHVrV+2SiYY13J8lvXY5d0qGjMCANqVsShKHS8IUOtGYIT5uSPw JRzV97POFcJG17kEmJ9GWUbBhYnJVBx4ejOhI8Hc7078Czz6O6sbzF+YJdTOleWlNHn8 597g== MIME-Version: 1.0 Received: by 10.205.129.137 with SMTP id hi9mr2557657bkc.131.1333313878535; Sun, 01 Apr 2012 13:57:58 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Sun, 1 Apr 2012 13:57:58 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Sun, 1 Apr 2012 13:57:58 -0700 (PDT) In-Reply-To: <20120401213340.5cea6a29@gumby.homeunix.com> References: <4F7827A7.3030804@yandex.ru> <20120401213340.5cea6a29@gumby.homeunix.com> Date: Sun, 1 Apr 2012 21:57:58 +0100 Message-ID: From: Chris Rees To: RW Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: ports@freebsd.org Subject: Re: Preferred way of applying OSVERSION-dependend patches X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2012 20:58:00 -0000 On 1 Apr 2012 21:34, "RW" 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