From owner-freebsd-ports@FreeBSD.ORG Sun Apr 1 17:51:44 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 74E141065673 for ; Sun, 1 Apr 2012 17:51:44 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AC4388FC08 for ; Sun, 1 Apr 2012 17:51:43 +0000 (UTC) Received: by wern13 with SMTP id n13so1676994wer.13 for ; Sun, 01 Apr 2012 10:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=dWjfuK1U2KT2fCRYowTlBYvH4x+f94LVqcIfWugAQBc=; b=fm0Hd+5LS47g+Kg0yno6blB+qiWBjDvB/Yh6wmF1xrun1iXMiiAVpEXxB+9W9ezLfo Au/d4hv9+0lraND6w+JT111cixHeAYDVYFFOs8RlUo5EFvMtF34ycL5eGSUFJZODV6QL 0Y1LWLqlxaK/W8dHV3lY4OC6wCZSyy47Glods= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=dWjfuK1U2KT2fCRYowTlBYvH4x+f94LVqcIfWugAQBc=; b=YBZKtMJYlzszQf84sZznkmiFNPva2hBhVCkb9SoQMqjdr5+7IBrsbkKOnN0QtqKuHH 0pYWukXHs0dD8sGVY2Op36TKFVop5U22ICNoMQ9J18bxm/buK2Dhdols04nynEKz286O Hy6gLlrEuLeBSCmzj6mPrxIgMyL0dHEtrZr9h/aCUGbON9rqpr6hA+h+45OUsswaJjmm Kqvq9IAY3X75xoDjxEPtFozZ7lnPS0BFWL/MdCS9yBtwnhu//O41xgbQnv5zzFHK1JVb aqyPqRHuuPWEv6GYl+CnhP3eioEC+OYx6R6jjhDUTWI0d6qJsdF7FfoA+tRDPooUDydx Hmjg== Received: by 10.180.91.165 with SMTP id cf5mr17008479wib.2.1333302697509; Sun, 01 Apr 2012 10:51:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.63.4 with HTTP; Sun, 1 Apr 2012 10:51:06 -0700 (PDT) In-Reply-To: <4F7827A7.3030804@yandex.ru> References: <4F7827A7.3030804@yandex.ru> From: Eitan Adler Date: Sun, 1 Apr 2012 13:51:07 -0400 Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkwryOjBo2iAbvXJsKqLaGLZNt3SE3GsU2zNJIejJKJ3KmJBOiq3Iwb7W46HidCVRqTfYF7 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 17:51:44 -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 > =C2=A0 of checks in Makefile (.if ${OSVERSION}). > 2. Add an patch-* to files subdirectory that applies unconditionally > =C2=A0 and that checking for __FreeBSD_version in app code itself. > > The second one will guarantee that the patch still applies cleanly on por= t > versions update, but it will make it more hard to find conditional checks > for obsoleted FreeBSD versions (because most people, I believe, only look= ing > 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. --=20 Eitan Adler