Koen van der Drift wrote:
> Hi,
>
> Is it possible to use %p in a patch file? I vaguely remember a while ago
> there was a reason not to do this, but I forgot exactly what. I haven't been
> following the latest developments of the project either, so I don't know if
> this has been changed.
>
> Basically, what I need to do is to update some paths in makefile.pl so that
> it can find the right headers and libraries. Adding a patch file in this case
> (IMHO) is much easier than to add a Patch field in the info file. Unless
> someone knows a good way to change using the Patch field:
>
> if (-d "$EMB_ROOT/include") {
> $EMB_INC = "-I$EMB_ROOT/include";
> }
>
> into this:
>
> if (-d "$EMB_ROOT/include") {
> $EMB_INC = "-I/%p/include/EMBOSS -I/%p/include/eplplot";
> }
>
>
> thanks,
>
> - Koen.
>
>
The reason not to do it is that it doesn't work. :-)
The patch is applied without evaluating any percent expansions, so all
of your %p will literally be "%p".
What you can do is put something like @FINKPREFIX@ instead of %p in your
.patch file, and then change that for %p in a PatchScript in the .info
file, where the percent expansions are evaluated. E.g.:
PatchScript: perl -pi -e 's|@FINKPREFIX@|%p|g' makefile.pl
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-devel