From owner-freebsd-ports@FreeBSD.ORG Wed Jul 10 16:56:41 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 58480B36 for ; Wed, 10 Jul 2013 16:56:41 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 30FF11DA0 for ; Wed, 10 Jul 2013 16:56:41 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id qd12so16067148ieb.30 for ; Wed, 10 Jul 2013 09:56:41 -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=9jHYKibJyQwIIThdQ9kZdg/eSux/uN0XT2oTNnzjERg=; b=gMWTiFmEU42/tfjYFT+KhJcTK0APXVPdSBZmLDAfhfKxXo2Vfh06cfgv+aTs70kwmw K0m+2y+D9k1C11S+yDl02uf+xOIR7+RDh0Ju/YKbEy+2UqEE/Yv3uCNJ3OJoT883s0h/ UEFii5GEhyAEjzhcvfgN1IDbDUmYraUP706NLuhmXQHf9QQOZ6Mgxb+VaIdpiqFHbsEQ 7h5X12Lt/WJwFgyI3h7olZY0y/9Q58BT5rId5OEUInkkw1u/H213Z6EC8JpEnWb3aKav MgQNEpVG9+EAOSgitzHHpTh9tuJmDmQRppYQt/rMEafyXa0y4eaMrZT2h4ydu1zxIj7b Mx4w== MIME-Version: 1.0 X-Received: by 10.42.36.198 with SMTP id v6mr10117570icd.58.1373475400955; Wed, 10 Jul 2013 09:56:40 -0700 (PDT) Received: by 10.50.221.179 with HTTP; Wed, 10 Jul 2013 09:56:40 -0700 (PDT) In-Reply-To: <201307100903.r6A93Gdb001317@mech-cluster241.men.bris.ac.uk> References: <201307100903.r6A93Gdb001317@mech-cluster241.men.bris.ac.uk> Date: Wed, 10 Jul 2013 11:56:40 -0500 Message-ID: Subject: Re: order of patches under ports/xxx/zzz/files From: Scot Hetzel To: mexas@bristol.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 16:56:41 -0000 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. 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: 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 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. -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.