configure breaks if PATCH_WRKSRC != WRKSRC (culprit: AUTOTOOLS)
Fernan Aguero
fernan at iib.unsam.edu.ar
Wed Feb 7 22:20:22 UTC 2007
+----[ Michael Johnson <ahze at ahze.net> (07.Feb.2007 17:58):
|
| On 2/7/07, Fernan Aguero <fernan at iib.unsam.edu.ar> wrote:
| >
| >Hi,
| >
| >I'm working on an update to the biology/emboss port that I
| >maintain, and I need to include an external patch.
| >
| >So I modified the port to fetch the patchfile and apply it.
| >For this I had to set PATCH_WRKSRC. This works fine, but now
| >the configure target breaks.
| >
| >I isolated the problem to a single line: the one that
| >defines PATCH_WRKSRC.
|
| You could take a different approach and use
| PATCH_STRIP=-p1 (see patch(1) about -p)
|
| Michael
|
+----]
Already tried that, but:
i) PATCH_STRIP does not work (see below)
ii) PATCH_WRKSRC does work if bsd.autotools.mk is patched
Before settling on PATCH_DIST_STRIP I've tried to use
PATCH_WRKSRC because it's the only one documented in
bsd.port.mk. And from what I've read there it should be
perfectly legal to set PATCH_WRKSRC to anything you want as
long as it serves your purpose (patching the sources).
# PATCH_WRKSRC - Directory to apply patches in.
# Default: ${WRKSRC}
PATCH_DIST_STRIP is documented in the Porter's Handbook, and
also works in this case, unlike PATCH_STRIP which is not
documented anywhere and doesn't work in this case.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#PORTING-PATCHFILES
IMHO, if bsd.autotools.mk breaks when I fiddle with PATCH_WRKSRC
this means that this is either a bug in bsd.autotools.mk, or
that PATCH_WRKSRC is a private variable that should not be
used my mere mortals.
I'm inclined to think it's the former.
I'm using PATCH_DIST_STRIP in my port, of course, cause it's the
best course of action. I just wanted to raise the
issue with PATCH_WRKSRC in conjunction with bsd.autotools.mk.
Fernan
PS: PATCH_STRIP vs PATCH_DIST_STRIP
Script started on Wed Feb 7 18:31:17 2007
gama# grep STRIP Makefile
PATCH_STRIP= -p1
gama# setenv PATCH_DEBUG 1
gama# make patch
===> Patching for emboss-4.0.0.23
===> Applying distribution patches for emboss-4.0.0.23
===> Applying distribution patch patch-1-23.gz
Hmm... Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|diff -c -N --recursive EMBOSS-4.0.0old/ajax/ajacd.c EMBOSS-4.0.0/ajax/ajacd.c
|*** EMBOSS-4.0.0old/ajax/ajacd.c 2006-07-12 16:37:44.000000000 +0100
|--- EMBOSS-4.0.0/ajax/ajacd.c 2007-01-05 17:11:58.000000000 +0000
--------------------------
File to patch: ^C
gama# ^Dexit
Script done on Wed Feb 7 18:32:40 2007
Script started on Wed Feb 7 18:44:38 2007
gama# grep STRIP Makefile
PATCH_DIST_STRIP= -p1
gama# setenv PATCH_DEBUG 1
gama# make patch
===> Patching for emboss-4.0.0.23
===> Applying distribution patches for emboss-4.0.0.23
===> Applying distribution patch patch-1-23.gz
Hmm... Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|diff -c -N --recursive EMBOSS-4.0.0old/ajax/ajacd.c EMBOSS-4.0.0/ajax/ajacd.c
|*** EMBOSS-4.0.0old/ajax/ajacd.c 2006-07-12 16:37:44.000000000 +0100
|--- EMBOSS-4.0.0/ajax/ajacd.c 2007-01-05 17:11:58.000000000 +0000
--------------------------
Patching file ajax/ajacd.c using Plan A...
Hunk #1 succeeded at 2505.
Hunk #2 succeeded at 10599.
Hmm... The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|diff -c -N --recursive EMBOSS-4.0.0old/ajax/ajfeat.c EMBOSS-4.0.0/ajax/ajfeat.c
|*** EMBOSS-4.0.0old/ajax/ajfeat.c 2006-07-07 20:08:21.000000000 +0100
|--- EMBOSS-4.0.0/ajax/ajfeat.c 2007-01-05 17:11:58.000000000 +0000
--------------------------
Patching file ajax/ajfeat.c using Plan A...
Hunk #1 succeeded at 684.
Hunk #2 succeeded at 1149.
...
[ snipped ]
...
Patching file nucleus/embpatlist.c using Plan A...
Hunk #1 succeeded at 122.
Hunk #2 succeeded at 148.
Hunk #3 succeeded at 175.
Hunk #4 succeeded at 192.
Hunk #5 succeeded at 214.
done
gama#
More information about the freebsd-ports
mailing list