Makefile: Trouble with EXTRA_PATCHES

Brian Kee brianakee at
Thu Sep 8 18:22:00 PDT 2005

Ok, a simple segment like the following resolved my problem.
 ${SED} -i .orig -e s,file.c,path/to/file.c, ${EXTRA_PATCHES}
 I placed this within the .if/.endif block for the specific patch.
 I will not say that this is elegant, but it solved the current problem. Now 
on to the next one...
 Thank You, 
Brian A. Kee

 On 9/8/05, Brian Kee <brianakee at> wrote: 
> Well, I found a fairly simple solution the problem. If I manually modify 
> the patch file and add the correct relative path to the file listing in the 
> top couple of lines within the patch file. 
>  e.g.
>  -- filetopatch.c
> changed to
> -- src/filetopatch.c
>  the problem corrects itself. 
>  So, I now have two options. 
> 1. I can contact the maintainer of this patch and have him make these 
> corrections.
> 2. Somehow figure out how to directly modify this file from within the 
> Makefile.
>  Any suggestions on how this can be accomplished within the Makefile?
> Maybe a post-extract or pre-patch command? I see some referenced command 
> within <>, but I do not see them defined 
> anywhere.

More information about the freebsd-ports mailing list