From owner-freebsd-ports@FreeBSD.ORG Thu Jul 11 07:45:38 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F2082F2 for ; Thu, 11 Jul 2013 07:45:38 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from eu1sys200aog111.obsmtp.com (eu1sys200aog111.obsmtp.com [207.126.144.131]) by mx1.freebsd.org (Postfix) with ESMTP id B58F61839 for ; Thu, 11 Jul 2013 07:45:37 +0000 (UTC) Received: from mail-ee0-f41.google.com ([74.125.83.41]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKUd5im+RfE/N3OyKHH+VAVOIL/31jQ2jn@postini.com; Thu, 11 Jul 2013 07:45:37 UTC Received: by mail-ee0-f41.google.com with SMTP id d17so5356135eek.0 for ; Thu, 11 Jul 2013 00:45:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:date:from:message-id:to:subject:cc:reply-to:in-reply-to :x-gm-message-state; bh=JHKmRlhbQwfDejoaiXh58k8H0pdfNOFOfgtVBJavoSA=; b=nYVeYXw5Cm0ze4y6cr2Tgdp6wZvIPAd0QfCsQ84MRthviIjQUPg1qdNm3YnfiULCC6 tkAWTcK0e4k5yKZvu2RFlmOeuMe7PW/Vz9sRQlAonSqSKPNQrTezv+lXfgQTum+9KOOD 2HT7i+aOmcknuYb+Va/vynmYwKeOoDYuOrfCPr4+WqEjS6vxTN60F5B6494FYrcY2di7 jE64VbBnPPPk251cKzAcJtz4FPhWmvR95ruREbz8moIORMaFUefkJ+1dXJUjgLRNjJ/C B6jtHjSLiqV8RzwMQfZxjp62NvEc8eRRXWRX8GAhuWc53c4B1oVR8bjIA0aDA69DLY5J bAxQ== X-Received: by 10.14.1.70 with SMTP id 46mr40376297eec.82.1373528730920; Thu, 11 Jul 2013 00:45:30 -0700 (PDT) X-Received: by 10.14.1.70 with SMTP id 46mr40376288eec.82.1373528730820; Thu, 11 Jul 2013 00:45:30 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id b7sm66786522eef.16.2013.07.11.00.45.29 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Jul 2013 00:45:29 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id r6B7jRog022174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Jul 2013 08:45:27 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id r6B7jR2R022173; Thu, 11 Jul 2013 08:45:27 +0100 (BST) (envelope-from mexas) Date: Thu, 11 Jul 2013 08:45:27 +0100 (BST) From: Anton Shterenlikht Message-Id: <201307110745.r6B7jR2R022173@mech-cluster241.men.bris.ac.uk> To: mexas@bristol.ac.uk, swhetzel@gmail.com Subject: Re: order of patches under ports/xxx/zzz/files In-Reply-To: X-Gm-Message-State: ALoCoQmJCBWxTt+sHWhBOfJIdTvLhQQFk5ovictZT9MVopwpZx94e7guf+dCH/HGW8t7C0U4q1sRiEEMt6bWynmEkweFG48ZXgSe7QwtUxidjuV5eYldMTHgMwLGsv5ZWxjlLkQIrbhK+c3NbfQesoY4gTGvD2Ygqfk02UvVzeoz3aNux9yn7Tg= Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 07:45:38 -0000 From swhetzel@gmail.com Wed Jul 10 17:58:47 2013 On Wed, Jul 10, 2013 at 4:03 AM, Anton Shterenlikht wrote: > I'm trying to understand exactly how the patches > located in files directory in a port apply. > For example, port math/metis-edf has under files: > > # ls files/ > medis-patch-Lib_Makefile.txt patch-Lib::proto.h patch-Test::Makefile > patch-CONFIG::configure patch-Lib_Makefile patch-onmetis > patch-CONFIG_onmetis.in patch-Programs::Makefile > # > > Patch medis-patch-Lib_Makefile.txt must be applied > on top of patch-Lib_Makefile. This does seem to > work, but what process makes sure that the order > of patch application is exactly that. > Patch files are applied in alphabetical order. ok, got it What is medis-patch-Lib_Makefile.txt? Is it a private patch, an update for the port, or applied when an Option is selected? If it is a private patch, then try naming it patch-Lib_Makefile-private, then see if it patches the files in the correct order: I guess that is my case. This is patch suggested via a PR, but the author made the patch to be applied on top, not instead of, patch-Lib_Makefile. So I renamed it as patch-Lib_Makefile.txt and that put it after the original patch in alphabetic order. cd /usr/ports/match/metis-edf make clean ; make patch If it is an update for the port, then you should merge patch-Lib_Makefile and medis-patch-Lib_Makefile.txt cd /usr/ports/math/metis-edf make clean ; make patch cd ./work/metis-edf-4.1/ mv Lib/Makefile.orig Lib/Makefile.orig1 patch < ../../files/medis-patch-Lib_Makefile.txt mv Lib/Makefile.orig1 Lib/Makefile.orig diff -u Lib/Makefile.orig Lib/Makefile > ../../files/patch-Lib_Makefile I think this is going to happen at a later stage when the new patch has been confirmed to solve the problem. If the patch is to be applied when a certain option is selected, then add the patch as a EXTRA_PATCHES math/metis-edf/Makefile OPTIONS_DEFINE= ZAX ZAX_DESC= apply extra patch to Lib/Makefile .include .if ${PORT_OPTIONS:MZAX} EXTRA_PATCHES+= ${FILESDIR}/medis-patch-Lib_Makefile.txt .endif Note: ZAX and ZAX_DESC should tell us what the extra patch does. Thanks Anton