Thread: [Module-build-general] patch for cygwin
Status: Beta
Brought to you by:
kwilliams
|
From: Yitzchak Scott-T. <sth...@ef...> - 2003-09-24 08:25:57
|
Couldn't install Module::Build...the manpage names contain colons.
Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and MM_OS2
($^O eq 'uwin' and 'os2', respectively) also use '.', but have no
special code in Module::Build. MakeMaker uses '__' for DOS,
Module::Build uses '.' (via Platform/Windows.pm).
I left os_type as Unix for cygwin. Darwin does the same. You might
think about implementing an os_flavor ala MakeMaker instead (where one
platform can list multiple types) with an os_flavor_is(@foo) routine
checking if any of the @foo types apply.
Would have been nice if install.t had caught the problem instead of
the actual install failing midway, but the install.t only tries a
top-level module name.
t/xs.t is failing tests 4 and 8. I'm not sure how to translate the
other things MM_Cygwin does into Module::Build terms.
diff -ruN Module-Build-0.20.orig/MANIFEST Module-Build-0.20/MANIFEST
--- Module-Build-0.20.orig/MANIFEST 2003-08-05 09:45:51.000000000 -0700
+++ Module-Build-0.20/MANIFEST 2003-09-23 22:59:34.570513600 -0700
@@ -20,6 +20,7 @@
lib/Module/Build/Platform/VMS.pm
lib/Module/Build/Platform/VOS.pm
lib/Module/Build/Platform/Windows.pm
+lib/Module/Build/Platform/cygwin.pm
lib/Module/Build/Platform/darwin.pm
t/MANIFEST
t/Sample/Build.PL
diff -ruN Module-Build-0.20.orig/lib/Module/Build/Platform/cygwin.pm Module-Build-0.20/lib/Module/Build/Platform/cygwin.pm
--- Module-Build-0.20.orig/lib/Module/Build/Platform/cygwin.pm 1969-12-31 16:00:00.000000000 -0800
+++ Module-Build-0.20/lib/Module/Build/Platform/cygwin.pm 2003-09-23 22:23:13.474251200 -0700
@@ -0,0 +1,36 @@
+package Module::Build::Platform::cygwin;
+
+use strict;
+use Module::Build::Platform::Unix;
+
+use vars qw(@ISA);
+@ISA = qw(Module::Build::Platform::Unix);
+
+sub manpage_separator {
+ '.'
+}
+
+1;
+__END__
+
+
+=head1 NAME
+
+Module::Build::Platform::cygwin - Builder class for Cygwin platform
+
+=head1 DESCRIPTION
+
+This module provides some routines very specific to the cygwin
+platform.
+
+Please see the L<Module::Build> for the general docs.
+
+=head1 AUTHOR
+
+Initial stub by Yitzchak Scott-Thoennes, sth...@ef...
+
+=head1 SEE ALSO
+
+perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
+
+=cut
End of Patch.
|
|
From: Steve P. <sp...@qu...> - 2003-09-24 16:30:01
|
On Wednesday, September 24, 2003, at 07:06 am, Yitzchak Scott-Thoennes wrote: > Couldn't install Module::Build...the manpage names contain colons. > Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and MM_OS2 > ($^O eq 'uwin' and 'os2', respectively) also use '.', but have no > special code in Module::Build. MakeMaker uses '__' for DOS, > Module::Build uses '.' (via Platform/Windows.pm). Might make sense to use '__' for cygwin then, to preserve MM compatibility. I didn't see a Module::Build subclass for the others you've mentioned, so I left them out of the original patch[1]. Perhaps stubs for them should be created too? -Steve [1] see http://sourceforge.net/mailarchive/ forum.php?thread_id=2800835&forum_id=10905 |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2003-09-24 17:05:17
|
On Wed, Sep 24, 2003 at 05:29:23PM +0100, Steve Purkis <sp...@qu...> wrote: > On Wednesday, September 24, 2003, at 07:06 am, Yitzchak Scott-Thoennes > wrote: > > >Couldn't install Module::Build...the manpage names contain colons. > >Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and MM_OS2 > >($^O eq 'uwin' and 'os2', respectively) also use '.', but have no > >special code in Module::Build. MakeMaker uses '__' for DOS, > >Module::Build uses '.' (via Platform/Windows.pm). > > Might make sense to use '__' for cygwin then, to preserve MM > compatibility. I assume you mean DOS, not cygwin. cygwin should use '.'. > I didn't see a Module::Build subclass for the others > you've mentioned, so I left them out of the original patch[1]. > > Perhaps stubs for them should be created too? Only if someone is going to try them. I don't even know what uwin is. |
|
From: Steve P. <sp...@qu...> - 2003-09-25 09:08:00
|
On Wednesday, September 24, 2003, at 06:05 pm, Yitzchak Scott-Thoennes
wrote:
> On Wed, Sep 24, 2003 at 05:29:23PM +0100, Steve Purkis
> <sp...@qu...> wrote:
>> On Wednesday, September 24, 2003, at 07:06 am, Yitzchak
>> Scott-Thoennes
>> wrote:
>>
>>> Couldn't install Module::Build...the manpage names contain colons.
>>> Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and MM_OS2
>>> ($^O eq 'uwin' and 'os2', respectively) also use '.', but have no
>>> special code in Module::Build. MakeMaker uses '__' for DOS,
>>> Module::Build uses '.' (via Platform/Windows.pm).
>>
>> Might make sense to use '__' for cygwin then, to preserve MM
>> compatibility.
>
> I assume you mean DOS, not cygwin. cygwin should use '.'.
Actually, I was a bit confused there. I meant cygwin, but then I've
just looked at MM_Cygwin, which inherits its manpage separator from
MM_Unix ('::' again), so M::B was backwards compatible to begin with.
Perhaps MM_Cygwin's manpage generation is broken?
As an aside, I always thought it would be a bit more useful to generate
HTML manpages on Win32 & friends, considering they don't have a 'man'
tool by default. I suppose cygwin supplies one, so it's not a problem
there. But there might be a case for an option that lets the user
build HTML or MAN pages.
>> I didn't see a Module::Build subclass for the others
>> you've mentioned, so I left them out of the original patch[1].
>>
>> Perhaps stubs for them should be created too?
>
> Only if someone is going to try them. I don't even know what uwin is.
Point taken.
-Steve
|
|
From: Yitzchak Scott-T. <sth...@ef...> - 2003-09-25 10:51:15
|
On Thu, Sep 25, 2003 at 10:00:14AM +0100, Steve Purkis <sp...@qu...> wrote:
> On Wednesday, September 24, 2003, at 06:05 pm, Yitzchak Scott-Thoennes
> wrote:
>
> >On Wed, Sep 24, 2003 at 05:29:23PM +0100, Steve Purkis
> ><sp...@qu...> wrote:
> >>On Wednesday, September 24, 2003, at 07:06 am, Yitzchak
> >>Scott-Thoennes
> >>wrote:
> >>
> >>>Couldn't install Module::Build...the manpage names contain colons.
> >>>Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and MM_OS2
> >>>($^O eq 'uwin' and 'os2', respectively) also use '.', but have no
> >>>special code in Module::Build. MakeMaker uses '__' for DOS,
> >>>Module::Build uses '.' (via Platform/Windows.pm).
> >>
> >>Might make sense to use '__' for cygwin then, to preserve MM
> >>compatibility.
> >
> >I assume you mean DOS, not cygwin. cygwin should use '.'.
>
> Actually, I was a bit confused there. I meant cygwin, but then I've
> just looked at MM_Cygwin, which inherits its manpage separator from
> MM_Unix ('::' again), so M::B was backwards compatible to begin with.
> Perhaps MM_Cygwin's manpage generation is broken?
I don't know if we are looking at the same thing. I see this in
MakeMaker:
sthoenna@DHX98431 /usr/lib/perl5/5.8.0/ExtUtils
$ fgrep -A3 'sub replace_manpage_separator' MM*
MM_Cygwin.pm:sub replace_manpage_separator {
MM_Cygwin.pm- my($self, $man) = @_;
MM_Cygwin.pm- $man =~ s{/+}{.}g;
MM_Cygwin.pm- return $man;
--
MM_DOS.pm:sub replace_manpage_separator {
MM_DOS.pm- my($self, $man) = @_;
MM_DOS.pm-
MM_DOS.pm- $man =~ s,/+,__,g;
--
MM_OS2.pm:sub replace_manpage_separator {
MM_OS2.pm- my($self,$man) = @_;
MM_OS2.pm- $man =~ s,/+,.,g;
MM_OS2.pm- $man;
--
MM_UWIN.pm:sub replace_manpage_separator {
MM_UWIN.pm- my($self, $man) = @_;
MM_UWIN.pm-
MM_UWIN.pm- $man =~ s,/+,.,g;
--
MM_Unix.pm:sub replace_manpage_separator {
MM_Unix.pm- my($self,$man) = @_;
MM_Unix.pm-
MM_Unix.pm- $man =~ s,/+,::,g;
--
MM_VMS.pm:sub replace_manpage_separator {
MM_VMS.pm- my($self,$man) = @_;
MM_VMS.pm- $man = unixify($man);
MM_VMS.pm- $man =~ s#/+#__#g;
--
MM_Win32.pm:sub replace_manpage_separator {
MM_Win32.pm- my($self,$man) = @_;
MM_Win32.pm- $man =~ s,/+,.,g;
MM_Win32.pm- $man;
and I do get manpages with . in them.
> As an aside, I always thought it would be a bit more useful to generate
> HTML manpages on Win32 & friends, considering they don't have a 'man'
> tool by default. I suppose cygwin supplies one, so it's not a problem
> there. But there might be a case for an option that lets the user
> build HTML or MAN pages.
I'd think whether to install HTML would be a separate option, unrelated
to man pages.
> >>I didn't see a Module::Build subclass for the others
> >>you've mentioned, so I left them out of the original patch[1].
> >>
> >>Perhaps stubs for them should be created too?
> >
> >Only if someone is going to try them. I don't even know what uwin is.
>
> Point taken.
What are the plans for integrating into the core? As soon as you do
that, the people who maintain the various ports will be pretty much
forced to get things working.
|
|
From: Steve P. <sp...@qu...> - 2003-09-29 09:34:52
|
Hi Yitzchak,
Apologies for the delay, the end of last week was a bit hectic..
On Thursday, September 25, 2003, at 11:50 am, Yitzchak Scott-Thoennes
wrote:
> On Thu, Sep 25, 2003 at 10:00:14AM +0100, Steve Purkis
> <sp...@qu...> wrote:
>> On Wednesday, September 24, 2003, at 06:05 pm, Yitzchak
>> Scott-Thoennes
>> wrote:
>>
>>> On Wed, Sep 24, 2003 at 05:29:23PM +0100, Steve Purkis
>>> <sp...@qu...> wrote:
>>>> On Wednesday, September 24, 2003, at 07:06 am, Yitzchak
>>>> Scott-Thoennes
>>>> wrote:
>>>>
>>>>> Couldn't install Module::Build...the manpage names contain colons.
>>>>> Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and
>>>>> MM_OS2
>>>>> ($^O eq 'uwin' and 'os2', respectively) also use '.', but have no
>>>>> special code in Module::Build. MakeMaker uses '__' for DOS,
>>>>> Module::Build uses '.' (via Platform/Windows.pm).
>>>>
>>>> Might make sense to use '__' for cygwin then, to preserve MM
>>>> compatibility.
>>>
>>> I assume you mean DOS, not cygwin. cygwin should use '.'.
>>
>> Actually, I was a bit confused there. I meant cygwin, but then I've
>> just looked at MM_Cygwin, which inherits its manpage separator from
>> MM_Unix ('::' again), so M::B was backwards compatible to begin with.
>> Perhaps MM_Cygwin's manpage generation is broken?
>
> I don't know if we are looking at the same thing. I see this in
> MakeMaker:
You're quite right - I'm looking at EU::MM v6.05, and that's got an
older MM_Cygwin.pm (v1.04). Couldn't see a reference to it in the
Changes file, but it looks like that's one thing that's changed.
So it was backwards compat with a broken MM_Cygwin. Oops :).
>> As an aside, I always thought it would be a bit more useful to
>> generate
>> HTML manpages on Win32 & friends, considering they don't have a 'man'
>> tool by default. I suppose cygwin supplies one, so it's not a problem
>> there. But there might be a case for an option that lets the user
>> build HTML or MAN pages.
>
> I'd think whether to install HTML would be a separate option, unrelated
> to man pages.
Yeah - that discussion really belongs in a separate thread.
>>>> I didn't see a Module::Build subclass for the others
>>>> you've mentioned, so I left them out of the original patch[1].
>>>>
>>>> Perhaps stubs for them should be created too?
>>>
>>> Only if someone is going to try them. I don't even know what uwin
>>> is.
>>
>> Point taken.
>
> What are the plans for integrating into the core? As soon as you do
> that, the people who maintain the various ports will be pretty much
> forced to get things working.
I imagine the CPAN Testers and p5p will be involved, but I don't know
what the plan is. Ken's your best bet for that question.
( Still, it will most likely be in the core by 5.10.0 - if you haven't
already, see:
http://search.cpan.org/dist/perl-5.8.1/pod/
perldelta.pod#Future_Directions )
-Steve
|
|
From: Steve P. <sp...@qu...> - 2003-09-29 10:04:24
|
On Thursday, September 25, 2003, at 10:00 am, Steve Purkis wrote: > As an aside, I always thought it would be a bit more useful to > generate HTML manpages on Win32 & friends, considering they don't have > a 'man' tool by default. I suppose cygwin supplies one, so it's not a > problem there. But there might be a case for an option that lets the > user build HTML or MAN pages. For example, ACTION_docs could be split up into ACTION_manpages, ACTION_html_docs: ./Build html_docs ./Build manpages And there could be config parameters set for each (with sensible defaults for each OS) that ACTION_docs checked before trying to do anything. What do people think: a useful idea, or feature creep? -Steve |
|
From: Ken W. <ke...@ma...> - 2003-10-10 20:30:22
|
Okay, I've committed this patch. Thanks. -Ken On Wednesday, September 24, 2003, at 01:06 AM, Yitzchak Scott-Thoennes wrote: > Couldn't install Module::Build...the manpage names contain colons. > Patch below fixes it. Looking at MakeMaker, I see MM_UWIN and MM_OS2 > ($^O eq 'uwin' and 'os2', respectively) also use '.', but have no > special code in Module::Build. MakeMaker uses '__' for DOS, > Module::Build uses '.' (via Platform/Windows.pm). > > I left os_type as Unix for cygwin. Darwin does the same. You might > think about implementing an os_flavor ala MakeMaker instead (where one > platform can list multiple types) with an os_flavor_is(@foo) routine > checking if any of the @foo types apply. > > Would have been nice if install.t had caught the problem instead of > the actual install failing midway, but the install.t only tries a > top-level module name. > > t/xs.t is failing tests 4 and 8. I'm not sure how to translate the > other things MM_Cygwin does into Module::Build terms. |