Changeset 147625


Ignore:
Timestamp:
Apr 10, 2016, 6:26:36 PM (4 years ago)
Author:
mcalhoun@…
Message:

gdal: allow universal build

Location:
trunk/dports/gis/gdal
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/gis/gdal/Portfile

    r147624 r147625  
    44PortSystem          1.0
    55PortGroup           mpi 1.0
     6PortGroup           muniversal 1.0
    67
    78name                gdal
     
    112113                    patch-nawk.diff
    113114
    114 # Patches for universal build
     115
     116pre-configure {
     117    global worksrcpath_dirs
     118    if { ![variant_isset universal] } {
     119        set worksrcpath_dirs ${worksrcpath}
     120    } else {
     121        foreach arch ${universal_archs_to_use} {
     122            lappend worksrcpath_dirs ${worksrcpath}-${arch}
     123        }
     124    }
     125}
     126
    115127post-configure {
    116     reinplace -E "s|(INST_PYMOD).*|\\1\t=\t${PYINST}|" \
    117         ${worksrcpath}/GDALmake.opt
    118     if {[variant_isset universal]} {
    119         system "ed - ${worksrcpath}/port/cpl_config.h < ${filespath}/config.h.ed"
     128    foreach w ${worksrcpath_dirs} {
     129        reinplace -E "s|(INST_PYMOD).*|\\1\t=\t${PYINST}|" \
     130            ${w}/GDALmake.opt
    120131    }
    121132}
     
    124135build.target
    125136
    126 variant lzma conflicts universal \
     137variant lzma \
    127138    description {Enable LZMA (7Z) compression support} {
    128139    depends_lib-append      port:lzma
     
    284295
    285296    post-configure {
    286         reinplace -E "s|^LIBS(.*)\\\\$|LIBS\\1 -lsqlite3 \\\\|" ${worksrcpath}/GDALmake.opt
     297        foreach w ${worksrcpath_dirs} {
     298            reinplace -E "s|^LIBS(.*)\\\\$|LIBS\\1 -lsqlite3 \\\\|" ${w}/GDALmake.opt
     299        }
    287300    }
    288301}
     
    337350# GDAL own include directories
    338351post-configure {
    339     set FRMT_PATH ${worksrcpath}/ogr/ogrsf_frmts
    340     foreach makefile [glob -dir $FRMT_PATH */GNUmakefile] {
    341         reinplace "s|\$\(EXPAT_INCLUDE\)||" $makefile
    342     }
    343 
    344     reinplace -E "s|(GEOS_CFLAGS.*=).*|\\1|" ${worksrcpath}/GDALmake.opt
    345     reinplace -E "s|^CPPFLAGS.*|CPPFLAGS = -I\$(GDAL_ROOT)/port -I${prefix} -I${prefix}/include|" ${worksrcpath}/GDALmake.opt
     352    foreach w ${worksrcpath_dirs} {
     353        set FRMT_PATH ${w}/ogr/ogrsf_frmts
     354        foreach makefile [glob -dir $FRMT_PATH */GNUmakefile] {
     355            reinplace "s|\$\(EXPAT_INCLUDE\)||" $makefile
     356        }
     357
     358        reinplace -E "s|(GEOS_CFLAGS.*=).*|\\1|" ${w}/GDALmake.opt
     359        reinplace -E "s|^CPPFLAGS.*|CPPFLAGS = -I\$(GDAL_ROOT)/port -I${prefix} -I${prefix}/include|" ${w}/GDALmake.opt
     360    }
    346361}
    347362
Note: See TracChangeset for help on using the changeset viewer.