Build UV-CDAT 2.1.0 on OpenSuSE 12.3

Just succeeded to build UV-CDAT on my SuSE 12.3. A couple of problems were solved by David Lonie, and other developers, thanks!

Here is a script that results in a working build here.

#!/bin/bash

# receipe to build UVCDAT release 2.1.0
# includes specifics for OpenSuSE 12.3
# tested on OpenSuSE 12.3
# Should work for other platforms as well
# Harald von Waldow <hvw@env.ethz.ch> - 2015-01-29
# Big kudos to David Lonie who figured it all out
# and to all members of the extremely responsive UVCDAT developer team!

## Modify this #######################################################################
# Where you want to build
SOURCE_ROOT="/lhome/hvwaldow/src/uvcdat"
DATE=`date +"%y-%m-%d"`
# What to download; check if still up-to-date
DOWNLOAD_URL="https://github.com/UV-CDAT/uvcdat/archive/release-2.1.0.zip"
VERSION="2.1.0"
# Where you want UVCDAT to be installed
# Is supposed not to exist yet
DESTINATION="/lhome/hvwaldow/uvcdat-$VERSION"
# ####################################################################################

cd $SOURCE_ROOT
wget $DOWNLOAD_URL
ARCHIVE=`basename $DOWNLOAD_URL`
unzip $ARCHIVE
SOURCEDIR=`unzip -Z -1 $ARCHIVE |head -n1`
SOURCEDIR=`basename $SOURCEDIR`
mkdir build-uvcdat
cd build-uvcdat
# environment variables that interfere with the build process
unset PYTHONSTARTUP
unset CONFIG_SITE
# Patch UVMETRICS installation
sed -i '/^set(nm UVCMETRICS)/aset\(USR_ENVS "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${cdat_EXTERNALS}/lib:$ENV{LD_LIBRARY_PATH}")' \
    ${SOURCE_ROOT}/$SOURCEDIR/CMake/cdat_modules/uvcmetrics_external.cmake
cmake  ${SOURCE_ROOT}/$SOURCEDIR -DGIT_PROTOCOL=git:// -DCMAKE_INSTALL_PREFIX=$DESTINATION
# adapt to the number of cores you can use
make -j8
#
# build fails with
# "error: ‘GLintptr’ has not been declared"
#
# patching VTK
sed -i 's,//#define GLX_GLXEXT_LEGACY,#define GLX_GLXEXT_LEGACY,' build/VTK/Rendering//OpenGL/vtkXOpenGLRenderWindow.cxx
# continue build
make -j8

# run that before running uvcdat
# source $DESTINATION/bin/setup_runtime.sh
# put in .bashrc or so ?