version: 3.2.0b2
source: http://ogdi.sourceforge.net/ (look in the Download Archive)
parallel: no
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.
Unzip the source. Copy the file config/common.mak.in to config/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
An extra patch for Snow Leopard: 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.6 make XCFLAGS="-arch i386 -arch x86_64" XLDFLAGS="-arch i386 -arch x86_64" sudo make install
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
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
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" \