On Aug 19, 2007, at 11:47 AM, Michael Barton wrote:

With regard to swig, this adds a major new dependency to the wxPython GUI. It doesn't come on the Mac and I had to compile it from source. IT was pretty easy, but not something other most other Mac users will want to do. Same with Windows users. Maybe we'll want to have Python-swig as a requirement anyway. Several people have mentioned this. I know generally what it swig does, but not the details. An important question is...Is swig necessary for creating the driver for digitizing in wxPython or is there potentially another way to do this? That is, can we accomplish what you are trying to do without swig, oris it essential to make it work?

I think there are a couple levels to the SWIG setup. (ie see MapServer and GDAL) One is the developers - they need swig installed so they can generate the SWIG stuff in the GRASS source. The other is users - anyone who downloads the GRASS source should not need SWIG on their computer to compile GRASS, the SWIG bits are already generated by the developers.

Dunno about how appropriate SWIG is, though...

Makefile below ==========================

[I'm responding to the OSX bit below, but felt I could answer some other questions also]

MODULE_TOPDIR = ../../..

include $(MODULE_TOPDIR)/include/Make/Lib.make
include $(MODULE_TOPDIR)/include/Make/Doxygen.make

>>>> NOTE: This seems to imply putting the source directory for display_driver somewhere in the GRASS source tree, but I can't figure out where it is supposed to go. I've tried putting it at the root, in lib, and another place or two. My GRASS source tree happens to be in /Users/cmbarton/grass_dev/grass6.

MODULE_TOPDIR is the GRASS source top. Whereever you put the display driver source, the MODULE_TOPDIR = should backtrack to get to the source top.

Someone else could probably answer off the top of their head, but a little poking around reveals: display/drivers in the GRASS source.

CFLAGS=-c -fpic -I/usr/include/python$(PYTHONVERSION) -I./ -I$ (ARCH_DISTDIR)/include `wx-config --cxxflags`

>>>> NOTE: My Python includes are in a completely different place. I'm not sure what ARCH_DISTDIR refers to but am guessing that this needs to be set to match each system.

ARCH_DISTDIR is where binaries are built into, dist-[platform] off the grass top dir. The includes above (Lib.make, ...) should set all the necessary make variables for you.

LDFLAGS=-shared -L$(ARCH_LIBDIR) -lgrass_vect -lgrass_gis `wx- config --libs`

>>>> NOTE: This may need to be changed for Mac OS X if I am correctly remembering some discussions crossing the dev list.

-dynamiclib for OSX. But whatever it is for a platform, this is already in the GRASS makefile parts that are included, so -shared/- dynamiclib should be left out here. But it looks like display drivers are built as programs anyways, not libraries. Try using the PNG driver makefile as an example.


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan


_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Reply via email to