Skip to content
Permalink
Browse files
Changed some grass modules to work with grass 6.4 and guarantee the c…
…ompatibility with previous versions. Fixed #1629.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10903 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rugginoso committed Jun 11, 2009
1 parent 460c9cd commit 23ae11e
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 8 deletions.
@@ -66,7 +66,15 @@ ENDIF (WITH_GRASS)

IF (GRASS_FOUND)
FILE(READ ${GRASS_INCLUDE_DIR}/grass/version.h VERSIONFILE)
# We can avoid the following block using version_less version_equal and
# version_greater. Are there compatibility problems?
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[^ ]+" GRASS_VERSION ${VERSIONFILE})
STRING(REGEX REPLACE "^([0-9]*)\\.[0-9]*\\..*$" "\\1" GRASS_MAJOR_VERSION ${GRASS_VERSION})
STRING(REGEX REPLACE "^[0-9]*\\.([0-9]*)\\..*$" "\\1" GRASS_MINOR_VERSION ${GRASS_VERSION})
STRING(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.(.*)$" "\\1" GRASS_MICRO_VERSION ${GRASS_VERSION})
# Add micro version too?
# How to numerize RC versions?
MATH( EXPR GRASS_NUM_VERSION "${GRASS_MAJOR_VERSION}*10000 + ${GRASS_MINOR_VERSION}*100")

IF (NOT GRASS_FIND_QUIETLY)
MESSAGE(STATUS "Found GRASS: ${GRASS_PREFIX} (${GRASS_VERSION})")
@@ -1,5 +1,5 @@

SUBDIRS(config modules scripts themes)
SUBDIRS(config modules modules-old scripts themes)

ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
@@ -0,0 +1,6 @@
IF ( GRASS_NUM_VERSION LESS 60400 )
FILE (GLOB MODULE_FILES *.qgm *.svg *.png)
INSTALL (FILES ${MODULE_FILES}
DESTINATION ${QGIS_DATA_DIR}/grass/modules)
ENDIF ( GRASS_NUM_VERSION LESS 60400 )

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Create fractal surface of given fractal dimension" module="r.surf.fractal">
<option key="d" />
<option key="n" />
<option key="out" />
</qgisgrassmodule>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Vector buffer" module="v.buffer">
<option key="input" typeoption="type" layeroption="layer" />
<option key="buffer"/>
<option key="output" />
</qgisgrassmodule>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Display vector attributes" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Display vector map attributes with SQL" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<option key="where" />
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Put geometry variables in database" module="v.to.db">
<option key="map" layeroption="layer"/>
<option key="option"/>
<option key="units"/>
<field key="column" layer="map" type="integer,double" label="Attribute field" />
</qgisgrassmodule>
@@ -2,7 +2,7 @@
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Create fractal surface of given fractal dimension" module="r.surf.fractal">
<option key="d" />
<option key="n" />
<option key="out" />
<option key="dimension" />
<option key="number" />
<option key="output" />
</qgisgrassmodule>
@@ -3,6 +3,6 @@

<qgisgrassmodule label="Vector buffer" module="v.buffer">
<option key="input" typeoption="type" layeroption="layer" />
<option key="buffer"/>
<option key="distance"/>
<option key="output" />
</qgisgrassmodule>
@@ -3,6 +3,6 @@

<qgisgrassmodule label="Display vector attributes" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<field key="columns" layer="map" type="integer,double,varchar"/>
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
@@ -3,7 +3,7 @@

<qgisgrassmodule label="Display vector map attributes with SQL" module="v.db.select">
<option key="map" layeroption="layer" />
<field key="column" layer="map" type="integer,double,varchar"/>
<field key="columns" layer="map" type="integer,double,varchar"/>
<option key="where" />
<option key="fs" answer="|" hidden="yes" />
</qgisgrassmodule>
@@ -5,5 +5,5 @@
<option key="map" layeroption="layer"/>
<option key="option"/>
<option key="units"/>
<field key="column" layer="map" type="integer,double" label="Attribute field" />
<field key="columns" layer="map" type="integer,double" label="Attribute field" />
</qgisgrassmodule>

0 comments on commit 23ae11e

Please sign in to comment.