[Slackbuilds-users] Bugs in perl-template.SlackBuild
Chris Novakovic
chris at chrisn.me.uk
Thu Dec 11 20:27:38 UTC 2014
On 07/12/2014 07:16, Robby Workman wrote:
> On Wed, 03 Dec 2014 00:15:28 +0000
> Chris Novakovic <chris at chrisn.me.uk> wrote:
>
>> Dear all,
>>
>> There are a few bugs in perl-template.SlackBuild that prevent some
>> module distributions installing correctly, or at all.
>>
>> "Build method #1" uses makefiles generated by ExtUtils::MakeMaker [1]
>> to drive the build process:
>>
>> perl Makefile.PL \
>> PREFIX=/usr \
>> INSTALLDIRS=vendor \
>> INSTALLVENDORMAN3DIR=/usr/man/man3
>> make
>> make test
>> make install DESTDIR=$PKG
>>
>> Module distributions that install system-wide scripts to /usr/bin have
>> the man pages for those scripts installed to /usr/share/man/man1
>> because INSTALLVENDORMAN1DIR isn't set. The solution is to set
>> INSTALLVENDORMAN1DIR=/usr/man/man1 after setting INSTALLDIRS.
>>
>> "Build method #2" uses Module::Build [2] to build and install the
>> module distribution:
>>
>> perl Build.PL \
>> prefix=/usr \
>> installdirs=vendor \
>> destdir=$PKG
>> ./Build
>> ./Build test
>> ./Build install \
>> --install_path bindoc=/usr/man/man1 \
>> --install_path libdoc=/usr/man/man3
>>
>> There are two bugs here:
>>
>> - Options and values passed to Build.PL aren't meant to be delimited
>> with = symbols, which leads to them being ignored; the default
>> behaviour is to install to /usr/local (and in the main perl
>> directory, not in the site or vendor subdirectories) and then to
>> install directly to /usr/local when running `./Build install`, thus
>> bypassing $PKG entirely. The solution is to replace the = symbols
>> with spaces in the arguments to `perl Build.PL`.
>>
>> - The Module::Build cookbook [3] says that destdir should be passed to
>> `./Build install` rather than `perl Build.PL`. destdir=$PKG should
>> therefore move to `./Build install` and become --destdir $PKG.
>>
>> With all three of these changes, I've yet to see a Perl module that
>> doesn't build and install correctly.
>>
>> Cheers,
>> Chris
>>
>> [1]
>> http://search.cpan.org/~bingos/ExtUtils-MakeMaker-7.04/lib/ExtUtils/MakeMaker.pm
>> [2]
>> http://search.cpan.org/~leont/Module-Build-0.4210/lib/Module/Build.pm
>> [3]
>> http://search.cpan.org/~leont/Module-Build-0.4210/lib/Module/Build/Cookbook.pm
>
>
> If you will send me a patch against the current template, we'll get
> it merged.
>
> Thanks!
Apologies for the delay -- I've attached a patch against the HEAD of
templates.git.
Cheers,
Chris
-------------- next part --------------
commit 1bf543364072d3a676bb887856cd56b9f66c59cd
Author: Chris Novakovic <chris at chrisn.me.uk>
Date: Thu Dec 11 20:20:08 2014 +0000
Several fixes for perl-template.SlackBuild:
- INSTALLVENDORMAN1DIR=/usr/man/man1 is now set during build method #1,
so man pages in section 1 are installed in a location supported by
Slackware
- The options "prefix" and "installdirs" that are passed to Build.PL in
build method #2 are now correctly recognised
- "destdir" is now passed to `./Build install` instead of Build.PL in
build method #2, as recommended by the Module::Build::Cookbook
documentation
diff --git a/perl-template.SlackBuild b/perl-template.SlackBuild
index 53adb0d..6787cda 100644
--- a/perl-template.SlackBuild
+++ b/perl-template.SlackBuild
@@ -106,6 +106,7 @@ find -L . \
perl Makefile.PL \
PREFIX=/usr \
INSTALLDIRS=vendor \
+ INSTALLVENDORMAN1DIR=/usr/man/man1 \
INSTALLVENDORMAN3DIR=/usr/man/man3
make
make test
@@ -113,12 +114,12 @@ make install DESTDIR=$PKG
# Build method #2
perl Build.PL \
- prefix=/usr \
- installdirs=vendor \
- destdir=$PKG
+ prefix /usr \
+ installdirs vendor
./Build
./Build test
./Build install \
+ --destdir $PKG \
--install_path bindoc=/usr/man/man1 \
--install_path libdoc=/usr/man/man3
More information about the SlackBuilds-users
mailing list