From owner-freebsd-ports@FreeBSD.ORG Wed Feb 7 22:20:22 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F23FB16A403; Wed, 7 Feb 2007 22:20:21 +0000 (UTC) (envelope-from fernan@iib.unsam.edu.ar) Received: from omega.iib.unsam.edu.ar (omega.iib.unsam.edu.ar [170.210.49.14]) by mx1.freebsd.org (Postfix) with ESMTP id 14FF013C474; Wed, 7 Feb 2007 22:20:00 +0000 (UTC) (envelope-from fernan@iib.unsam.edu.ar) Received: from gama.iib.unsam.edu.ar (gama.iib.unsam.edu.ar [192.168.10.72]) by omega.iib.unsam.edu.ar (8.13.6/8.13.6) with ESMTP id l17MJYRL007619; Wed, 7 Feb 2007 19:19:34 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) Received: (from fernan@localhost) by gama.iib.unsam.edu.ar (8.13.8/8.13.8/Submit) id l17MKbg0088644; Wed, 7 Feb 2007 19:20:37 -0300 (ART) (envelope-from fernan@iib.unsam.edu.ar) X-Authentication-Warning: gama.iib.unsam.edu.ar: fernan set sender to fernan@iib.unsam.edu.ar using -f Date: Wed, 7 Feb 2007 19:20:36 -0300 From: Fernan Aguero To: Michael Johnson Message-ID: <20070207222036.GA85470@iib.unsam.edu.ar> Mail-Followup-To: Michael Johnson , FreeBSD Ports , ade@freebsd.org References: <20070207175419.GA59592@iib.unsam.edu.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Cc: FreeBSD Ports , ade@freebsd.org Subject: Re: configure breaks if PATCH_WRKSRC != WRKSRC (culprit: AUTOTOOLS) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 22:20:22 -0000 +----[ Michael Johnson (07.Feb.2007 17:58): | | On 2/7/07, Fernan Aguero 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