Subject: Re: Simple commands to add own patches to pkgsrc softwares
To: None <netbsd-users@netbsd.org>
From: Klaus Heinz <k.heinz@dezsieben.kh-22.de>
List: netbsd-users
Date: 12/29/2007 15:27:38
[ pkgsrc-users might have been more appropriate ]

Cem Kayali wrote:

> Full steps in detail:

Install pkgtools/pkgdiff

> Exract the software
> # make extract
...
> Edit files via pkgvi and get difference file
> # pkgvi file.c
> # pkgdiff file.c > patch-zz

You do not _need_ to use pkgdiff directly for that. Just change all the
files you want with 'pkgvi' and _then_ create all the patches at once

  # cd $PKGSRCDIR/category/software 
  # mkpatches

See mkpatches(1) for details of its operation. It's especially
convenient that it creates patch files with the correct names: If there
is an existing patch for file foo.c named patches/patch-ad, the new
patch for file foo.c in work/.newpatches/ will also be named patch-ad.

  Compare all the created patches with the existing ones in the patches
  directory
  # patchdiff | more

> Move patch to original patches directory
> # mv patch-zz /usr/pkgsrc/category/software/patches
> # cd /usr/pkgsrc/category/software

  Copy/move the newer patches you want to the patches directory
  # cp work/.newpatches/patch-zz patches/.

> Well, it could be better to clean first and then install
> # make clean
> # make install

  You forget to generate the correct checksums
  # make makepatchsum 
  or as a shortcut
  # make mps

ciao
     Klaus Heinz