From owner-freebsd-ports@FreeBSD.ORG Wed Jun 20 03:48:14 2007 Return-Path: X-Original-To: freebsd-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 BF7EE16A46C for ; Wed, 20 Jun 2007 03:48:14 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) by mx1.freebsd.org (Postfix) with ESMTP id 6108C13C469 for ; Wed, 20 Jun 2007 03:48:14 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id 0993637DE5A; Wed, 20 Jun 2007 13:48:13 +1000 (EST) X-Viruscan-Id: <4678A37C0000F940B1802A@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail4.barnet.com.au (Postfix) with ESMTP id C6C984230B2 for ; Wed, 20 Jun 2007 13:48:12 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail4auth.barnet.com.au (Postfix) with ESMTP id DCCC537DE17 for ; Wed, 20 Jun 2007 13:48:11 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 9FE573B; Wed, 20 Jun 2007 13:48:11 +1000 (EST) Date: Wed, 20 Jun 2007 13:48:11 +1000 From: Edwin Groothuis To: freebsd-ports@freebsd.org Message-ID: <20070620034811.GA1558@k7.mavetju> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Subject: Re: Generating patch files 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, 20 Jun 2007 03:48:14 -0000 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 20, 2007 at 02:25:20AM +0200, Steffen Beyer wrote: > Is there an easy way to create this set of files, i.e. cutting the patch > into pieces and naming the files accordingly? I looked through the > handbook and various tools, but couldn't find the right one. Make sure that the directory files exist, Go to the ${WRKSRC}, and run "makediff path/and/file.extension" Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/ --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=makediff #!/bin/sh filename=$1 filesdir=../../files if [ -z "`echo ${filename} | grep _`" ]; then patchfile="${filesdir}/patch-`echo ${filename} | sed -e 's/\//__/g'`" else patchfile="${filesdir}/patch-`echo ${filename} | sed -e 's/\//_/g'`" fi test -f ${filename}.orig || cp ${filename} ${filename}.orig vi ${filename} p=`grep -l " ${filename} " ${filesdir}/*` test ! -z "${p}" && patchfile=${p} diff -u ${filename}.orig ${filename} > ${patchfile} echo "Saving diff to ${patchfile}" --+HP7ph2BbKc20aGI--