[147625] trunk/dports/gis/gdal
mcalhoun at macports.org
mcalhoun at macports.org
Sun Apr 10 11:26:36 PDT 2016
Revision: 147625
https://trac.macports.org/changeset/147625
Author: mcalhoun at macports.org
Date: 2016-04-10 11:26:36 -0700 (Sun, 10 Apr 2016)
Log Message:
-----------
gdal: allow universal build
Modified Paths:
--------------
trunk/dports/gis/gdal/Portfile
Removed Paths:
-------------
trunk/dports/gis/gdal/files/config.h.ed
Modified: trunk/dports/gis/gdal/Portfile
===================================================================
--- trunk/dports/gis/gdal/Portfile 2016-04-10 17:41:57 UTC (rev 147624)
+++ trunk/dports/gis/gdal/Portfile 2016-04-10 18:26:36 UTC (rev 147625)
@@ -3,6 +3,7 @@
PortSystem 1.0
PortGroup mpi 1.0
+PortGroup muniversal 1.0
name gdal
version 2.0.2
@@ -111,19 +112,29 @@
patch-ogr_api_cpp.diff \
patch-nawk.diff
-# Patches for universal build
+
+pre-configure {
+ global worksrcpath_dirs
+ if { ![variant_isset universal] } {
+ set worksrcpath_dirs ${worksrcpath}
+ } else {
+ foreach arch ${universal_archs_to_use} {
+ lappend worksrcpath_dirs ${worksrcpath}-${arch}
+ }
+ }
+}
+
post-configure {
- reinplace -E "s|(INST_PYMOD).*|\\1\t=\t${PYINST}|" \
- ${worksrcpath}/GDALmake.opt
- if {[variant_isset universal]} {
- system "ed - ${worksrcpath}/port/cpl_config.h < ${filespath}/config.h.ed"
+ foreach w ${worksrcpath_dirs} {
+ reinplace -E "s|(INST_PYMOD).*|\\1\t=\t${PYINST}|" \
+ ${w}/GDALmake.opt
}
}
# Set target to none
build.target
-variant lzma conflicts universal \
+variant lzma \
description {Enable LZMA (7Z) compression support} {
depends_lib-append port:lzma
configure.args-delete --without-liblzma
@@ -283,7 +294,9 @@
configure.args-append --with-sqlite3=${prefix}
post-configure {
- reinplace -E "s|^LIBS(.*)\\\\$|LIBS\\1 -lsqlite3 \\\\|" ${worksrcpath}/GDALmake.opt
+ foreach w ${worksrcpath_dirs} {
+ reinplace -E "s|^LIBS(.*)\\\\$|LIBS\\1 -lsqlite3 \\\\|" ${w}/GDALmake.opt
+ }
}
}
@@ -336,13 +349,15 @@
# Postconfigure hack to avoid read ${include} .h files before
# GDAL own include directories
post-configure {
- set FRMT_PATH ${worksrcpath}/ogr/ogrsf_frmts
- foreach makefile [glob -dir $FRMT_PATH */GNUmakefile] {
- reinplace "s|\$\(EXPAT_INCLUDE\)||" $makefile
+ foreach w ${worksrcpath_dirs} {
+ set FRMT_PATH ${w}/ogr/ogrsf_frmts
+ foreach makefile [glob -dir $FRMT_PATH */GNUmakefile] {
+ reinplace "s|\$\(EXPAT_INCLUDE\)||" $makefile
+ }
+
+ reinplace -E "s|(GEOS_CFLAGS.*=).*|\\1|" ${w}/GDALmake.opt
+ reinplace -E "s|^CPPFLAGS.*|CPPFLAGS = -I\$(GDAL_ROOT)/port -I${prefix} -I${prefix}/include|" ${w}/GDALmake.opt
}
-
- reinplace -E "s|(GEOS_CFLAGS.*=).*|\\1|" ${worksrcpath}/GDALmake.opt
- reinplace -E "s|^CPPFLAGS.*|CPPFLAGS = -I\$(GDAL_ROOT)/port -I${prefix} -I${prefix}/include|" ${worksrcpath}/GDALmake.opt
}
post-destroot {
Deleted: trunk/dports/gis/gdal/files/config.h.ed
===================================================================
--- trunk/dports/gis/gdal/files/config.h.ed 2016-04-10 17:41:57 UTC (rev 147624)
+++ trunk/dports/gis/gdal/files/config.h.ed 2016-04-10 18:26:36 UTC (rev 147625)
@@ -1,22 +0,0 @@
-/#undef SIZEOF_LONG/c
-#ifdef __LP64__
-#define SIZEOF_LONG 8
-#else
-#define SIZEOF_LONG 4
-#endif
-.
-/#define SIZEOF_UNSIGNED_LONG/c
-#ifdef __LP64__
-#define SIZEOF_UNSIGNED_LONG 8
-#else
-#define SIZEOF_UNSIGNED_LONG 4
-#endif
-.
-/#define SIZEOF_VOIDP/c
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-.
-w
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160410/996ab741/attachment.html>
More information about the macports-changes
mailing list