From owner-freebsd-ports@FreeBSD.ORG Sun Apr 1 20:01:17 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 0428D106564A for ; Sun, 1 Apr 2012 20:01:17 +0000 (UTC) (envelope-from jhelfman@e-e.com) Received: from mail.dw.redsrci.com (mail.pub.dw.redsrci.com [72.29.183.251]) by mx1.freebsd.org (Postfix) with ESMTP id 958228FC20 for ; Sun, 1 Apr 2012 20:01:16 +0000 (UTC) Received: from mail.dw.redsrci.com (localhost [127.0.0.1]) by mail.dw.redsrci.com (Postfix) with ESMTP id 831FD6F4075; Sun, 1 Apr 2012 13:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=e-e.com; h= content-transfer-encoding:content-type:content-type:mime-version :user-agent:from:from:subject:subject:date:date:references :in-reply-to:message-id:received:received:received; s=ee; t= 1333310470; x=1335124870; bh=0SwCHarAW/Q/wufxN2FADvDetT3weNZZU8g dM6GcHGA=; b=VnKRPTTG9d9eRHHRkfEZF/CP2NHJbiudfnreHuKyhAXIuyVRP/N 3cPIhWhbqaPAyXWHEavZUlQhU2UHUJB3K9T6sgW69PyjqEFswOBoBJdqoVLqRNOG D1in940QPmpgNg6tRkHr0c+nBbYdfOp1Y3xmjWLprKM3Df1yMn2E+GwE= X-Virus-Scanned: amavisd-new at experts-exchange.com Received: from mail.dw.redsrci.com ([127.0.0.1]) by mail.dw.redsrci.com (mail.dw.redsrci.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pR1gx2ZnS5Lc; Sun, 1 Apr 2012 13:01:10 -0700 (PDT) Received: from mail.experts-exchange.com (localhost [127.0.0.1]) by mail.dw.redsrci.com (Postfix) with ESMTP id 2CF486F4072; Sun, 1 Apr 2012 13:01:10 -0700 (PDT) Received: from 76.251.118.198 (SquirrelMail authenticated user jhelfman) by mail.experts-exchange.com with HTTP; Sun, 1 Apr 2012 13:01:10 -0700 Message-ID: <3feda25fa085f9040079a33bc0f26ff9.squirrel@mail.experts-exchange.com> In-Reply-To: References: <4F7827A7.3030804@yandex.ru> Date: Sun, 1 Apr 2012 13:01:10 -0700 From: "Jason Helfman" To: "Eitan Adler" User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: FreeBSD Ports Mailing List , Ruslan Mahmatkhanov 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:01:17 -0000 > On 1 April 2012 06:02, 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, but it will make it more hard to find conditional >> checks >> for obsoleted FreeBSD versions (because most people, I believe, only >> looking >> to Makefile for things like this). > > #1 for exactly the reason you specify: it makes it easier to figure > out why something is being patched and when that patch is no longer > required. > I say #3 :) So if it is non-conditional in the port, but you choose to make it conditional in the code -- Send the patch upstream, or to maintainer of code, so the patch isn't necessary in the portstree. -jgh