> diff -uraN aee-2.2.3.old aee-2.2.3.new > aee.patch > more aee.patch diff -uraN aee-2.2.3.old/help.c aee-2.2.3.new/help.c --- aee-2.2.3.old/help.c Sun Jan 31 23:28:23 1999 +++ aee-2.2.3.new/help.c Thu Feb 3 21:44:53 2005 @@ -11,7 +11,7 @@ #include "aee.h"
char *help_file_list[4] = { - "/usr/local/aee/help.ae", + "@PREFIX@/share/doc/aee/help.ae", "/usr/local/lib/help.ae", "~/.help.ae", "help.ae"
Now, In my aee.info file, I've got the following line.
PatchScript: sed 's|@PREFIX@|%p|g' < %a/%n.patch | patch -p1
Unfortunately, when I try to build the package, I get an error like this.
aee-2.2.3/genstr
aee-2.2.3/aee.i18n.guide
aee-2.2.3/aee.msg
aee-2.2.3/keypad
aee-2.2.3/aee.1.ps
aee-2.2.3/install-sh
aee-2.2.3/catalog.aee
aee-2.2.3/Changes
sed 's|@PREFIX@|/min|g' < /min/fink/dists/local/main/finkinfo/aee.patch | patch -p1
patching file help.c
Hunk #1 FAILED at 11.
1 out of 1 hunk FAILED -- saving rejects to file help.c.rej
### execution of sed failed, exit code 1
Failed: patching aee-2.2.3-1 failed
I'm pretty sure the error is occurring due to the fact the @PREFIX@ is within double quotes. I did some experiments, and anytime @PREFIX@ is placed within double quotes, the patch fails, but anytime it is out of quotes, the patch is successful. Based on the patch reject file, it looks like sed is correctly substituting @PREFIX@ with %p, but the patch command doesn't like the double quotes, or maybe it's a combination of the commands screwing up. I don't really know.
>more help.c.rej *************** *** 11,17 **** #include "aee.h"
char *help_file_list[4] = { - "/usr/local/aee/help.ae", "/usr/local/lib/help.ae", "~/.help.ae", "help.ae" --- 11,17 ---- #include "aee.h"
char *help_file_list[4] = { + "/sw/share/doc/aee/help.ae", "/usr/local/lib/help.ae", "~/.help.ae", "help.ae"
So, does anyone know how I can use the patch command to get around this problem? Or should I just use a series of some other commands to edit the file prior to compilation?
Jason Park
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel