# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2 # $Id$ PortSystem 1.0 PortGroup wxWidgets 1.0 PortGroup active_variants 1.1 name grass version 6.4.3 revision 5 epoch 1 maintainers nomaintainer categories gis license GPL-2+ platforms darwin description GRASS long_description GRASS is a Geographic Information System (GIS) used for \ geospatial data management and analysis. homepage http://grass.osgeo.org/ master_sites ${homepage}grass[join [lrange [split ${version} .] 0 1] {}]/source/ checksums rmd160 bdbd671972730701aa8213c2041abe31a68eea4c \ sha256 5d29d322a262330894aa046845e6790258cd6e3f95b28c350ed7839810672ed6 depends_build port:pkgconfig depends_lib port:fftw-3 \ port:freetype \ port:gdal \ port:geos \ port:jpeg \ port:libpng \ port:mesa \ lib:libXm:openmotif \ port:proj47 \ port:tk \ path:lib/pkgconfig/cairo.pc:cairo \ port:readline # https://trac.macports.org/ticket/32790 # this should probably only apply to some Xcode versions # compiler.blacklist *clang* patchfiles patch-configure.diff \ patch-gui-wxpython-core-globalvar.py.diff \ patch-gui-wxpython-gui_core-ghelp.py.diff \ patch-is_void.diff \ patch-lib-init-grass.src.diff \ patch-macosx_Makefile.diff \ patch-Makefile.diff \ patch-ffmpeg.diff post-patch { reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|" ${worksrcpath}/configure # http://trac.osgeo.org/grass/ticket/2169 reinplace "s|CC=gcc|CC=${configure.cc}|" ${worksrcpath}/gem/Makefile } # List of all python scripts. Used later to ensure usage of python26/python27 # (insteaf of the currently active python) # Work around bug http://trac.osgeo.org/grass/ticket/1758 set python_scripts [ list \ doc/python/m.distance.py \ doc/python/raster_example_ctypes.py \ doc/python/vector_example_ctypes.py \ general/g.parser/test.py \ gui/scripts/d.rast3d.py \ gui/scripts/g.change.gui.py \ gui/scripts/g.extension.py \ gui/scripts/g.extension.rebuild.all.py \ gui/scripts/v.type_wrapper.py \ gui/wxpython/compat/__init__.py \ gui/wxpython/compat/subprocess.py \ gui/wxpython/core/debug.py \ gui/wxpython/core/gcmd.py \ gui/wxpython/core/globalvar.py \ gui/wxpython/core/menudata.py \ gui/wxpython/core/render.py \ gui/wxpython/core/settings.py \ gui/wxpython/core/units.py \ gui/wxpython/core/utils.py \ gui/wxpython/core/workspace.py \ gui/wxpython/create__init__.py \ gui/wxpython/dbmgr/dialogs.py \ gui/wxpython/dbmgr/manager.py \ gui/wxpython/dbmgr/sqlbuilder.py \ gui/wxpython/dbmgr/vinfo.py \ gui/wxpython/gcp/manager.py \ gui/wxpython/gcp/mapdisplay.py \ gui/wxpython/gcp/toolbars.py \ gui/wxpython/gis_set.py \ gui/wxpython/gmodeler/dialogs.py \ gui/wxpython/gmodeler/frame.py \ gui/wxpython/gmodeler/menudata.py \ gui/wxpython/gmodeler/model.py \ gui/wxpython/gmodeler/preferences.py \ gui/wxpython/gmodeler/toolbars.py \ gui/wxpython/gui_core/dialogs.py \ gui/wxpython/gui_core/forms.py \ gui/wxpython/gui_core/ghelp.py \ gui/wxpython/gui_core/goutput.py \ gui/wxpython/gui_core/gselect.py \ gui/wxpython/gui_core/mapdisp.py \ gui/wxpython/gui_core/mapwindow.py \ gui/wxpython/gui_core/menu.py \ gui/wxpython/gui_core/preferences.py \ gui/wxpython/gui_core/prompt.py \ gui/wxpython/gui_core/toolbars.py \ gui/wxpython/gui_core/widgets.py \ gui/wxpython/icons/__init__.py \ gui/wxpython/icons/grass2_icons.py \ gui/wxpython/icons/grass_icons.py \ gui/wxpython/icons/icon.py \ gui/wxpython/icons/silk_icons.py \ gui/wxpython/lmgr/frame.py \ gui/wxpython/lmgr/layertree.py \ gui/wxpython/lmgr/menudata.py \ gui/wxpython/lmgr/pyshell.py \ gui/wxpython/lmgr/toolbars.py \ gui/wxpython/location_wizard/base.py \ gui/wxpython/location_wizard/dialogs.py \ gui/wxpython/location_wizard/wizard.py \ gui/wxpython/mapdisp/frame.py \ gui/wxpython/mapdisp/gprint.py \ gui/wxpython/mapdisp/main.py \ gui/wxpython/mapdisp/mapwindow.py \ gui/wxpython/mapdisp/overlays.py \ gui/wxpython/mapdisp/statusbar.py \ gui/wxpython/mapdisp/toolbars.py \ gui/wxpython/modules/colorrules.py \ gui/wxpython/modules/extensions.py \ gui/wxpython/modules/histogram.py \ gui/wxpython/modules/mcalc_builder.py \ gui/wxpython/modules/ogc_services.py \ gui/wxpython/modules/vclean.py \ gui/wxpython/nviz/animation.py \ gui/wxpython/nviz/main.py \ gui/wxpython/nviz/mapwindow.py \ gui/wxpython/nviz/preferences.py \ gui/wxpython/nviz/tools.py \ gui/wxpython/nviz/workspace.py \ gui/wxpython/nviz/wxnviz.py \ gui/wxpython/psmap/dialogs.py \ gui/wxpython/psmap/frame.py \ gui/wxpython/psmap/instructions.py \ gui/wxpython/psmap/menudata.py \ gui/wxpython/psmap/toolbars.py \ gui/wxpython/psmap/utils.py \ gui/wxpython/scripts/p.cmd.py \ gui/wxpython/scripts/p.db.py \ gui/wxpython/scripts/p.mon.py \ gui/wxpython/scripts/p.rast.py \ gui/wxpython/scripts/p.vect.py \ gui/wxpython/scripts/vkrige.py \ gui/wxpython/tools/update_menudata.py \ gui/wxpython/vdigit/dialogs.py \ gui/wxpython/vdigit/main.py \ gui/wxpython/vdigit/mapwindow.py \ gui/wxpython/vdigit/preferences.py \ gui/wxpython/vdigit/toolbars.py \ gui/wxpython/vdigit/wxdigit.py \ gui/wxpython/vdigit/wxdisplay.py \ gui/wxpython/wxgui.py \ gui/wxpython/wxplot/base.py \ gui/wxpython/wxplot/dialogs.py \ gui/wxpython/wxplot/profile.py \ imagery/i.atcorr/create_iwave.py \ lib/python/__init__.py \ lib/python/array.py \ lib/python/core.py \ lib/python/ctypes/__init__.py \ lib/python/ctypes/ctypesgen.py \ lib/python/ctypes/ctypesgencore/__init__.py \ lib/python/ctypes/ctypesgencore/ctypedescs.py \ lib/python/ctypes/ctypesgencore/descriptions.py \ lib/python/ctypes/ctypesgencore/expressions.py \ lib/python/ctypes/ctypesgencore/libraryloader.py \ lib/python/ctypes/ctypesgencore/messages.py \ lib/python/ctypes/ctypesgencore/options.py \ lib/python/ctypes/ctypesgencore/parser/__init__.py \ lib/python/ctypes/ctypesgencore/parser/cdeclarations.py \ lib/python/ctypes/ctypesgencore/parser/cgrammar.py \ lib/python/ctypes/ctypesgencore/parser/cparser.py \ lib/python/ctypes/ctypesgencore/parser/ctypesparser.py \ lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py \ lib/python/ctypes/ctypesgencore/parser/lex.py \ lib/python/ctypes/ctypesgencore/parser/lextab.py \ lib/python/ctypes/ctypesgencore/parser/parsetab.py \ lib/python/ctypes/ctypesgencore/parser/pplexer.py \ lib/python/ctypes/ctypesgencore/parser/preprocessor.py \ lib/python/ctypes/ctypesgencore/parser/yacc.py \ lib/python/ctypes/ctypesgencore/printer/__init__.py \ lib/python/ctypes/ctypesgencore/printer/defaultheader.py \ lib/python/ctypes/ctypesgencore/printer/preamble.py \ lib/python/ctypes/ctypesgencore/printer/printer.py \ lib/python/ctypes/ctypesgencore/printer/test.py \ lib/python/ctypes/ctypesgencore/processor/__init__.py \ lib/python/ctypes/ctypesgencore/processor/dependencies.py \ lib/python/ctypes/ctypesgencore/processor/operations.py \ lib/python/ctypes/ctypesgencore/processor/pipeline.py \ lib/python/ctypes/loader.py \ lib/python/ctypes/preamble.py \ lib/python/db.py \ lib/python/grass__init__.py \ lib/python/raster.py \ lib/python/task.py \ lib/python/vector.py ] configure.ldflags-append -framework OpenGL -framework Accelerate configure.args \ --with-fftw-includes=${prefix}/include \ --with-fftw-libs=${prefix}/lib \ --with-freetype \ --with-freetype-includes=${prefix}/include/freetype2 \ --with-freetype-libs=${prefix}/lib \ --with-gdal=${prefix}/bin/gdal-config \ --with-jpeg-includes=${prefix}/include \ --with-jpeg-libs=${prefix}/lib \ --with-motif \ --with-motif-includes=${prefix}/include \ --with-motif-libs=${prefix}/lib \ --with-png-includes=${prefix}/include \ --with-png-libs=${prefix}/lib \ --with-proj-includes=${prefix}/lib/proj47/include \ --with-proj-libs=${prefix}/lib/proj47/lib \ --with-proj-share=${prefix}/lib/proj47/share/proj \ --with-tcltk-includes=${prefix}/include \ --with-tcltk-libs=${prefix}/lib \ --with-cxx \ --with-x \ --without-postgres \ --enable-largefile \ --with-cairo \ --with-cairo-includes=${prefix}/include/cairo \ --with-cairo-libs=${prefix}/lib \ --with-blas \ --with-lapack \ --with-readline \ --with-readline-includes=${prefix}/include/readline \ --with-readline-libs=${prefix}/lib \ --with-regex-includes=/usr/include \ --with-regex-lib=/usr/lib build.target default variant mysql5 description {Add MySQL 5 support} { depends_lib-append path:bin/mysql_config5:mysql5 configure.args-append --with-mysql configure.args-append --with-mysql-includes=${prefix}/include/mysql5/mysql configure.args-append --with-mysql-libs=${prefix}/lib/mysql5/mysql configure.env-append MYSQLD_CONFIG=${prefix}/lib/mysql5/bin/mysql_config } variant postgresql83 conflicts postgresql84 postgresql90 postgresql91 postgresql92 postgresql93 description {Add PostgreSQL 8.3 support} { depends_lib-append port:postgresql83 configure.args-delete --without-postgres configure.args-append --with-postgres configure.args-append --with-postgres-includes=${prefix}/include/postgresql83 configure.args-append --with-postgres-libs=${prefix}/lib/postgresql83 } variant postgresql84 conflicts postgresql83 postgresql90 postgresql91 postgresql92 postgresql93 description {Add PostgreSQL 8.4 support} { depends_lib-append port:postgresql84 configure.args-delete --without-postgres configure.args-append --with-postgres configure.args-append --with-postgres-includes=${prefix}/include/postgresql84 configure.args-append --with-postgres-libs=${prefix}/lib/postgresql84 } variant postgresql90 conflicts postgresql83 postgresql84 postgresql91 postgresql92 postgresql93 description {Add PostgreSQL 9.0 support} { depends_lib-append port:postgresql90 configure.args-delete --without-postgres configure.args-append --with-postgres configure.args-append --with-postgres-includes=${prefix}/include/postgresql90 configure.args-append --with-postgres-libs=${prefix}/lib/postgresql90 } variant postgresql91 conflicts postgresql83 postgresql84 postgresql90 postgresql92 postgresql93 description {Add PostgreSQL 9.1 support} { depends_lib-append port:postgresql91 configure.args-delete --without-postgres configure.args-append --with-postgres configure.args-append --with-postgres-includes=${prefix}/include/postgresql91 configure.args-append --with-postgres-libs=${prefix}/lib/postgresql91 } variant postgresql92 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql93 description {Add PostgreSQL 9.2 support} { depends_lib-append port:postgresql92 configure.args-delete --without-postgres configure.args-append --with-postgres configure.args-append --with-postgres-includes=${prefix}/include/postgresql92 configure.args-append --with-postgres-libs=${prefix}/lib/postgresql92 } variant postgresql93 conflicts postgresql83 postgresql84 postgresql90 postgresql91 postgresql92 description {Add PostgreSQL 9.3 support} { depends_lib-append port:postgresql93 configure.args-delete --without-postgres configure.args-append --with-postgres configure.args-append --with-postgres-includes=${prefix}/include/postgresql93 configure.args-append --with-postgres-libs=${prefix}/lib/postgresql93 } variant sqlite3 description {Add SQLite 3 support} { depends_lib-append port:sqlite3 configure.args-append --with-sqlite configure.args-append --with-sqlite-includes=${prefix}/include configure.args-append --with-sqlite-libs=${prefix}/lib } variant ffmpeg description {Add ffmpeg support} { depends_lib-append path:lib/libavcodec.dylib:ffmpeg configure.args-append --with-ffmpeg \ --with-ffmpeg-includes=\"${prefix}/include/libavcodec \ ${prefix}/include/libavformat \ ${prefix}/include/libswscale\" \ --with-ffmpeglibs=${prefix}/lib } # python26 variant is only present to allow 'grass +wxgtk28' to coexist with py27-wxpython-3.0 # once support for wxWidgets 3.0 is complete, support for Python 2.6 may be removed variant python26 conflicts python27 description {} { depends_lib-append port:python26 set python_bin ${frameworks_dir}/Python.framework/Versions/2.6/bin/python2.6 # Enable support for wxGUI Python extensions # (by removing this we wouldn't need to depend on py-wxpython-x.y) configure.args-append --with-python=${frameworks_dir}/Python.framework/Versions/2.6/bin/python2.6-config build.args-append PYTHON=${python_bin} # TODO: this port doesn't work with the python portgroup because the group changes too much # but it would make sense to fix this in such a way that python_bin could be determined automatically post-patch { # for some reason it fails if python_bin is not defined inside post-patch (figure out why) set python_bin ${frameworks_dir}/Python.framework/Versions/2.6/bin/python2.6 reinplace "s|@@PYTHON@@|${python_bin}|" ${worksrcpath}/lib/init/grass.src foreach f $python_scripts { reinplace "s|/usr/bin/env python|${python_bin}|" $f } } } variant python27 conflicts python26 description {} { depends_lib-append port:python27 set python_bin ${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 configure.args-append --with-python=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7-config build.args-append PYTHON=${python_bin} post-patch { set python_bin ${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 reinplace "s|@@PYTHON@@|${python_bin}|" ${worksrcpath}/lib/init/grass.src foreach f $python_scripts { reinplace "s|/usr/bin/env python|${python_bin}|" $f } } } # TODO: in principle wxWidgets is optional and could be disable with # --disable-wxwidgets if there is demand for that # grass 4.6.3 is not compatible with wxWidgets 3.0 yet variant wxwidgets30 conflicts wxwidgets28 wxgtk28 description {Use Cocoa-based wxWidgets 3.0 (experimental)} { wxWidgets.use wxPython-3.0 depends_lib-append port:${wxWidgets.port} configure.args-append --with-wxwidgets=${wxWidgets.wxconfig} } variant wxwidgets28 conflicts wxwidgets30 wxgtk28 description {Use Carbon-based wxWidgets 2.8} { # untested (might not work) wxWidgets.use wxWidgets-2.8 depends_lib-append port:${wxWidgets.port} configure.args-append --with-wxwidgets=${wxWidgets.wxconfig} } variant wxgtk28 conflicts wxwidgets30 wxwidgets28 description {Use GTK-based wxWidgets 2.8} { wxWidgets.use wxGTK-2.8 depends_lib-append port:${wxWidgets.port} configure.args-append --with-wxwidgets=${wxWidgets.wxconfig} } if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] && ![variant_isset wxgtk28]} { default_variants-append +wxgtk28 } if {![variant_isset python26] && ![variant_isset python27]} { if {[variant_isset wxgtk28] || [variant_isset wxwidgets28]} { default_variants-append +python26 } else { default_variants-append +python27 } } # TODO: if py27-wxpython-3.0 is installed, grass +wxgtk28 cannot be installed with +python27 # we could remove this limitation by disabling wxpython support altogether # (in case there is demand for it) # TODO: the code below is ugly; any suggestions for improving it are welcome if {[variant_isset wxwidgets30]} { if {[variant_isset python26]} { depends_lib-append port:py26-wxpython-3.0 } elseif {[variant_isset python27]} { depends_lib-append port:py27-wxpython-3.0 } } else { if {[variant_isset python26]} { depends_lib-append port:py26-wxpython-2.8 if {[variant_isset wxwidgets28]} { require_active_variants py26-wxpython-2.8 carbon gtk } else { require_active_variants py26-wxpython-2.8 gtk carbon } } elseif {[variant_isset python27]} { depends_lib-append port:py27-wxpython-2.8 if {[variant_isset wxwidgets28]} { require_active_variants py27-wxpython-2.8 carbon gtk } else { require_active_variants py27-wxpython-2.8 gtk carbon } } } livecheck.type regex livecheck.url http://grass.osgeo.org/download/software/sources/ livecheck.regex grass-(\[0-9.\]+)${extract.suffix}