perl5.8 fixup
Bradley Giesbrecht
brad at pixilla.com
Mon Mar 16 15:07:19 PDT 2009
On Mar 16, 2009, at 10:45 AM, Rainer Müller wrote:
> On 2009-03-16 17:33, Bradley Giesbrecht wrote:
>> I was very interested in having the per5.8 rename it's man extensions
>> to something that would be found after p5 module.
>> I couldn't find where the Configure script allowed for this although
>> they do make allowances for having man pages for man1, site_man1 and
>> vendor_man1.
>
> In perl5, we could use:
> ./Configure ... -man1ext=3perl -man3ext=3perl
This only changes the dot extension, right?
I tried this earlier using
./Configure ... -man1ext=1perl5.8 -man3ext=3perl5.8
and when building p5 modules afterward I thought it also used 3perl5.8
for the module man extension.
I'm checking this again.
Yep, the p5's use the man1 and man3 extentions that perl5 was
configured with unless p5-CGI is behaving different then other p5 ports.
bash-3.2# port install p5-cgi
---> Fetching p5-cgi
---> Verifying checksum(s) for p5-cgi
---> Extracting p5-cgi
---> Configuring p5-cgi
---> Building p5-cgi
---> Staging p5-cgi into destroot
---> Installing p5-cgi @3.42_0
---> Activating p5-cgi @3.42_0
Error: Target org.macports.activate returned: Image error: /opt/local/
share/man/man3/CGI.3perl.gz is being used by the active perl5.8 port.
Please deactivate this port first, or use the -f flag to force the
activation.
Error: Status 1 encountered during processing.
I hunted all over the web to find how to Configure perl5 with man1ext,
man3ext, siteman1ext, siteman3ext, vendorman1ext and vendorman3ext but
that doesn't seem an option. Configure --help doesn't mention it either.
What about having the perl5.8 port move all it's man pages after pre
distroot or something so we can use
./Configure ... -man1ext=1perl5.8 -man3ext=3perl5.8
and have the Portfile move them from man/man3/CGI.3pm to man/man3/CGI.
3perl5.8 as an example?
The name could be shortened but I'm not sure if people will try to
have perl5.10 or something else installed and active alongside perl5.8
some day.
Looking at the Makefile for p5-cgi we could patch:
MAN1EXT = 1perl
MAN3EXT = 3perl
to
MAN1EXT = 1pm
MAN3EXT = 3pm
but who wants to change all those modules. No one.
This seems to be working on my system. Does this look like an
acceptable solution to anyone?
configure.args \
-des \
-D prefix='${prefix}' \
-D scriptdir='${prefix}/bin' \
-D cppflags="\${CPPFLAGS}" \
-D ldflags="\${LDFLAGS}" \
-D siteprefix='${prefix}' \
-D vendorprefix='${prefix}' \
-D man1ext='1p' \
-D man3ext='3p' \
-D cc=\${CC} \
-D ld=\${CC} \
-D man1dir='${prefix}/share/man/man1' \
-D man3dir='${prefix}/share/man/man3' \
-D siteman1dir='${prefix}/share/man/man1' \
-D siteman3dir='${prefix}/share/man/man3' \
-D vendorman1dir='${prefix}/share/man/man1' \
-D vendorman3dir='${prefix}/share/man/man3'
# Move perl5.8 installed man pages out of the way of port p5 modules
post-configure {
reinplace "s|^man1ext='1p'|man1ext='1p5.8'|" ${worksrcpath}/config.sh
reinplace "s|^man3ext='3p'|man3ext='3p5.8'|" ${worksrcpath}/config.sh
}
> p5-* ports are already using .3pm for their man pages as far as I can
> see, so no conflicts any more. I just tried this approach manually and
> it seems to get at least 3pm before 3perl.
>
> $ man -w
> /opt/local/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/
> share/man
> $ man -aw CGI
> /opt/local/share/man/man3/CGI.3pm.gz
> /opt/local/share/man/man3/CGI.3perl.gz
> /opt/local/share/man/man3/CGI.3.gz
> /usr/share/man/man3/CGI.3pm.gz
> /opt/local/share/man/man3/CGI.3pm.gz
> /opt/local/share/man/man3/CGI.3perl.gz
> /usr/share/man/man3/CGI.3pm.gz
>
> So it kind of works. But the 3perl man page is inaccessible (except
> specifying the full path) as there is only 3 or 3p in MANSECT, which
> seems to consider these man pages to be equal. Not sure which rules
> apply for the order here.
I thought the MANSECT refered to the dirnames. Basically man/
man[MANSECT]/. I guess I'm wrong.
//Brad
More information about the macports-dev
mailing list