[MacPorts] #42203: grass: allow building without GUI

MacPorts noreply at macports.org
Mon Jan 20 07:02:34 PST 2014


#42203: grass: allow building without GUI
--------------------------+--------------------------------
  Reporter:  mojca@…      |      Owner:  macports-tickets@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:  grass        |
--------------------------+--------------------------------

Comment (by mojca@…):

 Vincent's proposal was to use the variant `+console`:
 {{{
 variant console conflicts wxwidgets30 wxwidgets28 wxgtk28 python27
 python26 description {Buils command mode only} {

     configure.args-delete   --with-motif \
                             --with-motif-includes=${prefix}/include \
                             --with-motif-libs=${prefix}/lib
     configure.args-delete   --with-tcltk-includes=${prefix}/include \
                             --with-tcltk-libs=${prefix}/lib
     depends_lib-delete      port:mesa \
                             lib:libXm:openmotif \
                             port:tk

     configure.args-append   --without-motif \
                             --without-tcltk \
                             --without-wxwidgets \
                             --without-python \
                             --without-opengl

     post-patch {
         reinplace -E "s/gui//" ${worksrcpath}/Makefile
     }
 }
 }}}

 and then change:
 {{{
 if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] &&
 ![variant_isset wxgtk28]} {
     default_variants-append +wxgtk28
 }
 }}}
 into:
 {{{
 if {![variant_isset python26] && ![variant_isset python27] &&
 ![variant_isset console]} {
     if {[variant_isset wxgtk28]} {
         default_variants-append +python26
     } else {
         default_variants-append +python27
     }
 }
 }}}

 For some reason having the variant called `+gui` to do the opposite seems
 more logical to me, but it might be more weird to implement it in the
 `Portfile`.

 I would also like to understand how not having any Python support
 influences grass. (I had an impression that Python is used even if it is
 disabled: http://trac.osgeo.org/grass/ticket/1758.)

-- 
Ticket URL: <https://trac.macports.org/ticket/42203#comment:1>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list