[127794] trunk/dports/gis/gdal/Portfile

vince at macports.org vince at macports.org
Tue Nov 4 02:05:58 PST 2014


Revision: 127794
          https://trac.macports.org/changeset/127794
Author:   vince at macports.org
Date:     2014-11-04 02:05:58 -0800 (Tue, 04 Nov 2014)
Log Message:
-----------
Correct various bugs. Bump to revision 1.

Revision Links:
--------------
    https://trac.macports.org/changeset/1

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

Modified: trunk/dports/gis/gdal/Portfile
===================================================================
--- trunk/dports/gis/gdal/Portfile	2014-11-04 07:34:19 UTC (rev 127793)
+++ trunk/dports/gis/gdal/Portfile	2014-11-04 10:05:58 UTC (rev 127794)
@@ -5,6 +5,7 @@
 
 name                gdal
 version             1.11.1
+revision            1
 categories          gis
 license             MIT BSD
 platforms           darwin
@@ -104,22 +105,24 @@
 
 # local cpl_port.h is masked by ${prefix} one
 
-# Fix disabled: does not work for case-insensitive filesystems, see #45755
-# Issue regarding including the wrong header files version, needs other solution
-#
-#post-extract {
-#    file copy ${worksrcpath}/port/cpl_port.h ${worksrcpath}/port/Cpl_port.h
-#    set files_to_patch [exec find ${worksrcpath} -type f -exec grep -l "cpl_port.h" \{\} \;]
-#    foreach file ${files_to_patch} {
-#        puts ${file}
-#        reinplace -locale C "s|cpl_port.h|Cpl_port.h|" ${file}
-#    }
-#}
+post-extract {
+    file copy -force ${worksrcpath}/port/cpl_port.h ${worksrcpath}/port/lcpl_port.h
+    set files_to_patch [exec find ${worksrcpath} -type f -exec grep -l "cpl_port.h" \{\} \;]
+    foreach file ${files_to_patch} {
+        reinplace -locale C "s|cpl_port.h|lcpl_port.h|" ${file}
+    }
+}
 
-#post-build {
-#    file delete ${worksrcpath}/port/Cpl_port.h
-#}
+# Undo after build (otherwise the headers files installed are corrupt)
 
+post-build {
+    file delete ${worksrcpath}/port/lcpl_port.h
+    set files_to_patch [exec find ${worksrcpath} -name "*.h" -exec grep -l "lcpl_port.h" \{\} \;]
+    foreach file ${files_to_patch} {
+        reinplace -locale C "s|lcpl_port.h|cpl_port.h|" ${file}
+    }
+}
+
 # Patches for universal build
 post-configure {
     reinplace -E "s|(INST_PYMOD).*|\\1\t=\t${PYINST}|" \
@@ -344,7 +347,7 @@
     }
     
     reinplace -E "s|(GEOS_CFLAGS.*=).*|\\1|" ${worksrcpath}/GDALmake.opt
-    reinplace -E "s|^CPPFLAGS.*|CPPFLAGS = -I\$(GDAL_ROOT)/port -I/opt/local -I/opt/local/include|" ${worksrcpath}/GDALmake.opt
+    reinplace -E "s|^CPPFLAGS.*|CPPFLAGS = -I\$(GDAL_ROOT)/port -I${prefix} -I${prefix}/include|" ${worksrcpath}/GDALmake.opt
 }
 
 post-destroot {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141104/48ba4687/attachment.html>


More information about the macports-changes mailing list