Kyng Chaos
“The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects.”
- the wisdom of Tarzan

OGDI Build

version: 3.2.0b2
source: http://ogdi.sourceforge.net/ (look in the Download Archive)

The OGDI source has an odd configuration. There is a 'configure', but it doesn't get Mac OS X/Darwin right. There is also a preset darwin configuration, but it needs some adjustments, and that's how we'll do it here.

Pathes

Unzip the source. Rename the file config/common.mak.in to common.mak.

Grab this patchfile and unzip it into the OGDI source folder. Note: these patches are for OGDI version 3.2.0b2. They configure OGDI for PROJ, zlib and Expat, fix the shared library build, and fix the driver loading for dylibs.

In the ogdi source folder (Note: you DON'T run configure. If you do it will overwrite darwin.mak with something useless):

patch -p1 -i ogdi-3.2.0.patch

Leopard

A Leopard-only patch: edit ogdi/driver/rpf/rpf.h and move the end-comment marker, around line 76, to include the bool typedef:

/* typedef's conflict with /usr/include/sys/types.h
typedef unsigned short ushort;
typedef unsigned long  uint;
typedef unsigned char  bool;
*/

Now, in the ogdi source folder:

export TOPDIR=`pwd`
export TARGET=darwin
export MACOSX_DEPLOYMENT_TARGET=10.5
make XCFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64" \
XLDFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64"
sudo make install

Tiger

In the ogdi source folder:

export TOPDIR=`pwd`
export TARGET=darwin
export MACOSX_DEPLOYMENT_TARGET=10.4
make XCFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
XLDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
sudo make install

Using Frameworks

If you want to use the PROJ framework, override the PROJ setting by adding this to the make command before the XCFLAGS:

PROJ_INCLUDE="-I/Library/Frameworks/PROJ.framework/Headers" \
PROJ_STATICLIB="-framework PROJ" \
macosx/build/ogdi.txt (1107 views) · Last modified: 2009/08/08 09:20 by kyngchaos
Copyright © 2004-2009 William Kyngesburye Driven by DokuWiki Recent changes RSS feed