[121188] trunk/dports/gis/gdal

vince at macports.org vince at macports.org
Thu Jun 19 10:19:48 PDT 2014


Revision: 121188
          https://trac.macports.org/changeset/121188
Author:   vince at macports.org
Date:     2014-06-19 10:19:48 -0700 (Thu, 19 Jun 2014)
Log Message:
-----------
Bump to 1.11.0. Also enable ECW via manual installation of the SDK.
More to come…

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

Added Paths:
-----------
    trunk/dports/gis/gdal/files/patch-configure-ecw-libcxx.diff
    trunk/dports/gis/gdal/files/patch-configure-ecw-libstdcxx.diff

Modified: trunk/dports/gis/gdal/Portfile
===================================================================
--- trunk/dports/gis/gdal/Portfile	2014-06-19 16:11:39 UTC (rev 121187)
+++ trunk/dports/gis/gdal/Portfile	2014-06-19 17:19:48 UTC (rev 121188)
@@ -4,8 +4,7 @@
 PortSystem          1.0
 
 name                gdal
-version             1.10.1
-revision            5
+version             1.11.0
 categories          gis
 license             MIT BSD
 platforms           darwin
@@ -27,8 +26,8 @@
                     http://download.osgeo.org/gdal/ \
                     http://download.osgeo.org/gdal/CURRENT/
 
-checksums           rmd160  b06cbd0f34a6dad99768d5f75a9856e4e027d3bc \
-                    sha256  9984f0314c0bd831eb59fb646c2bc5e13cf1378be4f51499045166cbe62be6ea
+checksums           rmd160  0a522a145131b65103d0e6c02e52651069005e48 \
+                    sha256  989db33ff411e2c888348e71edec5ad06c74ed68781ebfbc4e85179b9d65aafe
 
 depends_lib-append  port:zlib \
                     port:libpng \
@@ -96,12 +95,8 @@
 # Patch to ensure that the python installation respects DESTDIR
 patchfiles          patch-swig_python_GNUmakefile \
                     patch-gdalwarpkernel_opencl_c.diff \
-                    patch-gdalwarpkernel_opencl_c_2.diff \
                     patch-gdalwarpkernel_opencl_h.diff
 
-# Upstream fix for "Undefined symbols: _environ"
-patchfiles-append   patch-port-cpl_spawn.cpp.diff
-
 # Patches for universal build
 post-configure {
     reinplace -E "s|(INST_PYMOD).*|\\1\t=\t${PYINST}|" \
@@ -139,6 +134,49 @@
     configure.args-append       --with-mrsid=${prefix}/share/Geo_DSDK/Raster_DSDK
 }
 
+variant ecw description {Enable ECW file format} {
+    configure.args-delete   --without-ecw
+    configure.args-append   --with-ecw=${prefix}/lib/ECW
+
+    if {${configure.cxx_stdlib} == "libc++" } { 
+        patchfiles-append       patch-configure-ecw-libcxx.diff
+    } else {
+        patchfiles-append       patch-configure-ecw-libstdcxx.diff
+    }
+
+    pre-configure {
+        if {(![file exists ${prefix}/lib/ECW]) && \
+        (![file exists /Intergraph/ERDASEcwJpeg2000SDK5.1.1/Desktop_Read-Only])} {
+            ui_error "
+****
+* The Intergraph ECW SDK version 5.1.1 is needed to 
+* compile gdal with the ecw variant. It must be installed separately.
+* Please download the Mac OS X version of the SDK 
+* 'ERDAS ECW/JP2 SDK v5.1.1 (MacOSX)' from 
+* http://download.intergraph.com/
+* Choose to install it in ${prefix}/lib/ECW.
+* Then try to install GDAL again.
+****"       
+            return -code error "ECW SDK 5.1.1 not installed."
+        }
+        
+        if {(![file exists ${prefix}/lib/ECW]) && \
+            ([file exists /Intergraph/ERDASEcwJpeg2000SDK5.1.1/Desktop_Read-Only])} {
+
+          ui_error "
+****
+* Please create symbolic links from the /Intergraph directory to 
+* ${prefix}/lib/ECW, by executing at the prompt:
+* sudo ln -s /Intergraph/ERDASEcwJpeg2000SDK5.1.1/Desktop_Read-Only \
+                  ${prefix}/lib/ECW"
+* Or reinstall the ECW SDK in ${prefix}/lib/ECW directly.
+* Then try again.
+****"
+            return -code error "Symlinks missing."
+        }
+    }
+}
+
 variant hdf4 description {Enable HDF4 file format} {
     depends_lib-append      port:hdf4
     configure.args-delete   --without-hdf4
@@ -314,6 +352,8 @@
     foreach makefile [glob -dir $FRMT_PATH */GNUmakefile] {
         reinplace "s|\$\(EXPAT_INCLUDE\)||" $makefile
     }
+    
+    reinplace -E "s|(GEOS_CFLAGS.*=).*|\\1|" ${worksrcpath}/GDALmake.opt
 }
 
 post-destroot {
@@ -342,6 +382,7 @@
             bin/nearblack \
             bin/ogr2ogr \
             bin/ogrinfo \
+            bin/ogrlineref \
             bin/ogrtindex \
             bin/testepsg \
             lib/libgdal.1.dylib] \
@@ -350,6 +391,44 @@
             }
     }
 
+    if {[variant_isset ecw]} {
+          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/ogrlineref \
+            bin/ogrtindex \
+            bin/testepsg \
+            lib/libgdal.1.dylib] \
+            {
+                if {${configure.cxx_stdlib} == "libc++"} {
+                    exec install_name_tool -change \
+                        /Users/jenkins/hudson/workspace/RL_5.1.1_ECWJP2SDK_OSX/Master/libNCSEcw.dylib ${prefix}/lib/ECW/redistributable/libc++/libNCSEcw.dylib \
+                        ${destroot}${prefix}/${f}
+                } else {
+                    exec install_name_tool -change \
+                        /Users/jenkins/hudson/workspace/RL_5.1.1_ECWJP2SDK_OSX/Master/libNCSEcw.dylib ${prefix}/lib/ECW/redistributable/libstdc++/libNCSEcw.dylib \
+                        ${destroot}${prefix}/${f}
+                } 
+            }
+    }
+
 }
 
 livecheck.type  regex

Added: trunk/dports/gis/gdal/files/patch-configure-ecw-libcxx.diff
===================================================================
--- trunk/dports/gis/gdal/files/patch-configure-ecw-libcxx.diff	                        (rev 0)
+++ trunk/dports/gis/gdal/files/patch-configure-ecw-libcxx.diff	2014-06-19 17:19:48 UTC (rev 121188)
@@ -0,0 +1,28 @@
+--- configure.orig	2014-06-19 11:21:05.000000000 +0200
++++ configure	2014-06-19 11:22:50.000000000 +0200
+@@ -22477,8 +22477,8 @@
+   fi
+ else
+ 
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libNCSEcw.so or libecwj2" >&5
+-$as_echo_n "checking for libNCSEcw.so or libecwj2... " >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libNCSEcw.dylib or libecwj2" >&5
++$as_echo_n "checking for libNCSEcw.dylib or libecwj2... " >&6; }
+   ECW_SETTING=yes
+   if test -r $with_ecw/lib/libNCSCnet.so -o -r $with_ecw/lib/libNCSCnet.dylib ; then
+     ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
+@@ -22488,10 +22488,10 @@
+     ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCNet -lNCSUtil"
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/lib." >&5
+ $as_echo "found in $with_ecw/lib." >&6; }
+-  elif test -r $with_ecw/bin/libNCSEcw.so -o -r $with_ecw/bin/libNCSEcw.dylib ; then
+-    ECW_LIBS="-L$with_ecw/bin -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
+-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/bin." >&5
+-$as_echo "found in $with_ecw/bin." >&6; }
++  elif test -r $with_ecw/bin/libNCSEcw.so -o -r $with_ecw/redistributable/libc++/libNCSEcw.dylib ; then
++    ECW_LIBS="-L$with_ecw/redistributable/libc++ -lNCSEcw"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/redistributable/libc++." >&5
++$as_echo "found in $with_ecw/redistributable/libc++." >&6; }
+   elif test -r $with_ecw/lib/libecwj2.dylib ; then
+     ECW_LIBS="-L$with_ecw/lib -lecwj2 $CARBON_FRAMEWORK"
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found libecwj2 in $with_ecw/lib." >&5

Added: trunk/dports/gis/gdal/files/patch-configure-ecw-libstdcxx.diff
===================================================================
--- trunk/dports/gis/gdal/files/patch-configure-ecw-libstdcxx.diff	                        (rev 0)
+++ trunk/dports/gis/gdal/files/patch-configure-ecw-libstdcxx.diff	2014-06-19 17:19:48 UTC (rev 121188)
@@ -0,0 +1,28 @@
+--- configure.orig	2014-06-19 11:21:05.000000000 +0200
++++ configure	2014-06-19 11:22:50.000000000 +0200
+@@ -22477,8 +22477,8 @@
+   fi
+ else
+ 
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libNCSEcw.so or libecwj2" >&5
+-$as_echo_n "checking for libNCSEcw.so or libecwj2... " >&6; }
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libNCSEcw.dylib or libecwj2" >&5
++$as_echo_n "checking for libNCSEcw.dylib or libecwj2... " >&6; }
+   ECW_SETTING=yes
+   if test -r $with_ecw/lib/libNCSCnet.so -o -r $with_ecw/lib/libNCSCnet.dylib ; then
+     ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
+@@ -22488,10 +22488,10 @@
+     ECW_LIBS="-L$with_ecw/lib -lNCSEcw -lNCSEcwC -lNCSCNet -lNCSUtil"
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/lib." >&5
+ $as_echo "found in $with_ecw/lib." >&6; }
+-  elif test -r $with_ecw/bin/libNCSEcw.so -o -r $with_ecw/bin/libNCSEcw.dylib ; then
+-    ECW_LIBS="-L$with_ecw/bin -lNCSEcw -lNCSEcwC -lNCSCnet -lNCSUtil"
+-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/bin." >&5
+-$as_echo "found in $with_ecw/bin." >&6; }
++  elif test -r $with_ecw/bin/libNCSEcw.so -o -r $with_ecw/redistributable/libstdc++/libNCSEcw.dylib ; then
++    ECW_LIBS="-L$with_ecw/redistributable/libstdc++ -lNCSEcw"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $with_ecw/redistributable/libstdc++." >&5
++$as_echo "found in $with_ecw/redistributable/libstdc++." >&6; }
+   elif test -r $with_ecw/lib/libecwj2.dylib ; then
+     ECW_LIBS="-L$with_ecw/lib -lecwj2 $CARBON_FRAMEWORK"
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: found libecwj2 in $with_ecw/lib." >&5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140619/541941e7/attachment-0001.html>


More information about the macports-changes mailing list