Subject: Re: Q&D guide to putting perl modules into pkgsrc?
To: None <>
From: Carl Brewer <>
List: tech-pkg
Date: 10/26/2004 14:42:57
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/  Sun Apr 11 17:02:16 2004
|+++ lib/MasonX/       Mon Oct 25 22:47:12 2004
File to patch: work/MasonX-Apache2Handler-0.05/lib/MasonX/
Patching file 
work/MasonX-Apache2Handler-0.05/lib/MasonX/ using Plan A...
Hunk #1 succeeded at 615 with fuzz 1.

but when I run it from make :

===> Applying pkgsrc patches for p5-MasonX-Apache2Handler-0.05
1 out of 1 hunks failed--saving rejects to lib/MasonX/
Patch /usr/pkgsrc/www/p5-MasonX-Apache2Handler/patches/patch-aa failed
*** Error code 1


The patch looks like this:
more patches/patch-aa
--- lib/MasonX/   Sun Apr 11 17:02:16 2004
+++ lib/MasonX/        Mon Oct 25 22:47:12 2004
@@ -615,7 +615,7 @@
      if (exists $allowed_params->{data_dir} and not exists 
         # constructs path to <server root>/mason
-       my $def = $defaults{data_dir} = 
+       my $def = $defaults{data_dir} = 
File::Spec->catfile(Apache::ServerUtil::server_root, 'mason');
         param_error "Default data_dir (MasonDataDir) '$def' must be an 
absolute path"
             unless File::Spec->file_name_is_absolute($def);

Can anyone let me know what I've done wrong?