Opened 7 years ago

Last modified 7 years ago

#42203 new enhancement

grass: allow building without GUI

Reported by: mojca (Mojca Miklavec) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Veence (Vincent), cooljeanius (Eric Gallager), petrrr, dbevans (David B. Evans), manuel.deljesuspe@…
Port: grass

Description

I'm opening this ticket for a request by vince to support building grass without GUI tools (see #40315):

I think it would be nice to have an option to build without the GUI. Grass functions can now be used inside QGis through the Sextant extension. Typically, since I have QGis installed, I don't care about Grass UI, but I'm still interested in using the various algorithms the software provides.

Change History (2)

comment:1 Changed 7 years ago by mojca (Mojca Miklavec)

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.)

comment:2 in reply to:  1 Changed 7 years ago by mojca (Mojca Miklavec)

From IRC (neverpanic):

if it always contains the console functionality, I'd use +gui If it switches between console and gui functionality, separate subports seems more like the way to go

Note: See TracTickets for help on using tickets.