Index: /issm/trunk-jpl/externalpackages/curl/install-7.67-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/curl/install-7.67-with_tests.sh	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/curl/install-7.67-with_tests.sh	(revision 24454)
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="7.67.0"
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/curl-${VER}.tar.gz" "curl-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf curl-$VER.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv curl-$VER/* src
+rm -rf curl-$VER
+
+# Configure
+cd src
+./configure \
+	--prefix="${ISSM_DIR}/externalpackages/curl/install" \
+	--disable-manual
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make test
+	make install
+else
+	make -j $1
+	make -j $1 test
+	make -j $1 install
+fi
+
+# Return to initial directory
+cd ../..
Index: /issm/trunk-jpl/externalpackages/curl/install-7.67.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/curl/install-7.67.sh	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/curl/install-7.67.sh	(revision 24454)
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="7.67.0"
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/curl-${VER}.tar.gz" "curl-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf curl-$VER.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv curl-$VER/* src
+rm -rf curl-$VER
+
+# Configure
+cd src
+./configure \
+	--prefix="${ISSM_DIR}/externalpackages/curl/install" \
+	--disable-manual \
+	--disable-verbose
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
+
+# Return to initial directory
+cd ../..
Index: /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/frmts/wms/dataset.cpp
===================================================================
--- /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/frmts/wms/dataset.cpp	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/frmts/wms/dataset.cpp	(revision 24454)
@@ -0,0 +1,676 @@
+/******************************************************************************
+ * $Id: dataset.cpp 25776 2013-03-20 20:46:48Z rouault $
+ *
+ * Project:  WMS Client Driver
+ * Purpose:  Implementation of Dataset and RasterBand classes for WMS
+ *           and other similar services.
+ * Author:   Adam Nowacki, nowak@xpam.de
+ *
+ ******************************************************************************
+ * Copyright (c) 2007, Adam Nowacki
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************
+ *
+ * dataset.cpp:
+ * Initialization of the GDALWMSdriver, parsing the XML configuration file,
+ * instantiation of the minidrivers and accessors used by minidrivers
+ *
+ ***************************************************************************/
+
+
+#include "stdinc.h"
+
+GDALWMSDataset::GDALWMSDataset() {
+    m_mini_driver = 0;
+    m_cache = 0;
+    m_hint.m_valid = false;
+    m_data_type = GDT_Byte;
+    m_clamp_requests = true;
+    m_unsafeSsl = false;
+    m_data_window.m_sx = -1;
+    nBands = 0;
+    m_default_block_size_x = 1024;
+    m_default_block_size_y = 1024;
+    m_bNeedsDataWindow = TRUE;
+    m_default_tile_count_x = 1;
+    m_default_tile_count_y = 1;
+    m_default_overview_count = -1;
+    m_zeroblock_on_serverexceptions = 0;
+    m_poColorTable = NULL;
+}
+
+GDALWMSDataset::~GDALWMSDataset() {
+    if (m_mini_driver) delete m_mini_driver;
+    if (m_cache) delete m_cache;
+    if (m_poColorTable) delete m_poColorTable;
+}
+
+CPLErr GDALWMSDataset::Initialize(CPLXMLNode *config) {
+    CPLErr ret = CE_None;
+
+    char* pszXML = CPLSerializeXMLTree( config );
+    if (pszXML)
+    {
+        m_osXML = pszXML;
+        CPLFree(pszXML);
+    }
+
+    // Initialize the minidriver, which can set parameters for the dataset using member functions
+    CPLXMLNode *service_node = CPLGetXMLNode(config, "Service");
+    if (service_node != NULL)
+    {
+        const CPLString service_name = CPLGetXMLValue(service_node, "name", "");
+        if (!service_name.empty())
+        {
+            GDALWMSMiniDriverManager *const mdm = GetGDALWMSMiniDriverManager();
+            GDALWMSMiniDriverFactory *const mdf = mdm->Find(service_name);
+            if (mdf != NULL)
+            {
+                m_mini_driver = mdf->New();
+                m_mini_driver->m_parent_dataset = this;
+                if (m_mini_driver->Initialize(service_node) == CE_None)
+                {
+                    m_mini_driver_caps.m_capabilities_version = -1;
+                    m_mini_driver->GetCapabilities(&m_mini_driver_caps);
+                    if (m_mini_driver_caps.m_capabilities_version == -1)
+                    {
+                        CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Internal error, mini-driver capabilities version not set.");
+                        ret = CE_Failure;
+                    }
+                }
+                else
+                {
+                    delete m_mini_driver;
+                    m_mini_driver = NULL;
+
+                    CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Failed to initialize minidriver.");
+                    ret = CE_Failure;
+                }
+            }
+            else
+            {
+                CPLError(CE_Failure, CPLE_AppDefined,
+                                "GDALWMS: No mini-driver registered for '%s'.", service_name.c_str());
+                ret = CE_Failure;
+            }
+        }
+        else
+        {
+            CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: No Service specified.");
+            ret = CE_Failure;
+        }
+    }
+    else
+    {
+        CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: No Service specified.");
+        ret = CE_Failure;
+    }
+
+
+    /*
+    Parameters that could be set by minidriver already, based on server side information.
+    If the size is set, minidriver has done this already
+    A "server" side minidriver needs to set at least:
+      - Blocksize (x and y)
+      - Clamp flag (defaults to true)
+      - DataWindow
+      - Band Count
+      - Data Type
+    It should also initialize and register the bands and overviews.
+    */
+
+    if (m_data_window.m_sx<1)
+    {
+        int nOverviews = 0;
+
+        if (ret == CE_None)
+        {
+            m_block_size_x = atoi(CPLGetXMLValue(config, "BlockSizeX", CPLString().Printf("%d", m_default_block_size_x)));
+            m_block_size_y = atoi(CPLGetXMLValue(config, "BlockSizeY", CPLString().Printf("%d", m_default_block_size_y)));
+            if (m_block_size_x <= 0 || m_block_size_y <= 0)
+            {
+                CPLError( CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value in BlockSizeX or BlockSizeY" );
+                ret = CE_Failure;
+            }
+        }
+
+        if (ret == CE_None)
+        {
+            m_clamp_requests = StrToBool(CPLGetXMLValue(config, "ClampRequests", "true"));
+            if (m_clamp_requests<0)
+            {
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of ClampRequests, true/false expected.");
+                ret = CE_Failure;
+            }
+        }
+
+        if (ret == CE_None)
+        {
+            CPLXMLNode *data_window_node = CPLGetXMLNode(config, "DataWindow");
+            if (data_window_node == NULL && m_bNeedsDataWindow)
+            {
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: DataWindow missing.");
+                ret = CE_Failure;
+            }
+            else
+            {
+                CPLString osDefaultX0, osDefaultX1, osDefaultY0, osDefaultY1;
+                CPLString osDefaultTileCountX, osDefaultTileCountY, osDefaultTileLevel;
+                CPLString osDefaultOverviewCount;
+                osDefaultX0.Printf("%.8f", m_default_data_window.m_x0);
+                osDefaultX1.Printf("%.8f", m_default_data_window.m_x1);
+                osDefaultY0.Printf("%.8f", m_default_data_window.m_y0);
+                osDefaultY1.Printf("%.8f", m_default_data_window.m_y1);
+                osDefaultTileCountX.Printf("%d", m_default_tile_count_x);
+                osDefaultTileCountY.Printf("%d", m_default_tile_count_y);
+                if (m_default_data_window.m_tlevel >= 0)
+                    osDefaultTileLevel.Printf("%d", m_default_data_window.m_tlevel);
+                if (m_default_overview_count >= 0)
+                    osDefaultOverviewCount.Printf("%d", m_default_overview_count);
+                const char *overview_count = CPLGetXMLValue(config, "OverviewCount", osDefaultOverviewCount);
+                const char *ulx = CPLGetXMLValue(data_window_node, "UpperLeftX", osDefaultX0);
+                const char *uly = CPLGetXMLValue(data_window_node, "UpperLeftY", osDefaultY0);
+                const char *lrx = CPLGetXMLValue(data_window_node, "LowerRightX", osDefaultX1);
+                const char *lry = CPLGetXMLValue(data_window_node, "LowerRightY", osDefaultY1);
+                const char *sx = CPLGetXMLValue(data_window_node, "SizeX", "");
+                const char *sy = CPLGetXMLValue(data_window_node, "SizeY", "");
+                const char *tx = CPLGetXMLValue(data_window_node, "TileX", "0");
+                const char *ty = CPLGetXMLValue(data_window_node, "TileY", "0");
+                const char *tlevel = CPLGetXMLValue(data_window_node, "TileLevel", osDefaultTileLevel);
+                const char *str_tile_count_x = CPLGetXMLValue(data_window_node, "TileCountX", osDefaultTileCountX);
+                const char *str_tile_count_y = CPLGetXMLValue(data_window_node, "TileCountY", osDefaultTileCountY);
+                const char *y_origin = CPLGetXMLValue(data_window_node, "YOrigin", "default");
+
+                if (ret == CE_None)
+                {
+                    if ((ulx[0] != '\0') && (uly[0] != '\0') && (lrx[0] != '\0') && (lry[0] != '\0'))
+                    {
+                        m_data_window.m_x0 = atof(ulx);
+                        m_data_window.m_y0 = atof(uly);
+                        m_data_window.m_x1 = atof(lrx);
+                        m_data_window.m_y1 = atof(lry);
+                    }
+                    else
+                    {
+                        CPLError(CE_Failure, CPLE_AppDefined,
+                                 "GDALWMS: Mandatory elements of DataWindow missing: UpperLeftX, UpperLeftY, LowerRightX, LowerRightY.");
+                        ret = CE_Failure;
+                    }
+                }
+
+                m_data_window.m_tlevel = atoi(tlevel);
+
+                if (ret == CE_None)
+                {
+                    if ((sx[0] != '\0') && (sy[0] != '\0'))
+                    {
+                        m_data_window.m_sx = atoi(sx);
+                        m_data_window.m_sy = atoi(sy);
+                    }
+                    else if ((tlevel[0] != '\0') && (str_tile_count_x[0] != '\0') && (str_tile_count_y[0] != '\0'))
+                    {
+                        int tile_count_x = atoi(str_tile_count_x);
+                        int tile_count_y = atoi(str_tile_count_y);
+                        m_data_window.m_sx = tile_count_x * m_block_size_x * (1 << m_data_window.m_tlevel);
+                        m_data_window.m_sy = tile_count_y * m_block_size_y * (1 << m_data_window.m_tlevel);
+                    }
+                    else
+                    {
+                        CPLError(CE_Failure, CPLE_AppDefined,
+                                 "GDALWMS: Mandatory elements of DataWindow missing: SizeX, SizeY.");
+                        ret = CE_Failure;
+                    }
+                }
+                if (ret == CE_None)
+                {
+                    if ((tx[0] != '\0') && (ty[0] != '\0'))
+                    {
+                        m_data_window.m_tx = atoi(tx);
+                        m_data_window.m_ty = atoi(ty);
+                    }
+                    else
+                    {
+                        CPLError(CE_Failure, CPLE_AppDefined,
+                                 "GDALWMS: Mandatory elements of DataWindow missing: TileX, TileY.");
+                        ret = CE_Failure;
+                    }
+                }
+
+                if (ret == CE_None)
+                {
+                    if (overview_count[0] != '\0')
+                    {
+                        nOverviews = atoi(overview_count);
+                    }
+                    else if (tlevel[0] != '\0')
+                    {
+                        nOverviews = m_data_window.m_tlevel;
+                    }
+                    else
+                    {
+                        const int min_overview_size = MAX(32, MIN(m_block_size_x, m_block_size_y));
+                        double a = log(static_cast<double>(MIN(m_data_window.m_sx, m_data_window.m_sy))) / log(2.0)
+                            - log(static_cast<double>(min_overview_size)) / log(2.0);
+                        nOverviews = MAX(0, MIN(static_cast<int>(ceil(a)), 32));
+                    }
+                }
+                if (ret == CE_None)
+                {
+                    CPLString y_origin_str = y_origin;
+                    if (y_origin_str == "top") {
+                        m_data_window.m_y_origin = GDALWMSDataWindow::TOP;
+                    } else if (y_origin_str == "bottom") {
+                        m_data_window.m_y_origin = GDALWMSDataWindow::BOTTOM;
+                    } else if (y_origin_str == "default") {
+                        m_data_window.m_y_origin = GDALWMSDataWindow::DEFAULT;
+                    } else {
+                        CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: DataWindow YOrigin must be set to "
+                            "one of 'default', 'top', or 'bottom', not '%s'.", y_origin_str.c_str());
+                        ret = CE_Failure;
+                    }
+                }
+            }
+        }
+
+        if (ret == CE_None)
+        {
+            if (nBands<1)
+                nBands=atoi(CPLGetXMLValue(config,"BandsCount","3"));
+            if (nBands<1)
+            {
+                CPLError(CE_Failure, CPLE_AppDefined,
+                         "GDALWMS: Bad number of bands.");
+                ret = CE_Failure;
+            }
+        }
+
+        if (ret == CE_None)
+        {
+            const char *data_type = CPLGetXMLValue(config, "DataType", "Byte");
+            m_data_type = GDALGetDataTypeByName( data_type );
+            if ( m_data_type == GDT_Unknown || m_data_type >= GDT_TypeCount )
+            {
+                CPLError( CE_Failure, CPLE_AppDefined,
+                          "GDALWMS: Invalid value in DataType. Data type \"%s\" is not supported.", data_type );
+                ret = CE_Failure;
+            }
+        }
+
+        // Initialize the bands and the overviews.  Assumes overviews are powers of two
+        if (ret == CE_None)
+        {
+            nRasterXSize = m_data_window.m_sx;
+            nRasterYSize = m_data_window.m_sy;
+
+            if (!GDALCheckDatasetDimensions(nRasterXSize, nRasterYSize) ||
+                !GDALCheckBandCount(nBands, TRUE))
+            {
+                return CE_Failure;
+            }
+
+            GDALColorInterp default_color_interp[4][4] = {
+                { GCI_GrayIndex, GCI_Undefined, GCI_Undefined, GCI_Undefined },
+                { GCI_GrayIndex, GCI_AlphaBand, GCI_Undefined, GCI_Undefined },
+                { GCI_RedBand, GCI_GreenBand, GCI_BlueBand, GCI_Undefined },
+                { GCI_RedBand, GCI_GreenBand, GCI_BlueBand, GCI_AlphaBand }
+            };
+            for (int i = 0; i < nBands; ++i)
+            {
+                GDALColorInterp color_interp = (nBands <= 4 && i <= 3 ? default_color_interp[nBands - 1][i] : GCI_Undefined);
+                GDALWMSRasterBand *band = new GDALWMSRasterBand(this, i, 1.0);
+                band->m_color_interp = color_interp;
+                SetBand(i + 1, band);
+                double scale = 0.5;
+                for (int j = 0; j < nOverviews; ++j)
+                {
+                    band->AddOverview(scale);
+                    band->m_color_interp = color_interp;
+                    scale *= 0.5;
+                }
+            }
+        }
+    }
+
+    // UserPwd
+    const char *pszUserPwd = CPLGetXMLValue(config, "UserPwd", "");
+    if (pszUserPwd[0] != '\0')
+        m_osUserPwd = pszUserPwd;
+
+    const char *pszUserAgent = CPLGetXMLValue(config, "UserAgent", "");
+    if (pszUserAgent[0] != '\0')
+        m_osUserAgent = pszUserAgent;
+
+    const char *pszReferer = CPLGetXMLValue(config, "Referer", "");
+    if (pszReferer[0] != '\0')
+        m_osReferer = pszReferer;
+
+    if (ret == CE_None) {
+        const char *pszHttpZeroBlockCodes = CPLGetXMLValue(config, "ZeroBlockHttpCodes", "");
+        if(pszHttpZeroBlockCodes[0] == '\0') {
+            m_http_zeroblock_codes.push_back(204);
+        } else {
+            char **kv = CSLTokenizeString2(pszHttpZeroBlockCodes,",",CSLT_HONOURSTRINGS);
+            int nCount = CSLCount(kv);
+            for(int i=0; i<nCount; i++) {
+                int code = atoi(kv[i]);
+                if(code <= 0) {
+                    CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of ZeroBlockHttpCodes \"%s\", comma separated HTTP response codes expected.",
+                            kv[i]);
+                    ret = CE_Failure;
+                    break;
+                }
+                m_http_zeroblock_codes.push_back(code);
+            }
+            CSLDestroy(kv);
+        }
+    }
+
+    if (ret == CE_None) {
+        const char *pszZeroExceptions = CPLGetXMLValue(config, "ZeroBlockOnServerException", "");
+        if(pszZeroExceptions[0] != '\0') {
+            m_zeroblock_on_serverexceptions = StrToBool(pszZeroExceptions);
+            if (m_zeroblock_on_serverexceptions == -1) {
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of ZeroBlockOnServerException \"%s\", true/false expected.",
+                     pszZeroExceptions);
+                ret = CE_Failure;
+            }
+        }
+    }
+
+    if (ret == CE_None) {
+        const char *max_conn = CPLGetXMLValue(config, "MaxConnections", "");
+        if (max_conn[0] != '\0') {
+            m_http_max_conn = atoi(max_conn);
+        } else {
+            m_http_max_conn = 2;
+        }
+    }
+    if (ret == CE_None) {
+        const char *timeout = CPLGetXMLValue(config, "Timeout", "");
+        if (timeout[0] != '\0') {
+            m_http_timeout = atoi(timeout);
+        } else {
+            m_http_timeout = 300;
+        }
+    }
+    if (ret == CE_None) {
+        const char *offline_mode = CPLGetXMLValue(config, "OfflineMode", "");
+        if (offline_mode[0] != '\0') {
+            const int offline_mode_bool = StrToBool(offline_mode);
+            if (offline_mode_bool == -1) {
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of OfflineMode, true / false expected.");
+                ret = CE_Failure;
+            } else {
+                m_offline_mode = offline_mode_bool;
+            }
+        } else {
+            m_offline_mode = 0;
+        }
+    }
+
+    if (ret == CE_None) {
+        const char *advise_read = CPLGetXMLValue(config, "AdviseRead", "");
+        if (advise_read[0] != '\0') {
+            const int advise_read_bool = StrToBool(advise_read);
+            if (advise_read_bool == -1) {
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of AdviseRead, true / false expected.");
+                ret = CE_Failure;
+            } else {
+                m_use_advise_read = advise_read_bool;
+            }
+        } else {
+            m_use_advise_read = 0;
+        }
+    }
+
+    if (ret == CE_None) {
+        const char *verify_advise_read = CPLGetXMLValue(config, "VerifyAdviseRead", "");
+        if (m_use_advise_read) {
+            if (verify_advise_read[0] != '\0') {
+                const int verify_advise_read_bool = StrToBool(verify_advise_read);
+                if (verify_advise_read_bool == -1) {
+                    CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of VerifyAdviseRead, true / false expected.");
+                    ret = CE_Failure;
+                } else {
+                    m_verify_advise_read = verify_advise_read_bool;
+                }
+            } else {
+                m_verify_advise_read = 1;
+            }
+        }
+    }
+
+    // Let the local configuration override the minidriver supplied projection
+
+    if (ret == CE_None) {
+        const char *proj = CPLGetXMLValue(config, "Projection", "");
+        if (proj[0] != '\0') {
+            m_projection = ProjToWKT(proj);
+            if (m_projection.size() == 0) {
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Bad projection specified.");
+                ret = CE_Failure;
+            }
+        }
+    }
+
+    // Same for Min, Max and NoData, defined per band or per dataset
+    // If they are set as null strings, they clear the server declared values
+    if (ret == CE_None) {
+       // Data values are attributes, they include NoData Min and Max
+       // TODO: document those options
+       if (0!=CPLGetXMLNode(config,"DataValues")) {
+           const char *nodata=CPLGetXMLValue(config,"DataValues.NoData",NULL);
+           if (nodata!=NULL) WMSSetNoDataValue(nodata);
+           const char *min=CPLGetXMLValue(config,"DataValues.min",NULL);
+           if (min!=NULL) WMSSetMinValue(min);
+           const char *max=CPLGetXMLValue(config,"DataValues.max",NULL);
+           if (max!=NULL) WMSSetMaxValue(max);
+       }
+    }
+
+    if (ret == CE_None) {
+        CPLXMLNode *cache_node = CPLGetXMLNode(config, "Cache");
+        if (cache_node != NULL) {
+            m_cache = new GDALWMSCache();
+            if (m_cache->Initialize(cache_node) != CE_None) {
+                delete m_cache;
+                m_cache = NULL;
+                CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Failed to initialize cache.");
+                ret = CE_Failure;
+            }
+        }
+    }
+
+    if (ret == CE_None) {
+    	const int v = StrToBool(CPLGetXMLValue(config, "UnsafeSSL", "false"));
+    	if (v == -1) {
+	    CPLError(CE_Failure, CPLE_AppDefined, "GDALWMS: Invalid value of UnsafeSSL: true or false expected.");
+	    ret = CE_Failure;
+	} else {
+	    m_unsafeSsl = v;
+	}
+    }
+
+    if (ret == CE_None) {
+        /* If we dont have projection already set ask mini-driver. */
+        if (!m_projection.size()) {
+            const char *proj = m_mini_driver->GetProjectionInWKT();
+            if (proj != NULL) {
+                m_projection = proj;
+            }
+        }
+    }
+
+    return ret;
+}
+
+CPLErr GDALWMSDataset::IRasterIO(GDALRWFlag rw, int x0, int y0, int sx, int sy, void *buffer, int bsx, int bsy, GDALDataType bdt, int band_count, int *band_map, int pixel_space, int line_space, int band_space) {
+    CPLErr ret;
+
+    if (rw != GF_Read) return CE_Failure;
+    if (buffer == NULL) return CE_Failure;
+    if ((sx == 0) || (sy == 0) || (bsx == 0) || (bsy == 0) || (band_count == 0)) return CE_None;
+
+    m_hint.m_x0 = x0;
+    m_hint.m_y0 = y0;
+    m_hint.m_sx = sx;
+    m_hint.m_sy = sy;
+    m_hint.m_overview = -1;
+    m_hint.m_valid = true;
+    //	printf("[%p] GDALWMSDataset::IRasterIO(x0: %d, y0: %d, sx: %d, sy: %d, bsx: %d, bsy: %d, band_count: %d, band_map: %p)\n", this, x0, y0, sx, sy, bsx, bsy, band_count, band_map);
+    ret = GDALDataset::IRasterIO(rw, x0, y0, sx, sy, buffer, bsx, bsy, bdt, band_count, band_map, pixel_space, line_space, band_space);
+    m_hint.m_valid = false;
+
+    return ret;
+}
+
+const char *GDALWMSDataset::GetProjectionRef() {
+    return m_projection.c_str();
+}
+
+CPLErr GDALWMSDataset::SetProjection(const char *proj) {
+    return CE_Failure;
+}
+
+CPLErr GDALWMSDataset::GetGeoTransform(double *gt) {
+    gt[0] = m_data_window.m_x0;
+    gt[1] = (m_data_window.m_x1 - m_data_window.m_x0) / static_cast<double>(m_data_window.m_sx);
+    gt[2] = 0.0;
+    gt[3] = m_data_window.m_y0;
+    gt[4] = 0.0;
+    gt[5] = (m_data_window.m_y1 - m_data_window.m_y0) / static_cast<double>(m_data_window.m_sy);
+    return CE_None;
+}
+
+CPLErr GDALWMSDataset::SetGeoTransform(double *gt) {
+    return CE_Failure;
+}
+
+const GDALWMSDataWindow *GDALWMSDataset::WMSGetDataWindow() const {
+    return &m_data_window;
+}
+
+void GDALWMSDataset::WMSSetBlockSize(int x, int y) {
+    m_block_size_x=x;
+    m_block_size_y=y;
+}
+
+void GDALWMSDataset::WMSSetRasterSize(int x, int y) {
+    nRasterXSize=x;
+    nRasterYSize=y;
+}
+
+void GDALWMSDataset::WMSSetBandsCount(int count) {
+    nBands=count;
+}
+
+void GDALWMSDataset::WMSSetClamp(bool flag=true) {
+    m_clamp_requests=flag;
+}
+
+void GDALWMSDataset::WMSSetDataType(GDALDataType type) {
+    m_data_type=type;
+}
+
+void GDALWMSDataset::WMSSetDataWindow(GDALWMSDataWindow &window) {
+    m_data_window=window;
+}
+
+void GDALWMSDataset::WMSSetDefaultBlockSize(int x, int y) {
+    m_default_block_size_x=x;
+    m_default_block_size_y=y;
+}
+
+void GDALWMSDataset::WMSSetDefaultDataWindowCoordinates(double x0, double y0, double x1, double y1)
+{
+    m_default_data_window.m_x0 = x0;
+    m_default_data_window.m_y0 = y0;
+    m_default_data_window.m_x1 = x1;
+    m_default_data_window.m_y1 = y1;
+}
+
+void GDALWMSDataset::WMSSetDefaultTileCount(int tilecountx, int tilecounty)
+{
+    m_default_tile_count_x = tilecountx;
+    m_default_tile_count_y = tilecounty;
+}
+
+void GDALWMSDataset::WMSSetDefaultTileLevel(int tlevel)
+{
+    m_default_data_window.m_tlevel = tlevel;
+}
+
+void GDALWMSDataset::WMSSetDefaultOverviewCount(int overview_count)
+{
+    m_default_overview_count = overview_count;
+}
+
+void GDALWMSDataset::WMSSetNeedsDataWindow(int flag)
+{
+    m_bNeedsDataWindow = flag;
+}
+
+static void list2vec(std::vector<double> &v,const char *pszList)
+{
+    if ((pszList==NULL)||(pszList[0]==0)) return;
+    char **papszTokens=CSLTokenizeString2(pszList," \t\n\r",
+        CSLT_STRIPLEADSPACES|CSLT_STRIPENDSPACES);
+    v.clear();
+    for (int i=0;i<CSLCount(papszTokens);i++)
+        v.push_back(CPLStrtod(papszTokens[i],NULL));
+    CSLDestroy(papszTokens);
+}
+
+void GDALWMSDataset::WMSSetNoDataValue(const char * pszNoData)
+{
+    list2vec(vNoData,pszNoData);
+}
+
+void GDALWMSDataset::WMSSetMinValue(const char * pszMin)
+{
+    list2vec(vMin,pszMin);
+}
+
+void GDALWMSDataset::WMSSetMaxValue(const char * pszMax)
+{
+    list2vec(vMax,pszMax);
+}
+
+CPLErr GDALWMSDataset::AdviseRead(int x0, int y0, int sx, int sy, int bsx, int bsy, GDALDataType bdt, int band_count, int *band_map, char **options) {
+//    printf("AdviseRead(%d, %d, %d, %d)\n", x0, y0, sx, sy);
+    if (m_offline_mode || !m_use_advise_read) return CE_None;
+    if (m_cache == NULL) return CE_Failure;
+
+    GDALRasterBand *band = GetRasterBand(1);
+    if (band == NULL) return CE_Failure;
+    return band->AdviseRead(x0, y0, sx, sy, bsx, bsy, bdt, options);
+}
+
+const char *GDALWMSDataset::GetMetadataItem( const char * pszName,
+                                             const char * pszDomain )
+{
+    if( pszName != NULL && EQUAL(pszName, "XML") &&
+        pszDomain != NULL && EQUAL(pszDomain, "WMS") )
+    {
+        return (m_osXML.size()) ? m_osXML.c_str() : NULL;
+    }
+
+    return GDALPamDataset::GetMetadataItem(pszName, pszDomain);
+}
Index: /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/ogr/ogrsf_frmts/vfk/vfkfeature.cpp
===================================================================
--- /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/ogr/ogrsf_frmts/vfk/vfkfeature.cpp	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/ogr/ogrsf_frmts/vfk/vfkfeature.cpp	(revision 24454)
@@ -0,0 +1,560 @@
+/******************************************************************************
+ * $Id: vfkfeature.cpp 25702 2013-03-07 17:17:54Z martinl $
+ *
+ * Project:  VFK Reader - Feature definition
+ * Purpose:  Implements IVFKFeature/VFKFeature class.
+ * Author:   Martin Landa, landa.martin gmail.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2009-2010, 2012-2013, Martin Landa <landa.martin gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ ****************************************************************************/
+
+#include "vfkreader.h"
+#include "vfkreaderp.h"
+
+#include "cpl_conv.h"
+#include "cpl_error.h"
+
+/*!
+  \brief IVFKFeature constructor
+
+  \param poDataBlock pointer to VFKDataBlock instance
+*/
+IVFKFeature::IVFKFeature(IVFKDataBlock *poDataBlock)
+{
+    CPLAssert(NULL != poDataBlock);
+    m_poDataBlock   = poDataBlock;
+
+    m_nFID          = -1;
+    m_nGeometryType = poDataBlock->GetGeometryType();
+    m_bGeometry     = FALSE;
+    m_bValid        = FALSE;
+    m_paGeom        = NULL;
+}
+
+/*!
+  \brief IVFKFeature destructor
+*/
+IVFKFeature::~IVFKFeature()
+{
+    if (m_paGeom)
+        delete m_paGeom;
+
+    m_poDataBlock = NULL;
+}
+
+/*!
+  \brief Set feature geometry type
+*/
+void IVFKFeature::SetGeometryType(OGRwkbGeometryType nGeomType)
+{
+    m_nGeometryType = nGeomType;
+}
+
+/*!
+  \brief Set feature id
+
+  FID: 0 for next, -1 for same
+
+  \param nFID feature id
+*/
+void IVFKFeature::SetFID(long nFID)
+{
+    if (m_nFID > 0) {
+        m_nFID = nFID;
+    }
+    else {
+        m_nFID = m_poDataBlock->GetFeatureCount() + 1;
+    }
+}
+
+/*!
+  \brief Set feature geometry
+
+  Also checks if given geometry is valid
+
+  \param poGeom pointer to OGRGeometry
+
+  \return TRUE on valid feature or otherwise FALSE
+*/
+bool IVFKFeature::SetGeometry(OGRGeometry *poGeom)
+{
+    m_bGeometry = TRUE;
+
+    delete m_paGeom;
+    m_paGeom = NULL;
+    m_bValid = TRUE;
+
+    if (!poGeom) {
+	return m_bValid;
+    }
+
+    /* check empty geometries */
+    if (m_nGeometryType == wkbNone && poGeom->IsEmpty()) {
+	CPLDebug("OGR-VFK", "%s: empty geometry fid = %ld",
+		 m_poDataBlock->GetName(), m_nFID);
+        m_bValid = FALSE;
+    }
+
+    /* check coordinates */
+    if (m_nGeometryType == wkbPoint) {
+        double x, y;
+        x = ((OGRPoint *) poGeom)->getX();
+        y = ((OGRPoint *) poGeom)->getY();
+        if (x > -430000 || x < -910000 ||
+            y > -930000 || y < -1230000) {
+            CPLDebug("OGR-VFK", "%s: invalid point fid = %ld",
+                     m_poDataBlock->GetName(), m_nFID);
+            m_bValid = FALSE;
+        }
+    }
+
+    /* check degenerated linestrings */
+    if (m_nGeometryType == wkbLineString &&
+        ((OGRLineString *) poGeom)->getNumPoints() < 2) {
+        CPLDebug("OGR-VFK", "%s: invalid linestring fid = %ld",
+		 m_poDataBlock->GetName(), m_nFID);
+        m_bValid = FALSE;
+    }
+
+    /* check degenerated polygons */
+    if (m_nGeometryType == wkbPolygon) {
+        OGRLinearRing *poRing;
+        poRing = ((OGRPolygon *) poGeom)->getExteriorRing();
+        if (!poRing || poRing->getNumPoints() < 3) {
+	    CPLDebug("OGR-VFK", "%s: invalid polygon fid = %ld",
+		     m_poDataBlock->GetName(), m_nFID);
+            m_bValid = FALSE;
+	}
+    }
+
+    if (m_bValid)
+        m_paGeom = (OGRGeometry *) poGeom->clone(); /* make copy */
+
+    return m_bValid;
+}
+
+/*!
+  \brief Get feature geometry
+
+  \return pointer to OGRGeometry or NULL on error
+*/
+OGRGeometry *IVFKFeature::GetGeometry()
+{
+    if (m_nGeometryType != wkbNone && !m_bGeometry)
+        LoadGeometry();
+
+    return m_paGeom;
+}
+
+
+/*!
+  \brief Load geometry
+
+  \return TRUE on success or FALSE on failure
+*/
+bool IVFKFeature::LoadGeometry()
+{
+    const char *pszName;
+    CPLString osSQL;
+
+    if (m_bGeometry)
+        return TRUE;
+
+    pszName  = m_poDataBlock->GetName();
+
+    if (EQUAL (pszName, "SOBR") ||
+        EQUAL (pszName, "OBBP") ||
+        EQUAL (pszName, "SPOL") ||
+        EQUAL (pszName, "OB") ||
+        EQUAL (pszName, "OP") ||
+        EQUAL (pszName, "OBPEJ")) {
+        /* -> wkbPoint */
+
+        return LoadGeometryPoint();
+    }
+    else if (EQUAL (pszName, "SBP")) {
+        /* -> wkbLineString */
+        return LoadGeometryLineStringSBP();
+    }
+    else if (EQUAL (pszName, "HP") ||
+             EQUAL (pszName, "DPM")) {
+        /* -> wkbLineString */
+        return LoadGeometryLineStringHP();
+    }
+    else if (EQUAL (pszName, "PAR") ||
+             EQUAL (pszName, "BUD")) {
+        /* -> wkbPolygon */
+        return LoadGeometryPolygon();
+    }
+
+    return FALSE;
+}
+
+/*!
+  \brief VFKFeature constructor
+
+  \param poDataBlock pointer to VFKDataBlock instance
+*/
+VFKFeature::VFKFeature(IVFKDataBlock *poDataBlock, long iFID) : IVFKFeature(poDataBlock)
+{
+    m_nFID = iFID;
+    m_propertyList.assign(poDataBlock->GetPropertyCount(), VFKProperty());
+    CPLAssert(size_t (poDataBlock->GetPropertyCount()) == m_propertyList.size());
+}
+
+/*!
+  \brief Set feature properties
+
+  \param pszLine pointer to line containing feature definition
+
+  \return TRUE on success or FALSE on failure
+*/
+bool VFKFeature::SetProperties(const char *pszLine)
+{
+    unsigned int iIndex, nLength;
+    const char *poChar, *poProp;
+    char* pszProp;
+    bool inString;
+
+    std::vector<CPLString> oPropList;
+
+    pszProp = NULL;
+
+    for (poChar = pszLine; *poChar != '\0' && *poChar != ';'; poChar++)
+        /* skip data block name */
+        ;
+    if( *poChar == '\0' )
+        return FALSE; /* nothing to read */
+
+    poChar++; /* skip ';' after data block name*/
+
+    /* read properties into the list */
+    poProp = poChar;
+    iIndex = nLength = 0;
+    inString = FALSE;
+    while(*poChar != '\0') {
+        if (*poChar == '"' &&
+            (*(poChar-1) == ';' || *(poChar+1) == ';' || *(poChar+1) == '\0')) {
+            poChar++; /* skip '"' */
+            inString = inString ? FALSE : TRUE;
+            if (inString) {
+                poProp = poChar;
+                if (*poChar == '"') {
+                    poChar++;
+                    inString = FALSE;
+                }
+            }
+            if (*poChar == '\0')
+                break;
+        }
+        if (*poChar == ';' && !inString) {
+            pszProp = (char *) CPLRealloc(pszProp, nLength + 1);
+            if (nLength > 0)
+                strncpy(pszProp, poProp, nLength);
+            pszProp[nLength] = '\0';
+            oPropList.push_back(pszProp);
+            iIndex++;
+            poProp = ++poChar;
+            nLength = 0;
+        }
+        else {
+            poChar++;
+            nLength++;
+        }
+    }
+    /* append last property */
+    if (inString) {
+        nLength--; /* ignore '"' */
+    }
+    pszProp = (char *) CPLRealloc(pszProp, nLength + 1);
+    if (nLength > 0)
+        strncpy(pszProp, poProp, nLength);
+    pszProp[nLength] = '\0';
+    oPropList.push_back(pszProp);
+
+    /* set properties from the list */
+    if (oPropList.size() != (size_t) m_poDataBlock->GetPropertyCount()) {
+        /* try to read also invalid records */
+        CPLDebug("OGR-VFK", "%s: invalid number of properties %d should be %d",
+                 m_poDataBlock->GetName(),
+		 (int) oPropList.size(), m_poDataBlock->GetPropertyCount());
+        return FALSE;
+   }
+    iIndex = 0;
+    for (std::vector<CPLString>::iterator ip = oPropList.begin();
+	 ip != oPropList.end(); ++ip) {
+	SetProperty(iIndex++, (*ip).c_str());
+    }
+
+    /* set fid
+    if (EQUAL(m_poDataBlock->GetName(), "SBP")) {
+        GUIntBig id;
+        const VFKProperty *poVfkProperty;
+
+        poVfkProperty = GetProperty("PORADOVE_CISLO_BODU");
+        if (poVfkProperty)
+        {
+            id = strtoul(poVfkProperty->GetValueS(), NULL, 0);
+            if (id == 1)
+                SetFID(0);
+            else
+                SetFID(-1);
+        }
+    }
+    else {
+        SetFID(0);
+    }
+    */
+    CPLFree(pszProp);
+
+    return TRUE;
+}
+
+/*!
+  \brief Set feature property
+
+  \param iIndex property index
+  \param pszValue property value
+
+  \return TRUE on success
+  \return FALSE on failure
+*/
+bool VFKFeature::SetProperty(int iIndex, const char *pszValue)
+{
+    if (iIndex < 0 || iIndex >= m_poDataBlock->GetPropertyCount() ||
+	size_t(iIndex) >= m_propertyList.size())
+        return FALSE;
+
+    if (strlen(pszValue) < 1)
+        m_propertyList[iIndex] = VFKProperty();
+    else {
+        OGRFieldType fType;
+
+        const char *pszEncoding;
+        char       *pszValueEnc;
+
+        fType = m_poDataBlock->GetProperty(iIndex)->GetType();
+        switch (fType) {
+        case OFTInteger:
+            m_propertyList[iIndex] = VFKProperty(atoi(pszValue));
+            break;
+        case OFTReal:
+            m_propertyList[iIndex] = VFKProperty(CPLAtof(pszValue));
+            break;
+        default:
+            pszEncoding = m_poDataBlock->GetProperty(iIndex)->GetEncoding();
+            if (pszEncoding) {
+                pszValueEnc = CPLRecode(pszValue, pszEncoding,
+                                        CPL_ENC_UTF8);
+                m_propertyList[iIndex] = VFKProperty(pszValueEnc);
+                CPLFree(pszValueEnc);
+            }
+            else {
+                m_propertyList[iIndex] = VFKProperty(pszValue);
+            }
+            break;
+        }
+    }
+    return TRUE;
+}
+
+/*!
+  \brief Get property value by index
+
+  \param iIndex property index
+
+  \return property value
+  \return NULL on error
+*/
+const VFKProperty *VFKFeature::GetProperty(int iIndex) const
+{
+    if (iIndex < 0 || iIndex >= m_poDataBlock->GetPropertyCount() ||
+	size_t(iIndex) >= m_propertyList.size())
+        return NULL;
+
+    const VFKProperty* poProperty = &m_propertyList[iIndex];
+    return poProperty;
+}
+
+/*!
+  \brief Get property value by name
+
+  \param pszName property name
+
+  \return property value
+  \return NULL on error
+*/
+const VFKProperty *VFKFeature::GetProperty(const char *pszName) const
+{
+    return GetProperty(m_poDataBlock->GetPropertyIndex(pszName));
+}
+
+/*!
+  \brief Load geometry (point layers)
+
+  \todo Really needed?
+
+  \return TRUE on success
+  \return FALSE on failure
+*/
+bool VFKFeature::LoadGeometryPoint()
+{
+    double x, y;
+    int i_idxX, i_idxY;
+
+    i_idxY = m_poDataBlock->GetPropertyIndex("SOURADNICE_Y");
+    i_idxX = m_poDataBlock->GetPropertyIndex("SOURADNICE_X");
+    if (i_idxY < 0 || i_idxX < 0)
+        return FALSE;
+
+    x = -1.0 * GetProperty(i_idxY)->GetValueD();
+    y = -1.0 * GetProperty(i_idxX)->GetValueD();
+    OGRPoint pt(x, y);
+    SetGeometry(&pt);
+
+    return TRUE;
+}
+
+/*!
+  \brief Load geometry (linestring SBP layer)
+
+  \todo Really needed?
+
+  \return TRUE on success or FALSE on failure
+*/
+bool VFKFeature::LoadGeometryLineStringSBP()
+{
+    int id, idxId, idxBp_Id, idxPCB, ipcb;
+
+    VFKDataBlock *poDataBlockPoints;
+    VFKFeature   *poPoint, *poLine;
+
+    OGRLineString OGRLine;
+
+    poDataBlockPoints = (VFKDataBlock *) m_poDataBlock->GetReader()->GetDataBlock("SOBR");
+    if (!poDataBlockPoints)
+        return FALSE;
+
+    idxId    = poDataBlockPoints->GetPropertyIndex("ID");
+    idxBp_Id = m_poDataBlock->GetPropertyIndex("BP_ID");
+    idxPCB   = m_poDataBlock->GetPropertyIndex("PORADOVE_CISLO_BODU");
+    if (idxId < 0 || idxBp_Id < 0 || idxPCB < 0)
+        return false;
+
+    poLine = this;
+    while (TRUE)
+    {
+        id   = poLine->GetProperty(idxBp_Id)->GetValueI();
+        ipcb = poLine->GetProperty(idxPCB)->GetValueI();
+        if (OGRLine.getNumPoints() > 0 && ipcb == 1)
+        {
+            m_poDataBlock->GetPreviousFeature(); /* push back */
+            break;
+        }
+
+        poPoint = poDataBlockPoints->GetFeature(idxId, id);
+        if (!poPoint)
+        {
+            continue;
+        }
+        OGRPoint *pt = (OGRPoint *) poPoint->GetGeometry();
+        OGRLine.addPoint(pt);
+
+        poLine = (VFKFeature *) m_poDataBlock->GetNextFeature();
+        if (!poLine)
+            break;
+    };
+
+    OGRLine.setCoordinateDimension(2); /* force 2D */
+    SetGeometry(&OGRLine);
+
+    /* reset reading */
+    poDataBlockPoints->ResetReading();
+
+    return TRUE;
+}
+
+/*!
+  \brief Load geometry (linestring HP/DPM layer)
+
+  \todo Really needed?
+
+  \return TRUE on success or FALSE on failure
+*/
+bool VFKFeature::LoadGeometryLineStringHP()
+{
+    int           id, idxId, idxHp_Id;
+    VFKDataBlock *poDataBlockLines;
+    VFKFeature   *poLine;
+
+    poDataBlockLines = (VFKDataBlock *) m_poDataBlock->GetReader()->GetDataBlock("SBP");
+    if (!poDataBlockLines)
+        return FALSE;
+
+    idxId    = m_poDataBlock->GetPropertyIndex("ID");
+    idxHp_Id = poDataBlockLines->GetPropertyIndex("HP_ID");
+    if (idxId < 0 || idxHp_Id < 0)
+        return FALSE;
+
+    id = GetProperty(idxId)->GetValueI();
+    poLine = poDataBlockLines->GetFeature(idxHp_Id, id);
+    if (!poLine || !poLine->GetGeometry())
+        return FALSE;
+
+    SetGeometry(poLine->GetGeometry());
+    poDataBlockLines->ResetReading();
+
+    return TRUE;
+}
+
+/*!
+  \brief Load geometry (polygon BUD/PAR layers)
+
+  \todo Implement (really needed?)
+
+  \return TRUE on success or FALSE on failure
+*/
+bool VFKFeature::LoadGeometryPolygon()
+{
+    return FALSE;
+}
+OGRErr VFKFeature::LoadProperties(OGRFeature *poFeature)
+{
+    for (int iField = 0; iField < m_poDataBlock->GetPropertyCount(); iField++) {
+        if (GetProperty(iField)->IsNull())
+            continue;
+        OGRFieldType fType = poFeature->GetDefnRef()->GetFieldDefn(iField)->GetType();
+        if (fType == OFTInteger)
+            poFeature->SetField(iField,
+                                GetProperty(iField)->GetValueI());
+        else if (fType == OFTReal)
+            poFeature->SetField(iField,
+                                GetProperty(iField)->GetValueD());
+        else
+            poFeature->SetField(iField,
+                                GetProperty(iField)->GetValueS());
+    }
+
+    return OGRERR_NONE;
+}
Index: /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/port/cplkeywordparser.cpp
===================================================================
--- /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/port/cplkeywordparser.cpp	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gdal/configs/1.10/linux/debian/port/cplkeywordparser.cpp	(revision 24454)
@@ -0,0 +1,368 @@
+/******************************************************************************
+ * $Id: cplkeywordparser.cpp 20996 2010-10-28 18:38:15Z rouault $
+ *
+ * Project:  Common Portability Library
+ * Purpose:  Implementation of CPLKeywordParser - a class for parsing
+ *           the keyword format used for files like QuickBird .RPB files.
+ *           This is a slight variation on the NASAKeywordParser used for
+ *           the PDS/ISIS2/ISIS3 formats.
+ * Author:   Frank Warmerdam <warmerdam@pobox.com
+ *
+ ******************************************************************************
+ * Copyright (c) 2008, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#include "cpl_string.h"
+#include "cplkeywordparser.h"
+
+CPL_CVSID("$Id");
+
+/************************************************************************/
+/* ==================================================================== */
+/*                          CPLKeywordParser                           */
+/* ==================================================================== */
+/************************************************************************/
+
+/************************************************************************/
+/*                         CPLKeywordParser()                          */
+/************************************************************************/
+
+CPLKeywordParser::CPLKeywordParser()
+
+{
+    papszKeywordList = NULL;
+}
+
+/************************************************************************/
+/*                        ~CPLKeywordParser()                          */
+/************************************************************************/
+
+CPLKeywordParser::~CPLKeywordParser()
+
+{
+    CSLDestroy( papszKeywordList );
+    papszKeywordList = NULL;
+}
+
+/************************************************************************/
+/*                               Ingest()                               */
+/************************************************************************/
+
+int CPLKeywordParser::Ingest( VSILFILE *fp )
+
+{
+/* -------------------------------------------------------------------- */
+/*      Read in buffer till we find END all on it's own line.           */
+/* -------------------------------------------------------------------- */
+    for( ; TRUE; )
+    {
+        const char *pszCheck;
+        char szChunk[513];
+
+        int nBytesRead = VSIFReadL( szChunk, 1, 512, fp );
+
+        szChunk[nBytesRead] = '\0';
+        osHeaderText += szChunk;
+
+        if( nBytesRead < 512 )
+            break;
+
+        if( osHeaderText.size() > 520 )
+            pszCheck = osHeaderText.c_str() + (osHeaderText.size() - 520);
+        else
+            pszCheck = szChunk;
+
+        if( strstr(pszCheck,"\r\nEND;\r\n") != NULL
+            || strstr(pszCheck,"\nEND;\n") != NULL )
+            break;
+    }
+
+    pszHeaderNext = osHeaderText.c_str();
+
+/* -------------------------------------------------------------------- */
+/*      Process name/value pairs, keeping track of a "path stack".      */
+/* -------------------------------------------------------------------- */
+    return ReadGroup( "" );
+}
+
+/************************************************************************/
+/*                             ReadGroup()                              */
+/************************************************************************/
+
+int CPLKeywordParser::ReadGroup( const char *pszPathPrefix )
+
+{
+    CPLString osName, osValue;
+
+    for( ; TRUE; )
+    {
+        if( !ReadPair( osName, osValue ) )
+            return FALSE;
+
+        if( EQUAL(osName,"BEGIN_GROUP") )
+        {
+            if( !ReadGroup( (CPLString(pszPathPrefix) + osValue + ".").c_str() ) )
+                return FALSE;
+        }
+        else if( EQUALN(osName,"END",3) )
+        {
+            return TRUE;
+        }
+        else
+        {
+            osName = pszPathPrefix + osName;
+            papszKeywordList = CSLSetNameValue( papszKeywordList,
+                                                osName, osValue );
+        }
+    }
+}
+
+/************************************************************************/
+/*                              ReadPair()                              */
+/*                                                                      */
+/*      Read a name/value pair from the input stream.  Strip off        */
+/*      white space, ignore comments, split on '='.                     */
+/************************************************************************/
+
+int CPLKeywordParser::ReadPair( CPLString &osName, CPLString &osValue )
+
+{
+    osName = "";
+    osValue = "";
+
+    if( !ReadWord( osName ) )
+        return FALSE;
+
+    SkipWhite();
+
+    if( EQUAL(osName,"END") )
+        return TRUE;
+
+    if( *pszHeaderNext != '=' )
+    {
+        // ISIS3 does not have anything after the end group/object keyword.
+        if( EQUAL(osName,"End_Group") || EQUAL(osName,"End_Object") )
+            return TRUE;
+        else
+            return FALSE;
+    }
+
+    pszHeaderNext++;
+
+    SkipWhite();
+
+    osValue = "";
+
+    // Handle value lists like:     Name   = (Red, Red)
+    // or list of lists like : TLCList = ( (0,  0.000000), (8299,  4.811014) );
+    if( *pszHeaderNext == '(' )
+    {
+        CPLString osWord;
+        int nDepth = 0;
+        const char* pszLastPos = pszHeaderNext;
+
+        while( ReadWord( osWord ) && pszLastPos != pszHeaderNext)
+        {
+            SkipWhite();
+            pszLastPos = pszHeaderNext;
+
+            osValue += osWord;
+            const char* pszIter = osWord.c_str();
+            int bInQuote = FALSE;
+            while(*pszIter != '\0')
+            {
+                if (*pszIter == '"')
+                    bInQuote = !bInQuote;
+                else if (!bInQuote)
+                {
+                    if (*pszIter == '(')
+                        nDepth ++;
+                    else if (*pszIter == ')')
+                    {
+                        nDepth --;
+                        if (nDepth == 0)
+                            break;
+                    }
+                }
+                pszIter ++;
+            }
+            if (*pszIter == ')' && nDepth == 0)
+                break;
+        }
+    }
+
+    else // Handle more normal "single word" values.
+    {
+        if( !ReadWord( osValue ) )
+            return FALSE;
+
+    }
+
+    SkipWhite();
+
+    // No units keyword?
+    if( *pszHeaderNext != '<' )
+        return TRUE;
+
+    // Append units keyword.  For lines that like like this:
+    //  MAP_RESOLUTION               = 4.0 <PIXEL/DEGREE>
+
+    CPLString osWord;
+
+    osValue += " ";
+
+    while( ReadWord( osWord ) )
+    {
+        SkipWhite();
+
+        osValue += osWord;
+        if( osWord[strlen(osWord)-1] == '>' )
+            break;
+    }
+
+    return TRUE;
+}
+
+/************************************************************************/
+/*                              ReadWord()                              */
+/************************************************************************/
+
+int CPLKeywordParser::ReadWord( CPLString &osWord )
+
+{
+    osWord = "";
+
+    SkipWhite();
+
+    if( *pszHeaderNext == '\0' || *pszHeaderNext == '=' )
+        return FALSE;
+
+    while( *pszHeaderNext != '\0'
+           && *pszHeaderNext != '='
+           && *pszHeaderNext != ';'
+           && !isspace((unsigned char)*pszHeaderNext) )
+    {
+        if( *pszHeaderNext == '"' )
+        {
+            osWord += *(pszHeaderNext++);
+            while( *pszHeaderNext != '"' )
+            {
+                if( *pszHeaderNext == '\0' )
+                    return FALSE;
+
+                osWord += *(pszHeaderNext++);
+            }
+            osWord += *(pszHeaderNext++);
+        }
+        else if( *pszHeaderNext == '\'' )
+        {
+            osWord += *(pszHeaderNext++);
+            while( *pszHeaderNext != '\'' )
+            {
+                if( *pszHeaderNext == '\0' )
+                    return FALSE;
+
+                osWord += *(pszHeaderNext++);
+            }
+            osWord += *(pszHeaderNext++);
+        }
+        else
+        {
+            osWord += *pszHeaderNext;
+            pszHeaderNext++;
+        }
+    }
+
+    if( *pszHeaderNext == ';' )
+        pszHeaderNext++;
+
+    return TRUE;
+}
+
+/************************************************************************/
+/*                             SkipWhite()                              */
+/************************************************************************/
+
+void CPLKeywordParser::SkipWhite()
+
+{
+    for( ; TRUE; )
+    {
+        // Skip white space (newline, space, tab, etc )
+        if( isspace( (unsigned char)*pszHeaderNext ) )
+        {
+            pszHeaderNext++;
+            continue;
+        }
+
+        // Skip C style comments
+        if( *pszHeaderNext == '/' && pszHeaderNext[1] == '*' )
+        {
+            pszHeaderNext += 2;
+
+            while( *pszHeaderNext != '\0'
+                   && (*pszHeaderNext != '*'
+                       || pszHeaderNext[1] != '/' ) )
+            {
+                pszHeaderNext++;
+            }
+
+            pszHeaderNext += 2;
+            continue;
+        }
+
+        // Skip # style comments
+        if( *pszHeaderNext == '#'  )
+        {
+            pszHeaderNext += 1;
+
+            // consume till end of line.
+            while( *pszHeaderNext != '\0'
+                   && *pszHeaderNext != 10
+                   && *pszHeaderNext != 13 )
+            {
+                pszHeaderNext++;
+            }
+            continue;
+        }
+
+        // not white space, return.
+        return;
+    }
+}
+
+/************************************************************************/
+/*                             GetKeyword()                             */
+/************************************************************************/
+
+const char *CPLKeywordParser::GetKeyword( const char *pszPath,
+                                            const char *pszDefault )
+
+{
+    const char *pszResult;
+
+    pszResult = CSLFetchNameValue( papszKeywordList, pszPath );
+    if( pszResult == NULL )
+        return pszDefault;
+    else
+        return pszResult;
+}
+
Index: /issm/trunk-jpl/externalpackages/gdal/install-1.10-debian-netcdf.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gdal/install-1.10-debian-netcdf.sh	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gdal/install-1.10-debian-netcdf.sh	(revision 24454)
@@ -0,0 +1,49 @@
+#!/bin/bash
+set -eu
+
+
+# Constants
+#
+VER="1.10.0"
+HDF5_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
+NETCDF_ROOT="${ISSM_DIR}/externalpackages/petsc/install"
+PROJ_ROOT="${ISSM_DIR}/externalpackages/proj/install"
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gdal-${VER}.tar.gz" "gdal-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf gdal-${VER}.tar.gz
+
+# Move source into 'src' directory
+mv gdal-${VER}/* src
+rm -rf gdal-${VER}
+
+# Copy customized source files to 'src' directory
+cp configs/1.10/linux/debian/frmts/wms/dataset.cpp src/frmts/wms
+cp configs/1.10/linux/debian/ogr/ogrsf_frmts/vfk/vfkfeature.cpp src/ogr/ogrsf_frmts/vfk
+cp configs/1.10/linux/debian/port/cplkeywordparser.cpp src/port
+
+# Configure
+cd src
+./configure \
+	--prefix="${ISSM_DIR}/externalpackages/gdal/install" \
+	--with-hdf5="${HDF5_ROOT}" \
+	--with-netcdf="${NETCDF_ROOT}" \
+	--with-proj="${PROJ_ROOT}"
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
+
+# Return to initial directory
+cd ..
Index: /issm/trunk-jpl/externalpackages/gdal/install-3.0-python-netcdf.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gdal/install-3.0-python-netcdf.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/gdal/install-3.0-python-netcdf.sh	(revision 24454)
@@ -7,5 +7,5 @@
 #
 
-# Constants
+## Constants
 #
 VER="3.0.2"
Index: /issm/trunk-jpl/externalpackages/gdal/install-3.0.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gdal/install-3.0.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/gdal/install-3.0.sh	(revision 24454)
@@ -16,5 +16,5 @@
 
 # Unpack source
-tar -zxvf gdal-$VER.tar.gz
+tar -zxvf gdal-${VER}.tar.gz
 
 # Move source into 'src' directory
@@ -30,5 +30,4 @@
 	--with-proj="${PROJ_ROOT}"
 
-
 # Compile and install
 if [ $# -eq 0 ]; then
Index: sm/trunk-jpl/externalpackages/gmt/configs/ConfigUser.cmake-jenkins
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/configs/ConfigUser.cmake-jenkins	(revision 24453)
+++ 	(revision )
@@ -1,240 +1,0 @@
-#
-# $Id: ConfigUserTemplate.cmake 12904 2014-02-17 20:52:35Z fwobbe $
-#
-# Copyright (c) 1991-2014 by P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis and F. Wobbe
-# See LICENSE.TXT file for copying and redistribution conditions.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by the
-# Free Software Foundation; version 3 or any later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
-# for more details.
-#
-# Contact info: gmt.soest.hawaii.edu
-# ----------------------------------------------------------------------------
-
-# Use this file to override variables in 'ConfigDefault.cmake' on a per-user
-# basis.  First copy 'ConfigUserTemplate.cmake' to 'ConfigUser.cmake', then
-# edit 'ConfigUser.cmake'.  'ConfigUser.cmake' is not version controlled
-# (currently listed in svn:ignore property)
-#
-# Note: CMake considers an empty string, "FALSE", "OFF", "NO", or any string
-# ending in "-NOTFOUND" to be false (this happens to be case-insensitive, so
-# "False", "off", "no", and "something-NotFound" are all false).  Other values
-# are true.  Thus it does not matter whether you use TRUE and FALSE, ON and
-# OFF, or YES and NO for your booleans.
-
-##
-## Section 1: Installation paths
-##
-
-# ============================================================================
-# Basic setup begins here.  All settings are optional.  In most cases, setting
-# CMAKE_INSTALL_PREFIX should be all you need to do in order to build GMT with
-# reasonable defaults enabled.
-# ============================================================================
-
-# Installation path (usually defaults to /usr/local) [auto]:
-set (CMAKE_INSTALL_PREFIX "$ENV{ISSM_DIR}/externalpackages/gmt/install")
-
-# Set install name suffix used for directories and gmt executables
-# [undefined]:
-#set (GMT_INSTALL_NAME_SUFFIX "suffix")
-
-# Install into traditional directory structure. Disable to install a
-# distribution type directory structure (doc and share separated) [on]:
-#set (GMT_INSTALL_TRADITIONAL_FOLDERNAMES OFF)
-
-# Install convenience links for GMT modules. Disable to install only the main
-# gmt program and access modules as "gmt modulename options" [TRUE]:
-#set (GMT_INSTALL_MODULE_LINKS FALSE)
-
-# Make executables relocatable on supported platforms (relative RPATH) [TRUE]:
-#set (GMT_INSTALL_RELOCATABLE FALSE)
-
-# ============================================================================
-# Advanced configuration begins here.  Usually it is not necessary to edit any
-# settings below.  You should know what you are doing if you do though.  Note:
-# installation paths are relative to ${CMAKE_INSTALL_PREFIX} unless absolute
-# path is given.
-# ============================================================================
-
-# Set binary installation path [bin]:
-#set (GMT_BINDIR "bin")
-
-# Set library installation path [lib or lib64]:
-#set (GMT_LIBDIR "lib")
-
-# Set include installation path [include/gmt${GMT_INSTALL_NAME_SUFFIX}]:
-#set (GMT_INCLUDEDIR "include/gmt")
-
-# Set share installation path [share or share/gmt${GMT_INSTALL_NAME_SUFFIX}]:
-#set (GMT_DATADIR "share/gmt")
-
-# Set doc installation path [share/doc or
-# share/doc/gmt${GMT_INSTALL_NAME_SUFFIX}]:
-#set (GMT_DOCDIR "share/doc/gmt")
-
-# Set manpage installation path [share/man or
-# share/doc/gmt${GMT_INSTALL_NAME_SUFFIX}/man]:
-#set (GMT_MANDIR "share/doc/gmt/man")
-
-# Install documentation files from this external location instead of creating
-# new PDF and HTML documents from scratch [${GMT_SOURCE_DIR}/doc_release]:
-#set (GMT_INSTALL_EXTERNAL_DOC OFF)
-
-# Install manual pages from this external location instead of creating the
-# manpages from scratch [${GMT_SOURCE_DIR}/man_release]:
-#set (GMT_INSTALL_EXTERNAL_MAN OFF)
-
-##
-## Section 2: Build dependencies (should only be needed if CMake cannot
-## automatically detect the rights version or path.)
-##
-
-# Set path to GSHHG Shoreline Database [auto]:
-set (GSHHG_ROOT "$ENV{ISSM_DIR}/externalpackages/gshhg/install")
-
-# Copy GSHHG files to $/coast [FALSE]:
-#set (COPY_GSHHG TRUE)
-
-# Set path to DCW Digital Chart of the World for GMT [auto]:
-#set (DCW_ROOT "dcw-gmt_path")
-
-# Copy DCW files to $/dcw [FALSE]:
-#set (COPY_DCW TRUE)
-
-# Set location of NetCDF (can be root directory, path to header file or path
-# to nc-config) [auto]:
-set (NETCDF_ROOT "/")
-
-# Set location of GDAL (can be root directory, path to header file or path to
-# gdal-config) [auto]:
-set (GDAL_ROOT "$ENV{ISSM_DIR}/externalpackages/gdal/install")
-
-# Set location of PCRE (can be root directory, path to header file or path to
-# pcre-config) [auto]:
-#set (PCRE_ROOT "pcre_install_prefix")
-
-# Set location of single precision FFTW (can be root directory or path to
-# header file) [auto]:
-#set (FFTW3_ROOT "fftw_install_prefix")
-
-# Set location of ZLIB (can be root directory or path to header file) [auto]:
-#set (ZLIB_ROOT "zlib_install_prefix")
-
-##
-## Section 3: GMT features
-##
-
-# Enforce GPL or LGPL conformity. Use this to disable routines that cannot be
-# redistributed under the terms of the GPL or LGPL such as Shewchuk's
-# triangulation (valid values are GPL, LGPL and off) [off]:
-#set (LICENSE_RESTRICTED GPL)
-
-# Configure default units (possible values are SI and US) [SI]:
-#set (UNITS "US")
-
-# Enable building of shared libraries [TRUE] (disable to use static libraries;
-# not recommended):
-#set (BUILD_SHARED_LIBS FALSE)
-
-# Build GMT shared lib with supplemental modules [TRUE]:
-#set (BUILD_SUPPLEMENTS FALSE)
-
-##
-## Section 4: Advanced tweaking
-##
-
-#
-# Testing and development
-#
-
-# Enable running examples/tests with "ctest" or "make check" (out-of-source).
-# Need to set either DO_EXAMPLES, DO_TESTS or both and uncomment the following
-# line.
-#enable_testing()
-#set (DO_EXAMPLES TRUE)
-#set (DO_TESTS TRUE)
-# Number of parallel test jobs with "make check":
-#set (N_TEST_JOBS 4)
-
-# Enable this option to run GMT programs from within ${GMT_BINARY_DIR} without
-# installing or setting GMT_SHAREDIR and GMT_USERDIR first. This is required
-# for testing [OFF]:
-#set (SUPPORT_EXEC_IN_BINARY_DIR ON)
-
-# List extra sub-dirs of 'src' with a CMakeList.txt to build non-module codes
-# that link against the full gmt libs (not just the API; for building codes
-# that only need the GMT API, see the gmtextension project).
-#set (EXTRA_BUILD_DIRS apidemo)
-
-# Directory in which to install the release sources per default
-# [${GMT_BINARY_DIR}/gmt-${GMT_PACKAGE_VERSION}]:
-#set (GMT_RELEASE_PREFIX "release-src-prefix")
-
-# If set to false, image conversion from PS images to PNG and PDF does
-# not depend on the gmt binary target. Note: "make gmt" is then required
-# before docs_depends [TRUE].
-#set (GMT_DOCS_DEPEND_ON_GMT FALSE)
-
-#
-# Debugging
-#
-
-# Set build type can be: empty, Debug, Release, RelWithDebInfo or MinSizeRel
-# [Release]:
-#set (CMAKE_BUILD_TYPE Debug)
-
-# Extra debugging for developers:
-#add_definitions(-DDEBUG)
-#add_definitions(-DMEMDEBUG) # Turn on memory tracking see gmt_support.c for extra info
-#set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement") # recommended even for release build
-#set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")            # extra warnings
-#set (CMAKE_C_FLAGS_DEBUG -ggdb3)                          # gdb debugging symbols
-#set (CMAKE_C_FLAGS_RELEASE "-ggdb3 -O2 -Wuninitialized")  # check uninitialized variables
-#set (CMAKE_LINK_DEPENDS_DEBUG_MODE TRUE)                  # debug link dependencies
-
-#
-# System specific tweaks
-#
-
-# This is for GCC on Solaris to avoid "relocations remain against allocatable
-# but non-writable sections" problems:
-#set (USER_GMTLIB_LINK_FLAGS -mimpure-text)
-
-# This may be needed to enable strdup and extended math functions with GCC and
-# Suncc on Solaris:
-#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__")
-
-# Do not warn when building with Windows SDK or Visual Studio Express:
-#set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
-
-# Manually select runtime library when compiling with Windows SDK or Visual
-# Studio Express:
-#set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS c:/Windows/System32/msvcr100.dll)
-
-# If your NetCDF library is static (not recommended, applies to Windows only)
-#set (NETCDF_STATIC TRUE)
-
-# If want to rename the DLLs to something else than the default (e.g. to
-# append the bitness - Windows only)
-#if (WIN32)
-# set (BITAGE 32)
-# # Detect if we are building a 32 or 64 bits version
-# if (CMAKE_SIZEOF_VOID_P EQUAL 8)
-#   set (BITAGE 64)
-# endif ()
-# set (GMT_DLL_RENAME gmt_w${BITAGE})
-# set (PSL_DLL_RENAME psl_w${BITAGE})
-#endif(WIN32)
-
-# On Windows Visual C 2012 needs _ALLOW_KEYWORD_MACROS to build
-#if(MSVC11)
-#  add_definitions(/D_ALLOW_KEYWORD_MACROS)
-#endif(MSVC11)
-
-# vim: textwidth=78 noexpandtab tabstop=2 softtabstop=2 shiftwidth=2
Index: /issm/trunk-jpl/externalpackages/gmt/configs/linux/5.1/cmake/ConfigUser.cmake
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/configs/linux/5.1/cmake/ConfigUser.cmake	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gmt/configs/linux/5.1/cmake/ConfigUser.cmake	(revision 24454)
@@ -0,0 +1,240 @@
+#
+# $Id: ConfigUserTemplate.cmake 12904 2014-02-17 20:52:35Z fwobbe $
+#
+# Copyright (c) 1991-2014 by P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis and F. Wobbe
+# See LICENSE.TXT file for copying and redistribution conditions.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation; version 3 or any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+# for more details.
+#
+# Contact info: gmt.soest.hawaii.edu
+# ----------------------------------------------------------------------------
+
+# Use this file to override variables in 'ConfigDefault.cmake' on a per-user
+# basis.  First copy 'ConfigUserTemplate.cmake' to 'ConfigUser.cmake', then
+# edit 'ConfigUser.cmake'.  'ConfigUser.cmake' is not version controlled
+# (currently listed in svn:ignore property)
+#
+# Note: CMake considers an empty string, "FALSE", "OFF", "NO", or any string
+# ending in "-NOTFOUND" to be false (this happens to be case-insensitive, so
+# "False", "off", "no", and "something-NotFound" are all false).  Other values
+# are true.  Thus it does not matter whether you use TRUE and FALSE, ON and
+# OFF, or YES and NO for your booleans.
+
+##
+## Section 1: Installation paths
+##
+
+# ============================================================================
+# Basic setup begins here.  All settings are optional.  In most cases, setting
+# CMAKE_INSTALL_PREFIX should be all you need to do in order to build GMT with
+# reasonable defaults enabled.
+# ============================================================================
+
+# Installation path (usually defaults to /usr/local) [auto]:
+set (CMAKE_INSTALL_PREFIX "$ENV{ISSM_DIR}/externalpackages/gmt/install")
+
+# Set install name suffix used for directories and gmt executables
+# [undefined]:
+#set (GMT_INSTALL_NAME_SUFFIX "suffix")
+
+# Install into traditional directory structure. Disable to install a
+# distribution type directory structure (doc and share separated) [on]:
+#set (GMT_INSTALL_TRADITIONAL_FOLDERNAMES OFF)
+
+# Install convenience links for GMT modules. Disable to install only the main
+# gmt program and access modules as "gmt modulename options" [TRUE]:
+#set (GMT_INSTALL_MODULE_LINKS FALSE)
+
+# Make executables relocatable on supported platforms (relative RPATH) [TRUE]:
+#set (GMT_INSTALL_RELOCATABLE FALSE)
+
+# ============================================================================
+# Advanced configuration begins here.  Usually it is not necessary to edit any
+# settings below.  You should know what you are doing if you do though.  Note:
+# installation paths are relative to ${CMAKE_INSTALL_PREFIX} unless absolute
+# path is given.
+# ============================================================================
+
+# Set binary installation path [bin]:
+#set (GMT_BINDIR "bin")
+
+# Set library installation path [lib or lib64]:
+#set (GMT_LIBDIR "lib")
+
+# Set include installation path [include/gmt${GMT_INSTALL_NAME_SUFFIX}]:
+#set (GMT_INCLUDEDIR "include/gmt")
+
+# Set share installation path [share or share/gmt${GMT_INSTALL_NAME_SUFFIX}]:
+#set (GMT_DATADIR "share/gmt")
+
+# Set doc installation path [share/doc or
+# share/doc/gmt${GMT_INSTALL_NAME_SUFFIX}]:
+#set (GMT_DOCDIR "share/doc/gmt")
+
+# Set manpage installation path [share/man or
+# share/doc/gmt${GMT_INSTALL_NAME_SUFFIX}/man]:
+#set (GMT_MANDIR "share/doc/gmt/man")
+
+# Install documentation files from this external location instead of creating
+# new PDF and HTML documents from scratch [${GMT_SOURCE_DIR}/doc_release]:
+#set (GMT_INSTALL_EXTERNAL_DOC OFF)
+
+# Install manual pages from this external location instead of creating the
+# manpages from scratch [${GMT_SOURCE_DIR}/man_release]:
+#set (GMT_INSTALL_EXTERNAL_MAN OFF)
+
+##
+## Section 2: Build dependencies (should only be needed if CMake cannot
+## automatically detect the rights version or path.)
+##
+
+# Set path to GSHHG Shoreline Database [auto]:
+set (GSHHG_ROOT "$ENV{ISSM_DIR}/externalpackages/gshhg/install")
+
+# Copy GSHHG files to $/coast [FALSE]:
+#set (COPY_GSHHG TRUE)
+
+# Set path to DCW Digital Chart of the World for GMT [auto]:
+#set (DCW_ROOT "dcw-gmt_path")
+
+# Copy DCW files to $/dcw [FALSE]:
+#set (COPY_DCW TRUE)
+
+# Set location of NetCDF (can be root directory, path to header file or path
+# to nc-config) [auto]:
+set (NETCDF_ROOT "$ENV{ISSM_DIR}/externalpackages/netcdf/install")
+
+# Set location of GDAL (can be root directory, path to header file or path to
+# gdal-config) [auto]:
+set (GDAL_ROOT "$ENV{ISSM_DIR}/externalpackages/gdal/install")
+
+# Set location of PCRE (can be root directory, path to header file or path to
+# pcre-config) [auto]:
+#set (PCRE_ROOT "pcre_install_prefix")
+
+# Set location of single precision FFTW (can be root directory or path to
+# header file) [auto]:
+#set (FFTW3_ROOT "fftw_install_prefix")
+
+# Set location of ZLIB (can be root directory or path to header file) [auto]:
+set (ZLIB_ROOT "$ENV{ISSM_DIR}/externalpackages/zlib/install")
+
+##
+## Section 3: GMT features
+##
+
+# Enforce GPL or LGPL conformity. Use this to disable routines that cannot be
+# redistributed under the terms of the GPL or LGPL such as Shewchuk's
+# triangulation (valid values are GPL, LGPL and off) [off]:
+#set (LICENSE_RESTRICTED GPL)
+
+# Configure default units (possible values are SI and US) [SI]:
+#set (UNITS "US")
+
+# Enable building of shared libraries [TRUE] (disable to use static libraries;
+# not recommended):
+#set (BUILD_SHARED_LIBS FALSE)
+
+# Build GMT shared lib with supplemental modules [TRUE]:
+#set (BUILD_SUPPLEMENTS FALSE)
+
+##
+## Section 4: Advanced tweaking
+##
+
+#
+# Testing and development
+#
+
+# Enable running examples/tests with "ctest" or "make check" (out-of-source).
+# Need to set either DO_EXAMPLES, DO_TESTS or both and uncomment the following
+# line.
+#enable_testing()
+#set (DO_EXAMPLES TRUE)
+#set (DO_TESTS TRUE)
+# Number of parallel test jobs with "make check":
+#set (N_TEST_JOBS 4)
+
+# Enable this option to run GMT programs from within ${GMT_BINARY_DIR} without
+# installing or setting GMT_SHAREDIR and GMT_USERDIR first. This is required
+# for testing [OFF]:
+#set (SUPPORT_EXEC_IN_BINARY_DIR ON)
+
+# List extra sub-dirs of 'src' with a CMakeList.txt to build non-module codes
+# that link against the full gmt libs (not just the API; for building codes
+# that only need the GMT API, see the gmtextension project).
+#set (EXTRA_BUILD_DIRS apidemo)
+
+# Directory in which to install the release sources per default
+# [${GMT_BINARY_DIR}/gmt-${GMT_PACKAGE_VERSION}]:
+#set (GMT_RELEASE_PREFIX "release-src-prefix")
+
+# If set to false, image conversion from PS images to PNG and PDF does
+# not depend on the gmt binary target. Note: "make gmt" is then required
+# before docs_depends [TRUE].
+#set (GMT_DOCS_DEPEND_ON_GMT FALSE)
+
+#
+# Debugging
+#
+
+# Set build type can be: empty, Debug, Release, RelWithDebInfo or MinSizeRel
+# [Release]:
+#set (CMAKE_BUILD_TYPE Debug)
+
+# Extra debugging for developers:
+#add_definitions(-DDEBUG)
+#add_definitions(-DMEMDEBUG) # Turn on memory tracking see gmt_support.c for extra info
+#set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement") # recommended even for release build
+#set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")            # extra warnings
+#set (CMAKE_C_FLAGS_DEBUG -ggdb3)                          # gdb debugging symbols
+#set (CMAKE_C_FLAGS_RELEASE "-ggdb3 -O2 -Wuninitialized")  # check uninitialized variables
+#set (CMAKE_LINK_DEPENDS_DEBUG_MODE TRUE)                  # debug link dependencies
+
+#
+# System specific tweaks
+#
+
+# This is for GCC on Solaris to avoid "relocations remain against allocatable
+# but non-writable sections" problems:
+#set (USER_GMTLIB_LINK_FLAGS -mimpure-text)
+
+# This may be needed to enable strdup and extended math functions with GCC and
+# Suncc on Solaris:
+#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__")
+
+# Do not warn when building with Windows SDK or Visual Studio Express:
+#set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+
+# Manually select runtime library when compiling with Windows SDK or Visual
+# Studio Express:
+#set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS c:/Windows/System32/msvcr100.dll)
+
+# If your NetCDF library is static (not recommended, applies to Windows only)
+#set (NETCDF_STATIC TRUE)
+
+# If want to rename the DLLs to something else than the default (e.g. to
+# append the bitness - Windows only)
+#if (WIN32)
+# set (BITAGE 32)
+# # Detect if we are building a 32 or 64 bits version
+# if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+#   set (BITAGE 64)
+# endif ()
+# set (GMT_DLL_RENAME gmt_w${BITAGE})
+# set (PSL_DLL_RENAME psl_w${BITAGE})
+#endif(WIN32)
+
+# On Windows Visual C 2012 needs _ALLOW_KEYWORD_MACROS to build
+#if(MSVC11)
+#  add_definitions(/D_ALLOW_KEYWORD_MACROS)
+#endif(MSVC11)
+
+# vim: textwidth=78 noexpandtab tabstop=2 softtabstop=2 shiftwidth=2
Index: /issm/trunk-jpl/externalpackages/gmt/configs/linux/6.0/cmake/ConfigUser.cmake
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/configs/linux/6.0/cmake/ConfigUser.cmake	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gmt/configs/linux/6.0/cmake/ConfigUser.cmake	(revision 24454)
@@ -0,0 +1,308 @@
+#
+#
+# Copyright (c) 1991-2019 by the GMT Team (https://www.generic-mapping-tools.org/team.html)
+# See LICENSE.TXT file for copying and redistribution conditions.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by the
+# Free Software Foundation; version 3 or any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+# for more details.
+#
+# Contact info: www.generic-mapping-tools.org
+# ----------------------------------------------------------------------------
+
+# Use this file to override variables in 'ConfigDefault.cmake' on a per-user
+# basis.  First copy 'ConfigUserTemplate.cmake' to 'ConfigUser.cmake', then
+# edit 'ConfigUser.cmake'.  'ConfigUser.cmake' is not version controlled
+# (currently listed in .gitignore).
+#
+# Note: CMake considers an empty string, "FALSE", "OFF", "NO", or any string
+# ending in "-NOTFOUND" to be false (this happens to be case-insensitive, so
+# "False", "off", "no", and "something-NotFound" are all false).  Other values
+# are true.  Thus it does not matter whether you use TRUE and FALSE, ON and
+# OFF, or YES and NO for your booleans.
+
+##
+## Section 1: Installation paths
+##
+
+# ============================================================================
+# Basic setup begins here.  All settings are optional.  In most cases, setting
+# CMAKE_INSTALL_PREFIX should be all you need to do in order to build GMT with
+# reasonable defaults enabled.  Note: If you need to specify directory names
+# with spaces (e.g., on Windows) then you must put them in quotes.
+# ============================================================================
+
+# Installation path (usually defaults to /usr/local) [auto]:
+set (CMAKE_INSTALL_PREFIX "$ENV{ISSM_DIR}/externalpackages/gmt/install")
+
+# Set install name suffix used for directories and gmt executables
+# [undefined]:
+#set (GMT_INSTALL_NAME_SUFFIX "suffix")
+
+# Install into traditional directory structure. Disable to install a
+# distribution type directory structure (doc and share separated) [on]:
+#set (GMT_INSTALL_TRADITIONAL_FOLDERNAMES OFF)
+
+# Install convenience links for GMT modules. Disable to install only the main
+# gmt program and access modules as "gmt modulename options" [TRUE]:
+#set (GMT_INSTALL_MODULE_LINKS FALSE)
+
+# Make executables relocatable on supported platforms (relative RPATH) [FALSE]:
+set (GMT_INSTALL_RELOCATABLE TRUE)
+
+# Exclude optional GDAL, PCRE, PCRE2, FFTW3, LAPACK, BLAS, ZLIB dependencies even if you have them installed [FALSE]
+#set (GMT_EXCLUDE_GDAL TRUE)
+#set (GMT_EXCLUDE_PCRE TRUE)
+#set (GMT_EXCLUDE_PCRE2 TRUE)
+#set (GMT_EXCLUDE_FFTW3 TRUE)
+#set (GMT_EXCLUDE_LAPACK TRUE)
+#set (GMT_EXCLUDE_BLAS TRUE)
+#set (GMT_EXCLUDE_ZLIB TRUE)
+
+# ============================================================================
+# Advanced configuration begins here.  Usually it is not necessary to edit any
+# settings below.  You should know what you are doing if you do though.  Note:
+# installation paths are relative to ${CMAKE_INSTALL_PREFIX} unless absolute
+# path is given.
+# ============================================================================
+
+# Set binary installation path [bin]:
+#set (GMT_BINDIR "bin")
+
+# Set library installation path [lib or lib64]:
+#set (GMT_LIBDIR "lib")
+
+# Set include installation path [include/gmt${GMT_INSTALL_NAME_SUFFIX}]:
+#set (GMT_INCLUDEDIR "include/gmt")
+
+# Set share installation path [share or share/gmt${GMT_INSTALL_NAME_SUFFIX}]:
+#set (GMT_DATADIR "share/gmt")
+
+# Set doc installation path [share/doc or
+# share/doc/gmt${GMT_INSTALL_NAME_SUFFIX}]:
+#set (GMT_DOCDIR "share/doc/gmt")
+
+# Set manpage installation path [share/man or
+# share/doc/gmt${GMT_INSTALL_NAME_SUFFIX}/man]:
+#set (GMT_MANDIR "share/doc/gmt/man")
+
+# Install documentation files from this external location instead of creating
+# new HTML documents from scratch [${GMT_SOURCE_DIR}/doc_release]:
+#set (GMT_INSTALL_EXTERNAL_DOC OFF)
+
+# Install manual pages from this external location instead of creating the
+# manpages from scratch [${GMT_SOURCE_DIR}/man_release]:
+#set (GMT_INSTALL_EXTERNAL_MAN OFF)
+
+##
+## Section 2: Build dependencies (should only be needed if CMake cannot
+## automatically detect the rights version or path.)
+##
+
+# Set URL to GMT Data server [auto]:
+#set (GMT_DATA_SERVER "data_server_url")
+
+# Set path to GSHHG Shoreline Database [auto]:
+set (GSHHG_ROOT "$ENV{ISSM_DIR}/externalpackages/gshhg/install")
+
+# Copy GSHHG files to ${GMT_DATADIR}/coast [FALSE]:
+#set (COPY_GSHHG TRUE)
+
+# Set path to DCW Digital Chart of the World for GMT [auto]:
+#set (DCW_ROOT "dcw-gmt_path")
+
+# Copy DCW files to ${GMT_DATADIR}/dcw [FALSE]:
+#set (COPY_DCW TRUE)
+
+# Copy GDAL's 'data' directory to ${GMT_DATADIR}/GDAL_DATA [FALSE]:
+#set (GDAL_DATA_PATH C:/programs/compa_libs/gdal_GIT/compileds/VC14_64/data)
+
+# Copy PROJ4's 'share' directory to ${GMT_DATADIR}/GDAL_DATA [FALSE]:
+#set (PROJ_DATA_PATH C:/programs/compa_libs/proj5_GIT/compileds/VC14_64/share/proj)
+
+# FOR WINDOWS ONLY
+# Set path to location of Ghostscript binaries (optional install)
+#set (GHOST_DATA_PATH C:/programs/compa_libs/ghostscript/bin)
+
+# FOR WINDOWS ONLY
+# Set path to location where the gmtmex is located.
+#set (GMTMEX_PATH "C:/progs_cygw/GMTdev/gmtmex/${GMTver}")
+
+# Set location of NetCDF (can be root directory, path to header file or path
+# to nc-config) [auto]:
+set (NETCDF_ROOT "$ENV{ISSM_DIR}/externalpackages/netcdf/install")
+
+# Set location of GDAL (can be root directory, path to header file or path to
+# gdal-config) [auto]:
+set (GDAL_ROOT "$ENV{ISSM_DIR}/externalpackages/gdal/install")
+
+# Set location of PCRE (can be root directory, path to header file or path to
+# pcre-config) [auto]:
+#set (PCRE_ROOT "pcre_install_prefix")
+# Alternatively, set location of PCRE2 (can be root directory, path to header file or path to
+# pcre2-config) [auto]:
+#set (PCRE2_ROOT "pcre2_install_prefix")
+
+# Set location of single precision FFTW (can be root directory or path to
+# header file) [auto]:
+#set (FFTW3_ROOT "fftw_install_prefix")
+
+# Set location of ZLIB (can be root directory or path to header file) [auto]:
+set (ZLIB_ROOT "$ENV{ISSM_DIR}/externalpackages/zlib/install")
+
+# Set location of CURL (can be root directory or path to header file) [auto]:
+#set (CURL_ROOT "curl_install_prefix")
+
+# Set location of GLIB component gthread [auto].  This is an optional (and
+# experimental) option which you need to enable:
+#set (GMT_USE_THREADS TRUE)
+# If pkg-config is not installed (e.g. on Windows) you need to specify these:
+#set (GLIB_INCLUDE_DIR c:/path/to/glib-dev/include/glib-2.0)
+#set (GLIB_LIBRARIES c:/path/to/glib-dev/lib/glib-2.0.lib)
+
+# Set LAPACK location. Use this when want to link with LAPACK and it's not found automatically
+set (LAPACK_LIBRARY "-L$ENV{ISSM_DIR}/externalpackages/lapack/install/lib -llapack")
+set (BLAS_LIBRARY "-L$ENV{ISSM_DIR}/externalpackages/lapack/install/lib -lblas")
+
+##
+## Section 3: GMT features
+##
+
+# Enforce GPL or LGPL conformity. Use this to disable routines that cannot be
+# redistributed under the terms of the GPL or LGPL such as Shewchuk's
+# triangulation (valid values are GPL, LGPL and off) [off]:
+#set (LICENSE_RESTRICTED GPL)
+
+# Allow building of OpenMP if compiler supports it
+# set (GMT_ENABLE_OPENMP TRUE)
+
+# Configure default units (possible values are SI and US) [SI]:
+#set (UNITS "US")
+
+# Enable building of shared libraries [TRUE] (disable to use static libraries;
+# not recommended; on non-x86 architectures uncomment the next option as well):
+#set (BUILD_SHARED_LIBS FALSE)
+
+# Create position independent code on all targets [auto] (needed for static
+# build on non-x86):
+#set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+
+# Build GMT shared lib with supplemental modules [TRUE]:
+#set (BUILD_SUPPLEMENTS FALSE)
+
+# Build/Install GMT Developer include files [TRUE]:
+# This installs the extra include files and configured files needed by 3rd-party
+# developers.  Until we build a separate gmt-devel we include them in the main
+# Distribution.
+#set (BUILD_DEVELOPER FALSE)
+
+##
+## Section 4: Advanced tweaking
+##
+
+#
+# Testing and development
+#
+
+# Enable running examples/tests with "ctest" or "make check" (out-of-source).
+# Need to set either DO_EXAMPLES, DO_TESTS or both and uncomment the following
+# line.
+#enable_testing()
+#set (DO_EXAMPLES TRUE)
+#set (DO_TESTS TRUE)
+#set (DO_ANIMATIONS TRUE)
+# Number of parallel test jobs with "make check":
+#set (N_TEST_JOBS 4)
+
+# Enable this option to run GMT programs from within ${GMT_BINARY_DIR} without
+# installing or setting GMT_SHAREDIR and GMT_USERDIR first. This is required
+# for testing [OFF]:
+#set (SUPPORT_EXEC_IN_BINARY_DIR ON)
+
+# List extra sub-dirs of 'src' with a CMakeList.txt to build non-module codes
+# that link against the full gmt libs (not just the API; for building codes
+# that only need the GMT API, see the gmt-custom project).
+#set (EXTRA_BUILD_DIRS apidemo)
+# Uncomment the following line to enable running low-level C tests of the API
+#set (DO_API_TESTS ON)
+
+# Directory in which to install the release sources per default
+# [${GMT_BINARY_DIR}/gmt-${GMT_PACKAGE_VERSION}]:
+#set (GMT_RELEASE_PREFIX "release-src-prefix")
+
+# If set to false, image conversion from PS images to PNG and PDF does
+# not depend on the gmt binary target. Note: "make gmt" is then required
+# before docs_depends [TRUE].
+#set (GMT_DOCS_DEPEND_ON_GMT FALSE)
+
+#
+# Debugging
+#
+
+# Set build type can be: empty, Debug, Release, RelWithDebInfo or MinSizeRel
+# [Release]:
+#set (CMAKE_BUILD_TYPE Debug)
+
+# Extra debugging for developers:
+#if ( CMAKE_GENERATOR STREQUAL "Xcode" )
+##	So Xcode can find the supplemental plug-ins during debug sessions
+#	add_definitions(-DXCODER)
+#   add_definitions(-DDEBUG_MODERN)			# To set PPID == 0 during Xcode test
+#	message("Add Xcode definition for GMT")
+#endif()
+#add_definitions(-DDEBUG)
+#add_definitions(-DMEMDEBUG) # Turn on memory tracking see gmt_support.c for extra info
+#set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement") # recommended even for release build
+#set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")            # extra warnings
+#set (CMAKE_C_FLAGS_DEBUG -ggdb3)                          # gdb debugging symbols
+#set (CMAKE_LINK_DEPENDS_DEBUG_MODE TRUE)                  # debug link dependencies
+if (HAVE_OPENMP)
+	set (CMAKE_C_FLAGS_RELEASE "-ggdb3 -O2 -Wuninitialized -flax-vector-conversions")  # check uninitialized variables
+else (HAVE_OPENMP)
+	set (CMAKE_C_FLAGS_RELEASE "-ggdb3 -O2 -Wuninitialized")  # check uninitialized variables
+endif (HAVE_OPENMP)
+
+#
+# System specific tweaks
+#
+
+# This is for GCC on Solaris to avoid "relocations remain against allocatable
+# but non-writable sections" problems:
+#set (USER_GMTLIB_LINK_FLAGS -mimpure-text)
+
+# This may be needed to enable strdup and extended math functions with GCC and
+# Suncc on Solaris:
+#set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__")
+
+# Do not warn when building with Windows SDK or Visual Studio Express:
+#set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+
+# Manually select runtime library when compiling with Windows SDK or Visual
+# Studio Express:
+#set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS c:/Windows/System32/msvcr100.dll)
+
+# If your NetCDF library is static (not recommended, applies to Windows only)
+#set (NETCDF_STATIC TRUE)
+
+# If want to rename the DLLs to something else than the default (e.g. to
+# append the bitness - Windows only)
+# WARNING: if using this option it is mandatory that the suffix starts with an underscore.
+#if (WIN32)
+# set (BITAGE 32)
+# # Detect if we are building a 32 or 64 bits version
+# if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+#   set (BITAGE 64)
+# endif ()
+# set (GMT_DLL_RENAME gmt_w${BITAGE})
+# set (PSL_DLL_RENAME psl_w${BITAGE})
+#endif(WIN32)
+
+# On Windows Visual C 2012 needs _ALLOW_KEYWORD_MACROS to build
+#if(MSVC11)
+#  add_definitions(/D_ALLOW_KEYWORD_MACROS)
+#endif(MSVC11)
Index: /issm/trunk-jpl/externalpackages/gmt/install-5.1-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/install-5.1-linux.sh	(revision 24454)
+++ /issm/trunk-jpl/externalpackages/gmt/install-5.1-linux.sh	(revision 24454)
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -eu
+
+
+# Constants
+#
+VER="5.1.1"
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmt-${VER}.tar.gz" "gmt-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf gmt-$VER.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv gmt-$VER/* src
+rm -rf gmt-$VER
+
+# Copy source customizations
+cp configs/5.1/linux/cmake/ConfigUser.cmake src/cmake
+
+# Configure
+cd src
+mkdir build
+cd build
+cmake ..
+
+# Install
+if [ $# -eq 0 ]; then
+	make install
+else
+	make -j $1 install
+fi
+
+# Return to initial directory
+cd ../..
Index: /issm/trunk-jpl/externalpackages/gmt/install-6.0-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/install-6.0-linux.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/gmt/install-6.0-linux.sh	(revision 24454)
@@ -2,4 +2,8 @@
 set -eu
 
+
+## Environment
+#
+CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
 
 ## Constants
@@ -22,5 +26,5 @@
 
 # Copy custom configuration files
-cp ./configs/Linux/cmake/ConfigUser.cmake ./src/cmake
+cp ./configs/6.0/linux/cmake/ConfigUser.cmake ./src/cmake
 
 # Configure
@@ -28,5 +32,14 @@
 mkdir build
 cd build
-cmake ..
+
+# NOTE: There is a CMake variable named CURL_ROOT in src/cmake/ConfigUser.cmake
+#		that, ostensibly, allows for supplying the path to curl when it is in a
+#		a non-standard location. That said, newer versions of CMake will
+#		ignore said variable and instead try to find curl itself. Passing in
+#		the two options below overrides this behavior.
+cmake \
+	-DCURL_LIBRARY="${CURL_ROOT}/lib" \
+	-DCURL_INCLUDE_DIR="${CURL_ROOT}/include" \
+	..
 
 # Compile and install
Index: /issm/trunk-jpl/externalpackages/netcdf/install-4.7-parallel-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/netcdf/install-4.7-parallel-with_tests.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/netcdf/install-4.7-parallel-with_tests.sh	(revision 24454)
@@ -21,6 +21,7 @@
 #
 export CC=mpicc
-export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
-export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
+CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
+HDF5_ROOT="${ISSM_DIR}/externalpackages/hdf5/install"
+ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
 
 # Download source
Index: /issm/trunk-jpl/externalpackages/netcdf/install-4.7-parallel.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/netcdf/install-4.7-parallel.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/netcdf/install-4.7-parallel.sh	(revision 24454)
@@ -15,4 +15,5 @@
 #
 VER="4.7.2"
+CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
 HDF5_ROOT="${ISSM_DIR}/externalpackages/hdf5/install"
 ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
@@ -21,6 +22,6 @@
 #
 export CC=mpicc
-export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
-export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
+export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include -I${CURL_ROOT}/include"
+export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib -L${CURL_ROOT}/lib"
 
 # Download source
Index: /issm/trunk-jpl/externalpackages/netcdf/install-4.7-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/netcdf/install-4.7-with_tests.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/netcdf/install-4.7-with_tests.sh	(revision 24454)
@@ -14,10 +14,12 @@
 #
 VER="4.7.2"
+CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
+HDF5_ROOT="${ISSM_DIR}/externalpackages/hdf5/install"
 ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
 
 # Environment
 #
-export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
-export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
+export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include -I${CURL_ROOT}/include"
+export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib -L${CURL_ROOT}/lib"
 
 # Download source
Index: /issm/trunk-jpl/externalpackages/netcdf/install-4.7.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/netcdf/install-4.7.sh	(revision 24453)
+++ /issm/trunk-jpl/externalpackages/netcdf/install-4.7.sh	(revision 24454)
@@ -14,4 +14,5 @@
 #
 VER="4.7.2"
+CURL_ROOT="${ISSM_DIR}/externalpackages/curl/install"
 HDF5_ROOT="${ISSM_DIR}/externalpackages/hdf5/install"
 ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
@@ -19,6 +20,6 @@
 # Environment
 #
-export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include"
-export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib"
+export CPPFLAGS="-I${HDF5_ROOT}/include -I${ZLIB_ROOT}/include -I${CURL_ROOT}/include"
+export LDFLAGS="-L${HDF5_ROOT}/lib -L${ZLIB_ROOT}/lib -L${CURL_ROOT}/lib"
 
 # Download source
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth	(revision 24453)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth	(revision 24454)
@@ -52,9 +52,10 @@
 	zlib		install-1.2.sh
 	hdf5		install-1.10.sh
+	curl		install-7.67.sh
 	netcdf		install-4.7.sh
 	proj		install-6.2.sh
-	gdal		install-3.0-netcdf.sh
+	gdal		install-3.0-python-netcdf.sh
 	gshhg		install.sh
-	gmt			install-6.0-linux.sh
+	gmt			install-5.1-linux.sh
 	gmsh		install.sh
 	shell2junit	install.sh
