Date: Thu, 11 Jul 2013 08:45:27 +0100 (BST) From: Anton Shterenlikht <mexas@bris.ac.uk> To: mexas@bristol.ac.uk, swhetzel@gmail.com Cc: freebsd-ports@freebsd.org Subject: Re: order of patches under ports/xxx/zzz/files Message-ID: <201307110745.r6B7jR2R022173@mech-cluster241.men.bris.ac.uk> In-Reply-To: <CACdU%2Bf-1R9G2fX%2B1cqfo9Apfu5T2V11jNwsxfzgN32DmsYNx4Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
From swhetzel@gmail.com Wed Jul 10 17:58:47 2013 On Wed, Jul 10, 2013 at 4:03 AM, Anton Shterenlikht <mexas@bris.ac.uk> 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 <bsd.port.options.mk> .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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307110745.r6B7jR2R022173>