Date: Wed, 10 Jul 2013 11:56:40 -0500 From: Scot Hetzel <swhetzel@gmail.com> To: mexas@bristol.ac.uk Cc: freebsd-ports@freebsd.org Subject: Re: order of patches under ports/xxx/zzz/files Message-ID: <CACdU%2Bf-1R9G2fX%2B1cqfo9Apfu5T2V11jNwsxfzgN32DmsYNx4Q@mail.gmail.com> In-Reply-To: <201307100903.r6A93Gdb001317@mech-cluster241.men.bris.ac.uk> References: <201307100903.r6A93Gdb001317@mech-cluster241.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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. 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 <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. -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf-1R9G2fX%2B1cqfo9Apfu5T2V11jNwsxfzgN32DmsYNx4Q>