Subject: Re: Q&D guide to putting perl modules into pkgsrc?
To: Carl Brewer <email@example.com>
From: Julio M. Merino Vidal <firstname.lastname@example.org>
Date: 10/26/2004 08:32:36
On Tue, 26 Oct 2004 14:42:57 +1000
Carl Brewer <email@example.com> wrote:
> Greg Troxel wrote:
> > Look at the Makefile for an existing perl module, and note that it is
> > pretty short and you just have to change the name (in then module
> > name, the CPAN fetch location, and in the PERL5_PACKLIST variable).
> > See devel/p5-Data-Buffer for a fairly vanilla example.
> I've done this, and got a mostly working pkg, save for
> worrying about the README etc ...
> But.... I'm having trouble getting a patch to take. When I
> run the patch manually, it works :
> rollcage2# patch < patches/patch-aa
> Hmm... Looks like a unified diff to me...
> The text leading up to this was:
> |--- lib/MasonX/Apache2Handler.pm.orig Sun Apr 11 17:02:16 2004
> |+++ lib/MasonX/Apache2Handler.pm Mon Oct 25 22:47:12 2004
> File to patch: work/MasonX-Apache2Handler-0.05/lib/MasonX/Apache2Handler.pm
> Patching file
> work/MasonX-Apache2Handler-0.05/lib/MasonX/Apache2Handler.pm using Plan A...
> Hunk #1 succeeded at 615 with fuzz 1.
The patch-* files should be in "diff -bu" format, and apply without a fuzz
to avoid problems (to force patches to apply with fuzz you can set
PATCH_FUZZ_FACTOR=-F2). Furthermore, do not put changes for more than one
file into a single patch-file, as this will make future modifications more
So, in summary: pkgsrc doesn't like that. Patches have to apply cleanly.
Apply the patch manually and regenerate it, preferably using pkgdiff from
Julio M. Merino Vidal <firstname.lastname@example.org>
The NetBSD Project - http://www.NetBSD.org/