Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 2007 19:20:36 -0300
From:      Fernan Aguero <fernan@iib.unsam.edu.ar>
To:        Michael Johnson <ahze@ahze.net>
Cc:        FreeBSD Ports <ports@freebsd.org>, ade@freebsd.org
Subject:   Re: configure breaks if PATCH_WRKSRC != WRKSRC (culprit: AUTOTOOLS)
Message-ID:  <20070207222036.GA85470@iib.unsam.edu.ar>
In-Reply-To: <b2203fed0702071250s1215b8e1w65538a45eed6d759@mail.gmail.com>
References:  <20070207175419.GA59592@iib.unsam.edu.ar> <b2203fed0702071250s1215b8e1w65538a45eed6d759@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
+----[ Michael Johnson <ahze@ahze.net> (07.Feb.2007 17:58):
|
| On 2/7/07, Fernan Aguero <fernan@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.
|=20
| You could take a different approach and use
| PATCH_STRIP=3D-p1 (see patch(1) about -p)
|=20
| 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 =0D=0D
PATCH_STRIP=3D	-p1=0D
gama# setenv PATCH_DEBUG 1=0D=0D
gama# make patch=0D=0D
=3D=3D=3D>  Patching for emboss-4.0.0.23=0D
=3D=3D=3D>  Applying distribution patches for emboss-4.0.0.23=0D
=3D=3D=3D>   Applying distribution patch patch-1-23.gz=0D
Hmm...  Looks like a new-style context diff to me...=0D
The text leading up to this was:=0D
--------------------------=0D
|diff -c -N --recursive EMBOSS-4.0.0old/ajax/ajacd.c EMBOSS-4.0.0/ajax/ajac=
d.c=0D
|*** EMBOSS-4.0.0old/ajax/ajacd.c	2006-07-12 16:37:44.000000000 +0100=0D
|--- EMBOSS-4.0.0/ajax/ajacd.c	2007-01-05 17:11:58.000000000 +0000=0D
--------------------------=0D
File to patch: ^C=0D=0D
gama# ^D=08=08exit=0D

Script done on Wed Feb  7 18:32:40 2007




Script started on Wed Feb  7 18:44:38 2007
gama# grep STRIP Makefile=0D=0D
PATCH_DIST_STRIP=3D	-p1=0D
gama# setenv PATCH_DEBUG 1=0D=0D
gama# make patch=0D=0D
=3D=3D=3D>  Patching for emboss-4.0.0.23=0D
=3D=3D=3D>  Applying distribution patches for emboss-4.0.0.23=0D
=3D=3D=3D>   Applying distribution patch patch-1-23.gz=0D
Hmm...  Looks like a new-style context diff to me...=0D
The text leading up to this was:=0D
--------------------------=0D
|diff -c -N --recursive EMBOSS-4.0.0old/ajax/ajacd.c EMBOSS-4.0.0/ajax/ajac=
d.c=0D
|*** EMBOSS-4.0.0old/ajax/ajacd.c	2006-07-12 16:37:44.000000000 +0100=0D
|--- EMBOSS-4.0.0/ajax/ajacd.c	2007-01-05 17:11:58.000000000 +0000=0D
--------------------------=0D
Patching file ajax/ajacd.c using Plan A...=0D
Hunk #1 succeeded at 2505.=0D
Hunk #2 succeeded at 10599.=0D
Hmm...  The next patch looks like a new-style context diff to me...=0D
The text leading up to this was:=0D
--------------------------=0D
|diff -c -N --recursive EMBOSS-4.0.0old/ajax/ajfeat.c EMBOSS-4.0.0/ajax/ajf=
eat.c=0D
|*** EMBOSS-4.0.0old/ajax/ajfeat.c	2006-07-07 20:08:21.000000000 +0100=0D
|--- EMBOSS-4.0.0/ajax/ajfeat.c	2007-01-05 17:11:58.000000000 +0000=0D
--------------------------=0D
Patching file ajax/ajfeat.c using Plan A...=0D
Hunk #1 succeeded at 684.=0D
Hunk #2 succeeded at 1149.=0D
=2E..
[ snipped ]
=2E..
Patching file nucleus/embpatlist.c using Plan A...=0D
Hunk #1 succeeded at 122.=0D
Hunk #2 succeeded at 148.=0D
Hunk #3 succeeded at 175.=0D
Hunk #4 succeeded at 192.=0D
Hunk #5 succeeded at 214.=0D
done=0D
gama#=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070207222036.GA85470>