Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to change the name of SWIG MapScript modules to the build process. #5699

Open
sdlime opened this issue Nov 8, 2018 · 1 comment

Comments

@sdlime
Copy link
Member

sdlime commented Nov 8, 2018

Sometimes it's necessary to run multiple versions of MapScript on the same box. At least for Perl-MapScript that involves editing a couple of files before generating the interface. From that README:

If you need to change the name of the mapscript module (default=mapscript) you need to:

  1) edit ../mapscript.i and change the name of the swig module
  2) edit Makefile.PL and edit the name 'mapscript' in the WriteMakefile subroutine call
  3) edit plmodule.i and change the name 'mapscript' to whatever the new name
     will be throughout the file

and now build as normal.

It's hard (impossible?) to make these changes with the current cmake process.

--Steve

@geographika
Copy link
Member

Would it be possible to set a command line variable and pass this to SWIG?

SWIG interface files must begin with a %module declaration—for example, %module module-name, where module-name is the name of the target language extension module. If the target language is Ruby, this is akin to creating a Ruby module. It is possible to override the module name by providing the command-line option –module module-name-modified: In this case, the target language module name is (you guessed it) module-name-modified.

https://www.ibm.com/developerworks/aix/library/au-swig/index.html

I'm running into a related issue with the PHPNG module name somehow causing the Python mapscript module to rebuild with each make call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants