[116694] trunk/dports/gis/gdal

macsforever2000 at macports.org macsforever2000 at macports.org
Mon Feb 3 13:01:55 PST 2014


Revision: 116694
          https://trac.macports.org/changeset/116694
Author:   macsforever2000 at macports.org
Date:     2014-02-03 13:01:55 -0800 (Mon, 03 Feb 2014)
Log Message:
-----------
gdal: Fix mrsid variant. Update for latest geoexpress-sdk. (#36496)

Modified Paths:
--------------
    trunk/dports/gis/gdal/Portfile

Removed Paths:
-------------
    trunk/dports/gis/gdal/files/patch-frmts_mrsid_mrsiddataset.cpp
    trunk/dports/gis/gdal/files/patch-mrsid-configure

Modified: trunk/dports/gis/gdal/Portfile
===================================================================
--- trunk/dports/gis/gdal/Portfile	2014-02-03 20:34:40 UTC (rev 116693)
+++ trunk/dports/gis/gdal/Portfile	2014-02-03 21:01:55 UTC (rev 116694)
@@ -5,7 +5,7 @@
 
 name                gdal
 version             1.10.1
-revision            2
+revision            3
 categories          gis
 license             MIT BSD
 platforms           darwin
@@ -135,11 +135,7 @@
 variant mrsid description {Enable MrSID file format} {
     depends_lib-append      port:geoexpress-sdk
     configure.args-delete   --without-mrsid
-    configure.args-append       --with-mrsid=${prefix}/share/Geo_DSDK
-
-    # Fixes for Geo_DSDK 7.x - http://trac.osgeo.org/gdal/ticket/2410
-    patchfiles-append       patch-frmts_mrsid_mrsiddataset.cpp \
-                            patch-mrsid-configure
+    configure.args-append       --with-mrsid=${prefix}/share/Geo_DSDK/Raster_DSDK
 }
 
 variant hdf4 description {Enable HDF4 file format} {
@@ -323,6 +319,36 @@
     xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
     xinstall -m 644 -W ${worksrcpath} HOWTO-RELEASE NEWS VERSION \
         ${destroot}${prefix}/share/doc/${name}
+
+    if {[variant_isset mrsid]} {
+         foreach f [list \
+            bin/gdal_contour \
+            bin/gdal_grid \
+            bin/gdal_rasterize \
+            bin/gdal_translate \
+            bin/gdaladdo \
+            bin/gdalbuildvrt \
+            bin/gdaldem \
+            bin/gdalenhance \
+            bin/gdalinfo \
+            bin/gdallocationinfo \
+            bin/gdalmanage \
+            bin/gdalserver \
+            bin/gdalsrsinfo \
+            bin/gdaltindex \
+            bin/gdaltransform \
+            bin/gdalwarp \
+            bin/nearblack \
+            bin/ogr2ogr \
+            bin/ogrinfo \
+            bin/ogrtindex \
+            bin/testepsg \
+            lib/libgdal.1.dylib] \
+            {
+                exec install_name_tool -change libltidsdk.9.dylib ${prefix}/share/Geo_DSDK/Raster_DSDK/lib/libltidsdk.9.dylib ${destroot}${prefix}/${f}
+            }
+    }
+
 }
 
 livecheck.type  regex

Deleted: trunk/dports/gis/gdal/files/patch-frmts_mrsid_mrsiddataset.cpp
===================================================================
--- trunk/dports/gis/gdal/files/patch-frmts_mrsid_mrsiddataset.cpp	2014-02-03 20:34:40 UTC (rev 116693)
+++ trunk/dports/gis/gdal/files/patch-frmts_mrsid_mrsiddataset.cpp	2014-02-03 21:01:55 UTC (rev 116694)
@@ -1,76 +0,0 @@
---- frmts/mrsid/mrsiddataset.cpp.orig	2008-08-14 23:59:18.000000000 -0700
-+++ frmts/mrsid/mrsiddataset.cpp	2008-08-15 00:05:20.000000000 -0700
-@@ -1,5 +1,5 @@
- /******************************************************************************
-- * $Id: mrsiddataset.cpp 12686 2007-11-09 19:31:29Z warmerdam $
-+ * $Id$
-  *
-  * Project:  Multi-resolution Seamless Image Database (MrSID)
-  * Purpose:  Read/write LizardTech's MrSID file format - Version 4+ SDK.
-@@ -37,7 +37,7 @@
- #include <geo_normalize.h>
- #include <geovalues.h>
- 
--CPL_CVSID("$Id: mrsiddataset.cpp 12686 2007-11-09 19:31:29Z warmerdam $");
-+CPL_CVSID("$Id$");
- 
- CPL_C_START
- double GTIFAngleToDD( double dfAngle, int nUOMAngle );
-@@ -161,7 +161,11 @@
- {
-     friend class MrSIDRasterBand;
- 
-+#if defined(LTI_SDK_MAJOR) && LTI_SDK_MAJOR >= 7
-+    MrSIDImageReader    *poImageReader;
-+#else
-     LTIImageReader      *poImageReader;
-+#endif
- 
- #ifdef MRSID_ESDK
-     LTIGeoFileImageWriter *poImageWriter;
-@@ -690,7 +694,14 @@
-     if ( poLTINav )
-         delete poLTINav;
-     if ( poImageReader && !bIsOverview )
-+#if defined(LTI_SDK_MAJOR) && LTI_SDK_MAJOR >= 7
-+    {
-+        poImageReader->release();
-+        poImageReader = NULL;
-+    }
-+#else
-         delete poImageReader;
-+#endif
- 
-     if ( pszProjection )
-         CPLFree( pszProjection );
-@@ -1250,6 +1261,7 @@
- /* -------------------------------------------------------------------- */
-     MrSIDDataset        *poDS;
-     const LTFileSpec    oFileSpec( poOpenInfo->pszFilename );
-+    LT_STATUS           eStat;
- 
-     poDS = new MrSIDDataset();
- #ifdef MRSID_J2K
-@@ -1257,9 +1269,21 @@
-         poDS->poImageReader = new LTIDLLReader<J2KImageReader>( oFileSpec, true );
-     else
- #endif
-+#if defined(LTI_SDK_MAJOR) && LTI_SDK_MAJOR >= 7
-+    {
-+        poDS->poImageReader = MrSIDImageReader::create();
-+    }
-+
-+    eStat = poDS->poImageReader->initialize( oFileSpec, true );
-+#else
-+    {
-         poDS->poImageReader = new LTIDLLReader<MrSIDImageReader>( oFileSpec, false );
-+    }
-+
-+    eStat = poDS->poImageReader->initialize();
-+#endif
- 
--    if ( !LT_SUCCESS( poDS->poImageReader->initialize() ) )
-+    if ( !LT_SUCCESS(eStat) )
-     {
-         delete poDS;
-         CPLError( CE_Failure, CPLE_AppDefined,

Deleted: trunk/dports/gis/gdal/files/patch-mrsid-configure
===================================================================
--- trunk/dports/gis/gdal/files/patch-mrsid-configure	2014-02-03 20:34:40 UTC (rev 116693)
+++ trunk/dports/gis/gdal/files/patch-mrsid-configure	2014-02-03 21:01:55 UTC (rev 116694)
@@ -1,17 +0,0 @@
---- configure.orig	2008-08-15 00:00:41.000000000 -0700
-+++ configure	2008-08-15 00:01:24.000000000 -0700
-@@ -23184,12 +23184,12 @@
- 
-   { echo "$as_me:$LINENO: checking for lt_base.h in $with_mrsid/include/support" >&5
- echo $ECHO_N "checking for lt_base.h in $with_mrsid/include/support... $ECHO_C" >&6; }
--  if test -r "$with_mrsid/include/support/lt_base.h" ; then
-+  if test -r "$with_mrsid/include/lt_base.h" ; then
-     { echo "$as_me:$LINENO: result: found MrSID DSDK version 4.x or newer." >&5
- echo "${ECHO_T}found MrSID DSDK version 4.x or newer." >&6; }
- 
-     HAVE_MRSID=yes
--    MRSID_INCLUDE="-I$with_mrsid/include/base -I$with_mrsid/include/metadata -I$with_mrsid/include/mrsid_readers -I$with_mrsid/include/j2k_readers -I$with_mrsid/include/support"
-+    MRSID_INCLUDE="-I$with_mrsid/include"
-     MRSID_LIBS="-lltidsdk -lpthread"
- 
-     { echo "$as_me:$LINENO: checking for MG3ImageWriter.h in $with_mrsid/include/mrsid_writers" >&5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140203/1b863b91/attachment-0001.html>


More information about the macports-changes mailing list