From owner-freebsd-ports@FreeBSD.ORG Thu Sep 29 04:07:14 2005 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE07216A41F for ; Thu, 29 Sep 2005 04:07:14 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [63.240.76.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AB9843D48 for ; Thu, 29 Sep 2005 04:07:14 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from [192.168.214.215] (c-24-1-232-64.hsd1.tx.comcast.net[24.1.232.64]) by comcast.net (sccrmhc13) with ESMTP id <2005092904071301300fkhqje>; Thu, 29 Sep 2005 04:07:13 +0000 Message-ID: <433B6870.7070802@computer.org> Date: Wed, 28 Sep 2005 23:07:12 -0500 From: Eric Schuele User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Kee References: <433B558D.8000204@computer.org> <34bd754105092820056ab6f73d@mail.gmail.com> In-Reply-To: <34bd754105092820056ab6f73d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org Subject: Re: Need help with patching a file in a new port.... 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: Thu, 29 Sep 2005 04:07:14 -0000 Brian Kee wrote: > I believe that the top of the patch file will need the relative path to the > file that you want to patch. I remember running into somthing similar a > while back. > I do not maintain the patch file, so I have to do something like the > following to fix the problem: > EXTRA_PATCHES+= ${WRKDIR}/ > pre-patch: > ${MV} ${WRKDIR}/sguil-0.5.3/sensor/snort_mods/2_1/spp_portscan_sguil.patch > ${EXTRA_PATCHES} > ${SED} -i .orig -e s,original/patchfile/name.c,path/to/new/name.c, > ${EXTRA_PATCHES} > > I know that it is not pretty, but it got the job done! > HTH > BAK > Thanks for the response... But I'm not quite following you. Did you have to make the above changes in the ports Makefile, or to the patch-* file? I have compared my diff to other port's diffs and the first few lines of mine 'seem' reasonable. But then again I'm not really sure how they should look. If my port is in /usr/ports/sysutils/foo And I go in there and type make install The tarball is pulled down into distfiles and unpacked into /usr/ports/sysutils/foo/work below work exists /foo-0.1.1/src There exists in src a Makefile. It is this file I have modified. The full path to this modified file is: /usr/ports/sysutils/foo/work/foo-0.1.1/src The first two lines of my patch-* file (presently, after some messing around) look like: --- foo-0.1.1/src/Makefile.orig Fri Apr 8 07:17:10 2005 +++ foo-0.1.1/src/Makefile Wed Sep 28 21:14:29 2005 Given your comments above, I'm even more confused. Have I generated the diff in the wrong format (I used `diff -ru `)? Are your comments related to another file which needs tweaking? Thanks for the help > > On 9/28/05, Eric Schuele wrote: > >>Hello, >> >>I'm having slight difficulty creating a patch for a file in a new port.... >> >>I have unpacked the source. It merely needs a path changed in the >>Makefile. So I fixed it, and created a port for it. However, the patch >>I made fails to apply. I get the message: >> >>"File to patch: " >> >> > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > -- Regards, Eric