Bug 1504 - [MS4W] add Perl mapscript module
: [MS4W] add Perl mapscript module
Status: RESOLVED WONTFIX
: MS4W
Apache
: unspecified
: PC Windows XP
: P2 enhancement
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2006-06-19 11:06 by
Modified: 2011-01-05 11:01 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-06-19 11:06:02
In /ms4w/Apache/cgi-bin/mapscript, there exists mapscript for java and python 
and csharp.

Can the perl equivalent be added as well?
------- Comment #1 From 2006-07-20 14:37:21 -------
tom i never found 'perl' in the mapserver's nmake.opt file.  (so this never made
it into the ms4w 2.1 / 1.5.5, blush)
------- Comment #2 From 2006-11-21 14:30:51 -------
You'll need swig enabled in your build environment and a directive to build perl
mapscript via swig.

Question: are the mapscript libs in apache/cgi-bin/mapscript built w/ swig or
something else?
------- Comment #3 From 2006-11-22 11:47:42 -------
Tom, I think the best way to get this done is for you to take the lead on it. 
You can download the exact buildkit that I use
(http://marsctl1.sdsc.edu/buildkit/), and let me know the changes that you come
up with for Perl.  It would be also great if you can submit a section for the
howto about Perl mapscript configuration (similar to the one submitted by Ken
Boss for Python at
http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#d-mapscript-configuration).

Otherwise it's hard for me since I don't know Perl at all.
------- Comment #4 From 2006-11-30 13:23:52 -------
OK, I took a look into things.

Basically, the person who builds ms4w for distribution needs to:

- download ActivePerl: http://www.activestate.com/Products/ActivePerl/
 - http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-
5.8.8.819-MSWin32-x86-267479.zip

(the perl exe is in ActivePerl-5.8.8.819-MSWin32-x86-267479\perl\bin\perl.exe)

- go to the MapServer build directory (in mapscript/perl).
- run the following commands:
 - perl Makefile.PL 
 - make
- copy the output mapscript.pm file to C:\ms4w\Apache\cgi-bin\mapscript\perl

- Test with a sample Perl script:


use lib 'C:\ms4w\Apache\cgi-bin\mapscript\perl';
use mapscript;

print $mapscript::MS_VERSION . "\n";

test like:

C:/> ActivePerl-5.8.8.819-MSWin32-x86-267479\perl\bin\perl.exe sample.pl

Jeff: if you can test this and let me know how things go, that would be 
appreciated (I don't have Win32 build tools).  If this works, then I'll finish 
of the howto.
------- Comment #5 From 2006-12-01 18:09:35 -------
i gave it a shot (msvc 2003 and mapserver-4.10.0).  The makefile gets generated,
but then when trying to make I'm running into path problems:

  >make
  make: *** No rule to make target `c:\Perl\libConfig.pm', needed by `Makefile'.
  Stop.

(it should be 'c:\Perl\lib\Config.pm'

And it seems to point a variable in the makefile that declares the separator for
paths:

  line54
    DIRFILESEP = ^\

But I try different slashes and i just get more errors later.

I wonder if we might ask the mapserver-dev list if anyone has built perl
mapscript on windows?  Maybe someone like hobu can help us. 
------- Comment #6 From 2006-12-01 21:23:11 -------
I'll query mapserver-dev and what we can find out.
------- Comment #7 From 2009-02-17 17:38:21 -------
no comments in this bug for years...  i guess i will leave the ticket open, in
case a Perl-Windows guru comes along..
------- Comment #8 From 2011-01-05 11:01:59 -------
- no Perl-Windows guru came along
- closing