From owner-freebsd-ports@FreeBSD.ORG Sun Apr 1 11:18:20 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEA21106566C for ; Sun, 1 Apr 2012 11:18:20 +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 44E428FC0A for ; Sun, 1 Apr 2012 11:18:19 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so1983067bkc.13 for ; Sun, 01 Apr 2012 04:18:12 -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=5ylfh+a0ivjaZH/tOQfJaif+LU/EXDUFDElwRVYyy1A=; b=vLY96WXC/GflMgJX1zhi7R+3hvRbXLO/DvoEdjsD433zOmgsYdpILk0PKJzcWaC+h+ kvisQjCcV4GRwoX+w4eQHy02vLakbGXXUA5GBNxPy57U4vBF0U4axcZPkCZuYb45K4Fg 70Ezzk02oreXjhiu+T7Rell1Ev8c9gRxHkrxBvW4ukieDOBceetSaEgs7nlwNMfF3hoF 8uAkhiQXtnRDJHYgSBi/glggcQcYUb28mSuo7tnaE4YniQXLJZHhj2FQ0Lrl3cBqrJu5 mk7oBwC2/IYkhfputT9OK6jnGYmBVMkTV5DC7r3KrMLgczwmyXoqgvHet/z0RHG8IhjV FMeg== MIME-Version: 1.0 Received: by 10.204.10.91 with SMTP id o27mr2027434bko.5.1333279092764; Sun, 01 Apr 2012 04:18:12 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Sun, 1 Apr 2012 04:18:12 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Sun, 1 Apr 2012 04:18:12 -0700 (PDT) In-Reply-To: <4F7827A7.3030804@yandex.ru> References: <4F7827A7.3030804@yandex.ru> Date: Sun, 1 Apr 2012 12:18:12 +0100 Message-ID: From: Chris Rees To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Ports Mailing List 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 11:18:20 -0000 On 1 Apr 2012 11:03, "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). > Definitely 2 :) Always testing beats sometimes testing. Stick a comment in the Makefile that a reasonable regexp will match. Chris